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.

Questions about C6670 AIF2 using EDMA3

Hello:

     Now I have three urgent questions about C6670 AIF2, and I need your help.

     Firstly, my platform is described as follows:C6670's AIF2 interface connect with FPGA, OBSAI protocol running in AIF2 interface, the link rate is 8x(6.144Gbps), LTE with 20M bandwidth and 4 AxCs.

     Secondly, three questions are as follows:

    (1)With Normal Cyclic Prefix, every timeslot(0.5ms) has 7 LTE symbols. Can I define 3 MONO_TX_COMPLETE_Qs each AxC using for TX circularly in L2(or MSMC), not define 7, in order to save L2(or MSMC) memory size? And the same for MONO_RX_FDQ?

    (2)As the above (1), I define 3 MONO_RX_FDQs each AxC using for RX circularly in L2(or MSMC). I can consecutively and rightly receive AxC datas, and transfer these datas from L2 to DDR3 using EDMA3. But for TX, when I  transfer datas from DDR3 to L2 using EDMA3, then packaged and pushed to MONO_TX_Q, the data can't TX out rightly, in other words, the FPGA can't receive the datas rightly (the FPGA code is no problem). I don't know why,can you tell me some probably reasons?

   (3)In order to solve the question (2), we have done many experiments. Now we find that if we package the datas only once and push it consecutively, it operate well. But if we  package one datas and push it, then package one another and push, repeating this for many times,it will be wrong. The number "tx_count" will be a very large number, about tens of thousand. (tx_count = get_descriptor_count(MONO_TX_Q0) ) . I think the reason is the PKTDMA doesn't run well after I push the package to MONO_TX_Q, do you agree? and how to solve it?

The questions are urgent, and I hope you can help me to solve them as quckily as possible. Thank you very much!

  • I don't understand your question. there are a lot of confusion. how many AxC are you using?  why you are trying to use 3 free queues for each side? how many descriptors are you using per queue?

    I'm not sure if you check our example code, we use only one Tx and Rx free queue and the number of descriptors are 32 for two AxC or four AxC channels. and I'm not sure why you are trying to use circular RAM concept for descriptor region. it is dangerous idea if each descriptor memory is not sequentially assigned.

    I cannot tell you more, if these basic things are not clear.

    Regards,

    Albert

  • Albert Bae said:

    I don't understand your question. there are a lot of confusion. how many AxC are you using?  why you are trying to use 3 free queues for each side? how many descriptors are you using per queue?

    I'm not sure if you check our example code, we use only one Tx and Rx free queue and the number of descriptors are 32 for two AxC or four AxC channels. and I'm not sure why you are trying to use circular RAM concept for descriptor region. it is dangerous idea if each descriptor memory is not sequentially assigned.

    I cannot tell you more, if these basic things are not clear.

    Regards,

    Albert

     

    Thank you,Albert Bae:

    I use one link with rate of 8x,  4 AxCs, one Tx free queue and one Rx free queue totally. For each AxC, I use one Tx queue and one Rx queue.   In your example code, there are 7*x descriptors in Tx free queue and Rx free queue(the x is the numbers of AxC). But in our design, we define 3*x descriptors in Tx free queue and Rx free queue(the x is the numbers of AxC),  in order to save L2(or MSMC) memory size.

    I don't know the description above is clear or not to you, thanks.

  • So you totally have 12 free descriptors in the free queue for four LTE 20 MHz AxC channels and I think it is enough. you need to understand the mechanism how the descriptor is re-used. those 12 descriptors is shared for four AxC channels and that means you need to set file size, PS field (AxC, Symbol) and do whatever you need in the ISR which popped from AT event. you may make AT external event every LTE symbol time and you can push one packet every symbol time (this is normal use case)

    you need to start pushing the packet before the frame boundary (around 136 ~ 139th symbol time) to make correct operation. please remember that you need to do some actions for each AxC channel within the ISR like I did in the example code. My example code was very simple, so I did that control in init time but you have to do that every symbol time within ISR.

    Regards,

    Albert 

  •  Yes, now we "make AT external event every LTE symbol time and you can push one packet every symbol time within ISR".

    In your opinion, what's "the mechanism how the descriptor is re-used"?

    "you need to start pushing the packet before the frame boundary (around 136 ~ 139th symbol time) to make correct operation."  why?

    Thank you!

  • Hi,Albert,

     Upon this situation,we change another way to make a test.

    The details are as follows:

    In this case,we have created and push 7 packets in one queue before synchronization to insure that we have got to push  the packet before the frame boundary 

    After synchronization ,according to the AT event setting we use the ISR of EVENT1 to push queue and use the ISR of  EVENT4 to re-create queue .

    Parameter settings are as follows:

    AtEventSetup.AtRadEvent[1].EventSelect = CSL_AIF2_EVENT_1;
    AtEventSetup.AtRadEvent[1].EventOffset =12000;
    AtEventSetup.AtRadEvent[1].EvtStrobeSel = CSL_AIF2_RADT_SYMBOL;
    AtEventSetup.AtRadEvent[1].EventModulo =21919;
    AtEventSetup.AtRadEvent[1].EventMaskLsb = 0xFFFFFFFF;
    AtEventSetup.AtRadEvent[1].EventMaskMsb = 0xFFFFFFFF;
    AtEventSetup.bEnableRadEvent[1] = TRUE;//Enable Event 1

    AtEventSetup.AtRadEvent[4].EventSelect = CSL_AIF2_EVENT_4;//Select Event 4
    AtEventSetup.AtRadEvent[4].EventOffset = 3000;
    AtEventSetup.AtRadEvent[4].EvtStrobeSel = CSL_AIF2_RADT_SYMBOL;
    AtEventSetup.AtRadEvent[4].EventModulo = 21919; //LTE sub-frame time (0.5 ms)
    AtEventSetup.AtRadEvent[4].EventMaskLsb = 0xFFFFFFFF;
    AtEventSetup.AtRadEvent[4].EventMaskMsb = 0xFFFFFFFF;
    AtEventSetup.bEnableRadEvent[4] = TRUE;//Enable Event 3

    that is to say ,we try to recreate the fifth or the forth packet before push the first packet again  

    rebuild it and run,however,the result is bad:

     The packet is re-created correctly every symbol,But, the transmitted data shows that we have only transmiited the first packet.

    I'm confused,but don't know why,thanks a lot~!

  • It looks like you don't have enough basic knowledge about AIF2 and MNavigator system and your wording (eg. re-create descriptor) is not matched with TI usage. your explanation has a lot of confusion, lack of information and I couldn't understand it before you match the wording with our wording. you'd better spend more of your time reading AIF2 UG and navigator UG to narrow down this gap. actually, all your questions can be resolved by careful reading of our document. our example use loopback as basic method but Egress and Ingress setup should be seperated when you explain your setup.

    Regards,

    Albert

  • "you need to start pushing the packet before the frame boundary (around 136 ~ 139th symbol time) to make correct operation."  why?

    this means it is not good to push symbol 0 packet at 140th (or 0 th) symbol time.

  • In your opinion, what's "the mechanism how the descriptor is re-used"?

  • Hi,Albert:

        I read the UG,the detais are as follows:

    "

    A single 100MHz AxC will not fit in the highest supported link rate (8x). At best, four
    20MHz LTE AxC would fit into a single 8x rate link. A single 100MHz LTE AxC has
    the same bandwidth as five 20 MHz AxC.
    One possible method of supporting 100 MHz LTE is for the sending device to segment
    the AxC into five parts, then send these parts over five different 20 MHz LTE AxC. If it
    is done correctly, the Multicore Navigator mechanism could be manipulated on the
    receiving device such that only Multicore Navigator headers would need to be modified
    in order to reconstruct the 100MHz AxC from the five 20 MHz AxC.


    To facilitate this reconstruction, the AIF2 PKTDMA channels involved should be
    programmed to use Multicore Navigator “Host Mode” instead of Multicore Navigator
    “Monolithic Mode”. Host mode separates the Multicore Navigator descriptor from the
    Multicore Navigator buffer. Host mode also allows for multiple descriptor/buffer pairs
    to be linked-listed into a larger packet structure. In the most optimal usage, the
    Multicore Navigator buffers should be sized such that a single LTE 20 MHz symbol fits
    into a buffer. In this way, there will be a single Multicore Navigator descriptor/buffer
    pair per 20 MHz Symbol. After all 20 MHz symbols are received, the application
    software can manipulate the buffer pointers linking all five descriptor/buffer pairs into
    a single LTE 100 MHz symbol packet.

    "

    just as decriberd aboved,if we use 4x,20MH for 80MHZ,is there the need for us to programme the PKTDMA to "HOST MODE"?

    thanks a lot~!

     

  • Tx descriptor : will be automatically re-cycled by pktDMA once the packet is fully transmitted.

    Rx descriptor : should be manually re-cycled by your SW (CPU)

  • It depends on your decision. you may use both Mono or Host descriptor in this case but we recommend to use Mono descriptor if possible not to make additional process delay.

    Albert

  • OK,thank you ~

    If I init 7 descriptors (only PS ,symbol,payload with the exeption of "push") and use one queue for  transmitte .In this case ,I rebuild a descriptor once when i pushed one

    descriotor.

    According to the UG,after we pushed the queque we would get an returned queue(TX_COMPLETE_Q) if transmited correctly.

    But now,we test the time between the push TX queue and pop TX_COMPLETE_Q,which is about 100ms.Actually,we hope this time within a symbol time.

    Ccould you tell me how to  handle this or is there some registers showing  some error status?

    Thank you very much~! 

  • 100 ms is too long. normally it should be less than 100 us after the packet EOP is transferred. looks like there are some problems from your test environment.

    1. Check your QM and PktDMA setup if there is anything wrong especially about linking RAM and region setup. try to move your region to L2, MSMC and DDR for testing.

    2. Check your BW status if there is any problem to transfer all your traffic. you may test with less traffic by reducing the number of channels

    3. Check your CPU application and operation system if that makes any critical system half or bottle neck situation that might affect VBUS operation.

    4. Increase the number of Free descriptors and see what's going on

    Regards,

    Albert

  • Hi,Albert:

    I'v checked my code :

    "1. Check your QM and PktDMA setup if there is anything wrong especially about linking RAM and region setup. try to move your region to L2, MSMC and DDR for testing.

    2. Check your BW status if there is any problem to transfer all your traffic. you may test with less traffic by reducing the number of channels

    3. Check your CPU application and operation system if that makes any critical system half or bottle neck situation that might affect VBUS operation.

    4. Increase the number of Free descriptors and see what's going on"

    related to the first one: I have been maintain region in MSMC.

    related  to the second one:what's about BW in your opinion?  Band width In PE? is thers some registers about status?

    related to the forth one:I try to add the TX_COMPLETE_Q,but there's no improvement.

    And another question:

    "you need to start pushing the packet before the frame boundary (around 136 ~ 139th symbol time) to make correct operation."

    In order to achive it ,if I use the AT event ,maybe there's need to use two AT event.one is triggered by 1ms ,and the other one is triggerd by one symbole?

  • Why do you think you still need 1 ms event for AIF2? I think symbol event should be enough. if your higher level apps program requires 1ms event, you can create two events and use both.

    Albert

  • Because I wanna achive the idea" start pushing the packet before the frame boundary (around 136 ~ 139th symbol time) to make correct operation"

    I tried to use one event to trigger for pushing and the setting are as follows:

    AtEventSetup.AtRadEvent[1].EventSelect = CSL_AIF2_EVENT_1;
    AtEventSetup.AtRadEvent[1].EventOffset =3134;
    AtEventSetup.AtRadEvent[1].EvtStrobeSel = CSL_AIF2_RADT_SYMBOL;
    AtEventSetup.AtRadEvent[1].EventModulo =21919;
    AtEventSetup.AtRadEvent[1].EventMaskLsb = 0xFFFFFFFF;
    AtEventSetup.AtRadEvent[1].EventMaskMsb = 0xFFFFFFFF;
    AtEventSetup.bEnableRadEvent[1] = TRUE;//Enable Event 1

    once the ISR of EVENT1 came,I push one descriptor.

    In my opinion ,I think this setting can't achive the idea just mentioned above.

    Settting like above is triggered by one symbo,but how to make sure"start pushing the packet before the frame boundary (around 136 ~ 139th symbol time)".

    I'm confused, maybe it's the keypoint of my problem for transmitting data incorrectly.

    Asking for help  and thank you very much.

    Thanks a lot~!

  • HI,Albert:

     We have made a good progress according to your advice"start pushing the packet before the frame boundary (around 278th symbol time)" and the first packet could be sent correctly and return tx_complete_q within a symbole time ,but the second packet can't be sent correctly,only up to next frame boundary.

    is there some setting wrong in PEor somewhere else.

    thank you ~

  • How many packets are in Tx queue? you need to push packets continuously every symbol time not to make egress starvation.

    if starvation ocurrs, the PE will not work for the whole frame time and resume work from the next frame boundary and it will wait symbol number 0 again.

    1. symbol number should be sequential within frame (0 ~ 139 for normal LTE ). descriptor PS symbol and AxC field should be filled correctly every time.

    2. you can push 1 symbol every symbol time or 7 symbols every 0.5 ms or 14 symbols every 1ms. it's upto you.

    It looks like you didn't fully analyze our UG and example code. please spend more time on that.

    Regards,

    Albert

  • Hi,Albert:

    I push one  packet every one symbol at the beginning .

    I inited the 14 symbols and push the first one in 278th symbol time and then push one packet every symbol time continuoulsy untile finish pushing the 14th packet .

    In this case,the first symbol could return TX_complete_q wihtin a symbol time ,but the second one can't return until the next frame time ,at this time ,I record the number of packet in Tx queue,it's 12.

    Beyond that ,the example code you referred to is "C:\ti\pdk_C6670_1_0_0_20\packages\ti\csl\example\aif2"?

  • Hi,Albert

    According to your advice ,I did some test and read UG .If I inited more packet(28 packets),26 packets could be sent  and return tx_complete_Q correctly.

    But in fact ,there are 140 symbols in one frame ,do we have to init 140 symbols?If we wanna send the updated data ,what should we do? re-init packet?

    If we have to re-creat packets,just do as the the first 140 symbols?

    thanks a lot~!

  • I think you'd better check TI AIF2 example code for LTE in any LLD or PDK. it will tell you how to control PS field. normally we have 140 symbols in one frame and the symbol number should have rising sequence 0 ,1 , 2 ..... 139 and it wrap back to zero from the next frame boundary. if you don't send the full frame, the AIF2 egress link stop work on your last symbol and wait until the next frame boundary. PE should get symbol zero from the frame boundary.

    regards,

    Albert