Module Commands#
- /module/adc-acq
Acquire an ADC trace from all channels in the module(s).
Note
This function must be called before calling /module/adc-save to populate the trace memory with data.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/adc-acq [modules(s)]
- /module/adc-save
Extract the collected ADC traces from the module(s) and save them to a file.
Warning
This command must be called after /module/adc-acq to ensure the trace memory contains valid traces.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.channel
: The channel(s) that the command will execute against. If optional, defaults toall
.length
: How long of an ADC trace to extract. Defaults to the module’s maximum.
Usage
/module/adc-save [modules(s) [channel(s) [length]]]
- /module/adj-off
Used to automatically adjust the module’s baseline offset.
Note
This function must be followed by the /module/set-dacs command to propagate the updated settings to the signal processing FPGAs.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/adj-off [modules(s)]
- /module/bl-acq
Acquire module baselines and makes them ready for readout.
Note
This command must be called before /module/bl-save to ensure that the baselines are populated into memory.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/bl-acq [module(s)]
- /module/bl-save
Save the module’s baselines to a file
Note
This function must be called after /module/bl-acq to ensure that the baseline are populated into memory for readout.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.channel
: The channel(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/bl-save [module(s) [channel(s)]]
- /module/copy
Copy parameters from one module to another
Arguments
filter-mask
: Defines what data gets copied from the source to the destination. SeePixie16CopyDSPParameters()
.src-module
: The module used as a the data source.dest-module
: The module used as the copied data receiver.src-channel
: The channel used as the data source. Defaults toall
.dest-channel
: The channel used as the copied data receiver. Defaults toall
.
Usage
/module/copy filter-mask src-module dest-module [src-channel dest-channel]
Example
The following example copies the filter and QDC parameters from Module 1 to Module 3.
/module/copy 4097 1 3
- /module/db
Provides fine grained control of the channels on the daughter boards.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.channel
: The channel(s) that the command will execute against. If optional, defaults toall
.disable-swap
: Disables the ADC channel swap test executed during boot for the provided module/channel.
Usage
/module/db module(s) [channel(s)] [disable-swap]
Example
The following example will disable the ADC channel swap test for Module 0, channels 24 and 25, and then boots the system.
/module/db/ 0 24,25 disable-swap /crate/boot
- /module/fifo/config/read
Read a variable from the module(s) fifo config
Variables
bw = bandwidth
bf = buffers
dma = dma trigger
hold = hold time (usecs)
iw = idle wait (usecs)
rw = run wait (usecs)
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.var
: The specific variable that you want to read. Omit this argument to read all of them.
Usage
/module/fifo/config/read module(s) [var]
- /module/fifo/config/write
Write a variable to module(s) fifo config
Variables
bw = bandwidth
bf = buffers
dma = dma trigger
hold = hold time (usecs)
iw = idle wait (usecs)
rw = run wait (usecs)
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.var
: The variable to writevalue
: The variable’s new value.
Usage
/module/fifo/config/write module(s) var value
- /module/fifo/stats
Check the current module(s) fifo stats and print them to the screen.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/fifo/stats [module(s)]
- /module/hist-resume
Resume an MCA data run that was in progress.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/hist-resume module(s)
- /module/hist-save
Read the module’s channel histograms from the on-board memory and output them to a file.
Arguments
-b bins
: The number of bins of the histogram to read. Defaults to the module’s max.module
: The module(s) that the command will execute against. If optional, defaults toall
.channel
: The channel(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/hist-save [-b bins] module(s) [channel(s)]
- /module/hist-start
Start an MCA run in the requested module.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/hist-start module(s)
- /module/list-mode
Start a list-mode data run that saves data to a file periodically.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.secs
: The polling frequency for the data readout.file
: The file to output the data into.
Usage
/module/list-mode module(s) secs file
- /module/list-resume
Resume a list-mode data run in the module.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/list-resume module(s)
- /module/list-save
Start a threaded process that periodically saves list-mode data to a file.
Warning
This is a blocking operation and should only be used after you stop the data run.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.secs
: The data polling frequencyfile
: The file to save the data into.
Usage
/module/list-save module(s) secs file
- /module/list-start
Starts a new list-mode data run in the module(s).
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/list-start module(s)
- /module/lset-import
Import a legacy settings file to a module respecting each variable’s read/write settings. This process is similar to the one used with the JSON settings files.
Actions
flush
: Synchronizes the settings in local memory to the DSP memory and does nothing else.sync
: Same asflush
, but propagates the changes to the rest of the on-board systems.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.file
: The path to the file that you want to import.action
: The action to take after loading the settings to memory.
Usage
/module/lset-import module(s) file [action]
- /module/lset-load
Load a legacy settings file directly into a module’s DSP memory. This functionality is similar to the Legacy API’s behavior.
Actions
flush
: Synchronizes the settings in local memory to the DSP memory and does nothing else.sync
: Same asflush
, but propagates the changes to the rest of the on-board systems.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.file
: The file to load into the DSP memory.action
: The action to take after loading the settings to memory.
Usage
/module/lset-load module(s) file [action]
- /module/lset-report
Output a legacy settings file in a readable format. The module’s DSP firmware (VAR) must match with the one that produced the settings file or the file will not be decoded properly.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.file
: Path to the legacy settings file that we will read and output.
Usage
/module/lset-report module(s) file
- /module/mod-offline
Forces a module offline removing it from use.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/mod-offline module(s)
- /module/mod-online
Forces a module online and makes it available for use. This does not boot the module.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/mod-online module(s)
- /module/mset-import
Imports a settings file to a module
Actions
flush
: Synchronizes the settings in local memory to the DSP memory and does nothing else.sync
: Same asflush
, but propagates the changes to the rest of the on-board systems.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.file
: The absolute path to the file to use.action
: The action to take after loading the settings to memory.
Usage
/module/mset-import module(s) file [action]
- /module/par-read
Reads parameters from the system and prints them to the screen. For a list of known parameters see Channel Parameters and Channel Parameters.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.channel
: The channel(s) that the command will execute against. If optional, defaults toall
.param
: parameter to read and print orall
for all parameters
Usage
/module/par-read module(s) [channel(s)] param
Example
The following example will read the
MODULE_CSRB
from Module 3./module/par-read 0 MODULE_CSRB
- /module/par-write
Write a parameter to the system using the provided value. For a list of known parameters see Channel Parameters and Channel Parameters.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.channel
: The channel(s) that the command will execute against. If optional, defaults toall
.param
: parameter to write to the value toovalue
: value to write to the parameter
Usage
/module/par-write module(s) [channel(s)] param value
Example
The following example will write the
CHANNEL_CSRA
parameter to 4 for all modules and channels./module/par-write all all CHANNEL_CSRA 4
- /module/reg-read
Read the value in a arbitrary or named memory register address in a module.
Register Input Options
Note
For non-PCI addresses (ex. FIPPI address space) you should use the
memory:addr
option to ensure that you’re communicating with the correct device.address
: The PCI memory address to read.name
: A name registered in a lookup table in the code. It is case insensitive.memory:address
: The memory space (sys, fippi, dsp) and registered name or address.
Arguments
-s
: Tells the command that you will be referencing the physical slot not the logical module.-x
: Formats the output in hex format instead of decimal.module
: The module(s) that the command will execute against. If optional, defaults toall
.reg
: Specifies the memory register that should be read.
Usage
/module/reg-read [-s] [-x] module/slot reg
Example
The following example boots the module then reads the CFG_RDCS memory block in 4 different ways.
/crate/boot /module/reg-read -x 0 0x08 /module/reg-read -x 0 cfg_rdcs /module/reg-read -x 0 CFG_RDCS /module/reg-read -x 0 sys:cfg_rdcs
The following example boots the module then reads the
DEBUG_K
register from FIPPI 0/crate/boot /module/reg-read -x 0 fippi:0x0080042A
The following example boots the module, writes the CHANNEL_CSRA to 4, then reads the DSP register containing the value.
/crate/boot /module/par-write 0 all CHANNEL_CSRA 4 /module/reg-read -x 0 dsp:0x00800002
- /module/reg-write
Write a value to an arbitrary or named memory register address in a module.
Register Input Options
Note
For non-PCI addresses (ex. FIPPI address space) you should use the
memory:addr
option to ensure that you’re communicating with the correct device.address
: The PCI memory address to read.name
: A name registered in the software’s lookup table. It is case insensitive.memory:address
: The memory space (sys, fippi, dsp) and registered name or address.
Arguments
-s
: Tells the command that you will be referencing the physical slot not the logical module.module
: The module(s) that the command will execute against. If optional, defaults toall
.reg
: Specifies the memory register that should be read.value
: The value to write
Usage
/module/reg-write [-s] module/slot reg [value]
Example
The following example boots the module, writes 0xDEADBEEF to the DSP test register and then reads it out.
/crate/boot /module/reg-write 0 dsp:0x00800814 0xDEADBEEF /module/reg-read -x 0 dsp:0x00800814
- /module/run-active
Does the module have an active run?
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/run-active module(s)
- /module/run-end
Ends a data run on the module(s).
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/run-end module(s)
- /module/set-dacs
Set the module’s DAC using the DSP control task. This must be called after calling /module/adj-off to ensure that the DACs are properly set.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/set-dacs modules(s)
- /module/stats
Outputs the requested module/channel hardware statistics to the screen.
Stat List
pe = processed events
ocr = output count rate
oc = total number of output counts
icr = input count rate
ic = total number of input counts
rt = real time
lt = live time
Arguments
-s stat
: The statistic that you want to output. If omitted, defaults to all.module
: The module(s) that the command will execute against. If optional, defaults toall
.channel
: The channel(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/stats [-s stat] module(s) [channel(s)]
- /module/stats-rpt
Outputs the module/channel hardware statistics to the requested file.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.filename
: The output file that will hold the report.
Usage
/module/stats-rpt module(s) filename
- /module/test
Test control, default mode is ‘off’.
Test Modes
off
: Default. Does nothing useful at all.lmfifo
: Executes a DSP Control Task 11, writes the resulting data to disk, and measures bandwidth usage.
Arguments
-m mode
: The test mode tomodule
: The module(s) that the command will execute against. If optional, defaults toall
.
Usage
/module/test [-m mode] module(s)
- /module/var-read
Read a DSP variable or all variables. The variable definitions may vary depending on the firmware. Refer to the DSP VAR file for a list of valid names.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.channel
: The channel(s) that the command will execute against. If optional, defaults toall
.var
: DSP variable to read and print orall
for all variablesoffset
: The index to write when working with an array variable type. Defaults to 0.
Usage
/module/var-read module(s) [channel(s)] var [offset(s)]
- /module/var-write
Write a value with a value. The variable definitions may vary depending on the firmware. Refer to the DSP VAR file for a list of valid names. The variable needs to be enabled and writable.
Arguments
module
: The module(s) that the command will execute against. If optional, defaults toall
.channel
: The channel(s) that the command will execute against. If optional, defaults toall
.var
: variable to writeoffset
: The index to write when working with an array variable type. Defaults to 0.value
: value to write to the variable
Usage
/module/var-write module(s) [channel(s)] var [offset(s)] value