X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=minidol%2Fshared.h;fp=minidol%2Fshared.h;h=032ef33b118ad9cd76ab44229d749fd959b28bf1;hb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;hp=0000000000000000000000000000000000000000;hpb=3e30b001296fb059cb070498bbe5d8e8834cd3e3;p=jump.git diff --git a/minidol/shared.h b/minidol/shared.h new file mode 100644 index 0000000..032ef33 --- /dev/null +++ b/minidol/shared.h @@ -0,0 +1,46 @@ +/* shared.h + * NOTE: shared between Host and Epiphany */ +#ifndef _SHARED_H_ +#define _SHARED_H_ + +#ifndef PACKED +#define PACKED __attribute__((packed)) +#endif + +#include + +#define NUM_CORES 16 + +typedef struct { + volatile uint32_t rp; + volatile uint32_t wp; + volatile uint32_t size; + char buf[]; +} PACKED hwbuf_t; + +typedef struct { + uint32_t rp; + uint32_t wp; + uint32_t size; + char buf[8]; +} PACKED buf0_t; + +typedef struct { + uint32_t rp; + uint32_t wp; + uint32_t size; + char buf[32]; +} PACKED buf1_t; + +typedef struct { + uint32_t counters[2]; +} PACKED coredata_t; + +typedef struct { + int32_t states[NUM_CORES]; + coredata_t cores[NUM_CORES]; + buf0_t buf0; + buf1_t buf1; +} PACKED shm_t; + +#endif /* _SHARED_H_ */