Skip to content

[rtl,CHERIoT] Properly track outstanding memory transactions assertions - #2502

Open
SamuelRiedel wants to merge 2 commits into
lowRISC:masterfrom
SamuelRiedel:cheriot/outstanding-mem
Open

SamuelRiedel wants to merge 2 commits into
lowRISC:masterfrom
SamuelRiedel:cheriot/outstanding-mem

Conversation

@SamuelRiedel

Copy link
Copy Markdown
Contributor

CHERIoT uses its own LSU request signals which were missing from some assertions tracking different LSU properties. This aligns the CHERIoT capability load/stores, which are two memory transactions, with the unaligned load/stores, which do the same. Simultaneously, we also fix a few edgecases, where the NoMemResponseWithoutPendingAccess could give false positives.

The CHERIoT clc/csc where not properly taken into account in this
assertion, leading to false positives.

Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
- Ensure a CHERIoT LSU request is mutually exclusive with other
  multicycle signals
- Ensure the LSU doesn't issue any CHERIoT requests while the ID stage
  is stalled

Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
Comment thread rtl/ibex_core.sv

// lsu_busy covers all non-IDLE states, but in WAIT_GNT the second grant hasn't been issued yet
// so no outstandng response can arrive there.
assign lsu_expecting_resp = lsu_busy & (load_store_unit_i.ls_fsm_cs != WAIT_GNT);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lsu_expecting_resp is declared/assigned outside if (WritebackStage) but only ever read inside it. WritebackStage defaults to 0, so this looks like it'll be an unused-signal lint warning in that config unless CI only lints WritebackStage=1. Might want to move the declaration/assign inside the if (WritebackStage) block.

Comment thread rtl/ibex_core.sv
(id_stage_i.lsu_req_dec | id_stage_i.cheriot_lsu_req_dec) &
id_stage_i.lsu_we;

// lsu_busy covers all non-IDLE states, but in WAIT_GNT the second grant hasn't been issued yet

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not quite sure I understand this comment

Comment thread rtl/ibex_core.sv

// lsu_busy covers all non-IDLE states, but in WAIT_GNT the second grant hasn't been issued yet
// so no outstandng response can arrive there.
assign lsu_expecting_resp = lsu_busy & (load_store_unit_i.ls_fsm_cs != WAIT_GNT);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also load_store_unit_i.ls_fsm_cs is a hierarchical assignment. please avoid. lets route this condition out of the LSU

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