Different assumption between TLUL adaptor and ibex assertion
@vogelpi @eunchan I accidentally used a wrong SW image file and ibex accesses some OOB addresses. Seems like in ibex we assume error is only set when valid is high. Since it connects with TLUL, it becomes when d_error high, d_valid must be high. But d_error should be "don't care" when d_valid is low.
should we update below assertion or ibex needs this assumption to be true?
// Errors must only be sent together with rvalid.
`ASSERT(IbexInstrErrWithoutRvalid, instr_err_i |-> instr_rvalid_i)

@sriyerg we only test tl_error on TL devices as we force on the host port. Look like we need to add some TL error cases (like OOB) to test the ibex TLUL glue logic. WDYT?
Absolutely agree. Thanks for pointing out.
Absolutely agree. Thanks for pointing out.
I will add this to the testplan. We can add a simple test that accesses bad address. Ibex entering the exception handler will then qualify the test as passed / failed.
(whoops, sorry for accidentally unassigning everyone)
Thanks for pointing this out @weicaiyang! @sriyerg I agree - having some simple tests that access OOB addresses at the top level is a good idea.
Thanks for reporting the issue @weicaiyang . The questionable assertion is inside Ibex itself (ibex_if_stage.sv, not in the rv_core_ibex.sv wrapper) and this should probably be discussed in a wider context, not just for TL-UL.
We have originally added this assertion to make sure we don't get an error without rvalid because Ibex just wouldn't be able to see/handle that. But to be honest I am not sure if this is still true. It could be that the design now reacts on an error without checking rvalid. This would be problematic together with TL-UL. Especially on the instruction side, the interface changed a lot and it may be different when the instruction cache is used.
Thus I am leaning towards changing the rv_core_ibex wrapper such that the error Ibex sees, is actually d_error & d_valid. What do you think @tomroberts-lowrisc and @GregAC ?
That doesn't match my expectation of how the protocol works. I'll check whether we actually need that behavior, and just remove the assertion if not.
I'm pretty sure we saw the same issue on the D-side recently, and just removed the assertion there. EDIT: see matching d-side issue #2405
Thanks @tomroberts-lowrisc for clarifying that and for removing the assertion upstream.
I will vendor in the latest version of Ibex which should solve this.
Thanks @vogelpi @tomroberts-lowrisc for quickly solving the issue.