AXI4 transaction

HI, I have puzzle

if I am write something like that

initial begin
$dumpfile("dump.vcd");
$dumpvars(1);

#100ns rst_n = 0;
#100ns rst_n = 1;

// Align to negedge to drive traffic
#5ns;

awaddr = 'h15;
awvalid = 1;

#10ns
awaddr = 'h25;
wvalid = 1;
wdata = 'h10;

#10ns
awaddr = 'h35;
wdata = 'h20;

#10ns
awvalid = 0;
wdata = 'h30;

#10ns
wvalid = 0;

#100ns
$finish();

What should be come out for first Address 0x15 or 0x25 for slave according to axi4 protocol.

BR,

Mayank 

Parents Reply Children
  • Sorry I could not understand Colin, what do you want to say.
    in our environment, if we write data now then the next data on the read channel is not from the same write address continuously.

    mayank

  • The AXI protocol has never had any relationship defined between read and write transactions (except for exclusive sequences), so if you want to guarantee that the data read back is the data you have just written, you must delay issuing the read until after you have received the write transfer BRESP response.

    If you do not do this, as there is no protocol relationship between the read and write channels, a later issued read could complete before an earlier issued write. This isn't just down to the AXI subordinate looking after any "read-after-write" hazards as the write transfer could be delayed by the AXI interconnect structure before it reaches the subordinate, so the read could actually reach the subordinate before a stalled write.

    So to ensure you read back the latest write data you must wait for the BRESP response indicating the write has been accepted by the subordinate before issuing the read transaction.

    None of that is particular to AXI4-lite or the use of IDs, it is simply a requirement of the basic AXI protocol.