Skip to content

Write data before address is lost #27

@rhinton

Description

@rhinton

UPDATE: When I changed DEFAULT_DELAY => 1 PS, the problem was resolved. If a delay of 0 is not supported, I suggest an assert (at least) in Axi4MemoryVTI.vhd.

I'm using Axi4/src/Axi4MemoryVTI.vhd. When I enable SetUseRandomDelays(TransRec, TRUE) in my test bench, I see that the memory component accepts the write burst data (AxiBus.WriteData.Ready = '1') before it accepts the write burst data (AxiBus.WriteAddress.Ready). In this case, the data for the next write transaction is stored to this address. Note I also have DEFAULT_DELAY => 0 ps.

Here is a waveform using my code's AXI bus structure, sorry. The cursor is at the point where the write address is accepted. When I subsequently read from address 0x012, I get 0xECE3 (first data from next transaction, lower right) instead of 0x75C8 (first data from matching transaction, lower left).
Image

Following is the OSVVM transcript for this waveform. I see two "Write Address" transactions at 64 ns and 66 ns. (My clock period is 2 ns.)

%%     56 ns    Log    DEBUG     in u_mem,                   Write Data.  WData: 75C8  WStrb: 11  Operation# 1
%%     58 ns    Log    DEBUG     in u_mem,                   Write Data.  WData: D6CD  WStrb: 11  Operation# 2
%%     64 ns    Log    DEBUG     in u_mem,                   Write Address.  AWAddr: 012  AWProt: 000  AWLen: 00000001  AWSize: 001  AWBurst: 01  AWID: 00  AWUser: 0  Operation# 1
%%     64 ns    Log    INFO      in u_mem,                   Memory Write.  AWAddr: 012  AWProt: 000  WData: 75C8  WStrb: 11  Operation# 0
%%     66 ns    Log    DEBUG     in u_mem,                   Write Address.  AWAddr: 012  AWProt: 000  AWLen: 00000001  AWSize: 001  AWBurst: 01  AWID: 00  AWUser: 0  Operation# 2
%%     72 ns    Log    DEBUG     in u_mem,                   Write Response.  BResp: 0  BID: 0  BUser: 0  Operation# 1
%%     80 ns    Log    DEBUG     in u_mem,                   Write Data.  WData: ECE3  WStrb: 11  Operation# 3
%%     80 ns    Log    DEBUG     in u_mem,                   Write Address.  AWAddr: 051  AWProt: 000  AWLen: 00000110  AWSize: 001  AWBurst: 01  AWID: 00  AWUser: 0  Operation# 3
%%     80 ns    Log    INFO      in u_mem,                   Memory Write.  AWAddr: 012  AWProt: 000  WData: ECE3  WStrb: 11  Operation# 1
%%     82 ns    Log    DEBUG     in u_mem,                   Write Data.  WData: C598  WStrb: 11  Operation# 4
%%     82 ns    Log    DEBUG     in u_mem,                   Write Response.  BResp: 0  BID: 0  BUser: 0  Operation# 2
%%     84 ns    Log    DEBUG     in u_mem,                   Write Data.  WData: ADDF  WStrb: 11  Operation# 5
%%     84 ns    Log    INFO      in u_mem,                   Memory Write.  AWAddr: 051  AWProt: 000  WData: ADDF  WStrb: 11  Operation# 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions