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
- Register
Error
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