Caribou Satellite#
Name |
Caribou |
---|---|
Subtitle |
Constellation Satellite for controlling Caribou devices via their Peary interface |
Category |
Readout Systems |
Website |
Description#
This module allows to integrate devices running with the Caribou readout system into the Constellation ecosystem.
This satellite supports the reconfiguration transition. Any registers or memory registers known to the configured Caribou device can be updated during reconfiguration.
FSM State Implementations#
The satellite interfaces the Peary device manager to add devices and to control them. The following actions are performed in the different FSM stages:
Initialization: The device to be instantiated is taken from the configuration parameter
type
. Device names are case sensitive and have to be available in the linked Peary installation. In addition, the following configuration keys are available for the initialization:peary_verbosity
: Set the Peary-internal logging verbosity for output on the terminal of the satellite. Please refer to the Peary documentation for more information. The verbosity can be changed at any point using thepeary_verbosity
command this satellite exposes.number_of_frames
: This key allows buffering of multiple Caribou device frames into a single Constellation data message. If set to a value larger than1
, frames are first buffered and upon reaching the desired buffer depth, they are collectively sent. A value of, for example,number_of_frames = 100
would therefore result in one message being sent every 100 frames read from the device. This message would contain 100 frames with the individual data blocks. This can be used to reduce the number of packets sent via the network and to better make use of available bandwidth.adc_signal
,adc_frequency
: These keys can be used to sample the slow ADC on the Carboard in regular intervals. Here,adc_signal
is the name of the ADC input channel as assigned via the Peary periphery for the given device, andadc_frequency
is the number of frames read from the device after which a new sampling is attempted, the default is 1000. If noadc_signal
is set, no ADC reading is attempted.
All other parameters are converted to strings and forwarded to the Peary instance.
Launching: During launch, the device is powered using Pearyβs
powerOn()
command. After this, the satellite waits for one second in order to allow the AIDA TLU to fully configure and make the clock available on the DUT outputs. Then, theconfigure()
command of the Peary device interface is called.Reconfiguration: Any register returned by the device by
list_registers()
or memory registers fromlist_memories()
can be updated during reconfiguration. The satellite attempts to read any of these values from the provided reconfiguration object and, if successful, updates the device.Start / Stop: During start and stop, the corresponding Peary device functions
daqStart()
anddaqStop()
are called.
Other Features#
Sometimes it is necessary to run two devices through Caribou, one of which only requires power and configuration, while the readout happens over the other. For this purpose, the parameter secondary_device
can be set. This secondary device will only be powered (via powerOn()
) and configured (via configure()
) but no data will be attempted to retrieve. Readout is only performed for the primary device.
Since the Peary device libraries are not thread-safe, all access to Peary libraries is guarded using a std::lock_guard
with a central mutex to avoid concurrent device access. The Peary device manager itself ensures that no two instances are executed on the same hardware. This means, only one Constellation satellite can be started per Caribou board.
Parameters#
The following parameters are read and interpreted by this satellite:
Parameter |
Description |
Type |
Default Value |
---|---|---|---|
|
Type of the Caribou device to be instantiated, corresponds to the (case-sensitive) device class name |
|
- |
|
Verbosity of the Peary logger. See custom commands for possible values. The verbosity can be changed at any time using the custom command described below |
|
|
|
Optional channel name of the Carboard ADC to be read in regular intervals and send as metric |
|
|
|
Interval in seconds between consecutive ADC samplings. Only used if |
|
10 |
|
Unit of the sampled ADC signal. Is sent as metric unit along the ADC signal |
|
|
|
Conversion factor with which the sampled ADC units are multiplied before being sent as metric |
|
1.0 |
|
Number of Caribou device frames to be sent with a single Constellation data message |
|
1 |
Configuration Example#
An example configuration for this satellite which could be dropped into a Constellation configuration as a starting point
[Caribou.H2M]
type = "H2M"
config_file = "~/h2m_config.conf"
Custom Commands#
The Caribou satellite exposes the following commands via the control interface. None of these commands alter the state of the attached device, but they only provide additional information on the device and its periphery.
Command |
Description |
Arguments |
Return Value |
Allowed States |
---|---|---|---|---|
|
Set verbosity of the Peary logger |
Desired verbosity as string, possible values are |
- |
all |
|
Get the currently configured verbosity of the Peary logger |
- |
Current Peary verbosity level |
all |
|
List all available register names for the attached Caribou device |
- |
List of registers, array of |
|
|
List all memory registers for the attached Caribou device |
- |
List of memory registers, array of |
|
|
Get selected output voltage of the attached Caribou device |
Voltage name, |
Voltage reading in V, |
|
|
Get selected output current of the attached Caribou device |
Current name, |
Current reading in A, |
|
|
Get selected output power of the attached Caribou device |
Power name, |
Power reading in W, |
|
|
Read the value of a register on the attached Caribou device |
Register name, |
Register reading, |
|
|
Read the value of a FPGA memory register on the attached Caribou device |
Memory register name, |
Memory register reading, |
|
|
Read a voltage from the Carboard ADC |
Voltage name, |
ADC channel reading, |
|