-
Notifications
You must be signed in to change notification settings - Fork 688
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
Add AW lock register to handle W FIFO push signal #2461
Conversation
); | ||
|
||
always_ff @( posedge clk_i or negedge rst_ni ) begin : aw_lock_reg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[verible-verilog-format] reported by reviewdog 🐶
always_ff @( posedge clk_i or negedge rst_ni ) begin : aw_lock_reg | |
always_ff @(posedge clk_i or negedge rst_ni) begin : aw_lock_reg |
); | ||
|
||
always_ff @( posedge clk_i or negedge rst_ni ) begin : aw_lock_reg | ||
if (~rst_ni) aw_lock_q <= 1'b0; | ||
else aw_lock_q <= aw_lock_d; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[verible-verilog-format] reported by reviewdog 🐶
else aw_lock_q <= aw_lock_d; | |
else aw_lock_q <= aw_lock_d; |
assign w_fifo_pop = axi_req_o.w_valid & axi_resp_i.w_ready & axi_req_o.w.last; | ||
assign aw_lock_d = ~axi_resp_i.aw_ready & (axi_req_o.aw_valid | aw_lock_q); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[verible-verilog-format] reported by reviewdog 🐶
assign w_fifo_pop = axi_req_o.w_valid & axi_resp_i.w_ready & axi_req_o.w.last; | |
assign aw_lock_d = ~axi_resp_i.aw_ready & (axi_req_o.aw_valid | aw_lock_q); | |
assign w_fifo_pop = axi_req_o.w_valid & axi_resp_i.w_ready & axi_req_o.w.last; | |
assign aw_lock_d = ~axi_resp_i.aw_ready & (axi_req_o.aw_valid | aw_lock_q); |
✔️ successful run, report available here. |
✔️ successful run, report available here. |
👋 Hi there! This pull request seems inactive. Need more help or have updates? Feel free to let us know. If there are no updates within the next few days, we'll go ahead and close this PR. 😊 |
✔️ successful run, report available here. |
Signed-off-by: Nils Wistoff <[email protected]>
The original implementation uses the AW handshake as the logical condition for a push into the W channel FIFO. However, this choice implicitly assume that the AW handshake will take place concurrently or before the W channel handshake.
This assumption is not mandatory in the AXI standard and a downstream IP can generate a situation where the W channel handshake precedes the AW channel one, resulting in a pop of a potentially empty FIFO.
Using an AW lock register to control the pushes on the FIFO makes sure that the proper W selection is stored as soon as the core generates a valid AW request (
aw_valid = 1'b1
) without relying on the occurrence of an AW handshake, which can happen out of order.This specific situation was observed when using CVA6 with a downstream AXI ID serializer. Due to the serializer internal FIFOs being full, the AW request was gated but the W channel was passed through, thus generating the situation where the core observed
aw_ready = 1'b0
andw_ready = 1'b1
and the empty W FIFO was popped.