主题中讨论的其他器件:MATHLIB、
你(们)好
我有一个共享区域、在 RTSC 配置文件中以静态方式创建了4个条目。
Program.global.CFG_SL2_IPC_MSG_BASE = 0x0c000000;
Program.global.CFG_SL2_IPC_MSG_SIZE = 0x00010000;
Program.global.CFG_SL2_BASE = 0x0c010000;
Program.global.CFG_SL2_SIZE = 0x00370000;
Program.global.CFG_DDR_HEAP_BASE = 0x81000000;
Program.global.CFG_DDR_HEAP_SIZE = 0x45200000; // => 1106 MB
Program.global.CFG_DDR_NONCACHED_HEAP_BASE = 0x80100000;
Program.global.CFG_DDR_NONCACHED_HEAP_SIZE = 0x00800000; // 8 MB
var sharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
sharedRegion.translate = false;
sharedRegion.numEntries = 4;
/* Shared Memory base address and length */
var SHAREDMEMSL2 = Program.global.CFG_SL2_IPC_MSG_BASE;
var SHAREDMEMSL2SIZE = Program.global.CFG_SL2_IPC_MSG_SIZE;
/* SL2 Shared Memory base address and length */
sharedRegion.setEntryMeta(Program.global.SL2HEAPID,
{ base: SHAREDMEMSL2,
len: SHAREDMEMSL2SIZE,
ownerProcId: 0,
isValid: true,
cacheLineSize: 64, /* need 64B to get pass IPC_attach phase, and it is okay with our 256B message size in our code */
createHeap: true,
name: "SL2_IPC",
});
/* Shared Memory base address and length */
var SHAREDMEM2SL2 = Program.global.CFG_SL2_BASE;
var SHAREDMEM2SL2SIZE = Program.global.CFG_SL2_SIZE;
/* SL2 Shared Memory base address and length */
sharedRegion.setEntryMeta(Program.global.SL2HEAP2ID,
{ base: SHAREDMEM2SL2,
len: SHAREDMEM2SL2SIZE,
ownerProcId: 0,
isValid: true,
cacheLineSize: 64, /* L1 cache line size: 64B */
createHeap: true,
name: "SL2_HEAP",
});
/* DDR Shared Memory base address and length */
var SHAREDMEMDDR = Program.global.CFG_DDR_HEAP_BASE;
var SHAREDMEMSIZEDDR = Program.global.CFG_DDR_HEAP_SIZE;
sharedRegion.setEntryMeta(Program.global.DDRHEAPID,
{ base: SHAREDMEMDDR,
len: SHAREDMEMSIZEDDR,
ownerProcId: 0,
isValid: true,
cacheLineSize: 128, /* L2 cache line size: 128B */
createHeap: true,
cacheEnable: true, /*This should reflect the cacheability of memory region. This does NOT set the cacheability*/
name: "DDR_HEAP",
});
/* Non-cacheable DDR Shared Memory base address and length */
var SHAREDMEM_DDRNONCACHEABLE = Program.global.CFG_DDR_NONCACHED_HEAP_BASE;
var SHAREDMEMSIZE_DDRNONCACHEABLE = Program.global.CFG_DDR_NONCACHED_HEAP_SIZE;
sharedRegion.setEntryMeta(Program.global.DDRNONCACHED_HEAPID,
{ base: SHAREDMEM_DDRNONCACHEABLE,
len: SHAREDMEMSIZE_DDRNONCACHEABLE,
ownerProcId: 0,
isValid: true,
cacheLineSize: 128, /* L2 cache line size: 128B */
createHeap: true,
cacheEnable: false, /*This should reflect the cacheability of memory region. This does NOT set the cacheability*/
name: "DDR_NONCACHED_HEAP",
});
在运行时、 使用 SharedRegion_getEntry()、SharedRegion_getHeap ()和 Memory_getStats()对每个区域 ID 查询条目和堆统计数据。 下表列出了每个区域 ID 的条目和堆统计值。
| 区域 ID | 使用 SharedRegion_getEntry()查询的条目 | 使用 SharedRegion_getHeap ()和 Memory_getStats ()查询堆统计信息 |
| 0 |
基址= 0x0C00000 Len = 0x00100000 ownerProId = 0 isVaild = 1 CacheEnable = 1 CacheLineSize = 64 createHeap = 1 名称="SL2_IPC" |
总大小= 0x0001F280 ttoalFreeSize = 0x00016300 largestFreeSize = 0x0001630 |
| 1 |
基址= 0x810000 Len = 0x45200000 ownerProId = 0 isVaild = 1 CacheEnable = 1 CacheLineSize = 128 createHeap = 1 名称="DDR_IPC" |
总大小= 0x8A400000 totalFreeSize = 0x8A400000 largestFreeSize = 0x8A400000 |
| 2. |
基址= 0x0C010000 Len = 0x00370000 ownerProId = 0 isVaild = 1 CacheEnable = 1 CacheLineSize = 64 createHeap = 1 名称="SL2_Hap" |
总大小= 0x006E0000 totalFreeSize = 0x006E0000 largestFreeSize = 0x006E0000 |
| 3. |
基址= 0x80100000 Len = 0x00800000 ownerProId = 0 isVaild = 1 CacheEnable = 0 CacheLineSize = 128 createHeap = 1 名称="DDR_NONCACHED_HAC" |
总大小= 0x01000000 totalFreeSize = 0x01000000 largestFreeSize = 0x01000000 |
对于每个区域 id、堆统计数据 totalSize 是 条目中设置的长度的两倍。 我假设 entry.len 的单位(8位字节)与 totalSize 相同。 在我的构建中、 库版本如下在 PROCESSOR-SDK-RTOS-C667X 中指定 06.03.00.106。
- Code Composer Studio v9.3
- C667x PDK 2.0.16
- DSPLIB C66x 3.4.04
- IPC 3.50.4.08
- MATHLIB 3.1.2.4
- SYS/BIOS 6.76.3.01
- 系统分析器(UIA 目标) 2.30.1.02
- xDAIS 7.24.0.04
- XDCtools 3.55.2.22
- TI C6000编译器8.3.2
使用旧版 SDK ti-processor-sdk-rtos-c667x-evm-03.03.00.04构建时不会出现此类问题 。 感谢您的任何帮助。
伟国法律





