High Level Design

Group:

{% include ‘group.md’ %}

Hardware top level block diagram

Full FlexDI module block diagram:

Hardware top level block diagram

State machine

Hardware diagram of PIO block

Software top level block diagram

Software Block diagram

Module specification

This project aims to be fully compatible with the existing PIO Hardware. For this reason the register specification is exactly the same as specified in the official documentation. This may be subject to change and could differ in the future.

Verilog module: PIO

Function:

  • Top level module of programmable IO block

Interface:

  • student

    • TL-UL

    • GPIOs

Verification plan:

  • Run the for examples mentioned in the Requirements & Functional Specification

Verilog module: Instruction memory

Function:

  • Holds the instructions necessary for FlexDI Cores

  • implemented as 4-read 1-write memory block

Interface:

  • flexdi

    • tlul_adapter

    • Instruction multiplexer

Verfication plan:

  • Verilog testbench, self-testing

Verilog module: Instruction multiplexer

Function:

  • Multiplexes instructions from the instruction memory (TL-UL adapter), forced instructions (TL-UL adapter) and EXE instructions from the Core

Interface:

  • flexdi

    • Instruction memory

    • Instruction decoder

    • Core

Verfication plan:

  • Tested with PIO-C-Examples integrated into the whole system

Verilog module: State machine

Function:

  • Grouping module for the individual state machines running the instructions

  • Pass through interfaces of sumbodules

Interface:

  • No direct external interface

  • Configuration using the DMA adapter

Verfication plan:

  • Verilog testbench, self-testing

Verilog module: Fractional divider

Function:

  • Enable the state machine to run at a clock speed different from the main system

  • Provide a clock to all state machine components

Interface:

  • No direct external interface

  • Configuration using the DMA adapter

Verfication plan:

  • Verilog testbench, self-testing

Verilog module: Instruction decoder

Function:

  • Decode instructions from memory

  • Set core operation flags

Interface:

  • No direct external interface

  • Configuration using the DMA adapter

Verfication plan:

  • Verilog testbench, self-testing

Verilog module: Core

Function:

  • Apply instructions to FIFO, In/Out shift registers and scratch registers

  • Advance program counter

Interface:

  • No direct external interface

  • Configuration using the DMA adapter

Verfication plan:

  • Verilog testbench, self-testing

Verilog module: Scratch registers

Function:

  • Hold temporary values for the state machine’s operations

Interface:

  • No direct external interface

  • Configuration using the DMA adapter

Verfication plan:

  • Verilog testbench, self-testing

Verilog module: Setup + Status registers

Function:

  • Enable main CPU to configure the state machine’s operation (speed, IRQs, force instruction, etc.)

  • Allow debugging of state machine through exposing state machine status (program counter, etc.) in status registers

Interface:

  • No direct external interface

  • Configuration using the DMA adapter

Verfication plan:

  • Tested by integration with the other modules

Verilog module: Output shift register (OSR)

Function:

  • Facilitate serializing words from TX FIFO to bits for processing

Interface:

  • No direct external interface

  • Configuration using the DMA adapter

Verfication plan:

  • Verilog testbench, self-testing

Verilog module: Input shift register (ISR)

Function:

  • Facilitate deserializing bits into words for RX FIFO after processing

Interface:

  • No direct external interface

  • Configuration using the DMA adapter

Verfication plan:

  • Verilog testbench, self-testing

Verilog module: FIFO

Function:

  • Instanced as asynchronous Input/Output FIFO for all the state machines

  • Two per state machine

Interface:

  • No direct external interface

  • Configuration using the DMA adapter

Verfication plan:

  • Verilog testbench, self-testing

Verilog module: DMA Adapter

Function:

  • Configuration unit

  • Allows for configuration

  • of almost all other components in the system

Interface:

flexDI.CTRL @ + 0x0
FlexDI control register
Reset default = 0x0, mask 0xfff
31302928272625242322212019181716
 
1514131211109876543210
  CLKDIV_RESTART SM_RESTART SM_ENABLE
BitsTypeResetNameDescription
3:0rw0x0SM_ENABLEEnable/disable each of the four state machines by writing 1/0 to each of these four bits. When disabled, a state machine will cease executing instructions, except those written directly to SMx_INSTR by the system. Multiple bits can be set/cleared at once to run/halt multiple state machines simultaneously
7:4rw0x0SM_RESTARTWrite 1 to instantly clear internal SM state which may be otherwise difficult to access and will affect future execution. Specifically, the following are cleared: input and output shift counters; the contents of the input shift register; the delay counter; the waiting-on-IRQ state; any stalled instruction written to SMx_INSTR or run by OUT/MOV EXEC; any pin write left asserted due to OUT_STICKY. The program counter, the contents of the output shift register and the X/Y scratch registers are not affected
11:8rw0x0CLKDIV_RESTARTRestart a state machine's clock divider from an initial phase of 0. Clock dividers are free-running, so once started their output (including fractional jitter) is completely determined by the integer/fractional divisor configured in SMx_CLKDIV. This means that, if multiple clock dividers with the same divisor are restarted simultaneously, by writing multiple 1 bits to this field, the execution clocks of those state machines will run in" precise lockstep. Note that setting/clearing SM_ENABLE does not stop the clock divider from running, so once multiple state machines' clocks are synchronised, it is safe to disable/reenable a state machine, whilst keeping the clock dividers in sync. Note also that CLKDIV_RESTART can be written to whilst the state machine is running, and this is useful to resynchronise clock dividers after the divisors (SMx_CLKDIV) have been changed on-the-fly."


flexDI.FSTAT @ + 0x4
FIFO status register
Reset default = 0xf000f00, mask 0xf0f0f0f
31302928272625242322212019181716
  TXEMPTY   TXFULL
1514131211109876543210
  RXEMPTY   RXFULL
BitsTypeResetNameDescription
3:0ro0x0RXFULLRX Fifo of state machine is full
7:4Reserved
11:8ro0xfRXEMPTYRX Fifo of state machine is empty
15:12Reserved
19:16ro0x0TXFULLRX Fifo of state machine is full
23:20Reserved
27:24ro0xfTXEMPTYTX Fifo of state machine is empty


flexDI.FDEBUG @ + 0x8
FIFO Debug Register
Reset default = 0x0, mask 0xf0f0f0f
31302928272625242322212019181716
  TXSTALL   TXOVER
1514131211109876543210
  RXUNDER   RXSTALL
BitsTypeResetNameDescription
3:0rw0x0RXSTALLstate machine has stalled on full RX FIFO during a blocking PUSH, or an IN with autopush enabled. This flag is also set when a nonblocking PUSH to a full FIFO took place, in which case the state machine has dropped data. Write 1 to clear.
7:4Reserved
11:8rw0x0RXUNDERRX FIFO underflow (i.e. read-on-empty by the system) has occurred. Write 1 to clear. Note that read-on-empty does not perturb the state of the FIFO in any way, but the data returned by reading from an empty FIFO is undefined, so this flag generally only becomes set due to some kind of software error.
15:12Reserved
19:16rw0x0TXOVERTX FIFO overflow (i.e. write-on-full by the system) has occurred. Write 1 to clear. Note that write-on-full does not alter the state or contents of the FIFO in any way, but the data that the system attempted to write is dropped, so if this flag is set, your software has quite likely dropped" some data on the floor."
23:20Reserved
27:24rw0x0TXSTALLstate machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear


flexDI.FLEVEL @ + 0xc
Current Fill levels of all FIFOs
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
RX3 TX3 RX2 TX2
1514131211109876543210
RX1 TX1 RX0 TX0
BitsTypeResetNameDescription
3:0ro0x0TX0Fill Level of TX Fifo of state Machine 0
7:4ro0x0RX0Fill Level of RX Fifo of state Machine 0
11:8ro0x0TX1Fill Level of TX Fifo of state Machine 1
15:12ro0x0RX1Fill Level of RX Fifo of state Machine 1
19:16ro0x0TX2Fill Level of TX Fifo of state Machine 2
23:20ro0x0RX2Fill Level of RX Fifo of state Machine 2
27:24ro0x0TX3Fill Level of TX Fifo of state Machine 3
31:28ro0x0RX3Fill Level of RX Fifo of state Machine 3


flexDI.TXF0 @ + 0x10
Direct Write Access to TX Fifo
Reset default = 0x0, mask 0x0
31302928272625242322212019181716
Data...
1514131211109876543210
...Data
BitsTypeResetNameDescription
31:0woxDataDirect write access to the TX FIFO for this state machine. Each write pushes one word to the FIFO. Attempting to write to a full FIFO has no effect on the FIFO state or contents, and sets the sticky FDEBUG_TXOVER error flag for this FIFO.


flexDI.TXF1 @ + 0x14
Direct Write Access to TX Fifo
Reset default = 0x0, mask 0x0
31302928272625242322212019181716
Data...
1514131211109876543210
...Data
BitsTypeResetNameDescription
31:0woxDataDirect write access to the TX FIFO for this state machine. Each write pushes one word to the FIFO. Attempting to write to a full FIFO has no effect on the FIFO state or contents, and sets the sticky FDEBUG_TXOVER error flag for this FIFO.


flexDI.TXF2 @ + 0x18
Direct Write Access to TX Fifo
Reset default = 0x0, mask 0x0
31302928272625242322212019181716
Data...
1514131211109876543210
...Data
BitsTypeResetNameDescription
31:0woxDataDirect write access to the TX FIFO for this state machine. Each write pushes one word to the FIFO. Attempting to write to a full FIFO has no effect on the FIFO state or contents, and sets the sticky FDEBUG_TXOVER error flag for this FIFO."


flexDI.TXF3 @ + 0x1c
Direct Write Access to TX Fifo
Reset default = 0x0, mask 0x0
31302928272625242322212019181716
Data...
1514131211109876543210
...Data
BitsTypeResetNameDescription
31:0woxDataDirect write access to the TX FIFO for this state machine. Each write pushes one word to the FIFO. Attempting to write to a full FIFO has no effect on the FIFO state or contents, and sets the sticky FDEBUG_TXOVER error flag for this FIFO.


flexDI.RXF0 @ + 0x20
Direct Read Access from RX Fifo
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
Data...
1514131211109876543210
...Data
BitsTypeResetNameDescription
31:0ro0x0DataDirect read access to the RX FIFO for this state machine. Each read pops one word from the FIFO. Attempting to read from an empty FIFO has no effect on the FIFO state, and sets the sticky FDEBUG_RXUNDER error flag for this FIFO. The data returned to the system on a read from an empty FIFO is undefined.


flexDI.RXF1 @ + 0x24
Direct Read Access from RX Fifo
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
Data...
1514131211109876543210
...Data
BitsTypeResetNameDescription
31:0ro0x0DataDirect read access to the RX FIFO for this state machine. Each read pops one word from the FIFO. Attempting to read from an empty FIFO has no effect on the FIFO state, and sets the sticky FDEBUG_RXUNDER error flag for this FIFO. The data returned to the system on a read from an empty FIFO is undefined.


flexDI.RXF2 @ + 0x28
Direct Read Access from RX Fifo
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
Data...
1514131211109876543210
...Data
BitsTypeResetNameDescription
31:0ro0x0DataDirect read access to the RX FIFO for this state machine. Each read pops one word from the FIFO. Attempting to read from an empty FIFO has no effect on the FIFO state, and sets the sticky FDEBUG_RXUNDER error flag for this FIFO. The data returned to the system on a read from an empty FIFO is undefined.


flexDI.RXF3 @ + 0x2c
Direct Read Access from RX Fifo
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
Data...
1514131211109876543210
...Data
BitsTypeResetNameDescription
31:0ro0x0DataDirect read access to the RX FIFO for this state machine. Each read pops one word from the FIFO. Attempting to read from an empty FIFO has no effect on the FIFO state, and sets the sticky FDEBUG_RXUNDER error flag for this FIFO. The data returned to the system on a read from an empty FIFO is undefined.


flexDI.IRQ Register @ + 0x30
IRQ Flags of state Machines
Reset default = 0x0, mask 0xff
31302928272625242322212019181716
 
1514131211109876543210
  IRQ Flags
BitsTypeResetNameDescription
7:0rw0x0IRQ Flagsstate machine IRQ flags register. Write 1 to clear. There are 8 state machine IRQ flags, which can be set, cleared, and waited on by the state machines. There’s no fixed association between flags and state machines — any state machine can use any flag. Any of the 8 flags can be used for timing synchronisation between state machines, using IRQ and WAIT instructions. The lower four of these flags are also routed out to system-level interrupt requests, alongside FIFO status interrupts — see e.g. IRQ0_INTE.


flexDI.IRQ FORCE @ + 0x34
Register to Force IRQs for Software tests
Reset default = 0x0, mask 0x0
31302928272625242322212019181716
 
1514131211109876543210
  IRQ Fields
BitsTypeResetNameDescription
7:0woxIRQ FieldsWriting a 1 to each of these bits will forcibly assert the corresponding IRQ. Note this is different to the INTF register: writing here affects FlexDI internal state. INTF just asserts the processor-facing IRQ signal for testing ISRs, and is not visible to the state machines.


flexDI.INPUT_SYNC_BYPASS @ + 0x38
Bypass 2FF Synchronizer of GPIOs
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
Input Sync Bypass...
1514131211109876543210
...Input Sync Bypass
BitsTypeResetNameDescription
31:0rw0x0Input Sync BypassThere is a 2-flipflop synchronizer on each GPIO input, which protects FlexDI logic from metastabilities. This increases input delay, and for fast synchronous IO (e.g. SPI) these synchronizers may need to be bypassed. Each bit in this register corresponds to one GPIO. 0 → input is synchronized (default) 1 → synchronizer is bypassed If in doubt, leave this register as all zeroes.


flexDI.DBG_PADOUT @ + 0x3c
GPIO Pad Output Debug Register
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
GPIO Output Values...
1514131211109876543210
...GPIO Output Values
BitsTypeResetNameDescription
31:0ro0x0GPIO Output ValuesRead to sample the pad output values FlexDI is currently driving to the GPIOs. There can be up to 32 GPIOs per FlexDI Unit


flexDI.DBG_PADOE @ + 0x40
GPIO Pad Output Enable Debug Register
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
GPIO Output Enables...
1514131211109876543210
...GPIO Output Enables
BitsTypeResetNameDescription
31:0ro0x0GPIO Output EnablesRead to sample the pad output enables (direction) FlexDI is currently driving to the GPIOs. On RP2040 there are 30 GPIOs, so the two most significant bits are hardwired to 0.


flexDI.DBG_CFGINFO @ + 0x44
Configuration Debug Register
Reset default = 0x0, mask 0x3f0f3f
31302928272625242322212019181716
  IMEM_SIZE
1514131211109876543210
  SM_COUNT   FIFO_DEPTH
BitsTypeResetNameDescription
5:0ro0x0FIFO_DEPTHThe depth of the state machine TX/RX FIFOs, measured in words. Joining fifos via SHIFTCTRL_FJOIN gives one FIFO with double this depth.
7:6Reserved
11:8ro0x0SM_COUNTNumber of state machines of this FlexDI instance
15:12Reserved
21:16ro0x0IMEM_SIZEThe Size of the instruction memory, measured in units of one instruction


flexDI.INSTR_MEM0 @ + 0x48
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM1 @ + 0x4c
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM2 @ + 0x50
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM3 @ + 0x54
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM4 @ + 0x58
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM5 @ + 0x5c
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM6 @ + 0x60
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM7 @ + 0x64
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM8 @ + 0x68
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM9 @ + 0x6c
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM10 @ + 0x70
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM11 @ + 0x74
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM12 @ + 0x78
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM13 @ + 0x7c
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM14 @ + 0x80
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM15 @ + 0x84
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM16 @ + 0x88
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM17 @ + 0x8c
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM18 @ + 0x90
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM19 @ + 0x94
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM20 @ + 0x98
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM21 @ + 0x9c
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM22 @ + 0xa0
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM23 @ + 0xa4
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM24 @ + 0xa8
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM25 @ + 0xac
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM26 @ + 0xb0
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM27 @ + 0xb4
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM28 @ + 0xb8
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM29 @ + 0xbc
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM30 @ + 0xc0
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.INSTR_MEM31 @ + 0xc4
Instruction memory mapping
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
val
BitsTypeResetNameDescription
15:0rw0x0valWrite-only access to instruction memory location N


flexDI.SM0_CLKDIV @ + 0xc8
Clock divider configuration Register
Reset default = 0x10000, mask 0xffffff00
31302928272625242322212019181716
INT_P
1514131211109876543210
FRAC_P  
BitsTypeResetNameDescription
7:0Reserved
15:8rw0x0FRAC_PFractional part of clock divisor
31:16rw0x1INT_PEffective frequency is sysclk/(int + frac/256). Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0.


flexDI.SM0_EXECCTRL @ + 0xcc
Execution and Behaviour Settings of state Machine
Reset default = 0x1f000, mask 0xffffff9f
31302928272625242322212019181716
EXEC_STALLED SIDE_EN SIDE_PINDIR JMP_PIN OUT_EN_SEL INLINE_OUT_EN OUT_STICKY WRAP_TOP...
1514131211109876543210
...WRAP_TOP WRAP_BOTTOM   STATUS_SEL STATUS_N
BitsTypeResetNameDescription
3:0rw0x0STATUS_NComparison level for the MOV x, STATUS instruction
4rw0x0STATUS_SELComparison used for the MOV x, STATUS instruction. 0x0 → All-ones if TX FIFO level < N, otherwise all-zeroes 0x1 → All-ones if RX FIFO level < N, otherwise all-zeroes
6:5Reserved
11:7rw0x0WRAP_BOTTOMAfter reaching wrap_top, execution is wrapped to this address.
16:12rw0x1fWRAP_TOPAfter reaching this address, execution is wrapped to wrap_bottom. If the instruction is a jump, and the jump condition is true, the jump takes priority.
17rw0x0OUT_STICKYContinuously assert the most recent OUT/SET to the pins
18rw0x0INLINE_OUT_ENIf 1, use a bit of OUT data as an auxiliary write enable When used in conjunction with OUT_STICKY, writes with an enable of 0 will deassert the latest pin write. This can create useful masking/override behaviour due to the priority ordering of state machine pin writes (SM0 < SM1 < …)
23:19rw0x0OUT_EN_SELWhich data bit to use for inline OUT enable
28:24rw0x0JMP_PINThe GPIO number to use as condition for JMP PIN. Unaffected by input mapping.
29rw0x0SIDE_PINDIRIf 1, side-set data is asserted to pin directions, instead of pin values
30rw0x0SIDE_ENIf 1, the MSB of the Delay/Side-set instruction field is used as side-set enable, rather than a side-set data bit. This allows instructions to perform side-set optionally, rather than on every instruction, but the maximum possible sideset width is reduced from 5 to 4. Note that the value of PINCTRL_SIDESET_COUNT is inclusive of this enable bit.
31rw0x0EXEC_STALLEDIf 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes.


flexDI.SM0_SHIFTCTRL @ + 0xd0
Control Behaviour of the input/output shift registers for state machine N
Reset default = 0xc0000, mask 0xffff0000
31302928272625242322212019181716
FJOIN_RX FJOIN_TX PULL_THRESH PUSH_THRESH OUT_SHIFTDIR IN_SHIFTDIR AUTOPULL AUTOPUSH
1514131211109876543210
 
BitsTypeResetNameDescription
15:0Reserved
16rw0x0AUTOPUSHPush automatically when the input shift register is filled, i.e. on an IN instruction which causes the input shift counter to reach or exceed PUSH_THRESH.
17rw0x0AUTOPULLPull automatically when the output shift register is emptied, i.e. on or following an OUT instruction which causes the output shift counter to reach or exceed PULL_THRESH.
18rw0x1IN_SHIFTDIR1 = shift input shift register to right (data enters from left). 0 = to left.
19rw0x1OUT_SHIFTDIR1 = shift out of output shift register to right. 0 = to left.
24:20rw0x0PUSH_THRESHNumber of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. Write 0 for value of 32.
29:25rw0x0PULL_THRESHNumber of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. Write 0 for value of 32.
30rw0x0FJOIN_TXWhen 1, TX FIFO steals the RX FIFO’s storage, and becomes twice as deep. RX FIFO is disabled as a result (always reads as both full and empty). FIFOs are flushed when this bit is changed.
31rw0x0FJOIN_RXWhen 1, RX FIFO steals the TX FIFO’s storage, and becomes twice as deep.TX FIFO is disabled as a result (always reads as both full and empty). FIFOs are flushed when this bit is changed.


flexDI.SM0_ADDR @ + 0xd4
Instruction Pointer Base Address of statemachine N
Reset default = 0x0, mask 0x1f
31302928272625242322212019181716
 
1514131211109876543210
  SMPC BASE
BitsTypeResetNameDescription
4:0ro0x0SMPC BASEBase Address of state Machine Instruction Pointer


flexDI.SM0_INSTR @ + 0xd8
Instruction Pointer of statemachine N
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
SMPC
BitsTypeResetNameDescription
15:0rw0x0SMPCRead to see the instruction currently addressed by state machine N's program counter. Write to execute an instruction immediately (including jumps) and then resume execution.


flexDI.SM0_PINCTRL @ + 0xdc
state machine pin control
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
SIDESET_COUNT SET_COUNT OUT_COUNT IN_BASE...
1514131211109876543210
...IN_BASE SIDESET_BASE SET_BASE OUT_BASE
BitsTypeResetNameDescription
4:0rw0x0OUT_BASEThe lowest-numbered pin that will be affected by an OUT PINS, OUT PINDIRS or MOV PINS instruction. The data written to this pin will always be the least-significant bit of the OUT or MOV data.
9:5rw0x0SET_BASEThe lowest-numbered pin that will be affected by a SET PINS or SET PINDIRS instruction. The data written to this pin is the least-significant bit of the SET data.
14:10rw0x0SIDESET_BASEThe lowest-numbered pin that will be affected by a sideset operation. The MSBs of an instruction’s side-set/delay field (up to 5, determined by SIDESET_COUNT) are used for side-set data, with the remaining LSBs used for delay. The least-significant bit of the side-set portion is the bit written to this pin, with more-significant bits written to higher-numbered pins.
19:15rw0x0IN_BASEThe pin which is mapped to the least-significant bit of a state machine’s IN data bus. Higher-numbered pins are mapped to consecutively more-significant data bits, with a modulo of 32 applied to pin number.
25:20rw0x0OUT_COUNTThe number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive.
28:26rw0x0SET_COUNTThe number of pins asserted by a SET. In the range 0 to 5 inclusive.
31:29rw0x0SIDESET_COUNTThe number of MSBs of the Delay/Side-set instruction field which are used for side-set. Inclusive of the enable bit, if present. Minimum of 0 (all delay bits, no side-set) and maximum of 5 (all side-set, no delay).


flexDI.SM1_CLKDIV @ + 0xe0
Clock divider configuration Register
Reset default = 0x10000, mask 0xffffff00
31302928272625242322212019181716
INT_P
1514131211109876543210
FRAC_P  
BitsTypeResetNameDescription
7:0Reserved
15:8rw0x0FRAC_PFractional part of clock divisor
31:16rw0x1INT_PEffective frequency is sysclk/(int + frac/256). Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0.


flexDI.SM1_EXECCTRL @ + 0xe4
Execution and Behaviour Settings of state Machine
Reset default = 0x1f000, mask 0xffffff9f
31302928272625242322212019181716
EXEC_STALLED SIDE_EN SIDE_PINDIR JMP_PIN OUT_EN_SEL INLINE_OUT_EN OUT_STICKY WRAP_TOP...
1514131211109876543210
...WRAP_TOP WRAP_BOTTOM   STATUS_SEL STATUS_N
BitsTypeResetNameDescription
3:0rw0x0STATUS_NComparison level for the MOV x, STATUS instruction
4rw0x0STATUS_SELComparison used for the MOV x, STATUS instruction. 0x0 → All-ones if TX FIFO level < N, otherwise all-zeroes 0x1 → All-ones if RX FIFO level < N, otherwise all-zeroes
6:5Reserved
11:7rw0x0WRAP_BOTTOMAfter reaching wrap_top, execution is wrapped to this address.
16:12rw0x1fWRAP_TOPAfter reaching this address, execution is wrapped to wrap_bottom. If the instruction is a jump, and the jump condition is true, the jump takes priority.
17rw0x0OUT_STICKYContinuously assert the most recent OUT/SET to the pins
18rw0x0INLINE_OUT_ENIf 1, use a bit of OUT data as an auxiliary write enable When used in conjunction with OUT_STICKY, writes with an enable of 0 will deassert the latest pin write. This can create useful masking/override behaviour due to the priority ordering of state machine pin writes (SM0 < SM1 < …)
23:19rw0x0OUT_EN_SELWhich data bit to use for inline OUT enable
28:24rw0x0JMP_PINThe GPIO number to use as condition for JMP PIN. Unaffected by input mapping.
29rw0x0SIDE_PINDIRIf 1, side-set data is asserted to pin directions, instead of pin values
30rw0x0SIDE_ENIf 1, the MSB of the Delay/Side-set instruction field is used as side-set enable, rather than a side-set data bit. This allows instructions to perform side-set optionally, rather than on every instruction, but the maximum possible sideset width is reduced from 5 to 4. Note that the value of PINCTRL_SIDESET_COUNT is inclusive of this enable bit.
31rw0x0EXEC_STALLEDIf 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes.


flexDI.SM1_SHIFTCTRL @ + 0xe8
Control Behaviour of the input/output shift registers for state machine N
Reset default = 0xc0000, mask 0xffff0000
31302928272625242322212019181716
FJOIN_RX FJOIN_TX PULL_THRESH PUSH_THRESH OUT_SHIFTDIR IN_SHIFTDIR AUTOPULL AUTOPUSH
1514131211109876543210
 
BitsTypeResetNameDescription
15:0Reserved
16rw0x0AUTOPUSHPush automatically when the input shift register is filled, i.e. on an IN instruction which causes the input shift counter to reach or exceed PUSH_THRESH.
17rw0x0AUTOPULLPull automatically when the output shift register is emptied, i.e. on or following an OUT instruction which causes the output shift counter to reach or exceed PULL_THRESH.
18rw0x1IN_SHIFTDIR1 = shift input shift register to right (data enters from left). 0 = to left.
19rw0x1OUT_SHIFTDIR1 = shift out of output shift register to right. 0 = to left.
24:20rw0x0PUSH_THRESHNumber of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. Write 0 for value of 32.
29:25rw0x0PULL_THRESHNumber of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. Write 0 for value of 32.
30rw0x0FJOIN_TXWhen 1, TX FIFO steals the RX FIFO’s storage, and becomes twice as deep. RX FIFO is disabled as a result (always reads as both full and empty). FIFOs are flushed when this bit is changed.
31rw0x0FJOIN_RXWhen 1, RX FIFO steals the TX FIFO’s storage, and becomes twice as deep.TX FIFO is disabled as a result (always reads as both full and empty). FIFOs are flushed when this bit is changed.


flexDI.SM1_ADDR @ + 0xec
Instruction Pointer Base Address of statemachine N
Reset default = 0x0, mask 0x1f
31302928272625242322212019181716
 
1514131211109876543210
  SMPC BASE
BitsTypeResetNameDescription
4:0ro0x0SMPC BASEBase Address of state Machine Instruction Pointer


flexDI.SM1_INSTR @ + 0xf0
Instruction Pointer of statemachine N
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
SMPC
BitsTypeResetNameDescription
15:0rw0x0SMPCRead to see the instruction currently addressed by state machine N's program counter. Write to execute an instruction immediately (including jumps) and then resume execution.


flexDI.SM1_PINCTRL @ + 0xf4
state machine pin control
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
SIDESET_COUNT SET_COUNT OUT_COUNT IN_BASE...
1514131211109876543210
...IN_BASE SIDESET_BASE SET_BASE OUT_BASE
BitsTypeResetNameDescription
4:0rw0x0OUT_BASEThe lowest-numbered pin that will be affected by an OUT PINS, OUT PINDIRS or MOV PINS instruction. The data written to this pin will always be the least-significant bit of the OUT or MOV data.
9:5rw0x0SET_BASEThe lowest-numbered pin that will be affected by a SET PINS or SET PINDIRS instruction. The data written to this pin is the least-significant bit of the SET data.
14:10rw0x0SIDESET_BASEThe lowest-numbered pin that will be affected by a sideset operation. The MSBs of an instruction’s side-set/delay field (up to 5, determined by SIDESET_COUNT) are used for side-set data, with the remaining LSBs used for delay. The least-significant bit of the side-set portion is the bit written to this pin, with more-significant bits written to higher-numbered pins.
19:15rw0x0IN_BASEThe pin which is mapped to the least-significant bit of a state machine’s IN data bus. Higher-numbered pins are mapped to consecutively more-significant data bits, with a modulo of 32 applied to pin number.
25:20rw0x0OUT_COUNTThe number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive.
28:26rw0x0SET_COUNTThe number of pins asserted by a SET. In the range 0 to 5 inclusive.
31:29rw0x0SIDESET_COUNTThe number of MSBs of the Delay/Side-set instruction field which are used for side-set. Inclusive of the enable bit, if present. Minimum of 0 (all delay bits, no side-set) and maximum of 5 (all side-set, no delay).


flexDI.SM2_CLKDIV @ + 0xf8
Clock divider configuration Register
Reset default = 0x10000, mask 0xffffff00
31302928272625242322212019181716
INT_P
1514131211109876543210
FRAC_P  
BitsTypeResetNameDescription
7:0Reserved
15:8rw0x0FRAC_PFractional part of clock divisor
31:16rw0x1INT_PEffective frequency is sysclk/(int + frac/256). Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0.


flexDI.SM2_EXECCTRL @ + 0xfc
Execution and Behaviour Settings of state Machine
Reset default = 0x1f000, mask 0xffffff9f
31302928272625242322212019181716
EXEC_STALLED SIDE_EN SIDE_PINDIR JMP_PIN OUT_EN_SEL INLINE_OUT_EN OUT_STICKY WRAP_TOP...
1514131211109876543210
...WRAP_TOP WRAP_BOTTOM   STATUS_SEL STATUS_N
BitsTypeResetNameDescription
3:0rw0x0STATUS_NComparison level for the MOV x, STATUS instruction
4rw0x0STATUS_SELComparison used for the MOV x, STATUS instruction. 0x0 → All-ones if TX FIFO level < N, otherwise all-zeroes 0x1 → All-ones if RX FIFO level < N, otherwise all-zeroes
6:5Reserved
11:7rw0x0WRAP_BOTTOMAfter reaching wrap_top, execution is wrapped to this address.
16:12rw0x1fWRAP_TOPAfter reaching this address, execution is wrapped to wrap_bottom. If the instruction is a jump, and the jump condition is true, the jump takes priority.
17rw0x0OUT_STICKYContinuously assert the most recent OUT/SET to the pins
18rw0x0INLINE_OUT_ENIf 1, use a bit of OUT data as an auxiliary write enable When used in conjunction with OUT_STICKY, writes with an enable of 0 will deassert the latest pin write. This can create useful masking/override behaviour due to the priority ordering of state machine pin writes (SM0 < SM1 < …)
23:19rw0x0OUT_EN_SELWhich data bit to use for inline OUT enable
28:24rw0x0JMP_PINThe GPIO number to use as condition for JMP PIN. Unaffected by input mapping.
29rw0x0SIDE_PINDIRIf 1, side-set data is asserted to pin directions, instead of pin values
30rw0x0SIDE_ENIf 1, the MSB of the Delay/Side-set instruction field is used as side-set enable, rather than a side-set data bit. This allows instructions to perform side-set optionally, rather than on every instruction, but the maximum possible sideset width is reduced from 5 to 4. Note that the value of PINCTRL_SIDESET_COUNT is inclusive of this enable bit.
31rw0x0EXEC_STALLEDIf 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes.


flexDI.SM2_SHIFTCTRL @ + 0x100
Control Behaviour of the input/output shift registers for state machine N
Reset default = 0xc0000, mask 0xffff0000
31302928272625242322212019181716
FJOIN_RX FJOIN_TX PULL_THRESH PUSH_THRESH OUT_SHIFTDIR IN_SHIFTDIR AUTOPULL AUTOPUSH
1514131211109876543210
 
BitsTypeResetNameDescription
15:0Reserved
16rw0x0AUTOPUSHPush automatically when the input shift register is filled, i.e. on an IN instruction which causes the input shift counter to reach or exceed PUSH_THRESH.
17rw0x0AUTOPULLPull automatically when the output shift register is emptied, i.e. on or following an OUT instruction which causes the output shift counter to reach or exceed PULL_THRESH.
18rw0x1IN_SHIFTDIR1 = shift input shift register to right (data enters from left). 0 = to left.
19rw0x1OUT_SHIFTDIR1 = shift out of output shift register to right. 0 = to left.
24:20rw0x0PUSH_THRESHNumber of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. Write 0 for value of 32.
29:25rw0x0PULL_THRESHNumber of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. Write 0 for value of 32.
30rw0x0FJOIN_TXWhen 1, TX FIFO steals the RX FIFO’s storage, and becomes twice as deep. RX FIFO is disabled as a result (always reads as both full and empty). FIFOs are flushed when this bit is changed.
31rw0x0FJOIN_RXWhen 1, RX FIFO steals the TX FIFO’s storage, and becomes twice as deep.TX FIFO is disabled as a result (always reads as both full and empty). FIFOs are flushed when this bit is changed.


flexDI.SM2_ADDR @ + 0x104
Instruction Pointer Base Address of statemachine N
Reset default = 0x0, mask 0x1f
31302928272625242322212019181716
 
1514131211109876543210
  SMPC BASE
BitsTypeResetNameDescription
4:0ro0x0SMPC BASEBase Address of state Machine Instruction Pointer


flexDI.SM2_INSTR @ + 0x108
Instruction Pointer of statemachine N
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
SMPC
BitsTypeResetNameDescription
15:0rw0x0SMPCRead to see the instruction currently addressed by state machine N's program counter. Write to execute an instruction immediately (including jumps) and then resume execution.


flexDI.SM2_PINCTRL @ + 0x10c
state machine pin control
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
SIDESET_COUNT SET_COUNT OUT_COUNT IN_BASE...
1514131211109876543210
...IN_BASE SIDESET_BASE SET_BASE OUT_BASE
BitsTypeResetNameDescription
4:0rw0x0OUT_BASEThe lowest-numbered pin that will be affected by an OUT PINS, OUT PINDIRS or MOV PINS instruction. The data written to this pin will always be the least-significant bit of the OUT or MOV data.
9:5rw0x0SET_BASEThe lowest-numbered pin that will be affected by a SET PINS or SET PINDIRS instruction. The data written to this pin is the least-significant bit of the SET data.
14:10rw0x0SIDESET_BASEThe lowest-numbered pin that will be affected by a sideset operation. The MSBs of an instruction’s side-set/delay field (up to 5, determined by SIDESET_COUNT) are used for side-set data, with the remaining LSBs used for delay. The least-significant bit of the side-set portion is the bit written to this pin, with more-significant bits written to higher-numbered pins.
19:15rw0x0IN_BASEThe pin which is mapped to the least-significant bit of a state machine’s IN data bus. Higher-numbered pins are mapped to consecutively more-significant data bits, with a modulo of 32 applied to pin number.
25:20rw0x0OUT_COUNTThe number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive.
28:26rw0x0SET_COUNTThe number of pins asserted by a SET. In the range 0 to 5 inclusive.
31:29rw0x0SIDESET_COUNTThe number of MSBs of the Delay/Side-set instruction field which are used for side-set. Inclusive of the enable bit, if present. Minimum of 0 (all delay bits, no side-set) and maximum of 5 (all side-set, no delay).


flexDI.SM3_CLKDIV @ + 0x110
Clock divider configuration Register
Reset default = 0x10000, mask 0xffffff00
31302928272625242322212019181716
INT_P
1514131211109876543210
FRAC_P  
BitsTypeResetNameDescription
7:0Reserved
15:8rw0x0FRAC_PFractional part of clock divisor
31:16rw0x1INT_PEffective frequency is sysclk/(int + frac/256). Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0.


flexDI.SM3_EXECCTRL @ + 0x114
Execution and Behaviour Settings of state Machine
Reset default = 0x1f000, mask 0xffffff9f
31302928272625242322212019181716
EXEC_STALLED SIDE_EN SIDE_PINDIR JMP_PIN OUT_EN_SEL INLINE_OUT_EN OUT_STICKY WRAP_TOP...
1514131211109876543210
...WRAP_TOP WRAP_BOTTOM   STATUS_SEL STATUS_N
BitsTypeResetNameDescription
3:0rw0x0STATUS_NComparison level for the MOV x, STATUS instruction
4rw0x0STATUS_SELComparison used for the MOV x, STATUS instruction. 0x0 → All-ones if TX FIFO level < N, otherwise all-zeroes 0x1 → All-ones if RX FIFO level < N, otherwise all-zeroes
6:5Reserved
11:7rw0x0WRAP_BOTTOMAfter reaching wrap_top, execution is wrapped to this address.
16:12rw0x1fWRAP_TOPAfter reaching this address, execution is wrapped to wrap_bottom. If the instruction is a jump, and the jump condition is true, the jump takes priority.
17rw0x0OUT_STICKYContinuously assert the most recent OUT/SET to the pins
18rw0x0INLINE_OUT_ENIf 1, use a bit of OUT data as an auxiliary write enable When used in conjunction with OUT_STICKY, writes with an enable of 0 will deassert the latest pin write. This can create useful masking/override behaviour due to the priority ordering of state machine pin writes (SM0 < SM1 < …)
23:19rw0x0OUT_EN_SELWhich data bit to use for inline OUT enable
28:24rw0x0JMP_PINThe GPIO number to use as condition for JMP PIN. Unaffected by input mapping.
29rw0x0SIDE_PINDIRIf 1, side-set data is asserted to pin directions, instead of pin values
30rw0x0SIDE_ENIf 1, the MSB of the Delay/Side-set instruction field is used as side-set enable, rather than a side-set data bit. This allows instructions to perform side-set optionally, rather than on every instruction, but the maximum possible sideset width is reduced from 5 to 4. Note that the value of PINCTRL_SIDESET_COUNT is inclusive of this enable bit.
31rw0x0EXEC_STALLEDIf 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes.


flexDI.SM3_SHIFTCTRL @ + 0x118
Control Behaviour of the input/output shift registers for state machine N
Reset default = 0xc0000, mask 0xffff0000
31302928272625242322212019181716
FJOIN_RX FJOIN_TX PULL_THRESH PUSH_THRESH OUT_SHIFTDIR IN_SHIFTDIR AUTOPULL AUTOPUSH
1514131211109876543210
 
BitsTypeResetNameDescription
15:0Reserved
16rw0x0AUTOPUSHPush automatically when the input shift register is filled, i.e. on an IN instruction which causes the input shift counter to reach or exceed PUSH_THRESH.
17rw0x0AUTOPULLPull automatically when the output shift register is emptied, i.e. on or following an OUT instruction which causes the output shift counter to reach or exceed PULL_THRESH.
18rw0x1IN_SHIFTDIR1 = shift input shift register to right (data enters from left). 0 = to left.
19rw0x1OUT_SHIFTDIR1 = shift out of output shift register to right. 0 = to left.
24:20rw0x0PUSH_THRESHNumber of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. Write 0 for value of 32.
29:25rw0x0PULL_THRESHNumber of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. Write 0 for value of 32.
30rw0x0FJOIN_TXWhen 1, TX FIFO steals the RX FIFO’s storage, and becomes twice as deep. RX FIFO is disabled as a result (always reads as both full and empty). FIFOs are flushed when this bit is changed.
31rw0x0FJOIN_RXWhen 1, RX FIFO steals the TX FIFO’s storage, and becomes twice as deep.TX FIFO is disabled as a result (always reads as both full and empty). FIFOs are flushed when this bit is changed.


flexDI.SM3_ADDR @ + 0x11c
Instruction Pointer Base Address of statemachine N
Reset default = 0x0, mask 0x1f
31302928272625242322212019181716
 
1514131211109876543210
  SMPC BASE
BitsTypeResetNameDescription
4:0ro0x0SMPC BASEBase Address of state Machine Instruction Pointer


flexDI.SM3_INSTR @ + 0x120
Instruction Pointer of statemachine N
Reset default = 0x0, mask 0xffff
31302928272625242322212019181716
 
1514131211109876543210
SMPC
BitsTypeResetNameDescription
15:0rw0x0SMPCRead to see the instruction currently addressed by state machine N's program counter. Write to execute an instruction immediately (including jumps) and then resume execution.


flexDI.SM3_PINCTRL @ + 0x124
state machine pin control
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
SIDESET_COUNT SET_COUNT OUT_COUNT IN_BASE...
1514131211109876543210
...IN_BASE SIDESET_BASE SET_BASE OUT_BASE
BitsTypeResetNameDescription
4:0rw0x0OUT_BASEThe lowest-numbered pin that will be affected by an OUT PINS, OUT PINDIRS or MOV PINS instruction. The data written to this pin will always be the least-significant bit of the OUT or MOV data.
9:5rw0x0SET_BASEThe lowest-numbered pin that will be affected by a SET PINS or SET PINDIRS instruction. The data written to this pin is the least-significant bit of the SET data.
14:10rw0x0SIDESET_BASEThe lowest-numbered pin that will be affected by a sideset operation. The MSBs of an instruction’s side-set/delay field (up to 5, determined by SIDESET_COUNT) are used for side-set data, with the remaining LSBs used for delay. The least-significant bit of the side-set portion is the bit written to this pin, with more-significant bits written to higher-numbered pins.
19:15rw0x0IN_BASEThe pin which is mapped to the least-significant bit of a state machine’s IN data bus. Higher-numbered pins are mapped to consecutively more-significant data bits, with a modulo of 32 applied to pin number.
25:20rw0x0OUT_COUNTThe number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive.
28:26rw0x0SET_COUNTThe number of pins asserted by a SET. In the range 0 to 5 inclusive.
31:29rw0x0SIDESET_COUNTThe number of MSBs of the Delay/Side-set instruction field which are used for side-set. Inclusive of the enable bit, if present. Minimum of 0 (all delay bits, no side-set) and maximum of 5 (all side-set, no delay).


flexDI.INTR @ + 0x128
Raw Interrupts
Reset default = 0x0, mask 0xfff
31302928272625242322212019181716
 
1514131211109876543210
  SM3 SM2 SM1 SM0 SM3_TXNFULL SM2_TXNFULL SM1_TXNFULL SM0_TXNFULL SM3_RXNEMPTY SM2_RXNEMPTY SM1_RXNEMPTY SM0_RXNEMPTY
BitsTypeResetNameDescription
0ro0x0SM0_RXNEMPTYEmpty flag of receive FIFO of SM0.
1ro0x0SM1_RXNEMPTYEmpty flag of receive FIFO of SM1.
2ro0x0SM2_RXNEMPTYEmpty flag of receive FIFO of SM2.
3ro0x0SM3_RXNEMPTYEmpty flag of receive FIFO of SM3.
4ro0x0SM0_TXNFULLFull flag of transmit FIFO of SM0.
5ro0x0SM1_TXNFULLFull flag of transmit FIFO of SM1.
6ro0x0SM2_TXNFULLFull flag of transmit FIFO of SM2.
7ro0x0SM3_TXNFULLFull flag of transmit FIFO of SM3.
8ro0x0SM0Interrupt status of SM0.
9ro0x0SM1Interrupt status of SM1.
10ro0x0SM2Interrupt status of SM2.
11ro0x0SM3Interrupt status of SM3.


flexDI.IRQ0_INTE @ + 0x12c
Interrupt Enable for irq0
Reset default = 0x0, mask 0xfff
31302928272625242322212019181716
 
1514131211109876543210
  SM3 SM2 SM1 SM0 SM3_TXNFULL SM2_TXNFULL SM1_TXNFULL SM0_TXNFULL SM3_RXNEMPTY SM2_RXNEMPTY SM1_RXNEMPTY SM0_RXNEMPTY
BitsTypeResetNameDescription
0rw0x0SM0_RXNEMPTYEnable of receive FIFO empty interrupt of SM0.
1rw0x0SM1_RXNEMPTYEnable of receive FIFO empty interrupt of SM1.
2rw0x0SM2_RXNEMPTYEnable of receive FIFO empty interrupt of SM2.
3rw0x0SM3_RXNEMPTYEnable of receive FIFO empty interrupt of SM3.
4rw0x0SM0_TXNFULLEnable of transmit FIFO full interrupt of SM0.
5rw0x0SM1_TXNFULLEnable of transmit FIFO full interrupt of SM1.
6rw0x0SM2_TXNFULLEnable of transmit FIFO full interrupt of SM2.
7rw0x0SM3_TXNFULLEnable of transmit FIFO full interrupt of SM3.
8rw0x0SM0Interrupt enable of SM0.
9rw0x0SM1Interrupt enable of SM1.
10rw0x0SM2Interrupt enable of SM2.
11rw0x0SM3Interrupt enable of SM3.


flexDI.IRQ0_INTF @ + 0x130
Interrupt Force for irq0, needs to be cleared manually from here
Reset default = 0x0, mask 0xfff
31302928272625242322212019181716
 
1514131211109876543210
  SM3 SM2 SM1 SM0 SM3_TXNFULL SM2_TXNFULL SM1_TXNFULL SM0_TXNFULL SM3_RXNEMPTY SM2_RXNEMPTY SM1_RXNEMPTY SM0_RXNEMPTY
BitsTypeResetNameDescription
0rw0x0SM0_RXNEMPTYForce receive FIFO empty interrupt of SM0.
1rw0x0SM1_RXNEMPTYForce receive FIFO empty interrupt of SM1.
2rw0x0SM2_RXNEMPTYForce receive FIFO empty interrupt of SM2.
3rw0x0SM3_RXNEMPTYForce receive FIFO empty interrupt of SM3.
4rw0x0SM0_TXNFULLForce transmit FIFO full interrupt of SM0.
5rw0x0SM1_TXNFULLForce transmit FIFO full interrupt of SM1.
6rw0x0SM2_TXNFULLForce transmit FIFO full interrupt of SM2.
7rw0x0SM3_TXNFULLForce transmit FIFO full interrupt of SM3.
8rw0x0SM0Force interrupt of SM0.
9rw0x0SM1Force interrupt of SM1.
10rw0x0SM2Force interrupt of SM2.
11rw0x0SM3Force interrupt of SM3.


flexDI.IRQ0_INTS @ + 0x134
Interrupt status after masking & forcing for irq0
Reset default = 0x0, mask 0xfff
31302928272625242322212019181716
 
1514131211109876543210
  SM3 SM2 SM1 SM0 SM3_TXNFULL SM2_TXNFULL SM1_TXNFULL SM0_TXNFULL SM3_RXNEMPTY SM2_RXNEMPTY SM1_RXNEMPTY SM0_RXNEMPTY
BitsTypeResetNameDescription
0ro0x0SM0_RXNEMPTYMasked interrupt of receive FIFO empty event of SM0.
1ro0x0SM1_RXNEMPTYMasked interrupt of receive FIFO empty event of SM1.
2ro0x0SM2_RXNEMPTYMasked interrupt of receive FIFO empty event of SM2.
3ro0x0SM3_RXNEMPTYMasked interrupt of receive FIFO empty event of SM3.
4ro0x0SM0_TXNFULLMasked interrupt of transmit FIFO full event of SM0.
5ro0x0SM1_TXNFULLMasked interrupt of transmit FIFO full event of SM1.
6ro0x0SM2_TXNFULLMasked interrupt of transmit FIFO full event of SM2.
7ro0x0SM3_TXNFULLMasked interrupt of transmit FIFO full event of SM3.
8ro0x0SM0Masked interrupt of SM0.
9ro0x0SM1Masked interrupt of SM1.
10ro0x0SM2Masked interrupt of SM2.
11ro0x0SM3Masked interrupt of SM3.


flexDI.IRQ1_INTE @ + 0x138
Interrupt Enable for irq1
Reset default = 0x0, mask 0xfff
31302928272625242322212019181716
 
1514131211109876543210
  SM3 SM2 SM1 SM0 SM3_TXNFULL SM2_TXNFULL SM1_TXNFULL SM0_TXNFULL SM3_RXNEMPTY SM2_RXNEMPTY SM1_RXNEMPTY SM0_RXNEMPTY
BitsTypeResetNameDescription
0rw0x0SM0_RXNEMPTYEnable of receive FIFO empty interrupt of SM0.
1rw0x0SM1_RXNEMPTYEnable of receive FIFO empty interrupt of SM1.
2rw0x0SM2_RXNEMPTYEnable of receive FIFO empty interrupt of SM2.
3rw0x0SM3_RXNEMPTYEnable of receive FIFO empty interrupt of SM3.
4rw0x0SM0_TXNFULLEnable of transmit FIFO full interrupt of SM0.
5rw0x0SM1_TXNFULLEnable of transmit FIFO full interrupt of SM1.
6rw0x0SM2_TXNFULLEnable of transmit FIFO full interrupt of SM2.
7rw0x0SM3_TXNFULLEnable of transmit FIFO full interrupt of SM3.
8rw0x0SM0Interrupt enable of SM0.
9rw0x0SM1Interrupt enable of SM1.
10rw0x0SM2Interrupt enable of SM2.
11rw0x0SM3Interrupt enable of SM3.


flexDI.IRQ1_INTF @ + 0x13c
Interrupt Force for irq1, needs to be cleared manually from here
Reset default = 0x0, mask 0xfff
31302928272625242322212019181716
 
1514131211109876543210
  SM3 SM2 SM1 SM0 SM3_TXNFULL SM2_TXNFULL SM1_TXNFULL SM0_TXNFULL SM3_RXNEMPTY SM2_RXNEMPTY SM1_RXNEMPTY SM0_RXNEMPTY
BitsTypeResetNameDescription
0rw0x0SM0_RXNEMPTYForce receive FIFO empty interrupt of SM0.
1rw0x0SM1_RXNEMPTYForce receive FIFO empty interrupt of SM1.
2rw0x0SM2_RXNEMPTYForce receive FIFO empty interrupt of SM2.
3rw0x0SM3_RXNEMPTYForce receive FIFO empty interrupt of SM3.
4rw0x0SM0_TXNFULLForce transmit FIFO full interrupt of SM0.
5rw0x0SM1_TXNFULLForce transmit FIFO full interrupt of SM1.
6rw0x0SM2_TXNFULLForce transmit FIFO full interrupt of SM2.
7rw0x0SM3_TXNFULLForce transmit FIFO full interrupt of SM3.
8rw0x0SM0Force interrupt of SM0.
9rw0x0SM1Force interrupt of SM1.
10rw0x0SM2Force interrupt of SM2.
11rw0x0SM3Force interrupt of SM3.


flexDI.IRQ1_INTS @ + 0x140
Interrupt status after masking & forcing for irq1
Reset default = 0x0, mask 0xfff
31302928272625242322212019181716
 
1514131211109876543210
  SM3 SM2 SM1 SM0 SM3_TXNFULL SM2_TXNFULL SM1_TXNFULL SM0_TXNFULL SM3_RXNEMPTY SM2_RXNEMPTY SM1_RXNEMPTY SM0_RXNEMPTY
BitsTypeResetNameDescription
0ro0x0SM0_RXNEMPTYMasked interrupt of receive FIFO empty event of SM0.
1ro0x0SM1_RXNEMPTYMasked interrupt of receive FIFO empty event of SM1.
2ro0x0SM2_RXNEMPTYMasked interrupt of receive FIFO empty event of SM2.
3ro0x0SM3_RXNEMPTYMasked interrupt of receive FIFO empty event of SM3.
4ro0x0SM0_TXNFULLMasked interrupt of transmit FIFO full event of SM0.
5ro0x0SM1_TXNFULLMasked interrupt of transmit FIFO full event of SM1.
6ro0x0SM2_TXNFULLMasked interrupt of transmit FIFO full event of SM2.
7ro0x0SM3_TXNFULLMasked interrupt of transmit FIFO full event of SM3.
8ro0x0SM0Masked interrupt of SM0.
9ro0x0SM1Masked interrupt of SM1.
10ro0x0SM2Masked interrupt of SM2.
11ro0x0SM3Masked interrupt of SM3.


flexDI.FLEXDI_REV @ + 0x144
flexdi revision register
Reset default = 0x0, mask 0xffffffff
31302928272625242322212019181716
revision number...
1514131211109876543210
...revision number
BitsTypeResetNameDescription
31:0ro0x0revision numberthe revision number of the current flexdi design implementation


Verfication plan:

  • Verilog testbench, self-testing

Verilog module: IRQ Adapter

Function:

  • Manages internal State machine IRQs

  • Manages external irq selection

Interface:

  • IRQ line input from CPU

  • configuration using DMA Adapter registers

Verfication plan:

  • Verilog testbench, self-testing

Verilog module: IO Mapper

Function:

  • GPIO selection Matrix

  • allows for selection and/or driving of multiple GPIO ports by state machines

Interface:

  • connection to GPIO Pins

Verfication plan:

  • Verilog testbench, self-testing