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.

SRIO FType9 64KB data payload test.

Other Parts Discussed in Thread: SYSBIOS

Hi,

I'm trying to run only the test_sock9 with 64KB data payload (the maximum possible for FType 9)
in the SRIO_Loopback.
I succeeded to run modify it up to 4K bytes, but no more.

The changes I made in the file test_main.c are:

#define MULTISEGMENT_DATA_SIZE 5120


    /* Initialize the OSAL */
    if (Osal_dataBufferInitMemory(MULTISEGMENT_DATA_SIZE) < 0)
 {
     System_printf ("Error: Unable to initialize the OSAL. \n");
     return;
    }


    /* Setup the SRIO Driver Managed Configuration. */
    drvCfg.bAppManagedConfig = FALSE;

    /* Driver Managed: Receive Configuration */
    drvCfg.u.drvManagedCfg.bIsRxCfgValid             = 1;
    drvCfg.u.drvManagedCfg.rxCfg.rxMemRegion         = Qmss_MemRegion_MEMORY_REGION0;
    drvCfg.u.drvManagedCfg.rxCfg.numRxBuffers        = 4;
    drvCfg.u.drvManagedCfg.rxCfg.rxMTU               = MULTISEGMENT_DATA_SIZE;
   

    /* Driver Managed: Transmit Configuration */
    drvCfg.u.drvManagedCfg.bIsTxCfgValid             = 1;
    drvCfg.u.drvManagedCfg.txCfg.txMemRegion         = Qmss_MemRegion_MEMORY_REGION0;
    drvCfg.u.drvManagedCfg.txCfg.numTxBuffers        = 4;
    drvCfg.u.drvManagedCfg.txCfg.txMTU               = MULTISEGMENT_DATA_SIZE;

The changes in the file test_sock9.c are:

#define SRIO_TYPE9_MESSAGE_SIZE  4096


My questions are:

1.- If I define the MULTISEGMENT_DATA_SIZE exactly of 4096 the test doesn't work. Please,
    could you tell me why MULTISEGMENT_DATA_SIZE must be greather than SRIO_TYPE9_MESSAGE_SIZE?

2.- For testing 4K bytes with FType 9, I needed to redefine the heap0 of 256KB in ti.sysbios.heaps.HeapMem.
    Why if I'm talking about 4 KB,  I need to do define heap0 of 256KB?

3.- What do I need to modify in order to achieve 64KB data of payload using FType 9?

4.- What do I need to modify in the sysbios in order to achieve the 64KB mentioned above?


Thanks in advance.
Shmulik.

 

  • Hi,

    I post again the message from july 31th:

     

    I'm trying to run only the test_sock9 with 64KB data payload (the maximum possible for FType 9)
    in the SRIO_Loopback.
    I succeeded to run modify it up to 4K bytes, but no more.

    The changes I made in the file test_main.c are:

    #define MULTISEGMENT_DATA_SIZE 5120


        /* Initialize the OSAL */
        if (Osal_dataBufferInitMemory(MULTISEGMENT_DATA_SIZE) < 0)
     {
         System_printf ("Error: Unable to initialize the OSAL. \n");
         return;
        }


        /* Setup the SRIO Driver Managed Configuration. */
        drvCfg.bAppManagedConfig = FALSE;

        /* Driver Managed: Receive Configuration */
        drvCfg.u.drvManagedCfg.bIsRxCfgValid             = 1;
        drvCfg.u.drvManagedCfg.rxCfg.rxMemRegion         = Qmss_MemRegion_MEMORY_REGION0;
        drvCfg.u.drvManagedCfg.rxCfg.numRxBuffers        = 4;
        drvCfg.u.drvManagedCfg.rxCfg.rxMTU               = MULTISEGMENT_DATA_SIZE;
       

        /* Driver Managed: Transmit Configuration */
        drvCfg.u.drvManagedCfg.bIsTxCfgValid             = 1;
        drvCfg.u.drvManagedCfg.txCfg.txMemRegion         = Qmss_MemRegion_MEMORY_REGION0;
        drvCfg.u.drvManagedCfg.txCfg.numTxBuffers        = 4;
        drvCfg.u.drvManagedCfg.txCfg.txMTU               = MULTISEGMENT_DATA_SIZE;

    The changes in the file test_sock9.c are:

    #define SRIO_TYPE9_MESSAGE_SIZE  4096


    My questions are:

    1.- If I define the MULTISEGMENT_DATA_SIZE exactly of 4096 the test doesn't work. Please,
        could you tell me why MULTISEGMENT_DATA_SIZE must be greather than SRIO_TYPE9_MESSAGE_SIZE?

    2.- For testing 4K bytes with FType 9, I needed to redefine the heap0 of 256KB in ti.sysbios.heaps.HeapMem.
        Why if I'm talking about 4 KB,  I need to do define heap0 of 256KB?

    3.- What do I need to modify in order to achieve 64KB data of payload using FType 9?

    4.- What do I need to modify in the sysbios in order to achieve the 64KB mentioned above?


    Thanks in advance.
    Shmulik.

  • Shmulik,

    1) There should be no reason why MULTISEGMENT_DATA_SIZE can't be the same as SRIO_TYPE9_MESSAGE_SIZE.  You should only need a 4096B buffer to send a 4096B payload.

    2) Well I'm not sure what portions of the code are all using the heap, but if you allocate 4 RX buffers and 4 TX buffers, each 4096B, that is 32KB right there.  So, you will need to allocate enough heap to cover the # buffers * size + some extra.

    3) Not sure what you tried, but how about modifying it to only allocate/send one 64KB RX and TX buffer, leaving the heap at 256KB. 

    4)  Should only be heap size.

     

    Regards,

    Travis

  • Travis,

    In the MCSDK version 02_00_01_11 there is the following example:

    C:\Program Files\Texas Instruments\pdk_C6678_1_0_0_11\packages\ti\drv\exampleProjects\SRIO_LoopbackTestProject

    Please, could you import the TI SRIO_LoopbackTestProject from the first folder into a workspace and check where to
    make the changes in order to get the 64KB payload with heap0 of 256KB as you told me?

    I tried but I didn't succeed to doing it.

    Thanks in advance.

    Shmulik.

  • Ok I got it working:

    Every single aspect of this problem deals with memory availability.

    I had to set the numRxBuffers and numTxBuffers to 2 instead of 4 (1 didn't work). I had to set test_osal.c's MAX_MEM_MGR_ENTRIES to 9 (less than 9 didn't work).

    So that means your buffer is going to be replicated many many times, and you will probably run out of L2SRAM (the default).

    In order to make a heap big enough, we have to move it to MSMCSRAM (which is 4MB instead of 512KB L2 which is being shared with other resources).

    First, increase the heap size in the cfg file:

    heapMemParams1.size = (2048+512)*1024; // Use up as much as is left in MSMC so this won't be a problem later

     

    Then, to move your heap to MSMC, the easiest thing to do is to go to the .cfg file and change

    Program.sectMap["systemHeap"] = "MSMCSRAM";

     

    So we finally have enough memory in our heap that can be used to allocate the buffers.

    Now in test_main.c change the MTU (you renamed yours, but the default was "SRIO_MAX_MTU") to something larger than 64K 

    #define SRIO_MAX_MTU (4096*16 + 512)

     

    And in test_sock9.c, change the message size to 64K (but NOT larger. The message won't send, I tried)

    #define SRIO_TYPE9_MESSAGE_SIZE (4096*16)

     

    And you will also have to change the comparison routine because it apparently promotes the UInt8 to a larger datatype -- but casting them back down to UInt8 should work (although I didn't check to see if it was saturating or anything).

     

    UInt32 idx; // change this too just in case

     

    (test_sock9.c : ~line 214)

    if ((UInt8)ptr_rxDataPayload[idx] != (UInt8)txData[idx])

  • Tim, Travis

     

    I changed the heap to MSMCSRAM and now is working with data payload of 64KB.

    I meassured the time for 16KB with the heap configured in MSMCSRAM and I observed that is four times slower than the same meassure with the heap

    configured in L2SDRAM. I supposed that must be slow but not in this order.

    Please could you explain me why?

     

    Thanks

    Shmulik

     

  • Hi,

    I posted the following question one week ago:

    Tim, Travis

     

    I changed the heap to MSMCSRAM and now is working with data payload of 64KB.

    I meassured the time for 16KB with the heap configured in MSMCSRAM and I observed that is four times slower than the same meassure with the heap

    configured in L2SDRAM. I supposed that must be slow but not in this order.

    Please could you explain me why?

     

    Thanks

    Shmulik

  • Shmulik,

    Performance degradation when moving from L2 to MSMC should be minimal.  It doesn't make sense unless the transfer sizes are not equivalent.

    Regards,

    Travis

     

  • Hi,

    i tried to test the DIO Loopback project as you mentioned. I changed the .cfg file of the project  as 

    Program.sectMap["systemHeap"] = "MSMCSRAM";

    when i ran the program on the 6678evm board, the transfer failed.

    i tried the same change on my own borad where the DSP communicate with a FPGA through SRIO.

    the DSP init a NREAD opration . From the FPGA side, it gives the correct respone, but the receive buffer on the DSP did't change.

    PS: when the systemHeap set as defult , this works fine. But my project need a really large payload up to 1MB, that the L2SRAM won't fit .

    SO , is there something i missed,  should i change something more for the defult .cfg file from theE:\ti\pdk_C6678_1_1_1_4\packages\ti\drv\exampleProjects\SRIO_LoopbackDioIsrexampleproject?

    Thanks a lot !