SpiNNFrontEndCommon 7.3.1
Common support code for user-facing front end systems.
Loading...
Searching...
No Matches
spinn_extra.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 The University of Manchester
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// ------------------------------------------------------------------------
29// ------------------------------------------------------------------------
30
31#ifndef __SPINN_EXTRA_H__
32#define __SPINN_EXTRA_H__
33
34#include <spinnaker.h>
35#include <stdbool.h>
36
37#ifndef DOXYGEN
38// Hack for better naming in doxygen while avoiding warnings when building
39#define DOXYNAME(x) /* nothing */
40#endif
41
42#if defined(__GNUC__) && __GNUC__ < 6
43// This particular warning (included in -Wextra) is retarded wrong for client
44// code of this file. Only really a problem on Travis.
45#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
46#endif // __GNUC__
47
60#define ASSERT_WORD_SIZED(type_ident) \
61 static inline void __static_word_sized_assert_ ## type_ident (void) { \
62 _Static_assert(sizeof(type_ident) == sizeof(uint), \
63 #type_ident " must be the same size as a word"); \
64 }
65
66// ---------------------------------------------------------------------
67// 1. Chip Organization
68
69// No registers
70
71// ---------------------------------------------------------------------
72// 2. System Architecture
73
74// No registers
75
76// ---------------------------------------------------------------------
77// 3. ARM968 Processing Subsystem
78
79// No registers
80
81// ---------------------------------------------------------------------
82// 4. ARM 968
83
84// No special registers here
85
86// ---------------------------------------------------------------------
100
102typedef void (*vic_interrupt_handler_t) (void);
103
176
204
206typedef struct {
211 // padding
212 uint : 26;
214
218
220static volatile vic_control_t *const vic_control =
221 // NB unbuffered!
222 (vic_control_t *) VIC_BASE_UNBUF;
225 (vic_interrupt_handler_t *) (VIC_BASE + 0x100);
228 (vic_vector_control_t *) (VIC_BASE + 0x200);
229
231
232// ---------------------------------------------------------------------
242
244typedef struct {
251 // padding
252 uint : 1;
259 // padding
260 uint : 24;
262
272
274typedef struct {
277 // padding
278 uint : 31;
280
300
303
305static volatile timer_controller_t *const timer1_control =
306 (timer_controller_t *) TIMER1_BASE;
308static volatile timer_controller_t *const timer2_control =
309 (timer_controller_t *) TIMER2_BASE;
310
312
313// ---------------------------------------------------------------------
328
330typedef struct {
332 uint _zeroes : 2;
335 // padding
336 uint : 2;
350
358
366
384
424
456
458typedef struct {
460 uint _zeroes : 5;
463 // padding
464 uint : 22;
466
468typedef struct {
473 // padding
474 uint : 30;
476
478typedef struct {
479 // padding
480 const uint _unused1[1];
494 const uint crcc;
496 const uint crcr;
501 // padding
502 const uint _unused2[5];
504 const uint statistics[8];
505 // padding
506 const uint _unused3[41];
513 // padding
514 const uint _unused4[29];
516 uint crc_polynomial[32];
517} dma_t;
518
525
527static volatile dma_t *const dma_control = (dma_t *) DMA_BASE;
528
530
531// ---------------------------------------------------------------------
537
539typedef union {
541 struct DOXYNAME(common) {
548 // padding
549 uchar : 2;
552 };
554 struct DOXYNAME(mc) {
555 // padding
556 uchar : 4;
559 // padding
560 uchar : 2;
561 } mc;
563 struct DOXYNAME(p2p) {
564 // padding
565 uchar : 4;
568 // padding
569 uchar : 2;
570 } p2p;
572 struct DOXYNAME(nn) {
573 // padding
574 uchar : 2;
579 // padding
580 uchar : 2;
581 } nn;
583 struct DOXYNAME(fr) {
584 // padding
585 uchar : 4;
588 // padding
589 uchar : 2;
590 } fr;
591 uchar value;
593
605
607typedef struct {
608 // padding
609 uint : 16;
612 // padding
613 uint : 4;
623
651
653typedef struct {
656 // padding
657 uint : 8;
660 // padding
661 uint : 5;
663
684
688
690static volatile comms_ctl_t *const comms_control = (comms_ctl_t *) CC_BASE;
691
693
694// ---------------------------------------------------------------------
695// 9. Communications NoC
696
697// No registers
698
699// ---------------------------------------------------------------------
715
743
763
775
777typedef union {
779 struct DOXYNAME(flags) {
780 // padding
781 uint : 6;
784 // padding
785 uint : 8;
796 // padding
797 uint : 2;
798 };
800 struct DOXYNAME(control_field_bits) {
801 // padding
802 uint : 17;
805 // padding
806 uint : 4;
809 };
813
831
833typedef struct {
838 // padding
839 uint : 8;
841
843typedef struct {
848 // padding
849 uint : 6;
855
863
883
885typedef struct {
887 uint L0 : 2;
889 uint L1 : 2;
891 uint L2 : 2;
893 uint L3 : 2;
895 uint L4 : 2;
897 uint L5 : 2;
898 // padding
899 uint : 20;
901
911
923
971
999
1001typedef union {
1003 struct DOXYNAME(routes) {
1008 };
1012
1033
1058
1071
1073static volatile router_t *const router_control = (router_t *) RTR_BASE;
1076 (router_diagnostic_filter_t *) (RTR_BASE + 0x200);
1078static volatile uint *const router_diagnostic_counter =
1079 (uint *) (RTR_BASE + 0x300);
1082 (router_multicast_route_t *) RTR_MCRAM_BASE;
1084static volatile uint *const router_key_table = (uint *) RTR_MCKEY_BASE;
1086static volatile uint *const router_mask_table = (uint *) RTR_MCMASK_BASE;
1089 (router_p2p_table_entry_t *) RTR_P2P_BASE;
1090
1092
1093// ---------------------------------------------------------------------
1094// 11. Inter-chip transmit and receive interfaces
1095
1096// No registers
1097
1098// ---------------------------------------------------------------------
1099// 12. System NoC
1100
1101// No registers
1102
1103// ---------------------------------------------------------------------
1111
1113typedef struct {
1126 // padding
1127 uint : 20;
1129
1131typedef struct {
1135
1152
1156typedef struct {
1159 // padding
1160 uint : 2;
1167 // padding
1168 uint : 10;
1170
1183
1207
1209typedef struct {
1212 // padding
1213 uint : 17;
1215
1217typedef struct {
1222 // padding
1223 uint : 28;
1225
1256
1274
1276typedef struct {
1283 // padding
1284 uint : 22;
1285} sdram_qos_t;
1286
1288typedef struct {
1295 // padding
1296 uint : 15;
1297} sdram_chip_t;
1298
1306
1308typedef struct {
1311 // padding
1312 uint : 1;
1335 // padding
1336 uint : 1;
1338 uint R : 1;
1340 uint M : 1;
1342 uint L : 1;
1343 // padding
1344 uint : 9;
1346
1348typedef struct {
1361 // padding
1362 uint : 4;
1372 uint R : 1;
1374 uint M : 1;
1376 uint L : 1;
1381 // padding
1382 uint : 7;
1384
1386typedef union {
1388 struct DOXYNAME(tuning) {
1401 // padding
1402 uint : 8;
1403 };
1407
1417
1429
1431static volatile sdram_controller_t *const sdram_control =
1432 (sdram_controller_t *) PL340_BASE;
1434static volatile sdram_qos_t *const sdram_qos_control =
1435 (sdram_qos_t *) (PL340_BASE + 0x100);
1437static volatile sdram_chip_t *const sdram_chip_control =
1438 (sdram_chip_t *) (PL340_BASE + 0x200);
1440static volatile sdram_dll_t *const sdram_dll_control =
1441 (sdram_dll_t *) (PL340_BASE + 0x300);
1442
1444
1445// ---------------------------------------------------------------------
1462
1464typedef struct {
1467 // padding
1468 uint : 2;
1472
1496
1498typedef struct {
1501 // padding
1502 uint : 29;
1504
1518
1520typedef struct {
1523 // padding
1524 uint : 3;
1527 // padding
1528 uint : 7;
1531 // padding
1532 uint : 3;
1536
1538typedef struct {
1541 // padding
1542 uint : 14;
1555 // padding
1556 uint : 11;
1558
1560typedef union {
1562 struct DOXYNAME(io_bits) {
1563 // padding
1564 uint : 16;
1571 // padding
1572 uint : 1;
1575 };
1578} sc_io_t;
1579
1581typedef struct {
1584 // padding
1585 uint : 2;
1588 // padding
1589 uint : 2;
1594 // padding
1595 uint : 5;
1597 uint _test : 1;
1598 // padding
1599 uint : 7;
1601
1613
1615typedef struct {
1620 // padding
1621 uint : 1;
1626 // padding
1627 uint : 1;
1632 // padding
1633 uint : 1;
1638 // padding
1639 uint : 1;
1644 // padding
1645 uint : 7;
1649
1663
1665typedef struct {
1668 // padding
1669 uint : 14;
1671
1673typedef struct {
1678 // padding
1679 uint : 6;
1683
1685typedef struct {
1686 // padding
1687 uint : 31;
1691
1693typedef struct {
1696 // padding
1697 uint : 2;
1700 // padding
1701 uint : 2;
1704 // padding
1705 uint : 3;
1709
1710#define _NUM_TEMPS 3
1711#define _NUM_ARBITERS 32
1712#define _NUM_LOCK_REGISTERS 32
1713
1781
1787
1799
1801static volatile system_controller_t *const system_control =
1802 (system_controller_t *) SYSCTL_BASE;
1803
1805
1806// ---------------------------------------------------------------------
1816
1844
1846typedef struct {
1851 // padding
1852 uint : 9;
1856
1858typedef struct {
1862
1870
1888
1890typedef struct {
1893 // padding
1894 uint : 3;
1897 // padding
1898 uint : 27;
1900
1902typedef struct {
1904 uint ptr : 12;
1907 // padding
1908 uint : 19;
1910
1912typedef struct {
1917 // padding
1918 uint : 25;
1920
1950
1954typedef struct {
1957 // unknown; might be padding or status bits?
1958 uint : 21;
1960
1969
1971static volatile uchar *const ethernet_tx_buffer = (uchar *) ETH_TX_BASE;
1973static volatile uchar *const ethernet_rx_buffer = (uchar *) ETH_RX_BASE;
1976 (ethernet_receive_descriptor_t *) ETH_RX_DESC_RAM;
1979 (ethernet_controller_t *) ETH_REGS;
1980
1982
1983// ---------------------------------------------------------------------
1993
1995typedef struct {
2000 // padding
2001 uint : 30;
2003
2005typedef struct {
2008 // padding
2009 uint : 31;
2011
2013typedef union {
2015 struct DOXYNAME(fields) {
2020 };
2024
2032
2052
2056
2059 (watchdog_controller_t *) WDOG_BASE;
2060
2062
2063// ---------------------------------------------------------------------
2064// 17. System RAM
2065
2066// No registers
2067
2068// ---------------------------------------------------------------------
2069// 18. Boot ROM
2070
2071// No registers
2072
2073// ---------------------------------------------------------------------
2074// 19. JTAG
2075
2076// No registers
2077
2078// ---------------------------------------------------------------------
2079// 20. Input and Output Signals
2080
2081// No registers
2082
2083// ---------------------------------------------------------------------
2084// 21. Packaging
2085
2086// No registers
2087
2088// ---------------------------------------------------------------------
2089// 22. Application Notes
2090
2091// No registers
2092
2093// ---------------------------------------------------------------------
2094#endif // !__SPINN_EXTRA_H__
uint reset_drop_counter
Reset receive dropped frame count (ethernet_general_status_t::drop_counter)
static volatile router_multicast_route_t *const router_multicast_table
Router multicast route table.
router_control_t control
Router control register.
uint nearest_neighbour
error-free nearest-neighbour packet received
uint receive_vlan
Receive VLAN enable.
uint L2
Diversion rule for link 2.
uint s4
Input select for delay line 4 {def, alt, 0, 1}.
dma_stats_control_t statistics_control
Statistics counters control.
uint set_flags
Set flags register.
uint cc_rx_fr
Comms controller fixed route packet received.
uint clear_write_buffer_int
clear Write Buffer interrupt request
uint loopback
Loopback enable.
uint load
Count load register.
uint R
3-phase bar-code control output
uint pb
clock selector for B CPUs (0 3 5 6 9 10 12 15 17); see sc_clock_source
uint transmit_command
Transmit command; any value commits transmit.
uint c1
Clock faster than strobe 1.
uint magic
Access control code.
uint value
The timeout.
uint mask
address mask
const uint current_value
Current value of Timer.
uint dumped
packet dumped
static volatile system_controller_t *const system_control
System controller registers.
uint L4
Diversion rule for link 4.
uint ethernet_receive
Ethernet MII RxD port.
uint gpio8
Signal on GPIO[8].
ethernet_tx_length_limits
Limits of ethernet_tx_length_t::tx_length.
@ ETHERNET_TX_LENGTH_MIN
Minimum length of an ethernet frame.
@ ETHERNET_TX_LENGTH_MAX
Maximum length of an ethernet frame.
const router_dump_status_t status
dumped packet status
sc_io_t io_direction
External I/O pin is input (1) or output (0)
uint dump_interrupt_enable
enable dump packet interrupt
uint value
Overall entry packed as number.
router_fixed_route_routing_t fixed_route
fixed-route packet routing vector
uint lock
Write access enabled (0) or disabled (1)
watchdog_lock_t lock
Lock register.
uint mdiv
divide SDRAM clock by Mdiv+1 (= 1-4)
uint interrupt_active_for_diagnostic_counter
diagnostic counter interrupt active
uint enable_force_lmr
Enable forcing of L, M, R.
router_p2p_route route7
Seventh packed route.
const uint chip_id
Chip ID register (hardwired)
uint L
3-phase bar-code control output
uint type
packet-type field from control byte
uint s2
Strobe 2 faster than Clock.
watchdog_control_t control
Control register.
uint time_phase_error
packet time stamp error (sticky)
uint enable_histogram
enable histogram
uint security_code
SYSTEM_CONTROLLER_MAGIC_NUMBER to enable write
uint t_xp
exit power-down command time
uint parity_error
packet parity error (sticky)
uint cc_tx_not_full
Comms controller can accept new Tx packet.
static volatile timer_controller_t *const timer2_control
Timer 2 control registers.
uint output_stage
Router output stage status (see router_output_stage)
uint ddr
DDR type: 3b’011 = Mobile DDR.
sc_link_disable_t link_disable
Disables for Tx and Rx link interfaces.
uint M
3-phase bar-code control output
uint interrupt_active_dump
dump packet interrupt active
uint boot_area_map
map System ROM (0) or RAM (1) to Boot area
uint reset
PHY reset (active low)
uint enable
enable counter/timer (1 = enabled)
const timer_interrupt_status_t masked_interrupt_status
Timer masked interrupt status.
uint reset_cycle_count
reset cycle counter
uint bdiv
divide CPU clock B by Bdiv+1 (= 1-4)
uchar type
Should be one of spinnaker_packet_type_t.
uint bit
The only relevant bit in the word.
uint full
Tx buffer full (sticky)
uint burst
burst length (1, 2, 4, 8, 16)
uint bank
bank passed to memory device
uint comm_rx
Debug communications receiver interrupt.
static volatile uchar *const ethernet_tx_buffer
Ethernet transmit buffer.
sc_io_t io_clear
Writing a 1 clears IO register bit.
vic_interrupt_handler_t default_vector_address
default vector address register
static volatile router_t *const router_control
Router controller registers.
sdram_direct_command_t direct
direct command
comms_tx_control_t tx_control
Controls packet transmission.
uint transfer_done
a DMA transfer has completed without error
uint p2p_source_id
16-bit chip source ID for P2P packets
uint sdram
On-package SDRAM control.
uint tune_1
Fine tuning control on delay line 1.
uint parity_error
packet parity error (error only)
sdram_command
Memory controller commands, for sdram_command_t::command.
@ SDRAM_CTL_WAKE
Wake.
@ SDRAM_CTL_CONFIG
Configure.
@ SDRAM_CTL_SLEEP
Sleep.
@ SDRAM_CTL_GO
Go.
@ SDRAM_CTL_ACTIVE_PAUSE
Active Pause.
@ SDRAM_CTL_PAUSE
Pause.
uint cpu
System Controller interrupt bit set for this processor.
uint soft_reset_interrupt
interrupt if dma_status_t::soft_reset set
uint incing
Phase comparator is increasing delay.
uint cc_tx_full
Comms controller transmit buffer full.
uint rtr
clock selector for Router; see sc_clock_source
static volatile sdram_qos_t *const sdram_qos_control
SDRAM QoS control registers.
static volatile watchdog_controller_t *const watchdog_control
Watchdog timer controller registers.
uint reset_histogram
reset histogram
watchdog_lock_codes
Watchdog timer lock codes, for watchdog_lock_t::whole_value.
@ WATCHDOG_LOCK_MAGIC
Unlock the watchdog timer for configuration.
@ WATCHDOG_LOCK_RESET
Put the watchdog timer into normal mode.
const vic_mask_t fiq_status
FIQ status register.
uint cc_rx_framing_error
Comms controller received packet framing error.
uint busy
busy - active packet(s) in Router pipeline
uint direction
read from or write to system bus, see dma_direction_t
const uint crcc
CRC value calculated by CRC block.
uint jtag_on_chip
select on-chip (1) or off-chip (0) control of JTAG pins
uint queued
DMA transfer is queued - registers are full.
uint nn_broadcast_links
Nearest-neighbour broadcast link vector.
uint clear_timeout_int
clear Timeout interrupt request
sc_pll_control_t pll2_freq_control
PLL2 frequency control.
uint time_phase_error
packet time stamp error (error only)
uint width
transfer width, see dma_transfer_unit_t
const sc_sleep_status_t cpu_sleep
CPU sleep (awaiting interrupt) status.
uint command
one of sdram_command
uint pa
clock selector for A CPUs (1 2 4 7 8 11 13 14 16); see sc_clock_source
vic_mask_t soft_int_enable
soft interrupt set register
uint c3
Clock faster than strobe 3.
uint clear
Clear the statistics registers (if 1)
uint unread_counter
Received unread frame count.
uint write_buffer_active
write buffer is not empty
uint links
The links to route along.
router_diversion_t diversion
divert default packets
uint receive_error_filter
Receive error filter enable.
sdram_ram_config_t mem_config
memory configuration
uint overflow
more than one error packet detected
uint control_byte
Control byte of last Rx packet.
vic_mask_t int_enable
interrupt enable set register
uint overflow
more than one packet dumped
uint transmit
Clear transmit interrupt request.
const ethernet_receive_descriptor_pointer_t receive_desc_write
Receive descriptor write pointer.
uint irq_invert_disable
PHY IRQn invert disable.
static volatile vic_interrupt_handler_t *const vic_interrupt_vector
VIC interrupt handlers. Array of 32 elements.
uint tune_5
Fine tuning control on delay line 5.
uchar timestamp
Timestamp (not used for NN packets)
uint rx_links
Rx link 0-5.
const watchdog_status_t masked_status
Masked interrupt status register.
uint decing
Phase comparator is reducing delay.
uint receive_command
Receive command; any value completes receive.
static volatile ethernet_receive_descriptor_t *const ethernet_desc_buffer
Ethernet receive descriptor buffer.
uint cc_rx_parity_error
Comms controller received packet parity error.
uint match
address match
uint overrun
Tx buffer overrun (sticky)
sdram_refresh_t refresh
refresh period
uint s1
Input select for delay line 1 {def, alt, 0, 1}.
router_p2p_route
The possible values of a P2P route.
@ ROUTER_P2P_ROUTE_NE
Route north-east.
@ ROUTER_P2P_ROUTE_W
Route west.
@ ROUTER_P2P_ROUTE_N
Route north.
@ ROUTER_P2P_ROUTE_MONITOR
@ ROUTER_P2P_ROUTE_S
Route south.
@ ROUTER_P2P_ROUTE_E
Route east.
@ ROUTER_P2P_ROUTE_SW
Route south-west.
@ ROUTER_P2P_ROUTE_DROP
Drop packet.
sc_magic_proc_map_t cpu_hard_reset_level
Level control of CPU node resets.
uint entire_chip
Entire chip (pulse reset only)
sc_magic_proc_map_t cpu_soft_reset_pulse
Pulse control of CPU resets.
sdram_dll_user_config1_t config1
Test: fine tune.
uint tcm_error_interrupt
interrupt if dma_status_t::tcm_error set
uint pattern_payload
packets with [x1]/without [1x] payload
uint error_free
Rx packet received without error.
router_diagnostic_counter_ctrl_t diagnostic_counter_control
diagnostic counter enables
uint size
0 = 16 bit, 1 = 32 bit
uint s5
Input select for delay line 5 {def, alt, 0, 1}.
uint adiv
divide CPU clock A by Adiv+1 (= 1-4)
uint comm_tx
Debug communications transmitter interrupt.
uint parity_error
Rx packet parity error (sticky)
sdram_cas_latency_t cas_latency
CAS latency.
uint ethernet_rx
Ethernet receive frame interrupt.
dma_global_control_t global_control
Control of the DMA device.
uint output_divider
output clock divider
uint tx_links
Tx link 0-5.
uint address
address passed to memory device
sc_frequency_range
Frequency range constants for sc_pll_control_t::freq_range.
@ FREQ_50_100
50-100 MHz
@ FREQ_100_200
100-200 MHz
@ FREQ_25_50
25-50 MHz
@ FREQ_200_400
200-400 MHz
static volatile sdram_dll_t *const sdram_dll_control
SDRAM delay-locked-loop control registers.
const dma_status_t status
Status of DMA and other transfers.
sc_monitor_id_t monitor_id
ID of Monitor Processor.
const router_status_t status
Router status.
static volatile comms_ctl_t *const comms_control
Communications controller registers.
uint control_byte
control byte of next sent packet
static volatile vic_control_t *const vic_control
VIC registers.
uint active
active chips: number for refresh generation
uint empty
Tx buffer empty.
uint t_ras
RAS to precharge delay.
uint smi_out_enable
SMI data output enable.
static volatile router_p2p_table_entry_t *const router_p2p_route_table
Router peer-to-peer route table.
vic_mask_t int_select
interrupt select register
uint power_down_delay
number of memory cycles before auto-power-down
uint length
Received packet length.
uint tx_disable
disables the corresponding link transmitter
uint interrupt_active_error
error packet interrupt active
void * sdram_address
DMA address on the system interface.
dma_transfer_unit_t
DMA burst width, see dma_description_t::width.
@ DMA_TRANSFER_DOUBLE_WORD
Transfer in double-words.
@ DMA_TRANSFER_WORD
Transfer in words.
sc_magic
System controller magic numbers.
@ SYSTEM_CONTROLLER_MAGIC_NUMBER
Magic number for enabling writing to critical fields.
uint maximum
maximum QoS
uint tx_length
Length of transmit frame (60 - 1514 bytes)
uint s3
Input select for delay line 3 {def, alt, 0, 1}.
uint t_wr
write to precharge delay
uint set_cpu_ok
Writing a 1 sets a CPU OK bit.
timer_control_t control
Timer control register.
sc_magic_proc_map_t processor_disable
Each bit disables a processor.
uint control
control byte; really a spinnaker_packet_control_byte_t
uchar emergency_routing
Emergency routing control.
uint enable_emergency_active_count
enable emergency router active cycle counter
uint pattern_local
local [x1]/non-local[1x] packet source
const router_error_status_t status
error packet status
uint interrupt_enable
enable interrupt (1 = enabled)
const timer_interrupt_status_t raw_interrupt_status
Timer raw interrupt status.
uint ptr
Receive frame buffer read pointer.
uint dma_timeout
DMA controller transfer timed out.
sdram_command_t command
PL340 command.
uint t_rc
active bank x to active bank x delay
dma_description_t description
DMA transfer descriptor; note that setting this commits a DMA.
void * tcm_address
DMA address on the TCM interface.
uint sdiv
divide System AHB clock by Sdiv+1 (= 1-4)
sc_magic_subsystem_map_t subsystem_reset_pulse
Pulse control of subsystem resets.
uint fr_processors
The physical processors to route FR packets to.
uint reset_emergency_active_count
reset emergency router active cycle counter
router_timing_counter_ctrl_t timing_counter_control
timing counter controls
uint t_rfc
auto-refresh command time
uint whole_value
Whole value of lock; see watchdog_lock_codes.
uint receive_multicast
Receive multicast packets enable.
uint error_interrupt_enable
enable error packet interrupt
const router_dump_outputs_t outputs
dumped packet intended destinations
uchar emergency_routing
Emergency routing control.
uint bridge_buffer_enable
enable Bridge write buffer
const uint key
dumped packet routing word
const ethernet_receive_pointer_t receive_read
Receive frame buffer read pointer.
uint timer1
Counter/timer interrupt 1.
uint L
Force 3-phase bar-code control inputs.
uint test_5
Substitute delay line 5 for 4 for testing.
sc_io_t gpio_pull_up_down_enable
General-purpose IO pull up/down enable.
uint value
Whole mask as integer.
uint write_buffer_error
a buffered write transfer has failed
uint security_code
SYSTEM_CONTROLLER_MAGIC_NUMBER to enable write
uint start
start temperature measurement
const vic_mask_t irq_status
IRQ status register.
uint drop_wait_time
wait2; wait time before dropping packet after entering emergency routing
uint route_packets_enable
enable packet routing
const void * current_sdram_address
Active system address.
uint L3
Diversion rule for link 3.
spinnaker_packet_type_t
SpiNNaker packet type codes.
@ SPINNAKER_PACKET_TYPE_NN
Nearest-neighbour packet.
@ SPINNAKER_PACKET_TYPE_FR
Fixed-route packet.
@ SPINNAKER_PACKET_TYPE_P2P
Peer-to-peer packet.
@ SPINNAKER_PACKET_TYPE_MC
Multicast packet.
uint invert_b
invert CPU clock B
uint auto_power_down
auto-power-down memory when inactive
uint cmd
command passed to memory device
uint crc_error
the calculated and received CRCs differ
uint framing_error
Rx packet framing error (sticky)
router_p2p_route route2
Second packed route.
uint framing_error
packet framing error (error only)
uint count_parity_errors
enable count of packet parity errors
uint interrupted
True if interrupt asserted.
const ethernet_receive_descriptor_pointer_t receive_desc_read
Receive descriptor read pointer.
uint hardware_byte_reorder_disable
Disable hardware byte reordering.
uint stop_clock
stop memory clock when no access
uint input_multiplier
input clock multiplier
uint transfer2_done_interrupt
interrupt if dma_status_t::transfer2_done set
uint uncommit
setting this bit uncommits a queued transfer
uint temperature
temperature sensor reading
#define ASSERT_WORD_SIZED(type_ident)
Generates valid code if the named type is one word long, and invalid code otherwise.
Definition spinn_extra.h:60
uchar payload
Payload-word-present flag.
sc_clock_source
System controller clock sources.
@ CLOCK_SRC_PLL2
PLL2.
@ CLOCK_SRC_EXT
external 10MHz clock input
@ CLOCK_SRC_EXT4
external 10MHz clock divided by 4
@ CLOCK_SRC_PLL1
PLL1.
uint row
number of row address bits (11-16)
uint select
Bit-map for selecting a processor.
uint transferring
DMA transfer in progress.
uint minimum
minimum QoS
sc_magic_proc_map_t clear_cpu_irq
Writing a 1 clears a processor’s interrupt line.
uint clk32
read value on Clk32 pin
uint smi_output
SMI data output.
uint t_rrd
active bank x to active bank y delay
sc_pll_control_t pll1_freq_control
PLL1 frequency control.
uint int1
External interrupt request 1.
uint route
Rx route field of packet.
static volatile sdram_controller_t *const sdram_control
SDRAM interface control registers.
uint multicast
error-free multicast packet received
ethernet_phy_control_t phy_control
PHY control.
uint enable
interrupt enable
router_p2p_route route5
Fifth packed route.
uint background_load_value
Background load value for Timer.
sdram_dll_user_config0_t config0
Test: control.
static volatile uint *const router_key_table
Router multicast key table (write only!)
router_p2p_route route1
First packed route.
const uint crcr
CRC value in received block.
uint point_to_point
error-free point-to-point packet received
uint t_wtr
write to read delay
uint soft_reset
a soft reset of the DMA controller has happened
uint timer2
Counter/timer interrupt 2.
sdram_register_maxima
Maximum register IDs.
@ SDRAM_QOS_MAX
Maximum memory QoS register.
@ SDRAM_CHIP_MAX
Maximum memory chip configuration register.
dma_timeout_t timeout
Timeout value.
uint power_up
Power UP.
uchar mem_or_normal
Type indicator.
const uint emergency_active_cycle_count
counts emergency router active cycles
uint route
Rx route field from packet.
static volatile ethernet_controller_t *const ethernet_control
Ethernet MII controller registers.
uint ethermux
read value on Ethermux pin
uint int0
External interrupt request 0.
uint user_abort_interrupt
interrupt if dma_status_t::user_abort set
uint test_incing
Force Incing (if ID = 1)
const sdram_status_t status
memory controller status
uint L5
Diversion rule for link 5.
uint fixed_route
error-free fixed-route packet received
uint type
packet type: fr, nn, p2p, mc
uint t_xsr
exit self-refresh command time
uint transfer2_done
2nd DMA transfer has completed without error
uint timeout
a burst transfer has not completed in time
uint timer
system-wide slow timer status and clear
uint load_value
Load value for Timer.
uint abort
end current transfer and discard data
static volatile uint *const router_mask_table
Router multicast mask table (write only!)
sc_io_t io_port
I/O pin output register.
uint tx_key
Send MC key/P2P dest ID & seq code; writing this commits a send.
uint locked
Phase comparator is locked.
uint L0
Diversion rule for link 0.
uint transfer_done_interrupt
interrupt if dma_status_t::transfer_done set
uint status
ARM968 STANDBYWFI signal for each core.
uint sys
clock selector for System AHB components; see sc_clock_source
uint width
Width of external memory: 2’b01 = 32 bits.
uint chip
chip number
uint transmit
Transmit system enable.
uint pattern_default
default [x1]/non-default [1x] routed packets
uint t_rcd
RAS to CAS minimum delay.
uint rollover
Rollover bit - toggles on address wrap-around.
uint64 mac_address
MAC address; low 48 bits only.
const router_packet_header_t header
dumped packet control byte and flags
uint half_cycle
CAS half cycle - must be set to 1’b0.
uint drop_counter
Receive dropped frame count.
uint cc_rx_p2p
Comms controller point-to-point packet received.
uint s0
Input select for delay line 0 {def, alt, 0, 1}.
uint enable
Enable DLL (0 = reset DLL)
router_p2p_route route8
Eighth packed route.
uint enable_cycle_count
enable cycle counter
uint counter_event_interrupt_active
counter interrupt active: I = E AND C
uint qos
selects the 4-bit QoS field from the AXI ARID
uint smi_clock
SMI clock (active rising)
uint fr_links
The links to route FR packets along.
uint receive_broadcast
Receive broadcast packets enable.
router_p2p_route route4
Fourth packed route.
vic_interrupt_handler_t vector_address
current vector address register
uint link
Tx link transmit error caused packet dump.
static volatile vic_vector_control_t *const vic_interrupt_control
VIC individual interrupt control. Array of 32 elements.
uint time_phase
time phase (c.f. packet time stamps)
uint cc_rx_mc
Comms controller multicast packet received.
router_diversion_rule_t
Diversion rules for the fields of router_diversion_t.
@ ROUTER_DIVERSION_NORMAL
Send on default route.
@ ROUTER_DIVERSION_DESTROY
Destroy default-routed packets.
@ ROUTER_DIVERSION_MONITOR
Divert to local monitor.
uint router_dump
Router packet dumped - indicates failed delivery.
uint count_framing_errors
enable count of packet framing errors
uint pre_divide
divide input clock (see timer_pre_divide)
uint value
Overall entry packed as number.
sc_clock_mux_t clock_mux_control
Clock multiplexer controls.
uint framing_error
packet framing error (sticky)
uint count_timestamp_errors
enable count of packet time stamp errors
ethernet_general_command_t command
General command.
dma_control_t control
Control DMA transfer.
sdram_timing_config_t timing_config
timing configuration
uint period
memory refresh period in memory clock cycles
sc_reset_codes
System controller chip reset reasons.
@ SC_RESET_CODE_POR
Power-on reset.
@ SC_RESET_CODE_REC
Reset entire chip (sc_magic_subsystem_map_t::entire_chip)
@ SC_RESET_CODE_WDI
Watchdog interrupt.
@ SC_RESET_CODE_WDR
Watchdog reset.
@ SC_RESET_CODE_UR
User reset.
uint periodic_mode
0 = free-running; 1 = periodic
uint parity_control
Router parity control.
const uint unblocked_count
counts packets that do not wait to be issued
comms_source_addr_t source_addr
P2P source address.
bool protection
protection register
uint dma_error
DMA controller error.
uint sample_finished
temperature measurement finished
uint timeout_interrupt
interrupt if dma_status_t::timeout set
uint ethernet_transmit
Ethernet MII TxD port.
uint banks
Fixed at 1’b01 = 4 banks on a chip.
uint tcm_error
the TCM AHB interface has signalled an error
uint cc_rx_nn
Comms controller nearest neighbour packet received.
router_output_stage
Stages in router_status_t::output_stage.
@ ROUTER_OUTPUT_STAGE_WAIT1
output stage is blocked in wait1
@ ROUTER_OUTPUT_STAGE_EMPTY
output stage is empty
@ ROUTER_OUTPUT_STAGE_FULL
output stage is full but unblocked
@ ROUTER_OUTPUT_STAGE_WAIT2
output stage is blocked in wait2
uint one_shot
0 = wrapping mode, 1 = one shot
uint t_esr
self-refresh command time
sc_magic_proc_map_t cpu_hard_reset_pulse
Pulse control of CPU node resets.
vic_mask_t soft_int_disable
soft interrupt clear register
uint comms_noc
Communications NoC.
vic_mask_t int_disable
interrupt enable clear register
uint axi_error_interrupt
interrupt if dma_status_t::axi_error set
const vic_mask_t raw_status
raw interrupt status register
uint reset_on_watchdog
Reset Monitor Processor on Watchdog interrupt.
uint error
error packet detected
const router_packet_header_t header
error packet control byte and flags
uint clear_done_int
clear Done interrupt request
uint receive
Receive system enable.
uint word
as a whole word
uint time_phase
time phase when packet received/dumped
uint slow_clock
System-wide slow (nominally 32 KHz) timer interrupt.
uint clear_cpu_ok
Writing a 1 clears a CPU OK bit.
uint monitor_id
Monitor processor identifier.
static volatile uint *const router_diagnostic_counter
Router diagnostic counters.
uint processor
Fascicle Proc link error caused dump (sticky)
uint link
Tx link error caused dump (sticky)
const dma_description_t current_description
Active transfer description.
static volatile sdram_chip_t *const sdram_chip_control
SDRAM chip control registers.
router_p2p_route route6
Sixth packed route.
const uint payload
error packet data payload
uint auto_precharge_position
position of auto-pre-charge bit (10/8)
uint jtag
JTAG interface.
uint s1
Strobe 1 faster than Clock.
const uint cycle_count
counts Router clock cycles
uint sdram
PL340 SDRAM controller.
uint axi_error
the AXI interface (SDRAM) has signalled a transfer error
const sdram_dll_status_t status
Status.
uint orientation
bank-row-column/row-bank-column
static volatile uchar *const ethernet_rx_buffer
Ethernet receive buffer.
uint tune_4
Fine tuning control on delay line 4.
uint meter
Current position of bar-code output.
uint receive_unicast
Receive unicast packets enable.
uint R
Force 3-phase bar-code control inputs.
uint test_decing
Force Decing (if ID = 1)
uint restart
resume transfer (clears DMA errors)
uint monitors
Number of exclusive access monitors (0, 1, 2, 4)
sc_magic_subsystem_map_t subsystem_reset_level
Level control of subsystem resets.
uint user_abort
the user has aborted the transfer (via dma_control_t::abort)
uint interrupt_enable
Enable Watchdog counter and interrupt (1)
uint interrupt_clear
Interrupt clear register; any written value will do.
uint security_code
SYSTEM_CONTROLLER_MAGIC_NUMBER to enable write
uint payload
payload-present field from control byte
uint software
Local software interrupt generation.
static volatile timer_controller_t *const timer1_control
Timer 1 control registers.
uint M
Force 3-phase bar-code control inputs.
uint rx_disable
disables the corresponding link receiver
static volatile dma_t *const dma_control
DMA control registers.
uint route
Set 'fake' route in packet.
ethernet_tx_length_t transmit_length
Transmit frame length.
uint receive
Clear receive interrupt request.
sdram_direct_command
Memory direct commands, for sdram_direct_command_t::cmd.
@ SDRAM_DIRECT_MODEREG
Mode Register.
@ SDRAM_DIRECT_AUTOREFRESH
Auto-Refresh.
@ SDRAM_DIRECT_PRECHARGE
Precharge.
@ SDRAM_DIRECT_NOP
No-op.
uint cc_tx_empty
Comms controller transmit buffer empty.
const uint rx_data
32-bit received data
uint jtag_rtck
read value on JTAG_RTCK pin
const uint rx_key
Received MC key/P2P source ID & seq code; reading this clears the received packet.
sc_io_t io_set
Writing a 1 sets IO register bit.
uint test
read value on Test pin
uint mem
clock selector for SDRAM; see sc_clock_source
uint pattern_destination
packet dest (Tx link[5:0], MP, local ¬MP, dump)
uint L1
Diversion rule for link 1.
const uint key
error packet routing word
uint enable
QoS enable.
uint t_dqss
write to DQS time
uint jtag_tdo
read value on JTAG_TDO pin
uint processors
The physical processors to route to.
uint emergency_routing
Emergency Routing field = 3, 2, 1 or 0.
sc_magic_proc_map_t set_cpu_irq
Writing a 1 sets a processor’s interrupt line.
const uint payload
dumped packet data payload
uint enable
Enable collecting DMA statistics.
uint crc_error_interrupt
interrupt if dma_status_t::crc_error set
uint s0
Strobe 0 faster than Clock.
uint received
Rx packet received.
uint tune_0
Fine tuning control on delay line 0.
uint s2
Input select for delay line 2 {def, alt, 0, 1}.
static volatile router_diagnostic_filter_t *const router_diagnostic_filter
Router diagnostic filters.
uint crc
check (read) or generate (write) CRC
uint error_count
16-bit saturating error count
uint enable_force_inc_dec
Enable forcing of Incing and Decing.
uint column
number of column address bits (8-12)
uint paused
DMA transfer is PAUSED.
uint clock_gen
System AHB & Clock Gen (pulse reset only)
uint reset_enable
Enable the Watchdog reset output (1)
uint not_full
Tx buffer not full, so it is safe to send a packet.
uint t_mrd
mode register command time
uint tx_data
32-bit data for transmission
const watchdog_status_t raw_status
Raw interrupt status register.
uint system_noc
System NoC.
uint router_error
Router error - packet parity, framing, or time stamp error.
uint enable_counter_event_interrupt
enable interrupt on counter event
uint cc_rx_ready
Comms controller packet received.
uint processor
Fascicle Processor link error caused dump.
uint dma_done
DMA controller transfer complete.
uint word
Tuning control word.
dma_direction_t
DMA transfer direction, see dma_description_t::direction.
@ DMA_DIRECTION_WRITE
write to system bus (SDRAM)
@ DMA_DIRECTION_READ
read from system bus (SDRAM)
uint reset_flags
Reset flags register.
uint rdiv
divide Router clock by Rdiv+1 (= 1-4)
comms_rx_status_t rx_status
Indicates packet reception status.
const ethernet_general_status_t status
General status.
const sc_reset_code_t reset_code
Indicates cause of last chip reset.
sc_misc_control_t misc_control
Miscellaneous control bits.
ushort reset
write a 1 to reset diagnostic counter 15..0
uint cc_tx_overflow
Comms controller transmit buffer overflow.
uint receive_promiscuous
Receive promiscuous packets enable.
uint ethernet_tx
Ethernet transmit frame interrupt.
uint reinit_wait_counters
re-initialise wait counters
uint processor_id
hardwired processor ID identifies CPU on chip
uint router_diagnostic
Router diagnostic counter event has occurred.
uint cas_lat
CAS latency in memory clock cycles.
uint emergency_routing_mode
Emergency Routing mode.
router_p2p_route route3
Third packed route.
uint freq_range
frequency range (see sc_frequency_range)
uint source
interrupt source
const ethernet_receive_pointer_t receive_write
Receive frame buffer write pointer.
uint transfer_id
software defined transfer ID
const uint value
Current count value.
uint s3
Strobe 3 faster than Clock.
uint c2
Clock faster than strobe 2.
ushort enable
enable diagnostic counter 15..0
uint security_code
SYSTEM_CONTROLLER_MAGIC_NUMBER to enable write
uint arbitrate_request
Write 1 to set MP arbitration bit (see system_controller_t::monitor_arbiter)
timer_pre_divide
Values for timer_control_t::pre_divide.
@ TIMER_PRE_DIVIDE_16
Divide by 16.
@ TIMER_PRE_DIVIDE_256
Divide by 256.
@ TIMER_PRE_DIVIDE_1
Divide by 1.
ethernet_interrupt_clear_t interrupt_clear
Interrupt clear.
uint transmit_active
Transmit MII interface active.
void(* vic_interrupt_handler_t)(void)
The type of an interrupt handler.
const void * current_tcm_address
Active TCM address.
uint privilege
DMA transfer mode is user (0) or privileged (1)
uint rollover
Rollover bit - toggles on address wrap-around.
uint smi_input
SMI data input.
uint gpio9
Signal on GPIO[9].
uint tune_2
Fine tuning control on delay line 2.
uint reset_code
One of sc_reset_codes.
uint monitor_processor
Monitor Processor ID number.
uint gpio
GPIO pins.
uint chips
Number of different chip selects (1, 2, 3, 4)
uint begin_emergency_wait_time
wait1; wait time before emergency routing
uint counter_event_occurred
counter event has occurred (sticky)
uint ethernet_phy
Ethernet PHY/external interrupt.
uint write_buffer_full
write buffer is full
uint status
The flag bit.
uint burst
burst length = 2B×Width, B = 0..4 (i.e max 16)
uint length_words
length of the DMA transfer, in words
uint ptr
Receive descriptor read pointer.
uint t_rp
precharge to RAS delay
sc_magic_proc_map_t cpu_soft_reset_level
Level control of CPU resets.
uint watchdog
Watchdog timer interrupt.
uint write_buffer_error_interrupt
interrupt if dma_status_t::write_buffer_error set
uint tune_3
Fine tuning control on delay line 3.
uchar route
Routing information.
uint c0
Clock faster than strobe 0.
uint interrupt_active
combined Router interrupt request
uint status
Config, ready, paused, low-power.
uint interrupt_clear
Interrupt clear (any value may be written)
SpiNNaker communications controller registers.
Indicates packet reception status.
P2P source address.
Controls packet transmission.
DMA control register.
DMA descriptor.
DMA global control register.
DMA statistics control register.
DMA status register.
DMA controller registers.
DMA timeout register.
Ethernet controller registers.
Ethernet general command.
Ethernet general status.
Ethernet interrupt clear register.
Ethernet PHY (physical layer) control.
Ethernet receive descriptor pointer.
Ethernet received message descriptor.
Ethernet receive data pointer.
Ethernet frame transmit length.
Router control register.
Router diagnostic counter enable/reset.
SpiNNaker router diagnostic filter.
Router diversion rules, used to handle default-routed packets.
Router dump outputs.
Router dump status.
Router error status.
Fixed route and nearest neighbour packet routing control.
Router status.
SpiNNaker router controller registers.
Packet-dump-related registers.
Error-related registers.
Router timing counter controls.
System controller clock multiplexing control.
System controller processor select.
System controller subsystem reset target select.
System controller miscellaneous control.
System controller monitor election control.
System controller mutex/interlock.
System controller phase-locked-loop control.
System controller last reset status.
System controller sleep status.
System controller temperature status/control.
Memory CAS latency.
Memory chip configuration.
Memory controller command.
Memory controller registers.
Memory controller direct command.
Memory delay-locked-loop (DLL) test and status inputs.
SDRAM delay-locked-loop (DLL) control registers.
Memory delay-locked-loop (DLL) test and control outputs.
Memory QoS settings.
Memory configuration.
Memory refresh period.
Memory controller status.
Memory timimg configuration.
Fixed-route packet only fields.
Multicast packet only fields.
Nearest-neighbour packet only fields.
Peer-to-peer packet only fields.
System controller registers.
Timer control register.
Timer controller registers.
Timer interrupt status flag.
VIC registers.
VIC individual vector control.
Watchdog timer control register.
Watchdog timer control registers.
Watchdog timer status registers.
SpiNNaker router multicast route.
A packed word in the P2P routing table.
Router error/dump header.
System controller general chip I/O pin access.
Memory delay-locked-loop (DLL) fine-tune control.
The control byte of a SpiNNaker packet.
Mask describing interrupts that can be selected.
Watchdog timer lock register.
unsigned long long uint64
#define WD_CODE
unsigned char uchar
unsigned int uint
#define NUM_CPUS
unsigned short ushort
#define NUM_LINKS