promach
Advanced Member level 4
- Joined
- Feb 22, 2016
- Messages
- 1,202
- Helped
- 2
- Reputation
- 4
- Reaction score
- 5
- Trophy points
- 1,318
- Activity points
- 11,643
A skid buffer would make sense
However, pipelining handshaking is more complicated: simply adding a pipeline register to the valid, ready, and data lines will work, but now each transfer take two cycles to start, and two cycles to stop.
Code Verilog - [expand] 1 else if(!(o_axi_arvalid && !i_axi_arready)) o_axi_arvalid <= (not_yet_the_end_of_neural_network_data);
That doesn't look right, any of the valid signals (from the master) should not be using the ready (slave) status to determine if the valid should be asserted.
The de-assertion of valid does look at both ready and valid to determine if the transfer is complete, which can result in valid being de-asserted or if another pending transfer is issued then valid stays asserted.
The code you posted states you can only assert valid when valid is low or ready is high, which does not conform to A3.3.1.
They both show rdata changing and rvalid going from high to low when rready is low.
Its not really clear why ARVALID is involved in the waveform
Code Verilog - [expand] 1 o_axi_arvalid <= o_axi_rready;
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 always @(posedge clk) begin if(reset) o_axi_rvalid <= 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 wait for i_axi_arvalid to be true before setting o_axi_arready true. // Note: For same interface, VALID cannot depend upon READY, but READY can depends upon VALID // Note: Once VALID is asserted, it MUST be kept asserted until READY is asserted. // VALID signal needs to be set (initially) independent of READY signal, // and then only ever adjusted if !(VALID && !READY) // Note: the slave must not wait for the master to assert RREADY before asserting RVALID // Note: (!(o_axi_rvalid && !i_axi_rready)) == (!rvalid || rready) // == (!rvalid || (rvalid && rready)). // it means "no transaction in progress or transaction accepted" // Note: the slave must wait for both ARVALID and ARREADY to be asserted before // it asserts RVALID to indicate that valid data is available else if(!(o_axi_rvalid && !i_axi_rready)) o_axi_rvalid <= i_axi_arvalid && o_axi_arready; end
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 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 wait for i_axi_arvalid to be true before setting o_axi_arready true. // Note: For same interface, VALID cannot depend upon READY, but READY can depends upon VALID // Note: Once VALID is asserted, it MUST be kept asserted until READY is asserted. // VALID signal needs to be set (initially) independent of READY signal, // and then only ever adjusted if !(VALID && !READY) // Note: the master must not wait for the slave to assert ARREADY before asserting ARVALID // Note: (!(o_axi_arvalid && !i_axi_arready)) == (!arvalid || arready) // == (!arvalid || (arvalid && arready)). // it means "no transaction in progress or transaction accepted" // Note: o_axi_rready is used for backpressure mechanism else //if(!(o_axi_arvalid && !i_axi_arready)) o_axi_arvalid <= /*i_axi_arready &&*/ (ddr_address_range_is_valid) && o_axi_rready; end
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?