How to talk with milkymist cores
From Milkymist Wiki
Basically Memory-mapped I/O http://wikimedia.org/wikipedia/en/wiki/MMIO
Some sniptes
/* PLEASE notice the use of volatile */
volatile unsigned int *my_peripheral;
/* peripheral memory mapped at 0xc0001004 */
my_peripheral = (unsigned int *)0xc0001004;
/* write word to peripheral */
- my_peripheral = 0xbaadf00d;
/* read word from peripheral */
printf("Result: %08x\n", *my_peripheral);
also
- define MM_READ(reg) (*((volatile unsigned int *)(reg)))
- define MM_WRITE(reg, val) *((volatile unsigned int *)(reg)) = val