axi_burst_unwrap: Remove overly pessimistic assertion#387
axi_burst_unwrap: Remove overly pessimistic assertion#387micprog merged 7 commits intopulp-platform:masterfrom
Conversation
|
I think the same technical bug is in the handling of B channel responses, but it practically never triggers because most AXI modules in this repo always keep |
|
Hi, thanks a lot for pointing this out! However, there is a path from |
|
Hey Nils, You're right about the loop between |
|
Okay, so this looked better to begin with, until I figured out the We need Since the id_queue takes a cycle to latch a new transaction anyway. What do you think, @niwis ? EDIT: Alternatively I think we can also disable the assertion further down in the code, as this case seems valid to me. |
I think I solved the underlying issue now; by introducing an If I understand correctly, functionally this only causes a change if the AXI slave of this module handshakes The edge case this change prevents is the w counter being requested if there are no more outstanding transactions queued up, and the AW Channel handshake for the next transaction has not been done, but the |
niwis
left a comment
There was a problem hiding this comment.
I think I understand the issue now. You're absolutely right that the AW beat is required to process the W/B streams, and that there should be backpressure on W/B while waiting for the AW handshake. From my recollection, this is the purpose of cnt_gnt: If the ID queue does not contain an entry for the requested id (yet), the W/B channels are stalled. Since the validity of the ID queues output is checked with cnt_gnt, I don't see the need for the assertion and think that it can be safely removed.
While I like the idea of checking the counters before accessing the ID queue, I see two potential hazards:
- The fact that any counter is allocated does not necessarily mean that the AW handshake of the current transaction has occurred (a counter could be allocated to another ID, triggering the same assertion for the requested ID. Although W beats are ordered and B beats are unlikely to arrive before their AW, but who knows?).
- Would this possibly add a cycle of delay if AW and W arrive simultaneously, since we now need to wait for the counter update?
tl;dr: It seems to me like the preferred solution is removing the assertion, which I don't think is necessary here. At the same time, I don't think that this change breaks anything, so I'm not opposed to it if I'm missing something :)
|
I agree with @niwis on this - all preconditions for forwarding W beats are correct in the current version. The assertion, however, is overly pessimistic. |
This PR fixes a bug in the
axi_burst_unwrapmodule, where theid_queuemanaging a write burst's outstanding W beats receives decrement requests even if the W channel transfer was not handshaked.