cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
yeeyangtan
Observer
Observer
495 Views
Registered: ‎05-22-2021

AXI Stream Master - M_AXIS_TVALID not always be '1' during a transaction and M_AXIS_TLAST

Jump to solution

I am implementing my AXI Stream Master module which can be use with Vivado DMA module. The connection of module is shown:

 

yeeyangtan_1-1621720794652.png

 

I have 3 questions:

1.) Could the "m_axis_tvalid" signal be non continuous at '1' during the stream transaction? Because some calculation delay might occur in the "axis_top_test_0" module, so the the m_axis_tdata might not be provided continuously. The provided reference only gives some simple condition. I have written my testbench signal which is shown below, so that you can understand my question in a better way:

yeeyangtan_2-1621720847316.png

2.) Is it necessary to set the "m_axis_tlast" to '1' when my transaction is finished? I test the xilinx sdk provided program xaxidma_example_simple_poll.c and it always stops at this line272:

 

while ((XAxiDma_Busy(&AxiDma,XAXIDMA_DEVICE_TO_DMA)) ||
    (XAxiDma_Busy(&AxiDma,XAXIDMA_DMA_TO_DEVICE))) {
        /* Wait */
}

 

Then, the program cannot be ended. When I rerun the program again, I can see that the data is transferred to the Rx already (which is the result of the 1st run of the program). Does it mean that the AxiDma is always busy when custom module asserts m_axis_tvalid to '1', if the dma does not receive m_axis_tlast = '1', then the dma will always be busy?

3.) Let's come back to the 1st question, I tested the implementation in question 1, and I still get the result of question 2. So, the only way to resolve it is to first store all my calculation results in a buffer, then I trigger the m_axis transaction once?

0 Kudos
1 Solution

Accepted Solutions
dgisselq
Scholar
Scholar
466 Views
Registered: ‎05-21-2015

@yeeyangtan ,

To answer your first question, M_AXIS_TVALID can be discontinuous.  It's not necessarily optimal to do so, but there's no requirement and some programs and applications don't need the 100% throughput.

As for the AXI S2MM DMA, it is designed around packets, and so it will try to synchronize packets to the TLAST end of packet marker.  I've been told that the original S2MM application was to move network packets of unknown lengths to memory.  As a result, you'd set it for the maximum length, and then the TLAST marker would tell it when to stop.  Needless to say, a lot of users have struggled with this IP and its quirks.

If you just want to send a fixed amount of data independent of the TLAST, you might wish to try an open source S2MM IP instead.

Dan

View solution in original post

2 Replies
dgisselq
Scholar
Scholar
467 Views
Registered: ‎05-21-2015

@yeeyangtan ,

To answer your first question, M_AXIS_TVALID can be discontinuous.  It's not necessarily optimal to do so, but there's no requirement and some programs and applications don't need the 100% throughput.

As for the AXI S2MM DMA, it is designed around packets, and so it will try to synchronize packets to the TLAST end of packet marker.  I've been told that the original S2MM application was to move network packets of unknown lengths to memory.  As a result, you'd set it for the maximum length, and then the TLAST marker would tell it when to stop.  Needless to say, a lot of users have struggled with this IP and its quirks.

If you just want to send a fixed amount of data independent of the TLAST, you might wish to try an open source S2MM IP instead.

Dan

View solution in original post

yeeyangtan
Observer
Observer
373 Views
Registered: ‎05-22-2021

Thank you very much! Regarding the question 3, I found out that it is my problem of editing the program xaxidma_example_simple_poll.c.

0 Kudos