by notzed » Wed Sep 17, 2014 12:32 pm
Remote is the address of the value on the remote core, relative to the remote core's base address. The function will then use the row/col to convert that to the global address required to access the specific core (upper 12-bits of the address select the core).
If the cores are running the same image (binary/file/program) then you just reference the address of the variable locally as the offset from zero will be the same. i.e. "&foo" for a value type, or just "foo" for a reference type. Obviously these need to be global or static values that have a fixed address and not automatic variables.
If the cores are running different images then you need to either hard-code the label (or address) in both programs - either in a header or the linker script - or find some other way to resolve the address. Most of the example programs just hardcode them I think.
It helps if you have a good grasp of the way the memory is seen by each core. If you're not familiar with it section 4.1 of the epiphany arch reference manual has a diagram, but basically the first 32KB of each core is local to the core and the upper 12-bits of the address can be used to select the other cores via banks including a global alias of the current core. There are some functions for forming those upper 12-bits based on data from the sdk (workgroup information) and/or the coreid register but it's up to you to define the lower 16 bits (i.e. the 'remote addr' you queried).
I think there's some other posts about this in the forum but you'll have to search yourself.