axi dma data receive for arbitrary length of axi stream
This is my top module which connected to axi dma:
And this is the interrupt connections of the dma to the PS:
My questions are:
1.) When is the interrupt signal of S2MM triggered? Is it at the moment of M_AXIS_TVALID or M_AXIS_TLAST of top_0 set to '1', then the PS goes to the interrupt routine?
2.) From the provided xaxidma_example_simple_intr.c program, the length of S2MM is fixed. However, my top_0 will send different length of data at different time. And the length of data at each transaction (a complete axi stream transaction with tlast set to '1') is arbitrary. How can I get the value of the length of an AXI Stream transaction? Will the axi_dma_0 tells the PS through the lite port?
3.) Why this line of code still need to be executed? Isn't it when the interrupt is triggered, then it will go into the interrupt routine (RxIntrHandler) and the data is read within the interrupt routine?
Status = XAxiDma_SimpleTransfer(&AxiDma,(UINTPTR) RxBufferPtr,
MAX_PKT_LEN * 4, XAXIDMA_DEVICE_TO_DMA);
4.) Would this line triggered the TxIntrHandler interrupt routine?
Status = XAxiDma_SimpleTransfer(&AxiDma,(UINTPTR) TxBufferPtr,