Advertisement
Guest User

Untitled

a guest
Aug 29th, 2011
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.04 KB | None | 0 0
  1. /*
  2. * Copyright (c) 2010, Texas Instruments Incorporated
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. *
  9. * * Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. *
  12. * * Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. *
  16. * * Neither the name of Texas Instruments Incorporated nor the names of
  17. * its contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  21. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  22. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  23. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  24. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  25. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  26. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  27. * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  28. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  29. * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  30. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. *
  32. */
  33. /*
  34. * ======== all.cfg ========
  35. *
  36. * For details about the packages and configuration parameters used throughout
  37. * this config script, see the Codec Engine Configuration Guide (link
  38. * provided in the release notes).
  39. */
  40.  
  41. /*
  42. * Configure CE's OSAL. This codec server only builds for the BIOS-side of
  43. * a heterogeneous system, so use the "DSPLINK_BIOS" configuration.
  44. */
  45. var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
  46. osalGlobal.runtimeEnv = osalGlobal.DSPLINK_BIOS;
  47.  
  48. /* configure default memory seg id to BIOS-defined segment */
  49. var platform = Program.build.cfgArgs.platform;
  50. if (platform.match("evmOMAPL13[78]")) {
  51. osalGlobal.defaultMemSegId = "SDRAM";
  52. }
  53. else {
  54. osalGlobal.defaultMemSegId = "DDR2";
  55. }
  56.  
  57. /*
  58. * Uncomment and modify the following line, to change the size of the circular
  59. * trace buffer, if necessary.
  60. */
  61. //osalGlobal.traceBufferSize = 32 * 1024;
  62.  
  63. /* activate BIOS logging module */
  64. var LogServer = xdc.useModule('ti.sdo.ce.bioslog.LogServer');
  65.  
  66. /* configure power management */
  67. var cfgArgs = Program.build.cfgArgs;
  68. if ((cfgArgs != undefined) && (cfgArgs.usePowerManagement != undefined)) {
  69. var biosIpc = xdc.useModule('ti.sdo.ce.ipc.bios.Ipc');
  70. biosIpc.usePowerManagement = cfgArgs.usePowerManagement;
  71. }
  72.  
  73. /*
  74. * "Use" the various codec modules; i.e., implementation of codecs.
  75. * All these "xdc.useModule" commands provide a handle to the codecs,
  76. * which we'll use below to add them to the Server.algs array.
  77. */
  78. var H264DEC =
  79. xdc.useModule('ti.sdo.codecs.h264dec.ce.H264DEC');
  80.  
  81. var VIDDEC_COPY =
  82. xdc.useModule('ti.sdo.ce.examples.codecs.viddec_copy.VIDDEC_COPY');
  83. var VIDENC_COPY =
  84. xdc.useModule('ti.sdo.ce.examples.codecs.videnc_copy.VIDENC_COPY');
  85. var SPHENC_COPY =
  86. xdc.useModule('ti.sdo.ce.examples.codecs.sphenc_copy.SPHENC_COPY');
  87. var SPHDEC_COPY =
  88. xdc.useModule('ti.sdo.ce.examples.codecs.sphdec_copy.SPHDEC_COPY');
  89. var IMGDEC_COPY =
  90. xdc.useModule('ti.sdo.ce.examples.codecs.imgdec_copy.IMGDEC_COPY');
  91. var IMGENC_COPY =
  92. xdc.useModule('ti.sdo.ce.examples.codecs.imgenc_copy.IMGENC_COPY');
  93. var AUDDEC_COPY =
  94. xdc.useModule('ti.sdo.ce.examples.codecs.auddec_copy.AUDDEC_COPY');
  95. var AUDENC_COPY =
  96. xdc.useModule('ti.sdo.ce.examples.codecs.audenc_copy.AUDENC_COPY');
  97.  
  98. var SCALE = xdc.useModule('ti.sdo.ce.examples.codecs.scale.SCALE_TI');
  99.  
  100. var VIDDEC2_COPY =
  101. xdc.useModule('ti.sdo.ce.examples.codecs.viddec2_copy.VIDDEC2_COPY');
  102. var VIDENC1_COPY =
  103. xdc.useModule('ti.sdo.ce.examples.codecs.videnc1_copy.VIDENC1_COPY');
  104. var IMGDEC1_COPY =
  105. xdc.useModule('ti.sdo.ce.examples.codecs.imgdec1_copy.IMGDEC1_COPY');
  106. var IMGENC1_COPY =
  107. xdc.useModule('ti.sdo.ce.examples.codecs.imgenc1_copy.IMGENC1_COPY');
  108. var SPHENC1_COPY =
  109. xdc.useModule('ti.sdo.ce.examples.codecs.sphenc1_copy.SPHENC1_COPY');
  110. var SPHDEC1_COPY =
  111. xdc.useModule('ti.sdo.ce.examples.codecs.sphdec1_copy.SPHDEC1_COPY');
  112. var AUDDEC1_COPY =
  113. xdc.useModule('ti.sdo.ce.examples.codecs.auddec1_copy.AUDDEC1_COPY');
  114. var AUDENC1_COPY =
  115. xdc.useModule('ti.sdo.ce.examples.codecs.audenc1_copy.AUDENC1_COPY');
  116. var G711ENC = xdc.useModule('ti.sdo.ce.examples.codecs.g711.G711ENC');
  117. var G711DEC = xdc.useModule('ti.sdo.ce.examples.codecs.g711.G711DEC');
  118. var transcoder = xdc.useModule('ti.sdo.ce.examples.codecs.' +
  119. 'vidtranscode_copy.VIDTRANSCODE_COPY');
  120. var analytics = xdc.useModule('ti.sdo.ce.examples.codecs.' +
  121. 'vidanalytics_copy.VIDANALYTICS_COPY');
  122. var universal = xdc.useModule('ti.sdo.ce.examples.codecs.' +
  123. 'universal_copy.UNIVERSAL_COPY');
  124.  
  125. var VIDDEC1_COPY =
  126. xdc.useModule('ti.sdo.ce.examples.codecs.viddec1_copy.VIDDEC1_COPY');
  127.  
  128. var VIDDEC2BACK_COPY =
  129. xdc.useModule('ti.sdo.ce.examples.codecs.viddec2split_copy.VIDDEC2BACK_COPY');
  130.  
  131. /*
  132. * ======== Server Configuration ========
  133. */
  134. var Server = xdc.useModule('ti.sdo.ce.Server');
  135.  
  136. /*
  137. * Set the caching policy that will be used by all skeletons. The options
  138. * are the following:
  139. *
  140. * LOCALBUFFERINVWB - Cache invalidation will be performed on input and
  141. * output buffers before processing, a cache writeback
  142. * will be performed on output buffers after processing.
  143. * This is the default policy, if this configuration
  144. * parameter is not set in the cfg file.
  145. *
  146. * WBINVALL - Perform a cache writeback invalidate on all memory
  147. * after processing. No invalidation of buffers is
  148. * done before processing. This may be more efficient
  149. * than the LOCALBUFFERINVWB policy in cases of very
  150. * large buffers.
  151. *
  152. * NONE - No cache operations will be performed in the
  153. * skeletons.
  154. */
  155. Server.skelCachingPolicy = Server.LOCALBUFFERINVWB;
  156. //Server.skelCachingPolicy = Server.WBINVALL;
  157.  
  158. /* The server's stackSize. More than we need... but safe. */
  159. Server.threadAttrs.stackSize = 4096;
  160.  
  161. /* The servers execution priority */
  162. Server.threadAttrs.priority = Server.MINPRI;
  163.  
  164. /*
  165. * The optional stack pad to add to non-configured stacks. This is well
  166. * beyond most codec needs, but follows the approach of "start big and
  167. * safe, then optimize when things are working."
  168. */
  169. Server.stackSizePad = 9000;
  170.  
  171. /*
  172. * The array of algorithms this server can serve up. This array also
  173. * configures details about the threads which will be created to run the
  174. * algorithms (e.g. stack sizes, priorities, etc.).
  175. *
  176. * Note that we don't set any per-codec instance stack sizes below, as
  177. * we leverage the Server.stackSizePad config param to pad all stacks in
  178. * this simple example.
  179. *
  180. * However, in a 'real' server, stack sizes should be measured and
  181. * tested - there are some techniques for doing so here:
  182. * http://wiki.davincidsp.com/index.php?title=Stack_issues
  183. */
  184. Server.algs = [
  185. {name: "viddec_copy", mod: VIDDEC_COPY, threadAttrs: {
  186. stackMemId: 0, priority: Server.MINPRI + 1}, groupId : 0,
  187. },
  188. {name: "videnc_copy", mod: VIDENC_COPY, threadAttrs: {
  189. stackMemId: 0, priority: Server.MINPRI + 1}, groupId : 0,
  190. },
  191. {name: "imgdec_copy", mod: IMGDEC_COPY, threadAttrs: {
  192. stackMemId: 0, priority: Server.MINPRI + 2}, groupId : 1,
  193. },
  194. {name: "imgenc_copy", mod: IMGENC_COPY, threadAttrs: {
  195. stackMemId: 0, priority: Server.MINPRI + 2}, groupId : 1,
  196. },
  197. {name: "auddec_copy", mod: AUDDEC_COPY, threadAttrs: {
  198. stackMemId: 0, priority: Server.MINPRI + 3}, groupId : 2,
  199. },
  200. {name: "audenc_copy", mod: AUDENC_COPY, threadAttrs: {
  201. stackMemId: 0, priority: Server.MINPRI + 3}, groupId : 2,
  202. },
  203. {name: "sphenc_copy", mod: SPHENC_COPY, threadAttrs: {
  204. stackMemId: 0, priority: Server.MINPRI + 3}, groupId : 2,
  205. },
  206. {name: "sphdec_copy", mod: SPHDEC_COPY, threadAttrs: {
  207. stackMemId: 0, priority: Server.MINPRI + 3}, groupId : 2,
  208. },
  209. {name: "scale", mod: SCALE, threadAttrs: {
  210. stackMemId: 0, priority: Server.MINPRI + 1}
  211. },
  212. {name: "h264dec", mod: H264DEC, threadAttrs: {
  213. stackMemId: 0, priority: Server.MINPRI + 1}, groupId : 0,
  214. },
  215. {name: "viddec2_copy", mod: VIDDEC2_COPY, threadAttrs: {
  216. stackMemId: 0, priority: Server.MINPRI + 1}, groupId : 0,
  217. },
  218. {name: "videnc1_copy", mod: VIDENC1_COPY, threadAttrs: {
  219. stackMemId: 0, priority: Server.MINPRI + 1}, groupId : 0,
  220. },
  221. {name: "imgdec1_copy", mod: IMGDEC1_COPY, threadAttrs: {
  222. stackMemId: 0, priority: Server.MINPRI + 2}, groupId : 1,
  223. },
  224. {name: "imgenc1_copy", mod: IMGENC1_COPY, threadAttrs: {
  225. stackMemId: 0, priority: Server.MINPRI + 2}, groupId : 1,
  226. },
  227. {name: "sphdec1_copy", mod: SPHDEC1_COPY, threadAttrs: {
  228. stackMemId: 0, priority: Server.MINPRI + 3}, groupId : 2,
  229. },
  230. {name: "sphenc1_copy", mod: SPHENC1_COPY, threadAttrs: {
  231. stackMemId: 0, priority: Server.MINPRI + 3}, groupId : 2,
  232. },
  233. {name: "auddec1_copy", mod: AUDDEC1_COPY, threadAttrs: {
  234. stackMemId: 0, priority: Server.MINPRI + 3}, groupId : 2,
  235. },
  236. {name: "audenc1_copy", mod: AUDENC1_COPY, threadAttrs: {
  237. stackMemId: 0, priority: Server.MINPRI + 3}, groupId : 2,
  238. },
  239. {name: "g711enc", mod: G711ENC, threadAttrs: {
  240. stackMemId: 0, priority: Server.MINPRI + 3}, groupId : 2,
  241. },
  242. {name: "g711dec", mod: G711DEC, threadAttrs: {
  243. stackMemId: 0, priority: Server.MINPRI + 3}, groupId : 2,
  244. },
  245. {name: "vidtranscode_copy", mod: transcoder, threadAttrs: {
  246. stackMemId: 0, priority: Server.MINPRI + 1}
  247. },
  248. {name: "vidanalytics_copy", mod: analytics, threadAttrs: {
  249. stackMemId: 0, priority: Server.MINPRI + 1}
  250. },
  251. {name: "viddec1_copy", mod: VIDDEC1_COPY, threadAttrs: {
  252. stackMemId: 0, priority: Server.MINPRI + 1}, groupId : 0,
  253. },
  254. {name: "viddec2back_copy", mod: VIDDEC2BACK_COPY, threadAttrs: {
  255. stackMemId: 0, priority: Server.MINPRI + 1}, groupId : 0,
  256. },
  257. {name: "universal_copy", mod: universal, threadAttrs: {
  258. stackMemId: 0, priority: Server.MINPRI + 1}
  259. }
  260. ];
  261.  
  262. /*
  263. * We can use DMA in the VIDENC_COPY codecs.
  264. *
  265. * Note, these .useDMA config params are provided by specific codecs,
  266. * not all codecs are required to provide this level of flexibility
  267. * (and others will provide even more!)
  268. */
  269. VIDENC_COPY.useDMA = true;
  270. VIDENC1_COPY.alg.useDMA = false;
  271.  
  272.  
  273. /*
  274. * Note that we presume this server runs on a system with DSKT2 and DMAN3,
  275. * so we configure those modules here.
  276. */
  277.  
  278.  
  279. /*
  280. * ======== DSKT2 (xDAIS Alg. memory allocation) configuration ========
  281. *
  282. * DSKT2 is the memory manager for all algorithms running in the system,
  283. * granting them persistent and temporary ("scratch") internal and external
  284. * memory. We configure it here to define its memory allocation policy.
  285. *
  286. * DSKT2 settings are critical for algorithm performance.
  287. *
  288. * First we assign various types of algorithm internal memory (DARAM0..2,
  289. * SARAM0..2,IPROG, which are all the same on a C64+ DSP) to "L1DHEAP"
  290. * defined in the .tcf file as an internal memory heap. (For instance, if
  291. * an algorithm asks for 5K of DARAM1 memory, DSKT2 will allocate 5K from
  292. * L1DHEAP, if available, and give it to the algorithm; if the 5K is not
  293. * available in the L1DHEAP, that algorithm's creation will fail.)
  294. *
  295. * The remaining segments we point to the "DDRALGHEAP" external memory segment
  296. * (also defined in the.tcf) except for DSKT2_HEAP which stores DSKT2's
  297. * internal dynamically allocated objects, which must be preserved even if
  298. * no codec instances are running, so we place them in "DDR2" memory segment
  299. * with the rest of system code and static data.
  300. */
  301. var DSKT2 = xdc.useModule('ti.sdo.fc.dskt2.DSKT2');
  302. DSKT2.DARAM0 = "L1DHEAP";
  303. DSKT2.DARAM1 = "L1DHEAP";
  304. DSKT2.DARAM2 = "L1DHEAP";
  305. DSKT2.SARAM0 = "L1DHEAP";
  306. DSKT2.SARAM1 = "L1DHEAP";
  307. DSKT2.SARAM2 = "L1DHEAP";
  308. DSKT2.ESDATA = "DDRALGHEAP";
  309. DSKT2.IPROG = "L1DHEAP";
  310. DSKT2.EPROG = "DDRALGHEAP";
  311. if (platform.match("evmOMAPL13[78]")) {
  312. DSKT2.DSKT2_HEAP = "SDRAM";
  313. }
  314. else {
  315. DSKT2.DSKT2_HEAP = "DDR2";
  316. }
  317.  
  318. /*
  319. * Next we define how to fulfill algorithms' requests for fast ("scratch")
  320. * internal memory allocation; "scratch" is an area an algorithm writes to
  321. * while it processes a frame of data and
  322. *
  323. * First we turn off the switch that allows the DSKT2 algorithm memory manager
  324. * to give to an algorithm external memory for scratch if the system has run
  325. * out of internal memory. In that case, if an algorithm fails to get its
  326. * requested scratch memory, it will fail at creation rather than proceed to
  327. * run at poor performance. (If your algorithms fail to create, you may try
  328. * changing this value to "true" just to get it running and optimize other
  329. * scratch settings later.)
  330. *
  331. * Next we set "algorithm scratch sizes", a scheme we use to minimize internal
  332. * memory resources for algorithms' scratch memory allocation. Algorithms that
  333. * belong to the same "scratch group ID" -- field "groupId" in the algorithm's
  334. * Server.algs entry above, reflecting the priority of the task running the
  335. * algorithm -- don't run at the same time and thus can share the same
  336. * scratch area. When creating the first algorithm in a given "scratch group"
  337. * (between 0 and 19), a shared scratch area for that groupId is created with
  338. * a size equal to SARAM_SCRATCH_SIZES[<alg's groupId>] below -- unless the
  339. * algorithm requests more than that number, in which case the size will be
  340. * what the algorithm asks for. So SARAM_SCRATCH_SIZES[<alg's groupId>] size is
  341. * more of a groupId size guideline -- if the algorithm needs more it will get
  342. * it, but getting these size guidelines right is important for optimal use of
  343. * internal memory. The reason for this is that if an algorithm comes along
  344. * that needs more scratch memory than its groupId scratch area's size, it
  345. * will get that memory allocated separately, without sharing.
  346. *
  347. * This DSKT2.SARAM_SCRATCH_SIZES[<groupId>] does not mean it is a scratch size
  348. * that will be automatically allocated for the group <groupId> at system
  349. * startup, but only that is a preferred minimum scratch size to use for the
  350. * first algorithm that gets created in the <groupId> group, if any.
  351. *
  352. * (An example: if algorithms A and B with the same groupId = 0 require 10K and
  353. * 20K of scratch, and if SARAM_SCRATCH_SIZES[0] is 0, if A gets created first
  354. * DSKT2 allocates a shared scratch area for group 0 of size 10K, as A needs.
  355. * If then B gets to be created, the 20K scratch area it gets will not be
  356. * shared with A's -- or anyone else's; the total internal memory use will be
  357. * 30K. By contrast, if B gets created first, a 20K shared scratch will be
  358. * allocated, and when A comes along, it will get its 10K from the existing
  359. * group 0's 20K area. To eliminate such surprises, we set
  360. * SARAM_SCRATCH_SIZES[0] to 20K and always spend exactly 20K on A and B's
  361. * shared needs -- independent of their creation order. Not only do we save 10K
  362. * of precious internal memory, but we avoid the possibility that B can't be
  363. * created because less than 20K was available in the DSKT2 internal heaps.)
  364. *
  365. * In our example below, we set the size of groupId 0 to 32K -- as an example,
  366. * even though our codecs don't use it.
  367. *
  368. * Finally, note that if the codecs correctly implement the
  369. * ti.sdo.ce.ICodec.getDaramScratchSize() and .getSaramScratchSize() methods,
  370. * this scratch size configuration can be autogenerated by
  371. * configuring Server.autoGenScratchSizeArrays = true.
  372. */
  373. DSKT2.ALLOW_EXTERNAL_SCRATCH = true;
  374. //DSKT2.SARAM_SCRATCH_SIZES[0] = 32*1024;
  375. DSKT2.SARAM_SCRATCH_SIZES[0] = 64*1024;
  376. DSKT2.DARAM_SCRATCH_SIZES[0] = 64*1024;
  377.  
  378. /*
  379. * ======== DMAN3 (DMA manager) configuration ========
  380. */
  381. var DMAN3 = xdc.useModule('ti.sdo.fc.dman3.DMAN3');
  382.  
  383. /* First we configure how DMAN3 handles memory allocations:
  384. *
  385. * Essentially the configuration below should work for most codec combinations.
  386. * If it doesn't work for yours -- meaning an algorithm fails to create due
  387. * to insufficient internal memory -- try the alternative (commented out
  388. * line that assigns "DDRALGHEAP" to DMAN3.heapInternal).
  389. *
  390. * What follows is an FYI -- an explanation for what the alternative would do:
  391. *
  392. * When we use an external memory segment (DDRALGHEAP) for DMAN3 internal
  393. * segment, we force algorithms to use external memory for what they think is
  394. * internal memory -- we do this in a memory-constrained environment
  395. * where all internal memory is used by cache and/or algorithm scratch
  396. * memory, pessimistically assuming that if DMAN3 uses any internal memory,
  397. * other components (algorithms) will not get the internal memory they need.
  398. *
  399. * This setting would affect performance very lightly.
  400. *
  401. * By setting DMAN3.heapInternal = <external-heap> DMAN3 *may not* supply
  402. * ACPY3_PROTOCOL IDMA3 channels the protocol required internal memory for
  403. * IDMA3 channel 'env' memory. To deal with this catch-22 situation we
  404. * configure DMAN3 with hook-functions to obtain internal-scratch memory
  405. * from the shared scratch pool for the associated algorithm's
  406. * scratch-group (i.e. it first tries to get the internal scratch memory
  407. * from DSKT2 shared allocation pool, hoping there is enough extra memory
  408. * in the shared pool, if that doesn't work it will try persistent
  409. * allocation from DMAN3.internalHeap).
  410. */
  411. DMAN3.heapInternal = "L1DHEAP"; /* L1DHEAP is an internal segment */
  412. // DMAN3.heapInternal = "DDRALGHEAP"; /* DDRALGHEAP is an external segment */
  413. DMAN3.heapExternal = "DDRALGHEAP";
  414. DMAN3.idma3Internal = false;
  415. DMAN3.scratchAllocFxn = "DSKT2_allocScratch";
  416. DMAN3.scratchFreeFxn = "DSKT2_freeScratch";
  417.  
  418. /* Next, we configure all the physical resources that DMAN3 is granted
  419. * exclusively. These settings are optimized for the DSP on DM6446 (DaVinci).
  420. *
  421. * We assume PaRams 0..79 are taken by the Arm drivers, so we reserve
  422. * all the rest, up to 127 (there are 128 PaRam sets on DM6446).
  423. * DMAN3 takes TCC's 32 through 63 (hence the High TCC mask is 0xFFFFFFFF
  424. * and the Low TCC mask is 0). Of the 48 PaRams we reserved, we assign
  425. * all of them to scratch group 0; similarly, of the 32 TCCs we reserved,
  426. * we assign all of them to scratch group 0.
  427. *
  428. * If we had more scratch groups with algorithms that require EDMA, we would
  429. * split those 48 PaRams and 32 TCCs appropriately. For example, if we had
  430. * a video encoder alg. in group 0 and video decoder alg. in group 1, and they
  431. * both needed a number of EDMA channels, we could assing 24 PaRams and 16
  432. * TCCs to Groups [0] and [1] each. (Assuming both algorithms needed no more
  433. * than 24 channels to run properly.)
  434. */
  435. DMAN3.paRamBaseIndex = 80; // 1st EDMA3 PaRAM set available for DMAN3
  436. DMAN3.numQdmaChannels = 8; // number of device's QDMA channels to use
  437. DMAN3.qdmaChannels = [0,1,2,3,4,5,6,7]; // choice of QDMA channels to use
  438. DMAN3.numPaRamEntries = 48; // number of PaRAM sets exclusively used by DMAN
  439. DMAN3.numPaRamGroup[0] = 48; // number of PaRAM sets for scratch group 0
  440. DMAN3.numTccGroup[0] = 32; // number of TCCs assigned to scratch group 0
  441. if (platform.match("evmOMAPL13[78]")) {
  442. /* there are only 32 TCCs on OMAP-L137 and OMAP-L138 devices */
  443. DMAN3.tccAllocationMaskL = 0xffffffff; // which TCCs 0..31 for DMAN3
  444. DMAN3.tccAllocationMaskH = 0; // which TCCs 32..63 for DMAN3
  445. } else {
  446. /* there are 64 TCCs on all other supported devices */
  447. DMAN3.tccAllocationMaskL = 0; // which TCCs 0..31 for DMAN3
  448. DMAN3.tccAllocationMaskH = 0xffffffff; // which TCCs 32..63 for DMAN3
  449. }
  450. /* The remaining DMAN3 configuration settings are as defined in ti.sdo.fc.DMAN3
  451. * defaults. You may need to override them to add more QDMA channels and
  452. * configure per-scratch-group resource sub-allocations.
  453. */
  454.  
  455. /*
  456. * ======== RMAN (IRES Resource manager) configuration ========
  457. */
  458. var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN');
  459. RMAN.useDSKT2 = true;
  460. RMAN.tableSize = 10;
  461. RMAN.semCreateFxn = "Sem_create";
  462. RMAN.semDeleteFxn = "Sem_delete";
  463. RMAN.semPendFxn = "Sem_pend";
  464. RMAN.semPostFxn = "Sem_post";
  465. /* The lock/unlock/set/getContext functions will default to DSKT2 */
  466. /*
  467. * @(#) ti.sdo.ce.examples.servers.all_codecs; 1, 0, 0,261; 12-2-2010 21:23:33; /db/atree/library/trees/ce/ce-r11x/src/ xlibrary
  468.  
  469. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement