Module memory

Source
Expand description

On-board memory management for readoutboards

The DRS4 is able to map its registers and the data buffer directly into OS memory.

memory locations for the control registers /dev/uio0 - DRS4 control /dev/uio1 - buffer 1 for blobs /dev/uio2 - buffer 2 for blobs

Enums§

RamBuffer
! There are 2 data buffers, commonly denoted as “A” and “B”. A -> /dev/uio1 B -> /dev/uio2
RegisterError

Constants§

DATABUF_TOTAL_SIZE
Data buffer related constants The data buffer is /dev/uio1 and /dev/uio2 are internally a single buffer but with 2 halves.
EVENT_SIZE
SIZEOF_U32
The size of a 32bit unsigned int in byte (all words in registers are u32)
UIO0
UIO1
UIO2
UIO1_MAX_OCCUPANCY
UIO1_MIN_OCCUPANCY
UIO2_MAX_OCCUPANCY
UIO2_MIN_OCCUPANCY

Functions§

map_physical_mem_read
Allow READ access to the memory registers at /dev/uio**
map_physical_mem_write
Allow WRITE access to the memory registers at /dev/uio0
read_buffer_into_streamer
Read a data buffer directly into a RBEventMemory streamer, avoiding the detour over vector.extend (which performs clones), so this should actually be much more efficient.
read_control_reg
! Get a single value from a 32bit (1 word) register This reads ONLY control registers (in /dev/uio0)
read_data_buffer
Read one of the data buffers and return a bytestream from the given address with the length in events.
size_in_events
Get a size which accomodates nevents
write_control_reg