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.

a problem of 6670 PKTDMA descriptor

I read the 6670 UG and CPPI UG and the example is related to loopback.

In the example ,the setting are as follows:

for(idx =0; idx < 7; idx++){  //push 7 packets into Tx queue for test
 
    tmp[idx] = pop_queue(MONO_TX_COMPLETE_Q);
    tmp[idx] &= 0xFFFFFFF0;//set DESC_SIZE field to zero
   
    mono_pkt = (MNAV_MonolithicPacketDescriptor *)tmp[idx];

    //Create Mono packet (initialize non-zero fields)
    mono_pkt->type_id = MNAV_DESC_TYPE_MONO;
    mono_pkt->data_offset = MNAV_MONO_PACKET_SIZE + 4;//16
    if(idx == 0)
    mono_pkt->packet_length = 8832;//first symbol
    else mono_pkt->packet_length = 8768;//other six symbols
    mono_pkt->ps_flags = 1;
    mono_pkt->epib = 0;
    mono_pkt->psv_word_count = 1; // 4 byte PS field length
    mono_pkt->pkt_return_qnum = MONO_TX_COMPLETE_Q;
    mono_pkt->src_tag_lo = 0; //copied to .flo_idx of streaming i/f

    temp = (Uint32 *)(tmp[idx] + 16);
    if(idx == 0){
      for (idx2 = 0; idx2 < 2208; idx2 ++) temp[idx2] = idx2; //payload data setup(first symbol)
    }
    else {
      for (idx2 = 0; idx2 < 2192; idx2 ++) temp[idx2] = idx2; //payload data setup(other six symbols)
    }

the line marked in red dedicats the flow ID according to the UG.

In this module ,I have a question ,if I don't wanna use loopback ,TX only,then,which value shoulud be programmed ?

thanks a lot~!

  • HI Chenyi,

      You're probably looking for the  cpswLpbkMode. It can be set to CPSW_LOOPBACK_NONE,CPSW_LOOPBACK_INTERNAL, and CPSW_LOOPBACK_EXTERNAL.

    If you set it to Loopback_none, the PASS will be configured to receive the test packets as normal from the MAC address. Loop back internal means to loop back within the SGMII, and External means to loopback outside of the platform, usually through RJ45 with a cable.  For Gigabit Ethernet, it is not enough to just use a RJ45 connector loopback, we need to enable the PHY loopback by executing "MDIO_enable_phy_loopback".

     

    Here's a forum post that has some answers for you if you need more input: http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/119109/496084.aspx#496084.

     

     

    Feel free to ask any more questions if you have any.


    Good Luck,

    Kat Kelsch

  • In fact ,the example I given is about AIF2,not about MDIO,so sorry,I will be waiting for you answer here~

    thank you very much~!

  • Apologizes. You said CPPI user guide so I misunderstood.

    To enable and disable the TX and RX (loopback) you'll use the CSL_aifHWControl.

    CSL_aifHwControl(hAifLink, CSL_AIF_CMD_ENABLE_DISABLE_RX_LINK,(void *)&ctrlArg);

    CSL_aifHwControl(hAifLink, CSL_AIF_CMD_ENABLE_DISABLE_TX_LINK,(void *)&ctrlArg);

     

    I got this info from this document on page 71. I suggest you read it for more details: http://www.ti.com/lit/ug/spruef4a/spruef4a.pdf

    Here is also a really helpful website for all of the CSL global variables for AIF: http://processors.wiki.ti.com/index.php/AIF_Module_Setup and this description of the software library: http://processors.wiki.ti.com/index.php/AIF_SW_Library

     

     

    -Kat Kelsch

  • oh,no

    my question is about the example as follows:

    for(idx =0; idx < 7; idx++){  //push 7 packets into Tx queue for test
     
        tmp[idx] = pop_queue(MONO_TX_COMPLETE_Q);
        tmp[idx] &= 0xFFFFFFF0;//set DESC_SIZE field to zero
       
        mono_pkt = (MNAV_MonolithicPacketDescriptor *)tmp[idx];

        //Create Mono packet (initialize non-zero fields)
        mono_pkt->type_id = MNAV_DESC_TYPE_MONO;
        mono_pkt->data_offset = MNAV_MONO_PACKET_SIZE + 4;//16
        if(idx == 0)
        mono_pkt->packet_length = 8832;//first symbol
        else mono_pkt->packet_length = 8768;//other six symbols
        mono_pkt->ps_flags = 1;
        mono_pkt->epib = 0;
        mono_pkt->psv_word_count = 1; // 4 byte PS field length
        mono_pkt->pkt_return_qnum = MONO_TX_COMPLETE_Q;
        mono_pkt->src_tag_lo = 0; //copied to .flo_idx of streaming i/f

        temp = (Uint32 *)(tmp[idx] + 16);
        if(idx == 0){
          for (idx2 = 0; idx2 < 2208; idx2 ++) temp[idx2] = idx2; //payload data setup(first symbol)
        }
        else {
          for (idx2 = 0; idx2 < 2192; idx2 ++) temp[idx2] = idx2; //payload data setup(other six symbols)
        }

     

     

    if I don't wanna use loopback,which value should be setting to the red line?