Provides core-local and inter-core hardware for the two processors, with single-cycle access.
Pointer to the register block
Return the pointer to the register block
Steal an instance of this peripheral
Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.
Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.
0x00 - Processor core identifier
Value is 0 when read from processor core 0, and 1 when read from processor core 1.
0x08 - Input value for QSPI pins
0x14 - GPIO output value set
0x18 - GPIO output value clear
0x1c - GPIO output value XOR
0x24 - GPIO output enable set
0x28 - GPIO output enable clear
0x2c - GPIO output enable XOR
0x30 - QSPI output value
0x34 - QSPI output value set
0x38 - QSPI output value clear
0x3c - QSPI output value XOR
0x40 - QSPI output enable
0x44 - QSPI output enable set
0x48 - QSPI output enable clear
0x4c - QSPI output enable XOR
0x50 - Status register for inter-core FIFOs (mailboxes).
There is one FIFO in the core 0 -> core 1 direction, and one core 1 -> core 0. Both are 32 bits wide and 8 words deep.
Core 0 can see the read side of the 1->0 FIFO (RX), and the write side of 0->1 FIFO (TX).
Core 1 can see the read side of the 0->1 FIFO (RX), and the write side of 1->0 FIFO (TX).
The SIO IRQ for each core is the logical OR of the VLD, WOF and ROE fields of its FIFO_ST register.
0x5c - Spinlock state
A bitmap containing the state of all 32 spinlocks (1=locked).
Mainly intended for debugging.
0x60 - Divider unsigned dividend
Write to the DIVIDEND operand of the divider, i.e. the p in p / q
.
Any operand write starts a new calculation. The results appear in QUOTIENT, REMAINDER.
UDIVIDEND/SDIVIDEND are aliases of the same internal register. The U alias starts an
unsigned calculation, and the S alias starts a signed calculation.
0x64 - Divider unsigned divisor
Write to the DIVISOR operand of the divider, i.e. the q in p / q
.
Any operand write starts a new calculation. The results appear in QUOTIENT, REMAINDER.
UDIVISOR/SDIVISOR are aliases of the same internal register. The U alias starts an
unsigned calculation, and the S alias starts a signed calculation.
0x68 - Divider signed dividend
The same as UDIVIDEND, but starts a signed calculation, rather than unsigned.
0x6c - Divider signed divisor
The same as UDIVISOR, but starts a signed calculation, rather than unsigned.
0x70 - Divider result quotient
The result of DIVIDEND / DIVISOR
(division). Contents undefined while CSR_READY is low.
For signed calculations, QUOTIENT is negative when the signs of DIVIDEND and DIVISOR differ.
This register can be written to directly, for context save/restore purposes. This halts any
in-progress calculation and sets the CSR_READY and CSR_DIRTY flags.
Reading from QUOTIENT clears the CSR_DIRTY flag, so should read results in the order
REMAINDER, QUOTIENT if CSR_DIRTY is used.
0x74 - Divider result remainder
The result of DIVIDEND % DIVISOR
(modulo). Contents undefined while CSR_READY is low.
For signed calculations, REMAINDER is negative only when DIVIDEND is negative.
This register can be written to directly, for context save/restore purposes. This halts any
in-progress calculation and sets the CSR_READY and CSR_DIRTY flags.
0x80 - Read/write access to accumulator 0
0x84 - Read/write access to accumulator 1
0x88 - Read/write access to BASE0 register.
0x8c - Read/write access to BASE1 register.
0x90 - Read/write access to BASE2 register.
0x94 - Read LANE0 result, and simultaneously write lane results to both accumulators (POP).
0x98 - Read LANE1 result, and simultaneously write lane results to both accumulators (POP).
0x9c - Read FULL result, and simultaneously write lane results to both accumulators (POP).
0xa0 - Read LANE0 result, without altering any internal state (PEEK).
0xa4 - Read LANE1 result, without altering any internal state (PEEK).
0xa8 - Read FULL result, without altering any internal state (PEEK).
0xac - Control register for lane 0
0xb0 - Control register for lane 1
0xb4 - Values written here are atomically added to ACCUM0
Reading yields lane 0’s raw shift and mask value (BASE0 not added).
0xb8 - Values written here are atomically added to ACCUM1
Reading yields lane 1’s raw shift and mask value (BASE1 not added).
0xbc - On write, the lower 16 bits go to BASE0, upper bits to BASE1 simultaneously.
Each half is sign-extended to 32 bits if that lane’s SIGNED flag is set.
0xc0 - Read/write access to accumulator 0
0xc4 - Read/write access to accumulator 1
0xc8 - Read/write access to BASE0 register.
0xcc - Read/write access to BASE1 register.
0xd0 - Read/write access to BASE2 register.
0xd4 - Read LANE0 result, and simultaneously write lane results to both accumulators (POP).
0xd8 - Read LANE1 result, and simultaneously write lane results to both accumulators (POP).
0xdc - Read FULL result, and simultaneously write lane results to both accumulators (POP).
0xe0 - Read LANE0 result, without altering any internal state (PEEK).
0xe4 - Read LANE1 result, without altering any internal state (PEEK).
0xe8 - Read FULL result, without altering any internal state (PEEK).
0xec - Control register for lane 0
0xf0 - Control register for lane 1
0xf4 - Values written here are atomically added to ACCUM0
Reading yields lane 0’s raw shift and mask value (BASE0 not added).
0xf8 - Values written here are atomically added to ACCUM1
Reading yields lane 1’s raw shift and mask value (BASE1 not added).
0xfc - On write, the lower 16 bits go to BASE0, upper bits to BASE1 simultaneously.
Each half is sign-extended to 32 bits if that lane’s SIGNED flag is set.
0x100..0x180 - Reading from a spinlock address will:
Writing (any value) releases the lock.
If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.
The value returned on success is 0x1 << lock number.
Iterator for array of: 0x100..0x180 - Reading from a spinlock address will:
Writing (any value) releases the lock.
If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.
The value returned on success is 0x1 << lock number.