However, here, I want to test it with multiple transactions. The master is 64 bits and the slave is 32 bits.
While randomly generating all possible combinations of AWSIZE, AWLEN, and WSTRB for testing, a transmission error was encountered.
Master:
awaddr[35:0] = 0x642_0860
awburst[1:0] = 0x1
awlen[7:0] = 0x3
awsize[2:0] = 0x1
wdata[63:0] = 0xefa9_d2c9_2f96_d822
wstrb[7:0] = 0x3 0x30 0xc0 0x0c
Slave:
wdata[31:0] = 0xd822 0x0 0xefa9_0000 0x0
wstrb[3:0] = 0x3 0x0 0xc 0x0
As you can see, the slave's wdata[31:0] does not correctly receive the data from the master. Specifically, the master's wdata[47:40] and wdata[39:32] are not correctly received by the slave.
wdata[31:0]
wdata[47:40]
wdata[39:32]
I’m confused because it works when the master's wstrb[7:0] = 0xf0 or 0x0f, but when I choose different wstrb values, the slave can't receive the data. Is there a restriction rule for wstrb, or did I misunderstand? Could you guide me, please?
wstrb[7:0] = 0xf0
0x0f
wstrb
[update]
Through several experiments, I found that when a 64-bit Master sends data to a 32-bit slave bus, the data must always be sent in 32-bit chunks. Since the Master is 64-bit, the wstrb can be either 8'hf or 8'hf0.
8'hf
8'hf0
If I send the 64-bit data with wstrb = 'hf0 first and then wstrb = 'hf, the slave does not receive the data correctly. However, if I send the 64-bit data with wstrb = 'hf first and then wstrb = 'hf0, the slave receives the data correctly.
wstrb = 'hf0
wstrb = 'hf
I originally thought that when splitting 64-bit data into two 32-bit parts to send to the slave, as long as I match the 32-bit boundaries with any wstrb combination, it should work without issues. However, from my experiments, it seems that when sending the data, the wstrb must first send the lower 32-bit part and then the upper 32-bit part. Is this the correct behavior? Does the lower 32 bits always need to be sent before the upper 32 bits?
Can’t I first send wstrb = 8'h1001_1010 and then send wstrb = 8'h0110_0101? I'm quite confused and would like some help understanding this.
wstrb = 8'h1001_1010
wstrb = 8'h0110_0101
4214.Bus Issue-1.PDF
Hopefully it doesn't contradict anything I said. Re-reading my reply I can't see where I might have contradicted what you are seeing, but if I have been unclear I apologise.
0x0F and then 0xF0 would be valid WSTRB values for 32-bit transfers on a 64-bit bus IF the start address is ending with 0x0 or 0x8 as that would indicate the lower half of the data bus is being used for the first transfer.
If the start address ended with 0x4 or 0xC then the upper half of the data bus is being used for the first transfer, and so 0xF0 and then 0x0F would be valid WSTRB values.