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: Osal integration with NDK NIMU

Part Number: TMS320C6678
Other Parts Discussed in Thread: SYSBIOS

Hello,

My customer is using NDK with OpenMP runtime, which these are delivered in ProcSDK Release 03.03.00.

They are using NIMU_emacExample_EVMC6678C66BiosExampleProject as code base to integrate OpenMP runtime (and their application code) and it uses nimu_osal.c by default.
You can find the file in the following path.

C:\ti\pdk_c667x_2_0_5\packages\ti\transport\ndk\nimu\example\HelloWorld\src\nimu_osal.c

They are now looking into the nimu osal integration and wandering if it is really OK to leave Osal_qmss/cppiBeginMemAccess() and Osal_qmss/cppiEndMemAccess() blank.

/**
 *  @b Description
 *  @n
 *      The function is used to indicate that a block of memory is
 *      about to be accessed. If the memory block is cached then this
 *      indicates that the application would need to ensure that the
 *      cache is updated with the data from the actual memory.
 *
 *  @param[in]  blockPtr
 *       Address of the block which is to be invalidated
 *
 *  @param[in]  size
 *       Size of the block to be invalidated

 *  @retval
 *      Not Applicable
 */
void Osal_cppiBeginMemAccess (void *blockPtr, uint32_t size)
{
    /* Cache coherence protection is only required for multi-core application */
    return;
}

/**
 *  @b Description
 *  @n
 *      The function is used to indicate that the block of memory has
 *      finished being accessed. If the memory block is cached then the
 *      application would need to ensure that the contents of the cache
 *      are updated immediately to the actual memory.
 *
 *  @param[in]  blockPtr
 *       Address of the block which is to be written back
 *
 *  @param[in]  size
 *       Size of the block to be written back

 *  @retval
 *      Not Applicable
 */
void Osal_cppiEndMemAccess (void *blockPtr, uint32_t size)
{
    /* Cache coherence protection is only required for multi-core application */
    return;
}

....
....


/**
 *  @b Description
 *  @n
 *      The function is used to indicate that a block of memory is
 *      about to be accessed. If the memory block is cached then this
 *      indicates that the application would need to ensure that the
 *      cache is updated with the data from the actual memory.
 *
 *  @param[in]  blockPtr
 *       Address of the block which is to be invalidated
 *
 *  @param[in]  size
 *       Size of the block to be invalidated

 *  @retval
 *      Not Applicable
 */
void Osal_qmssBeginMemAccess (void *blockPtr, uint32_t size)
{

    /* Cache coherence protection is only required for multi-core application */
    return;
}

/**
 *  @b Description
 *  @n
 *      The function is used to indicate that the block of memory has
 *      finished being accessed. If the memory block is cached then the
 *      application would need to ensure that the contents of the cache
 *      are updated immediately to the actual memory.
 *
 *  @param[in]  blockPtr
 *       Address of the block which is to be written back
 *
 *  @param[in]  size
 *       Size of the block to be written back

 *  @retval
 *      Not Applicable
 */
void Osal_qmssEndMemAccess (void *blockPtr, uint32_t size)
{

    /* Cache coherence protection is only required for multi-core application */
    return;
}




The comments in these functions suggest these are used as a gate to maintain the cache coherence between the cores.
Because OpenMP master thread is running only on core0 and other slave cores work for OpenMP parallel region dispatched from core0, NDK stack will run only on core0.
In this use case, can they leave the functions empty ?

Best Regards,
Naoki