01-20-2017 07:51 AM
Hello,
According to the stream mapper v1.1 product guide, in page 10 it is mentioned that both read and write AXI transaction channels are packed to the TDATA field:
However, while processing the TDATA field, it is not clear (at least to me) how to actually distinguish between a read and a write transaction. Is there a field among the above ones that actually says "this is a read transaction" or "this is a write transaction"?
Thanks,
dtheodor
02-15-2017 06:04 AM
Well after a lot of experiments, these are the values that the M_AXIS_TID gets, based on the mapped AXI transaction to the TDATA field:
write response channel -> 0
write address channel -> 1
read address channel -> 2
read data channel -> 3
write data channel -> 4
Hope this helps others!
dtheodor
01-21-2017 10:21 PM
@dtheodor actually it's worse than just read/write address channel; there is no information on how to separate the write data channel either. This logic is probably hidden in the streamer one uses on the other side.
01-22-2017 09:36 AM
Hello muzaffer,
Thanks for the reply! So what's you are saying is that there is no way to distinguish the transaction type (AXI read / write command, read / write data, response) if my custom logic parses each time the 'TDATA' field?
The reason I am asking is because, I want to use the Stream mapper output as an input for an HLS-based IP of mine, and use its fields (e.g. address, id, etc) to do some processing:
void myIP (AXI_STREAM &inputFromStreamMapper, ...) { uint32 aWAddr,aWId, aWSize,aRAddr,aRId, aRSize,transactionType; //which data range to use? transactionType = inputFromStreamMapper.data.range(?????); if (transactionType == 'write command') { aWAddr = inputFromStreamMapper.data.range(31,0); aWId = inputFromStreamMapper.data.range(56,53); aWSize = inputFromStreamMapper.data.range(37,35); } else if (transactionType == 'read command') { aRAddr = inputFromStreamMapper.data.range(31,0); aRId = inputFromStreamMapper.data.range(56,53); aRSize = inputFromStreamMapper.data.range(37,35); } else if (transactionType == 'read data') { .... } else if (transactionType == 'write data') { ..... } }
So, is this possible with the Stream mapper? Moreover, (in case you know) what is its difference compared to the Data Mover IP from Xilinx?
Thanks a lot!
dtheodor
01-22-2017 09:58 AM
@dtheodor given that stream mapper can encapsulate & expand itself, there is a way but it's not obvious (to me and apparently to you) how it is done from the product guide. It might be possible to infer how the multiplexing is done by looking at the simulation sources (assuming they are not encrypted).
As to datamover; the difference seems to be that the datamover is a dma engine which has control registers which decide, say, where memory is read from at its axi-mm master and transmits to its axi-s master port. Stream-mapper on the other hand has an axi-mm slave and it translates all the transactions it sees there into a stream of instructions to it axi-s master port. It's a way of collapsing 5 channels of axi-mm into two streams effectively removing the performance advantage of axi-mm interface as everything is serialized.
01-23-2017 06:59 AM
OK, thanks a lot again for the reply. I will try to "decrypt" based on simulations, how one can distinguish the transaction types.
In the meantime, can anyone from Xilinx comment on this?
Thanks,
dtheodor
02-09-2017 12:54 AM - edited 02-09-2017 12:55 AM
Well, it looks like the M_AXIS_TID output signal values are associated with the AXI transaction type.
This is for anyone who would like to use the mapper in the way we are trying also to do it.
In the documentation, it is mentioned that M_AXIS_TID "provides routing information for the data stream." To the documentation editors: please update it with the values that this signal gets when an MM AXI transaction is mapped to stream.
dtheodor
02-15-2017 06:04 AM
Well after a lot of experiments, these are the values that the M_AXIS_TID gets, based on the mapped AXI transaction to the TDATA field:
write response channel -> 0
write address channel -> 1
read address channel -> 2
read data channel -> 3
write data channel -> 4
Hope this helps others!
dtheodor