Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Streaming tables

Tables in PandA operate in two modes: fixed (a single write replaces the whole table) and streaming (a sequence of writes fills a DMA-backed ring buffer that the hardware consumes continuously). Streaming is used for long, DMA-driven tables — for example the SEQ sequencer table — where the host needs to supply data faster than a single write can deliver.

Write operators

The operator appended to the field name on the configuration port determines which mode is used:

OperatorEncodingMeaning
<textFixed table write
<<textStreaming table write (more data follows)
<<|textStreaming table write, last chunk
<Bbase-64Fixed table write
<<Bbase-64Streaming table write (more data follows)
<<|Bbase-64Streaming table write, last chunk

For text-encoded writes the data is a sequence of decimal integers, one per line, terminated by a blank line. For base-64 writes the payload follows base-64 encoding rules.

Writing an empty table with << or <<| is rejected to prevent accidental errors while in streaming mode. To reset a table to the INIT state, write an empty fixed table with <.

MODE attribute

Each table-type field exposes a MODE attribute that reflects the table’s current state:

ValueMeaning
INITNo table loaded
FIXEDA fixed table was last written
STREAMINGA streaming write is in progress (<< was last)
STREAMING_LASTThe final streaming chunk was received (`<<

Writing an empty table (<0) always moves the table to INIT. In addition to these modes there is an implicit completed state in the FPGA, entered either on a sudden error or when streaming finishes: any further writes are rejected and the MODE attribute keeps its last value until the table is reset with <0, ensuring the client becomes aware of the error.

MODE transition table

Current MODE / command<<<<<|<0
INITFIXEDSTREAMINGSTREAMING_LASTINIT
FIXEDFIXEDSTREAMINGSTREAMING_LASTINIT
STREAMINGRejectSTREAMINGSTREAMING_LASTINIT
STREAMING_LASTRejectRejectRejectINIT
completed ([HEALTH])RejectRejectRejectINIT

Other table attributes

LENGTH
Current number of 32-bit words in the table (read-only).
MAX_LENGTH
Maximum number of 32-bit words which can be stored in the table (read-only).
ROW_WORDS
Number of 32-bit words per table row (read-only).
B (base-64 read)
Returns the current table content encoded in base-64 (read-only).
FIELDS
Returns a list of strings describing how to interpret a table row. Each line has the format left:right field-name subtype, where left and right are bit-field indices into a single row. See Blocks, fields and attributes for details.

A << write returns the number of lines accepted. A < (fixed) write returns the total number of lines in the new table.

Buffer sizing

Long (DMA) tables are allocated as 2^size words per buffer with nbuf double buffers (as specified in the registers file — see Config, registers and description files). The simulation server allocates 4096 × 2^order bytes per buffer. When choosing buffer counts and sizes for a new block, ensure the ring is large enough to absorb worst-case host latency between refills.