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.

C6670 AIF loopback on link 1 without link 0



Hello

I'm trying to run AIF2 example Aif2_Cpri_Generic_Packet_Test from CSL (PDK C6670 1.1.1.6). This test is passed with AIF Link 0 in loopback mode. But then i try to use Link 1 instead of Link 0 test is busy in this loop:

while (hostRxCount < 8)
{
  // Get current descriptor count for host RX queue
  hostRxCount = get_descriptor_count(HOST_RX_Q);
  if (hostRxCount != 0)
    printf(" Number of monolithic packets received in RX queue: %d\n", hostRxCount);
}


That i need to
do to work with this test at AIF Link 1?

I also try example from AIF2LLD (aif2GenericTestProject). This example also successfully passed with Link 0 and with Link 0 + Link 1. But with enabled only Link 1 this test also failed.

I'm using Advantech TMDXEVMC6670 board Rev. A103-1.

Thanks.

  • Hi,

    How did you change the link0 to link1

    there must be an erroneous configuration in your code.

    can you show me your link1 configuration? 

    Regards,

    Albert

  • Hello,

    In Aif2_Cpri_Generic_Packet_Test from CSL i did not change this code:

    PeCommonSetup.ChIndex0[0] = 0;
    PeCommonSetup.bEnableChIndex0[0] = TRUE;
    PeCommonSetup.CpriPktEn0[0] = TRUE;
    

    to this:

    PeCommonSetup.ChIndex1[0] = 0;
    PeCommonSetup.bEnableChIndex1[0] = TRUE;
    PeCommonSetup.CpriPktEn1[0] = TRUE;

    When i do these changes, example from CSL works fine on AIF Link 1 and all other AIF links.

    But when i try example from AIF2LLD (aif2GenericTestProject) with Link 4 (loopback mode) when i call function AIF_startHw() i obtain this errors:

    Error: Enabling AIF2 Rx Channel 0 link 4 failed
    Error: Enabling AIF2 Tx Channel 0 link 4 failed

    I use this configuration structure for first test (no other changes of example source code):

    {//1st Test - CPRI 4x for GENERIC PACKET - Link 0
    	  "CPRI_4X_GP_L0", // test name
    	 // link0          link1          link2          link3          link4          link5
    	  {0,             0,             0,             0,             1,             0            },  // link enable
    	  {4,             4,             4,             4,             4,             4            },  // link rate
    	  {DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL },  // outboundDataType
    	  {DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16},  // outboundDataWidth
    	  {DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL },  // inboundDataType
    	  {DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16},  // oinboundDataWidth
    	  {CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0}, //Dio engine


    I tryed AIF2LLD 1.0.0.6 and 1.0.0.16 versions and obtain the same result for aif2GenericTestProject example with Link 4.

    Thanks

  • Hi,

    It looks like our AIF2 LLD SW  bug. LLD team is trying to fix it and they will update the new version later.

    thanks for catching this bug.

    Regards,

    Albert

  • Hi,

    I just fixed this issue with our LLD. Here is a new release: 

     1172.aif2_Keystone1_1_1_0_2_engineering.rar

    Copy that .rar file into /yourpdkpath/packages and unzip it. It should change your aif2 repository.

    With this just change the link you want to use in the testObj, and recompile your code with this new library:

    {//1st Test - CPRI 4x for GENERIC PACKET - Link 4
    	  "CPRI_4X_GP_L0", // test name
    	 // link0          link1          link2          link3          link4          link5
    	  {0,             0,             0,             0,             1,             0            },  // link enable
    	  {4,             4,             4,             4,             4,             4            },  // link rate
    	  {DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL },  // outboundDataType
    	  {DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16},  // outboundDataWidth
    	  {DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL,  DATA_TYPE_DL },  // inboundDataType
    	  {DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16, DATA_WIDTH_16},  // oinboundDataWidth
    	  {CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0}, //Dio engine.



    Let me know if you still have issues with this.

    Best Regards,
    Ben
  • Hello,

    I verify this post as "Answered". But i have the same problem with OBSAI protocol in test "aif2WcdmaTestProject".

    When i try this test with this configuration

    {// OBSAI 4x for UL WCDMA - Link 1 - DIO 0
          "OBSAI Multi link 4x UL", // test name
          CSL_AIF2_LINK_PROTOCOL_OBSAI,
       // link0          link1          link2          link3          link4          link5
         {0,             1,             0,             0,             0,             0            },  // link enable
    	 {4,             4,             4,             4,             4,             4            },  // link rate
    	 {DATA_TYPE_UL,  DATA_TYPE_UL,  DATA_TYPE_UL,  DATA_TYPE_UL,  DATA_TYPE_UL,  DATA_TYPE_UL },  // outboundDataType
    	 {DATA_WIDTH_8,  DATA_WIDTH_8,  DATA_WIDTH_8,  DATA_WIDTH_8,  DATA_WIDTH_8,  DATA_WIDTH_8 },  // outboundDataWidth
    	 {DATA_TYPE_UL,  DATA_TYPE_UL,  DATA_TYPE_UL,  DATA_TYPE_UL,  DATA_TYPE_UL,  DATA_TYPE_UL },  // inboundDataType
    	 {DATA_WIDTH_8,  DATA_WIDTH_8,  DATA_WIDTH_8,  DATA_WIDTH_8,  DATA_WIDTH_8,  DATA_WIDTH_8 },  // oinboundDataWidth
         {CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_1, CSL_AIF2_DIO_ENGINE_1, CSL_AIF2_DIO_ENGINE_0, CSL_AIF2_DIO_ENGINE_0}, //Dio engine
         {1,             0,             0},
    },
    

    i have a following output:

    Beginning AIF2 WCDMA test:
    test: OBSAI Multi link 4x UL
    AIF OBSAI mode
    link 0 is disabled
    link 1 runs at 4x rate
            outbound data type: UL_RSA
            outbound data width: 8 bit
            inbound data type: UL_RSA
            inbound data width: 8 bit
    link 2 is disabled
    link 3 is disabled
    link 4 is disabled
    link 5 is disabled
     Test OBSAI Multi link 4x UL on dsp 1: FAIL
    Some tests have failed
    

    But when i change configuration for using only AIF2 Link 0 instead of Link 1 test is passed.

    I run this test with enabled LOOPBACK and with AIF2LLD engineering release 1.1.0.2 from the post above.

    I think it's the same problem, which is not corrected for the OBSAI protocol.

    Thanks