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.

TMS320C6678: C6678 NDK and SRIO Example

Part Number: TMS320C6678

Hi, All.
I am using c6678 board, NDK 2.21.02.43, MCSDK 2.01.02.06.
What I have done until now is here.
First of all, I checked working NDK "hello world" example on our C6678 board and it works fine.
And then, I checked working "SRIO_LoopbackDioIsrexampleproject" and it works fine as well, too.
So, I thought my next step is combining together NDK + SRIO.
I Need a complete example that can work to previous requirement together.

  • Hi Amir,

    I've forwarded this to the SRIO experts. Their feedback should be posted here.

    BR
    Tsvetolin Shule
  • Hi Amir,

    You can start from merging .cfg file, then device initialization, SYS/BIOS tasks to get the NDK + SRIO work. If you have any questions, just let us know.

    Regards,
    Garrett
  • Hello
    Thank for your reply but I am a beginner.
    your answer is very global and is not useful for me.
    I need a detailed answer.
    the best solution for me is a complete example that shows me how to do your suggestion.
  • Hi Amir,

    We don't have an existing example that has both NDK and SRIO integrated in Processor SDK, but I think these e2e threads should be helpful to get you started:

    e2e.ti.com/.../198711
    e2e.ti.com/.../332218

    Regards,
    Garrett
  • Hallo Garrett.

    Might I request a more detailed response to the original question of running the NDK with SRIO functionality in one project on Core0 for C6678? I have also tried to merge the NIMU_emacExample, aka “Hello World” example, with the SRIO_LpbkDioIsr example project without much success. There are a lot of common functions between the two, but the code is not identical. That makes it difficult to know which one to choose. Below I list a few examples of common functions found in both files nimu_osal.c and loopbackDioIsr_osal.c respectively:

    Ptr Osal_cppiCsEnter (void)
    void Osal_cppiCsExit (Ptr CsHandle)
    Ptr Osal_cppiMalloc (uint32_t num_bytes)
    void Osal_cppiFree (Ptr dataPtr, uint32_t num_bytes)
    void Osal_cppiBeginMemAccess (void *blockPtr, uint32_t size)
    void Osal_cppiEndMemAccess (void *blockPtr, uint32_t size)
    Ptr Osal_qmssCsEnter (void)
    void Osal_qmssCsExit (Ptr CsHandle)
    Ptr Osal_qmssMtCsEnter (void)
    void Osal_qmssMtCsExit (Ptr CsHandle)
    Ptr Osal_qmssAccCsEnter (Void)
    Void Osal_qmssAccCsExit (Ptr CsHandle)
    void Osal_qmssBeginMemAccess (void *blockPtr, uint32_t size)
    void Osal_qmssEndMemAccess (void *blockPtr, uint32_t size)

    Also I imagine that NIMU_initQmss() from file nimu_cppi_qmss_iface.c and system_init() from file loopbackDioIsr.c, which both deal with QMSS initialization, would have to be intelligently merged. Unfortunately I do not know how to do that and would appreciate any help in the matter. I have looked at the two posts in your previous response, but those deal with MCSDK which I am not using.

    The packages I am using are as follows:

    bios_6_50_01_12
    ccsv7
    ipc_3_44_00_00
    ndk_2_25_01_11
    pdk_c667x_2_0_4
    xdctools_3_50_01_12_core

    Thank you
    Werner
  • Werner,

    The semaphore define in the Osal function for SRIO and NDK is the same for CPPI and QMSS, therefore most of the common functions you listed essentially is identical.  

    SRIO:

    #define CPPI_HW_SEM     1

    #define QMSS_HW_SEM     2

    NIMU:

    #define NIMU_CPPI_HW_SEM            1               /**< CPPI Driver - Used by OSAL layer */

    #define NIMU_QMSS_HW_SEM            2              /**< QMSS Driver - Used by OSAL Layer */

    For those functions with different implementation in SRIO and NDK, e.g, Osal_qmssBeginMemAccess() for cache coherence protection which is only required for multi-core application and not used in the examples, you may choose the ones from SRIO if needed. Osal_qmssBeginMemAccess() is null in NDK.

    For QMSS initialization, you still can refer to for the event number, accumulator, queue configuration though it's based on MCSDK.

    Actually CPPI/QMSS should not be required for SRIO direct I/O operation, you may simplify your integration using the example provided here:

    Regards, Garrett