This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to determine the data reception is completed in AIF communication?

Other Parts Discussed in Thread: TMS320C6474

Hi, guys! I'm using AIF to perform data transfer between two DSP on TMS320C6474, and the program works well. But the program is based on the assumption that the receiver already knows the amount of data,and when it receives enough data, the program reaches a software breakpoint. My question is, in situation that receiver is disable to get to know the amount of data in advance,how could it determine the data reception is completed?

  • If you are using generic packet mode between two DSPs, all your data can be controlled on PACKET level. if you use accumulator in QM, you may get an interrupt when the recieved packet number is reached the threshold value. you may also get interrupt every packet if you set the threshold to one. it depends on your setup. see MNavigator UG for more details about accumulator.

    Regards,

    Albert

  • I'm using DL data. And in the second way, if the receiver does not know the data amount, then how to set the threshold? I want to use the program to control it, for example, to monitor the recieved buffer count, if its value keeps the same for a certain time, say 10ms, then we think the receiving process is completed. But I don't know how to fulfill this function. Could you give me some advice?  

  • You are using IQ data, not a generic packet. I was confused. for UL, your UL application will decide when you can stop receiving raw frames.

    for DL, you are using loopback for data verification and it requires you need to stop the test at certain point. example code just use one AT event to stop the test after several frame running. in case of DIO, the DMA data will be overwritten DIO block based, so it doesn't matter when you stop the DMA. in case of LTE, if you stop recycling Rx descriptor, the DMA will be stopped as soon as you consume all free descriptors. AT event issues ISR and this routine can close everything.

    Albert

  • Are you saying AIF2? Because I don't know there is any "DIO" or "AT event" in"TMS320C6474 DSP Antenna Interface User's Guide" and I'm a little confused.

    Unicage

  • Oh! it is AIF1.

    In that case, there is no packet mode, you just can recieve continuous streaming from Ingress and you can stop test anytime you want.

    you may stop test at the frame boundary or slot boundary. the best way is using EDMA transfer complete interrupt. if EDMA finish its A,B,C transfer, it may issue an interrupt to let GEM core know the AIF stop timing.

    Regards,

    Albert 

  • Thanks for your answer, I think I get the point of this question. In my program, a UMTS frame is transfered by 150 EDMA transfers and I'm also using EDMA complete interrupt after each EDMA transfer, so I can't determine which EDMA transfer is the last one. I'll try to extend my buffer length and expand the value of CCNT to finish the transfer in just one EDMA transfer, then the complete interrupt can be correctly issued.

  • Hi, Albert! I am facing a new problem right now, since I assume that the receiver does not know the amount of data which should be received, how to set the CCNT of EDMA transfer if I only use one time EDMA transfer to receive data? 

  • Plan A:  set A count as 16 bytes and B count as number of AxC and C count the number of 16 bytes within one AxC

    Plan B: set A count as 16 bytes and B count as number of 16 bytes in one AxC and C count as number of AxC

    you can choose any these for your count and do not reload EDMA parameters, so as to get only one time transfer from EDMA.

    Our AIF CSL example code already shows this and that's why I don't understand why you are asking this.

    Albert 

  • Suppose the transmitter have 100 frames to transmit, how could the receiver stop working after it finishes receiving the 100th frame(The receiver does not know the amount of frames in advance)? I have an idea which is to monitor the BFN(number of NodeB frames). Because the BFN is transfered in control words, the receiver could get it from the receiving buffer. If the value of BFN is monitored to be the same within a certain time(>10ms), it can be considered that the transfer is finished. But I don't know how to fulfill this function in my program, someone told me this can be done by timer, can you give some advice? 

  • As I told you last time, you can setup EDMA A,B,C count to make 1 frame size transfer and count EDMA conpletion interrupt 100 times and then stop the test when it reaches 100. you need to use EDMA reload function to make it repeat 100 times. this is the best way you can try.

    Albert  

  • But your solution is based on the assumption that the receiver knows there are 100 frames in advance, so I can count EDMA completion interrupt 100 times. But the biggest problem is that the receiver does not know the amount of frames.

  • We have no way to do that. AIF is designed for continuous IQ stream from Radio head.

    the receive frames will be handled by L1 application, so we don't need to decide the proper amount of data on IP level.

    Albert