Skip to content

Add optional 60us HDR error recovery timer (I3C spec 5.1.10.1.9) and fix te2 error data in rx data fifo - #134

Merged
clayton8 merged 3 commits into
chipsalliance:v1p5from
clayton8:v1p5-te0-te1-timer
Feb 13, 2026
Merged

clayton8 merged 3 commits into
chipsalliance:v1p5from
clayton8:v1p5-te0-te1-timer

Conversation

@clayton8

@clayton8 clayton8 commented Feb 11, 2026 •

Copy link
Copy Markdown
Collaborator

Implement the optional recovery method for TE0/TE1 errors: if both SCL and SDA stay High for a configurable period (default 60us) while in HDR mode due to a TE0/TE1 error, the target exits HDR and returns to Idle. And fix te2 parity error byte getting pushed into the RX FIFO

RTL changes:

  • Add CSR registers: HDR_TIMEOUT_EN_REG (enable) and T_HDR_TIMEOUT_REG (threshold in clock cycles) in soc_management_interface.rdl
  • Add in_hdr_err_mode register in ccc.sv to distinguish error-induced HDR mode from CCC-commanded ENTHDR (timer only fires for errors)
  • Add 20-bit timeout counter in i3c_bus_monitor.sv, combined into existing hdr_exit_detect_o signal (no downstream FSM changes needed)
  • Thread new signals through configuration, controller, and standby hierarchy
  • Update CAP_LENGTH from 0x18 to 0x1A for the two new registers
  • Add te2_err_priv_wr to rx_fifo_wvalid in i3c_target_fsm to block parity byte from getting pushed onto the RX DATA FIFO since parity_err is 1 cycle delayed

Verification:

  • Add send_te0_error() and send_te1_error() to I3cControllerFixed
  • Add 7 cocotb tests covering: TE0 recovery, TE1 recovery, no false trigger on CCC-entered HDR, timer reset on line toggle, disabled by default, configurable threshold, HDR exit pattern coexistence
  • Refactor test_enter_exit_hdr_mode.py with shared constants, helpers, and clear section organization

@clayton8 clayton8 changed the title Add optional 60us HDR error recovery timer (I3C spec 5.1.10.1.9) Add optional 60us HDR error recovery timer (I3C spec 5.1.10.1.9) and fix te2 error data in rx data fifo Feb 12, 2026

@mkj121 mkj121 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good but for completeness tools/timing/timing.py should also be updated to calculate the new 60us period

Clayton Kuchta added 2 commits February 12, 2026 10:03
Implement the optional recovery method for TE0/TE1 errors: if both SCL
and SDA stay High for a configurable period (default 60us) while in HDR
mode due to a TE0/TE1 error, the target exits HDR and returns to Idle.

RTL changes:
- Add CSR registers: HDR_TIMEOUT_EN_REG (enable) and T_HDR_TIMEOUT_REG
  (threshold in clock cycles) in soc_management_interface.rdl
- Add in_hdr_err_mode register in ccc.sv to distinguish error-induced
  HDR mode from CCC-commanded ENTHDR (timer only fires for errors)
- Add 20-bit timeout counter in i3c_bus_monitor.sv, combined into
  existing hdr_exit_detect_o signal (no downstream FSM changes needed)
- Thread new signals through configuration, controller, and standby
  hierarchy
- Update CAP_LENGTH from 0x18 to 0x1A for the two new registers

Verification:
- Add send_te0_error() and send_te1_error() to I3cControllerFixed
- Add 7 cocotb tests covering: TE0 recovery, TE1 recovery, no false
  trigger on CCC-entered HDR, timer reset on line toggle, disabled by
  default, configurable threshold, HDR exit pattern coexistence
- Refactor test_enter_exit_hdr_mode.py with shared constants, helpers,
  and clear section organization
Add te2_err_priv_wr (combinational) to rx_fifo_wvalid gate alongside
the registered parity_err. Previously the 1-cycle latency of parity_err
allowed the corrupted byte to enter the FIFO before the gate activated.

ai3ct_error_type_s2 CTS test will pass with this change.
@clayton8
clayton8 merged commit 0327f23 into chipsalliance:v1p5 Feb 13, 2026
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants