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.

Combining SRIO_TputBenchmarkingTestProject and PA_emacExample_exampleProject in C6678

Other Parts Discussed in Thread: SYSBIOS

We have four c6678 DSPs(with SRIO port 0 of each dsp only) connected to a switch(cps1616) on a custom board.

PA_emacExample_exampleProject   -   I have modified this project to send and receive packets.

SRIO_TputBenchmarkingTestProject   -   I have modified this project to send packets from Producer core to Consumer core through the SRIO switch.

We are simply trying to combine these two projects as they need to work together. I have added parts of PA_emacExample_exampleProject to SRIO_TputBenchmarkingTestProject.

 

Modification 1:

Initially, there were two initialization of QMSS and CPPI -

Qmss_init (&qmssInitConfig, &qmssGblCfgParams);

Cppi_init (&cppiGblCfgParams);

Emac initializations were done first then later the SRIO initializations. EMAC is able to send packets up until the SRIO’s QMSS initialization is done. After that, it is able to send 32 packets then it gives error message “No Tx free descriptor. Cant run send/rcv test”.

 

Modification 2:

if (system_init () < 0)   -   this function was commented as qmss and cppi modules are already initialised in Init_Qmss() and Init_Cppi() in the emac code. The default qmss memory region is Qmss_MemRegion_MEMORY_REGION0 for emac and Qmss_MemRegion_MEMORY_REGION_NOT_SPECIFIED for srio. This did not give any new errors while running but we had the same error message - “No Tx free descriptor. Cant run send/rcv test”.

When we changed the memory region in srio from Qmss_MemRegion_MEMORY_REGION_NOT_SPECIFIED to Qmss_MemRegion_MEMORY_REGION1 it gave the following error:

Error inserting memory region: -129

We tried changing the number of descriptors to accommodate for both emac and srio but the same error message came up.

  • Hi,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com).

    Have you tested the both examples (SRIO_TputBenchmarkingTestProject and PA_emacExample_exampleProject) separately with C6678 device?

    Make sure that the address of the memory region is in order and for more details, read the multicore navigator user guide for keystone devices.
    http://www.ti.com/lit/sprugr9

    Thanks,
  • Dear Arun,
    Can you please comment out the QMSS init part of SRIO then try to send packets ?
    Also try to initialize the SRIO first then EMAC in combined project...

    Use the following code in SRIO QMSS part to check whether you are getting error of QMSS is intializing in double time.

    /* Initialize the Host Region. */
    memset ((void *)&host_region_consumer, 0, sizeof(host_region_consumer));

    /* Memory Region Configuration */
    memRegInfo.descBase = (uint32_t *)l2_global_address((uint32_t)host_region_consumer);
    memRegInfo.descSize = SIZE_HOST_DESC;
    memRegInfo.descNum = NUM_HOST_DESC;
    memRegInfo.manageDescFlag = Qmss_ManageDesc_MANAGE_DESCRIPTOR;
    memRegInfo.memRegion = Qmss_MemRegion_MEMORY_REGION_NOT_SPECIFIED;

    /* Initialize and inset the memory region. */
    result = Qmss_insertMemoryRegion (&memRegInfo);
    if (result == QMSS_MEMREGION_ALREADY_INITIALIZED)
    {
    System_printf ("Memory Region %d already Initialized \n", memCfg.memRegion);
    }
    else if (result < QMSS_SOK)
    {
    System_printf ("Error: Inserting memory region %d, Error code : %d\n", memCfg.memRegion, result);
    return -1;
    }
  • Thanks for the prompt reply.

    Yes, I have tested both the projects on C6678 EVM.

    I have managed to solve the problem. I went through another example project – qmInsRegionTestProject. I initialized Qmss_MemRegion_MEMORY_REGION0 for EMAC and Qmss_MemRegion_MEMORY_REGION1 for SRIO. Also made sure that the memory addresses are in order. (Thanks Ganapathi)

     

    Problem 1:

    Now, I’m able to send packets but not receive them. In the ISR Cpsw_RxISR I put a breakpoint. The program never reaches here.

     

    In the benchmarking.cfg file,

    I tried to make these true, but got errors,

    Description      Location          Resource         Path     Type

    Load.hwiEnabled must be set to 'false' when BIOS.libType == BIOS.LibType_Instrumented. Set 'BIOS.libType = BIOS.LibType_Custom' to build a custom library or update your configuration.            ti.sysbios.utils.Load:hwiEnabled        benchmarking.cfg       /SRIO_consumer_core0          XDCTools Configuration Marker

    And

    Description      Location          Resource         Path     Type

    Load.swiEnabled must be set to 'false' when BIOS.libType == BIOS.LibType_Instrumented. Set 'BIOS.libType = BIOS.LibType_Custom' to build a custom library or update your configuration.            ti.sysbios.utils.Load:swiEnabled        benchmarking.cfg       /SRIO_consumer_core0          XDCTools Configuration Marker

    Note:

    SRIO is running in Poll mode.

     

    Problem 2:

    Like I said before I’m able send UDP Packets. We are now running two DSPs (D0 and D1). D1 acts as producer and D0 as consumer. D0 has the EMAC code added to it, so when the packets arrive from D1 via the SRIO switch they are then send out through EMAC. This setup works for a while but after sending ~4k packets (1 packet is sent every 2 seconds) the consumer gives a run time error:

    ti.sysbios.heaps.HeapMem: line 294: out of memory: handle=0x86e140, size=32

    xdc.runtime.Error.raise: terminating execution

  • Screenshots that I missed in my previous reply.