Other Parts Discussed in Thread: SYSBIOS
Hi, everyone,
I want to use OpenMP in my srio project.I have problems making them work together.
I have searched a lot from e2e and wiki,and some has the same problems with me.for example https://e2e.ti.com/support/processors/f/791/t/468231?OpenMP-QMSS-manual-setup#pi320966=1 but when I
tried the the same operation with the forum ,the project could not work well.
First of all, my program aims to realize fpga transfer data to dsp through srio, send doorbell interruption after the transfer is completed, and then divide the data processing to core0-core7 for calculation by using
omp parallel programming.
This program is modified based on the SRIO_LpbkDioIsr_evmc6678_C66BiosExampleProject generated by the PDK. Many posts have been referenced before. Since srio uses qmss and omp also uses qmss,
follow http://downloads.ti.com/mctools/esd/docs/openmp-dsp/integrating_apps_with_qmss.html to manually initialize qmss. Since srio uses 128 descriptors and uses Qmss_MemRegion_MEMORY_REGION0,
modify the following in the cfg file.
ompSettings.runtimeInitializesQmss = false;
OpenMP.qmssMemRegionIndex = 1;
OpenMP.qmssFirstDescIdxInLinkingRam = 128;
add following code after the ddr.len.
var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
Cache.setMarMeta(msmcNcVirt.base, msmcNcVirt.len, 0);
Cache.setMarMeta(OpenMP.ddrBase, OpenMP.ddrSize,
Cache.PC|Cache.PFX|Cache.WTE);
Cache.setMarMeta(OpenMP.msmcBase, OpenMP.msmcSize,
Cache.PC|Cache.PFX|Cache.WTE);
add the customized qmss function before __TI_omp_initialize_rtsc_mode
var Startup = xdc.useModule('xdc.runtime.Startup');
Startup.lastFxns.$add('&qmssInitOmp');
Startup.lastFxns.$add('&__TI_omp_initialize_rtsc_mode');
The following phenomena exist:
1 If the task of srio is not started, the omp program runs normally;
2 If the omp program is not started, the srio program runs normally and can receive the doorbell interrupt;
3 If the srio and omp programs are started at the same time, the doorbell interrupt can still be received in the srio program, but the omp program reports an error INTERNAL ERROR: Unexpected NULL pointer-src / tomp_parallel.c, 224
My task is started statically through a cfg file. The srio has the lowest priority and the omp program has the highest priority. I strictly follow the instructions in the omp2.0 user guide , for example, modify the auto run options ans so on
My question is:
1 Is my qmss startup method correct?
2 When the omp program will show this kind of error INTERNAL ERROR: Unexpected NULL pointer-src / tomp_parallel.c, 224;
Post my cfg file and related code below.
I think I made some mistake with QMSS init but I can't find it by m own. Thank you in advance.
Best Regards