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.

Questions about Configuration file TMS320C6678

Other Parts Discussed in Thread: SYSBIOS

Hi , I want to compute a FFT 2080 * 256 points on all cores using openMP . each core work on 256 * 520 points

so I make the following configuration file :

* Copyright (c) 2012, Texas Instruments Incorporated
*
/*-----------------------------------------------------------------------------*/
/* runtime module configuration */
/*-----------------------------------------------------------------------------*/
var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
/* load the common configuration file */
xdc.loadCapsule('ti/omp/common.cfg.xs');
var System = xdc.useModule('xdc.runtime.System');
System.extendedFormats = "%$S";
// allocate out of this shared region heap after IPC has been started.
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
/*-----------------------------------------------------------------------------*/
/* configure openMP Module */
/*-----------------------------------------------------------------------------*/
// Configure HeapOMP for the shared memory heap
var HeapOMP = xdc.useModule('ti.omp.utils.HeapOMP');
var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
var OpenMP = xdc.useModule('ti.omp.utils.OpenMP');
OpenMP.setNumProcessors(8);
HeapOMP.sharedRegionId = 2;
HeapOMP.localHeapSize = 0x20000;
HeapOMP.sharedHeapSize = 0x1000000;
// Specify the Shared Region
SharedRegion.setEntryMeta( HeapOMP.sharedRegionId,
{ base: 0x90000000,
len: HeapOMP.sharedHeapSize,
ownerProcId: 0,
cacheEnable: true,
createHeap: true,
isValid: true,
name: "heapomp",
}
);
// Enable Cache Write-back for HEAPOMP
var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
Cache.setMarMeta(0x80000000, 0x20000000, Cache.PC | Cache.WTE);
/*-----------------------------------------------------------------------------*/
/* define a Section to store Shared input data and private data for each Core */
/*-----------------------------------------------------------------------------*/
Program.sectMap["InputBuffer"] = new Program.SectionSpec();
Program.sectMap["InputBuffer"].loadSegment = "DDR3";
Program.sectMap[".threadprivateBuffer"] = new Program.SectionSpec();
Program.sectMap[".threadprivateBuffer"].loadSegment = "L2SRAM";
/*-----------------------------------------------------------------------------*/
/* System Configuration : Memory for Variable and Program Code */
/*-----------------------------------------------------------------------------*/
Program.sectMap["systemHeapMaster"] = "DDR3"; // contains Heap Buffer
Program.sectMap[".cinit"] = "MSMCSRAM"; // contains tables for initializing variables and constants
Program.sectMap[".const"] = "MSMCSRAM"; // contains string literal, floating-point constant
Program.sectMap[".text"] = "MSMCSRAM"; // contains all executable code
Program.sectMap[".far"] = "L2SRAM"; // reserve space for global variable declared with far

The sectMap "InputBuffer" represent the place where my shared input data (2080 * 256 ) is stored,

and sectMap "threadprivateBuffer" where each core store his private data (520 * 256).

Question : does this configuration file make sense for my problem ?

On my C Code I declared a  Inputdata like this :

#pragma DATA_SECTION (inputdata , "InputBuffer")

float inputdata[2080 * 256]         ---->  Question : is these Declaration right?

After Compiling a have this warning : creating output section "InputBuffer " without a SECTIONS specifiaction ----> what that´s mind ?

Thank you for help

Best regards

Lopez

  • Lopez,

    Here is how you can achieve this:

    CFG file:

    /* load the common configuration file */
    xdc.loadCapsule('ti/omp/common.cfg.xs');

    var System = xdc.useModule('xdc.runtime.System');
    System.extendedFormats = "%$S";

    var OpenMP = xdc.useModule('ti.omp.utils.OpenMP');
    OpenMP.setNumProcessors(4); 

    Program.sectMap["ddr"] = new Program.SectionSpec();
    Program.sectMap["ddr"].loadSegment = "DDR3";

    Program.sectMap[".threadprivate"] = new Program.SectionSpec();
    Program.sectMap[".threadprivate"].loadSegment = "L2SRAM";

    Program.sectMap["Buffer"] = new Program.SectionSpec();
    Program.sectMap["Buffer"].loadSegment = "DDR3";


    C file:

    #pragma DATA_SECTION (pInputData , "Buffer")
    float *pInputData;

    #pragma DATA_SECTION (pOutputData , "Buffer")
    float *pOutputData;

    void main()
    {
        int i, j;
        pInputData = malloc(2080*256);
        pOutputData = malloc(2080);

        #pragma omp parallel

        //This is where you would put your code

    }

  • Btw if you haven't already updated to the latest versions of MCSDK and OMP, I would suggest you do so by installing them from the following links:

    You can find the latest version of MCSDK at http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html As of today this is MCSDK 2.01.02.06.

    Next, update your OpenMP package to the latest build by downloading the installer from http://software-dl.ti.com/sdoemb/sdoemb_public_sw/omp/latest/index_FDS.html  As of today this is OMP 1.02.00.05.

  • Hi Uday ,

    thank you for reply , I have already update the lastest version of MCSDK , but not OMP . I am doing that now.

    I keep you informed

    Best regards

    Lopez

  • Hi Uday ,

    when I use your cfg. File , i get this Error : invalid HeapMemory

    Maybe it is in relation to OpenMP , I cannot update to the lastest version for OpenMP : see

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/276949/969431.aspx#969431

    thank you

    Lopez