Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 always @(posedge clk) begin if(reset) o_axi_arvalid <= 0; // AXI specification: A3.3.1 Dependencies between channel handshake signal // the VALID signal of the AXI interface sending information must not be dependent on // the READY signal of the AXI interface receiving that information // this is to prevent deadlock // since AXI slave could waits for i_axi_arvalid to be true before setting o_axi_arready true. // Note: VALID cannot be dependent upon READY, but READY can be dependent upon VALID // VALID signal needs to be set (initially) independent of READY signal, // and then only ever adjusted if !(VALID && !READY) else o_axi_arvalid <= /*i_axi_arready &&*/ (!cache_is_full); end
VALID signal needs to be set (initially) independent of READY signal, and then only ever adjusted if !(VALID && !READY)
This is correct. it is ILLEGAL to assert valid based on the ready signal.
Asserting valid based on ready can result in a deadlock issue as neither side ever asserts their respective signal based on waiting for the other side to assert theirs first. That is why the spec say that the master asserts valid anytime it wants to do a transfer irregardless of the state of ready.if I do not remove i_axi_arready , I will have deadlock issue.
the two-ish stage pipeline, mix of conditions, and second backpressure signal make me very suspicious. there aren't comments about why the logic is different. or why it needs to be copy/pasted.
lines 144-149, 187, 200-201, 209, 217 seem suspect. But that is every interesting line -- not a quickfix scenario.
I don't think specific lines of code are suspicious. I think the design has flaws.
As long as the master can hold RREADY high, which most masters can do, then the master doesn't need a skid buffer. (The same is true of BREADY)
The 50% loss comes from the fact that it takes a clock to set ARREADY high after any transaction completes
We are not allowed to set ARREADY combinatorially
(This is in the slave now)
If we were to set ARREADY combinatorially, we might set it to ARREADY = (!RVALID || RREADY);
But because ARREADY *must* be registered as per spec, it takes a clock to capture the stall
During that clock, either data can come in and get kept some where (a.k.a. skid buffer), or we have to make certain ARREADY is already low (50% throughput)
because you wont assert backpressure, and the slave wont need to halt part midway during a burst, or is able to immediately start a new burst.
A skid buffer lets you be optimistically wrong for one cycle in a row.
when something should be combinatorial, but must be registered, it's nice to be able to be optimistic. but registering might make you wrong once in a row.
conceptually, to be safe you have to "look before you leap". that is not ideal.
It is better to say "leap" and then be able to be wrong once (in a row) as long as you aren't wrong twice in a row.
No backpressure ?
Why only 1 word deep fifo (skid buffer) ? what if the master keep holding RREADY low
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?