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.

try to merge PA example into NIMU example

Hi.

I am using the EVMK2H b'd, and I've tested two examples(NIMU_emac and PA_emac), in separately at dsp_core0. (both work well :))

Now, I am trying to merge the PA example into the NIMU example

sys/bios task 0 -> NDK-> eth0 -> remote PC0

sys/bios task 1 -> PA -> eth1 -> remote PC1

The common(similar) functions might be okay(like, initQmss, initCppi), however some curious parts are remained(I marked with bold).

Below flows are NIMU and PA's function call flow.

[NIMU]  example [PA] example                                        my job to do for merging PA into NIMU
NIMU_initQmss() 

Init_Qmss()

Qmss_init() must be called once. Qmss_init() with maxDescNum with 128(for NIMU)+64(for PA).

call Qmss_insertMemoryRegion() function twice for both NIMU and PA.

call Cppi_initDescriptor() function twice for both NIMU and PA.

NIMU_initCppi() Init_Cppi()

Cppi_init() must be called once. 

Cppi_open() must be called once.

call Cppi_txChannelOpen() function twice for both NIMU and PA OR call Cppi_txChannelOpen() once?

call Cppi_rxChannelOpen  function twice for both NIMU and PA OR call Cppi_rxChannelOpen () once?

NIMU_initPass() Init_PASS()

Pa_getBufferReq() must be called once.

Pa_create() must be called once.

Download_PAFirmware() must be called once.

Pa_configTimestamp() function is for PA. So merge this.

Qmss_queueOpen() function is for PA. So merge this.

Init_Cpsw(),

Setup_Tx(),

Setup_Rx(),

Setup_Tx() and Setup_Rx() is done at NIMU_eth.c by NDK, however PA also does this.

Should I call Setup_Tx() and Setup_Rx() for PA? or delete it.

Above is my first step to merge PA into NIMU, really need some help.

please helping me 

  • Hi,

    I've notified the design team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Hi,

    There is a similar work from this where to use two NDK instances running on the same core 0, each instance with a different EMAC ports. The work needs to modify the NIMU driver to support multicores. The NIMU modification is based on  11-06-2013 4:50 PM post with an explanation document and changed NIMU driver source code. The final outcome of the work is that two NDK instances can be run on the same core. The work also needs to deal with the QMSS, CPPI and PA setup, whether they needs to be called once globally or twice (each for the intance per core) like your current work --- one port with NDK, the other port with PA example. As I saw, Cppi_rxChannelOpen and Cppi_txChannelOpen are called inside NIMU_initCppi() only once, and Setup_Tx() and Setup_Tx() is also called once only in nimu_eth.c. You may refer to the code examples in those two threads for reference.

    Regards, Eric