]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blobdiff - pasdk/test_dsp/application/app.cfg
PASDK-218:Add rudimentary Dec Op CB status and alpha command interface
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / application / app.cfg
index b497d362ba3d1b2ebcf5963d40740dc53eece833..10ee8a95080d2ccee1297fb268412aecb8df86a8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
-Copyright (c) 2016, Texas Instruments Incorporated - http://www.ti.com/
+Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com/
 All rights reserved.
 
 * Redistribution and use in source and binary forms, with or without 
@@ -55,10 +55,12 @@ var SysMin          = xdc.useModule('xdc.runtime.SysMin');
 var System          = xdc.useModule('xdc.runtime.System');
 var Text            = xdc.useModule('xdc.runtime.Text');
 
+
 var BIOS            = xdc.useModule('ti.sysbios.BIOS');
+var GateAll         = xdc.useModule('ti.sysbios.gates.GateAll');    // Added for PFP
 var Hwi             = xdc.useModule('ti.sysbios.hal.Hwi');
 var Cache           = xdc.useModule('ti.sysbios.hal.Cache');
-var Cachec66       = xdc.useModule('ti.sysbios.family.c66.Cache');
+var Cachec66        = xdc.useModule('ti.sysbios.family.c66.Cache');
 var Timer           = xdc.useModule('ti.sysbios.hal.Timer');
 var HeapBuf         = xdc.useModule('ti.sysbios.heaps.HeapBuf');
 var HeapMem         = xdc.useModule('ti.sysbios.heaps.HeapMem');
@@ -66,6 +68,7 @@ var Clock           = xdc.useModule('ti.sysbios.knl.Clock');
 var Idle            = xdc.useModule('ti.sysbios.knl.Idle');
 var Queue           = xdc.useModule('ti.sysbios.knl.Queue');
 var Semaphore       = xdc.useModule('ti.sysbios.knl.Semaphore');
+var Swi             = xdc.useModule('ti.sysbios.knl.Swi');          // Added for PFP
 var Task            = xdc.useModule('ti.sysbios.knl.Task');
 var Load            = xdc.useModule('ti.sysbios.utils.Load');
 
@@ -84,7 +87,7 @@ xdc.global.SrMsmcMem_cacheEnable = true;
 xdc.global.SrDDr3Mem_cacheEnable = true;
 xdc.global.SrDDr3_2Mem_cacheEnable = false;
 xdc.global.procName = "CORE0";
-var ipc_cfg = xdc.loadCapsule("C:/ti/processor_audio_sdk_1_00_00_01/pasdk/shared/ipc.cfg.xs");
+var ipc_cfg = xdc.loadCapsule("C:/ti/processor_audio_sdk_1_00_00_03/pasdk/shared/ipc.cfg.xs");
 
 /* select ipc libraries */
 var Build = xdc.useModule('ti.sdo.ipc.Build');
@@ -187,10 +190,16 @@ LoggingSetup.mainLoggingRuntimeControl = false;
 LoggingSetup.mainLoggerSize = 327680; //81960;
 //LoggingSetup.memorySectionName = "CORE0_DDR3"; //"CORE0_MSMC";
 
-/* Configure Load Logging */ // FL: doesn't work
-//Load.taskEnabled = true;
-//Load.hwiEnabled = true;
-//Load.common$.diags_USER4 = Diags.ALWAYS_ON;
+// FL: CPU load logging via UIA doesn't work.
+//     Below settings work for target-side load computation (no UIA) when LoggingSetup.loadLogging set to false, but not true.
+//     Load.common$.diags_USER4 set to default or Diags.ALWAYS_ON makes no difference.
+/* Configure Load Logging */
+Load.updateInIdle = true;   // default=true
+Load.windowInMs = 5.33;    // 48KHz 256 @ 5.33ms  // in msec., default=500
+Load.taskEnabled = true;    // default=true
+Load.swiEnabled = false;    // default=true
+Load.hwiEnabled = false;    // default=true
+//Load.common$.diags_USER4 = Diags.ALWAYS_ON; // default=Diags.RUNTIME_ON
 
 //Task.common$.diags_USER1 = Diags.ALWAYS_ON;
 Task.common$.diags_INFO = Diags.ALWAYS_ON;
@@ -200,48 +209,13 @@ Hwi.dispatcherAutoNestingSupport = false;
 
 var ProjName = environment["ProjName"];
 var topo = ProjName.replace( /pa_([a-z])[0-9]+_.*/, "$1");
-var AudioClockSim = environment["AudioClockSim"];
-var acSimBuild = (AudioClockSim == "1" ? true : false);
 var RxAlphaSim = environment["RxAlphaSim"];
 var rxAlphaSimBuild = (RxAlphaSim == "1" ? true : false);
 
-if (acSimBuild == false)
-{
-    var drv             = xdc.loadPackage('ti.sdo.edma3.drv');
-    var rm              =   xdc.loadPackage ("ti.sdo.edma3.rm");
-    var Edma            =   xdc.loadPackage ("ti.sdo.edma3.drv.sample");
-    var Hwi             =   xdc.useModule('ti.sysbios.family.c64p.Hwi');
-}
-else
-{
-    // 
-    // SIO simulation
-    // 
-   
-    /* Add timer to simulate Rx audio DMA */
-    var timer0Params = new Timer.Params();
-    timer0Params.instance.name = "timerRxAudio";
-    timer0Params.period = 5330;
-    timer0Params.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
-    Program.global.timerRxAudio = Timer.create(1, null, timer0Params);
-
-    /* Add timer to simulate Tx audio DMA */
-    var timer1Params = new Timer.Params();
-    timer1Params.instance.name = "timerTxAudio";
-    timer1Params.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
-    timer1Params.period = 5330;
-    Program.global.timerTxAudio = Timer.create(2, null, timer1Params);
-
-    /* Add semaphore for Rx audio DMA */
-    var semaphore0Params = new Semaphore.Params();
-    semaphore0Params.instance.name = "semaphoreRxAudio";
-    Program.global.semaphoreRxAudio = Semaphore.create(null, semaphore0Params);
-
-    /* Add semaphore for Tx audio DMA */
-    var semaphore1Params = new Semaphore.Params();
-    semaphore1Params.instance.name = "semaphoreTxAudio";
-    Program.global.semaphoreTxAudio = Semaphore.create(null, semaphore1Params);
-}
+var drv             = xdc.loadPackage('ti.sdo.edma3.drv');
+var rm              = xdc.loadPackage ("ti.sdo.edma3.rm");
+var Edma            = xdc.loadPackage ("ti.sdo.edma3.drv.sample");
+var Hwi             = xdc.useModule('ti.sysbios.family.c64p.Hwi');
 
 if (rxAlphaSimBuild == false)
 {
@@ -347,7 +321,7 @@ var task4Params = new Task.Params();
 task4Params.instance.name = "TaskSysInit";
 task4Params.stackSize   = 0x1000;
 task4Params.stackSection = ".far:taskStackSectionSysInit";
-task4Params.priority = 4;
+task4Params.priority = 6; //5;
 Program.global.TaskSysInit = Task.create("&taskSysInitFxn", task4Params);
 Program.sectMap[".far:taskStackSectionSysInit"] = "CORE0_DDR3";
 
@@ -363,26 +337,17 @@ Program.global.TaskSystemStream = Task.create("&taskSystemStreamFxn", task5Param
 Program.sectMap[".far:taskStackSectionAudioStream"] = "CORE0_DDR3";
 
 /* Add idle functions */
-if (acSimBuild == false)
-{
-    Idle.idleFxns[0] = "&SAP_watchDog";         // Idle function for DSP watchdog; formerly DAP_watchDog()
-}
-else
-{
-    // 
-    // SIO simulation
-    // 
-    Idle.idleFxns[0] = "&idleDapWatchDog";      // Idle function for DSP watchdog; formerly DAP_watchDog()
-}
+Idle.idleFxns[0] = "&SAP_watchDog";         // Idle function for DSP watchdog; formerly DAP_watchDog()
 // Remark: Moved idleAudioStream (idle function) to taskSystemStreamFxn (task)
 //Idle.idleFxns[1] = "&idleAudioStream";      // Idle function for audio stream; formerly audioStream1Idle()
 //Idle.idleFxns[2] = "&idleNotifyInfoChange"; // Idle function for Notify Information Change (NIC); formerly customSystemStreamIdleNIC()
 Idle.idleFxns[1] = "&idleNotifyInfoChange"; // Idle function for Notify Information Change (NIC); formerly customSystemStreamIdleNIC()
+Idle.idleFxns[2] = "&idleDebug"             // Idle function for debug code
 
 /* Add L2 SRAM heap */ // formerly IRAM
 var heapMem0Params = new HeapMem.Params();
 heapMem0Params.instance.name = "heapMemL2Sram";
-heapMem0Params.size = 256*1024; // 96000; // from pa.cfg
+heapMem0Params.size = 700*1024; //512*1024; // 700 kB temporary setting for OB in L2
 heapMem0Params.sectionName = ".l2SramHeap";
 Program.global.heapMemL2Sram = HeapMem.create(heapMem0Params);
 Program.sectMap[".l2SramHeap"] = "L2SRAM";
@@ -409,39 +374,48 @@ heapMem2Params.sectionName = ".ddr3Heap";
 Program.global.heapMemDdr3 = HeapMem.create(heapMem2Params);
 Program.sectMap[".ddr3Heap"] = "CORE0_DDR3";
 
-/* FL: hack for DCS7, dcs7_cfg.c */
-Program.global.SDRAMHeap = Program.global.heapMemDdr3;
+/* For DCS7, dcs7_cfg.c */
+Program.global.Heap = Program.global.heapMemDdr3;
 
 Program.sectMap["platform_lib"] = "L2SRAM";
 //Program.sectMap[".stack"]    = "L2SRAM";
 
-if (acSimBuild == false)
-{
-    ECM.eventGroupHwiNum[0] = 7;
-    ECM.eventGroupHwiNum[1] = 8;  // FL: conflict w/ UART LLD (intr-callback)
-    ECM.eventGroupHwiNum[2] = 9;
-    ECM.eventGroupHwiNum[3] = 10;
-    //Clock.tickPeriod = 100;   // FL: UART LLD (intr-callback) unresponsive
-}
-else
-{
-    ////
-    //// For simulation
-    //// This doesn't work-- events #34,36 aren't enabled in C66 EVTMASK1
-    //
-    //// Use EventCombiner module
-    //var EventCombiner = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
-    //
-    //// Plug function and argument for event 31 (timer1) then enable it.
-    //EventCombiner.events[34].fxn = '&timerRxFxn';
-    //EventCombiner.events[34].arg = 34;
-    //EventCombiner.events[34].unmask = true;
-    //
-    //// Plug function and argument for event 36 (timer2) then enable it.
-    //EventCombiner.events[36].fxn = '&timerTxFxn';
-    //EventCombiner.events[36].arg = 36;
-    //EventCombiner.events[36].unmask = true;
-    //
-    //// Map event 1 (combine events 32-63) to vector 7
-    //EventCombiner.eventGroupHwiNum[1] = 7;
-}
+ECM.eventGroupHwiNum[0] = 7;
+ECM.eventGroupHwiNum[1] = 8;  // FL: conflict w/ UART LLD (intr-callback)
+ECM.eventGroupHwiNum[2] = 9;
+ECM.eventGroupHwiNum[3] = 10;
+//Clock.tickPeriod = 100;   // FL: UART LLD (intr-callback) unresponsive
+
+/* Define HWI Hook Set for PFP */
+Hwi.addHookSet({
+    registerFxn:    '&pfpHwiRegister',
+    createFxn:      '&pfpHwiCreate',
+    beginFxn:       '&pfpHwiBegin',
+    endFxn:         '&pfpHwiEnd',
+    deleteFxn:      null,
+});
+
+/* Define SWI Hook Set for PFP */
+Swi.addHookSet({
+    registerFxn:    '&pfpSwiRegister', // need this for Id for Hook context
+    createFxn:      '&pfpSwiCreate',   // malloc context storage space
+    readyFxn:       '&pfpSwiReady',
+    beginFxn:       '&pfpSwiBegin',
+    endFxn:         '&pfpSwiEnd',
+    deleteFxn:      null,
+});
+
+/* Define Task Hook Set for PFP */
+Task.addHookSet({
+    registerFxn:    '&pfpTaskRegister',
+    createFxn:      '&pfpTaskCreate',
+    readyFxn:       '&pfpTaskReady',
+    switchFxn:      '&pfpTaskSwitch',
+    exitFxn:        null,
+    deleteFxn:      null,
+});
+
+/* Added for PFP, not necessary */
+Hwi.common$.namedInstance=true;
+Swi.common$.namedInstance=true;
+Task.common$.namedInstance=true;