Skip to content

[rtl,doc] Align IIR Rx timeout interrupt behaviour with 16550 spec - #13

Open
raylau1 wants to merge 2 commits into
mainfrom
fix-rx-timeout-intr
Open

raylau1 wants to merge 2 commits into
mainfrom
fix-rx-timeout-intr

Conversation

@raylau1

@raylau1 raylau1 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #12 (merged) to be merged first, only the last commit is new.

Closes #9.

@raylau1 raylau1 self-assigned this Nov 16, 2026
@raylau1
raylau1 force-pushed the fix-rx-timeout-intr branch from 228beb2 to c95bf72 Compare November 17, 2026 11:25
@raylau1

raylau1 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@marnovandermaas Please check the RTL and also skim the docs change.

@martin-velay Please check if the IIR behaviour change in the docs works for you.

@marnovandermaas marnovandermaas 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.

Some initial comments from me. Also god to update the README on the rx_timeout behaviour.

Comment thread hw/ip/uart16550/rtl/uart16550_init.sv Resolved
Comment thread hw/ip/uart16550/rtl/uart16550_init.sv Outdated
//////////

// State register
prim_sparse_fsm_flop #(

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.

Do we need to set EnableAlertTriggerSVA to zero?

@raylau1 raylau1 Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No AFAIK, I've added a commit which changes this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

On second thought this requires the new FSM to trigger an alert when there is an invalid FSM state, and also a mechanism to "or" together this with the alert from the OT UART core. Perhaps enabling alert is better left for a future PR. WDYT?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Without it AssertConnected_A fails at 1 ps in Xcelium and VCS. The pre_dv TB passes only because Verilator uses the dummy assertion macros.

@raylau1
raylau1 force-pushed the fix-rx-timeout-intr branch 2 times, most recently from b53107f to 9afeeba Compare November 23, 2026 11:48

@martin-velay martin-velay left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good overall thanks

Another comment: README.md still lists rx_timeout as an always-inactive interrupt output.

Comment thread hw/ip/uart16550/rtl/uart16550_init.sv Resolved
Comment thread hw/ip/uart16550/rtl/uart16550.sv Resolved
@raylau1
raylau1 force-pushed the fix-rx-timeout-intr branch 4 times, most recently from 604793d to 3f8aef7 Compare November 26, 2026 17:21
Signed-off-by: Ray Lau <ray.lau@lowrisc.org>
@raylau1
raylau1 force-pushed the fix-rx-timeout-intr branch 2 times, most recently from c7186da to 8109a3c Compare November 27, 2026 12:00
- RBR read now clears any pending character timeout interrupt
- Enabling ERBFI enables rx_timeout interrupt in the OT UART core
- IIR[3] is asserted only when the character tiemout interrupt is active
  and there is no other higher priority interrupt
- Resetting the RCVR FIFO clears any pending character timeout interrupt
- When changing the parity enable in LCR, the timeout bit time duration of
  the OT UART core is automatically updated to reflect 4 character times

Signed-off-by: Ray Lau <ray.lau@lowrisc.org>
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.

[rtl] Align IIR Rx timeout interrupt behaviour with 16550 spec

3 participants