Closed mndstrmr closed 4 months ago
Great finding.. Yes when making the change I missed this condition where we save pc_if instead of pc_id. I am reversing back to always doing representability check.
The RTL commit 4a739b4 reverted back to include set_address check for pcc2mepcc
Fix verifies, thanks.
In
pcc2mepcc
, you write thatset_address
is not required since we know the PC is in bounds according to IF.https://github.com/microsoft/cheriot-ibex/blob/097d962f143b40e0cf120227f5dbc8d74a123dc4/rtl/cheri_pkg.sv#L594-L600
I do not believe this to be the case. Consider the following trace:
pc_if_o
will become the new address anyway.pcc_exc_cap = pcc2mepcc(pcc_cap_q, exception_pc, csr_mepcc_clrtag_i)
.exception_pc = pc_if
since this is an interrupt, but as we arranged at time t,pc_if
is outside of the bounds of the PCC, meaning the invariant fails andpcc2mepcc
ends up with moved bounds (breaking monotonicity I believe).I would suggest that
pcc2mepcc
needs to useset_address
.