Buffer configuration¶
empbutler -c CONNECTIONS.xml do DEVICE_ID buffers (rx|tx) MODE [-c CHANNEL_LIST] [--inject SOURCE] [--bx-range BX_RANGE | --frame-range BX_RANGE]
The buffers
command configures the ‘datapath’ logic, which connects the I/O buffers and pattern generator logic to the link firmware and payload. It has two required arguments:
DIRECTION
: Specifies which set of buffers are being configured -rx
ortx
MODE
: Specifies the mode of operation for the buffers. Valid values:
Pattern
- Use data from internal pattern generator logic (an incrementing counter), rather the buffers.
PlayOnce
- Play data from buffers at start of each LHC orbit (i.e. when BX counter resets to 0) for length of buffer, typically 1024 words; afterBUFFER_LENGTH
cycles of payload clock, the ‘valid’ signal will be low until start of next orbit.
PlayLoop
- Similar toPlayOnce
, butBUFFER_LENGTH
cycles after the start of the orbit, rather than setting the valid signal to 0, the datapath logic will start playing data from start of buffer again, and keep looping round the buffer until the end of the orbit.
Capture
- Capture received data; i.e. data from the payload for the TX buffers, or data from the RX MGTs for the RX buffers.
Additional options:
To configure only a subset of channels, add the
-c
option. By default the buffers for all channels are configured.In
PlayOnce
andPlayLoop
modes, you can specify what data will be loaded into the buffers using the--inject
option. Valid values are:file:///path/to/buffers.txt
- load contents of user-created EMP buffer.txt
file (at/path/to/buffers.txt
)generate:counter
- load incrementing counter pattern (i.e. value N for N’th frame), with valid bit set to ‘1’ for the full length of the buffer.generate:counter-with-index
- load incrementing counter pattern (i.e. value N for N’th frame), with channel index encoded in bits 16 to 19, and valid bit set to ‘1’ for the full length of the buffer.generate:random
- load random data in 128-frame packets, with an 128-cycle gap between packets.generate:random:N
- load random data inN
-frame packets, with aN
-cycle gap between packets.generate:random:N:M
- load random data inN
-frame packets, with aM
-cycle gap between packets.
The BX and clock cycle at which playback or capture starts and stops can be specified using either the
--bx-range
or--frame-range
options. By default capture/playback starts on the first clock cycle of an orbit, and continues for the full length of the I/O buffers.