45#ifndef __SPINN_API_PARAM_H__
46#define __SPINN_API_PARAM_H__
57#define GO_KEY (uint) ((0x1ffff << 11) | 0)
58#define RDYGO_KEY (uint) ((0x1ffff << 11) | 1)
59#define RDY1_KEY (uint) ((0x1ffff << 11) | 2)
60#define RDY2_KEY (uint) ((0x1ffff << 11) | 3)
61#define BARRIER_MASK (uint) (0xffffffff)
63#define BARRIER_GO_WAIT 50000
64#define BARRIER_RDY2_WAIT 25000
65#define BARRIER_RDYGO_WAIT 25000
66#define BARRIER_LOCK_WAIT 50000
67#define BARRIER_RESEND_WAIT 100
69#define ROUTER_INIT_WAIT 5000
73#define RTR_INIT_LCK 0xad
92#define API_DIAGNOSTICS TRUE
96#define API_PRINT_DLY 200
103 PACKET_QUEUE_FULL = 4,
104 WRITE_BUFFER_ERROR = 8,
114#define DMA_BURST_SIZE 4
118#define DMA_QUEUE_SIZE 16
120#define USE_WRITE_BUFFER FALSE
127#define TX_PACKET_QUEUE_SIZE 16
130#define TX_TCR_MCDEFAULT 0x00000000
132#define TX_FULL_MASK 0x40000000
134#define TX_EMPTY_MASK 0x80000000
136#define RX_RECEIVED_MASK 0x80000000
143#define USER_EVENT_QUEUE_SIZE 4
149#define RTS_STACKS 4096
185#if USE_WRITE_BUFFER == TRUE
199#define CHIP_ADDR(x, y) ((x << 8) | y)
203#define P2P_ROUTE(addr) (1 << p2p_get(addr))
207#define CORE_ROUTE(core) (1 << (core + NUM_LINKS))
305typedef __irq void (*
isr_t) (void);
@ NUM_EVENTS
Count of possible events.
Definition spin1_api.h:63
void(* callback_t)(uint, uint)
User callback for event handling.
Definition spin1_api.h:109
spin1_api_multicast_entries
Allocation of entries in MC table.
Definition spin1_api_params.h:168
spin1_api_callback_queue_params
callback queue parameters
Definition spin1_api_params.h:156
@ NUM_PRIORITIES
Number of priorities.
Definition spin1_api_params.h:159
@ TASK_QUEUE_SIZE
Size of task queue.
Definition spin1_api_params.h:160
@ N_TASK_QUEUES
Definition spin1_api_params.h:157
callback_t cback
Pointer to the function to call.
Definition spin1_api_params.h:284
uint end
Definition spin1_api_params.h:249
#define DMA_QUEUE_SIZE
internal DMA queue size
Definition spin1_api_params.h:118
uint TCR
The MC packet control word.
Definition spin1_api_params.h:242
uint arg0
The first arbitrary parameter.
Definition spin1_api_params.h:260
uint start
Index of first event.
Definition spin1_api_params.h:267
uint * tcm_address
Address in local TCM.
Definition spin1_api_params.h:221
spin1_api_error_codes
internal error/warning return codes
Definition spin1_api_params.h:99
uint arg1
The second arbitrary parameter.
Definition spin1_api_params.h:286
static volatile isr_t *const vic_vectors
VIC vector table.
Definition spin1_api_params.h:313
uint arg0
The first arbitrary parameter.
Definition spin1_api_params.h:285
static volatile uint *const vic_controls
VIC control table.
Definition spin1_api_params.h:315
spin1_api_vic_priorties
VIC priorities.
Definition spin1_api_params.h:176
@ RX_READY_PRIORITY
Multicast message ready to receive.
Definition spin1_api_params.h:181
@ CC_TMT_PRIORITY
Comms controller timeout.
Definition spin1_api_params.h:183
@ SOFT_INT_PRIORITY
Software-driven interrupt.
Definition spin1_api_params.h:184
@ DMA_DONE_PRIORITY
DMA complete.
Definition spin1_api_params.h:180
@ TIMER1_PRIORITY
Timer interrupt.
Definition spin1_api_params.h:179
@ SARK_PRIORITY
Communication with SARK/SCAMP.
Definition spin1_api_params.h:177
@ DMA_ERR_PRIORITY
DMA error.
Definition spin1_api_params.h:186
@ FR_READY_PRIORITY
Fixed route message ready to receive.
Definition spin1_api_params.h:182
@ TIMER2_PRIORITY
Timer 2 interrupt (events)
Definition spin1_api_params.h:178
uint tag
User label.
Definition spin1_api_params.h:219
spin1_api_link_orientations
link orientation codes
Definition spin1_api_params.h:78
callback_t cback
Pointer to the function to call.
Definition spin1_api_params.h:278
uint end
Definition spin1_api_params.h:293
void(* isr_t)(void)
interrupt service routine
Definition spin1_api_params.h:303
uint start
Index of first transfer.
Definition spin1_api_params.h:228
uint end
Definition spin1_api_params.h:229
uint description
Control descriptor.
Definition spin1_api_params.h:222
uint start
Index of first task.
Definition spin1_api_params.h:292
int priority
The interrupt priority.
Definition spin1_api_params.h:279
uint * system_address
Address in SDRAM (or other shared memory)
Definition spin1_api_params.h:220
cback_t callback[NUM_EVENTS]
The external interrupt handlers.
Definition spin1_api.c:113
uint end
Definition spin1_api_params.h:268
uint data
The MC packet payload (if defined)
Definition spin1_api_params.h:241
uint key
The MC packet key.
Definition spin1_api_params.h:240
uint start
Index of first packet.
Definition spin1_api_params.h:248
#define USER_EVENT_QUEUE_SIZE
internal user event queue size
Definition spin1_api_params.h:143
uint id
ID.
Definition spin1_api_params.h:218
uint arg1
The second arbitrary parameter.
Definition spin1_api_params.h:261
#define TX_PACKET_QUEUE_SIZE
Size of outbound packet queue.
Definition spin1_api_params.h:127
An external interrupt handler.
Definition spin1_api_params.h:277
Describes a DMA transfer.
Definition spin1_api_params.h:217
The queue of DMA transfers.
Definition spin1_api_params.h:227
A multicast packet.
Definition spin1_api_params.h:239
The queue of callbacks to do.
Definition spin1_api_params.h:291
An internal interrupt/callback handler.
Definition spin1_api_params.h:283
The queue of multicast packets to be sent.
Definition spin1_api_params.h:247
The type of the fixed-capacity queue of user events.
Definition spin1_api_params.h:266
Describes the parameters to pass to a user event.
Definition spin1_api_params.h:259
#define VIC_BASE
Vectored interrupt controller base address.
Definition spinnaker.h:253
unsigned int uint
Unsigned integer - 32 bits.
Definition spinnaker.h:39
#define MC_TABLE_SIZE
Multicast table size (entries)
Definition spinnaker.h:696