Hello,
I've some questions of the usage of shared memory. My system setup is as follows:
-I want to use shared memory with static allocation (e.g. a struct or variable)
-I'm using a RTSC cfg file
-I'm already using IPC and SYS/BIOS
I've already declared a Shared memory region, see below. The purpose is for example to use one variable on each core. The variable is not accessed parallel from the cores, ONLY one after the other. As an example, I want to test doing some stuff over all cores like pipelining:
Processing Variable on CORE1 -> IPC-Notify to CORE2 -> Processing Variable on CORE2 -> ... -> and so on.
So I think I just have to place the variable in the shared memory (and be careful on this entry because it's used for IPC-stuff)?
Or are there better ways for this issue (e.g. place a new memory section into DDR3 or MSMCSRAM)?
How can I place the variable into shared memory? Is it the same as for a memory section (like this:
#pragma DATA_SECTION(variable, "Data_section")
uint32_t variable;
Using a static global variable it only works to modify the variable on CORE0, the modifications on other CORE's are not seen (of course I think due to every CORE having its own local copy of the variable?).
Thanks for help on this topic,
Best Regards,
Bernd
// Shared memory
var SHAREDMEM = 0x0C000000;
var SHAREDMEMSIZE = 0x00200000;
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM,
len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
name: "DDR2_RAM",
});