Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PeakRDL-regblock AXI-Lite prematurely asserting wready/awready when it can't handle new wdata/awdata #51

Closed
arhum-alam opened this issue Jun 27, 2023 · 1 comment
Labels
invalid This doesn't seem right

Comments

@arhum-alam
Copy link

The AXI-Lite code as part of PeakRDL-regblock is unable to handle the case where a new data/address write occurs before a bresp is generated for the previous data-address pair. However the wready/awready signal is asserted and is expecting new writes. This is highlighted in the waveform below where the 2nd wdata is input before the first bresp is generated:
image

As per the AXI-Lite documentation (https://developer.arm.com/documentation/ihi0022/hc?lang=en): "AXI4-Lite supports multiple outstanding transactions, but a Subordinate can restrict this by the appropriate use of the handshake signals" [Section B1.1.4]

@amykyta3
Copy link
Member

The AXI4-Lite implementation is intentionally designed be lightweight and have minimal buffering storage space. In your example, wready is deasserted because it only has buffer space for one data word and is unable to process it until it has the corresponding address information for the write operation. This results in a stall cycle.
As soon as the awvalid arrives, the internal request buffer is available to accept the next transfer which appears to arrive soon after.

The delay of bvalid has nothing to do with the 2nd wvalid. Instead, this is due to the internal write processing latency of the register block - each transaction takes two clock cycles from the moment both parts arrive (wvalid and awvalid). I hope to make that latency even shorter in a future release (See #47). Your example's second transaction request just happened to finish being issued late enough that the first one was able to complete.

The register block does indeed support multiple outstanding transactions according to the AMBA spec, however there are some edge cases that prevent it from being able to effectively pipeline them. One option would be to add numerous independent FIFOs on each AXI channel to fully decouple them, but that would be quite costly for what is intended to be a lightweight implementation.

@amykyta3 amykyta3 added the invalid This doesn't seem right label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants