1 /* @@PROCESSNAME@@_Wrapper
2 * ===================================================================== */
5 #include "../esrc/@@PROCESSNAME@@.h"
10 shm_t shm SECTION(".shared_dram");
13 * ===================================================================== */
14 struct _DOL_wptr @@PROCESSNAME@@_wptr = {
16 {0,0,0,0} /* instance */
19 @@PROCESSNAME@@_State @@PROCESSNAME@@_local;
20 DOLProcess @@PROCESSNAME@@_process = {
21 &@@PROCESSNAME@@_local,
22 &@@PROCESSNAME@@_init,
23 &@@PROCESSNAME@@_fire,
24 &@@PROCESSNAME@@_wptr,
27 /* Port Read/Write Functions
28 * ===================================================================== */
32 * ===================================================================== */
33 #define NUM_PORTS @@NUM_PORTS@@
34 port_t ports[NUM_PORTS] = {
38 port_t *get_port(void *port)
40 for(int i = 0; i < NUM_PORTS; i++) {
41 if(!strncmp(ports[i].name, port, PORTNAME_MAXLEN)) {
50 * ===================================================================== */
53 int index = core_id2lin(e_get_coreid());
56 @@PROCESSNAME@@_process.init((struct _DOLProcess_struct*)&@@PROCESSNAME@@_process);
57 while(@@PROCESSNAME@@_process.wptr->active) {
58 shm.states[index] = ++state;
59 @@PROCESSNAME@@_process.fire((struct _DOLProcess_struct*)&@@PROCESSNAME@@_process);
62 shm.states[index] = -1;