package require scalerxlm72
AXLM72Scaler name slot
name GetFirmware ctlr
name Reset ctlr
name Latch ctlr
name SetTrigger ctlr bit
name SetTriggetBit ctlr bit value
name SetTriggerBits ctlr bitset
name ReadTrigger ctlr
name SetEnable ctlr onoff
name ReadEnable ctlr
name ReadAll ctlr
Stack Building Methods.
name sEnable stack
name sDisable stack
name sLatch stack
name sReadAll stack
name sReset stack
This device is mostly just a 32-bit latching scaler but has the feature that channel inputs can be redirected as a trigger output. The trigger output is the result of OR'ing all of the input signals of channels whose trigger bits are set.
The scaler can be enabled/disabled and atomically cleared (aka reset).
AXLM72Scaler name slot
Constructs an AXLM72Scaler object for a device seated in
slot slot
name GetFirmware ctlr
Reads and returns the firmware signature. The ctlr
is
a cvmusb::CVMUSB object.
name Reset ctlr
Atomically resets all scaler values by writing a 1 and then a 0 to the lowest
address of the FPGA address space. Returns 0 on success or a negative value for failure.
The ctlr
is a cvmusb::CVMUSB object.
name Latch ctlr
Latch the current values of the scaler counters into SRAMA for readout.
The ctlr
is a cvmusb::CVMUSB object.
The return value of this is either 0 for success or -1 for failure.
name SetTrigger ctlr bit
As a result of history, this relies on the state of the
trigger array to determine what to write. This ultimately
calls SetTriggerBits after properly setting the requested
bit. The ctlr
is a cvmusb::CVMUSB object.
The return value of this is either 0 for success or -1 for failure.
name SetTriggerBits ctlr bitset
As opposed to the previous two methods, this replaces the
entire trigger register value rather than manipulating
specific bits. It is therefore a lower level method but
it enables one to write all bits at once. The value of bitset
is written to the entire register. The ctlr
is a
cvmusb::CVMUSB object.
The return value of this is either 0 for success or -1 for failure.
name ReadTrigger ctlr
Read the trigger register.
The ctlr
parameter is a cvmusb::CVMUSB object.
The return value of this the value of the trigger register.
name SetEnable ctlr onoff
Write the value of onoff
to the enable register. Valid
values for onoff
are 0 (i.e. enable on) and 1 (i.e. enable off).
The ctlr
parameter is a cvmusb::CVMUSB object.
Returns either 0 for success or -1 for failure.
name ReadEnable ctlr
Read and return the value of the enable register.
The ctlr
parameter is a cvmusb::CVMUSB object.
name ReadAll ctlr
Read and return the value of all 32 scaler counters.
The ctlr
parameter is a cvmusb::CVMUSB object.
The return value of this is a tcl list of all 32 channels of scaler values.
name sEnable stack
Appends a write of 1 to the enable register onto stack
.
The stack
parameter is a cvmusbreadoutlist::CVMUSBReadoutList object.
name sDisable stack
Appends a write of 0 to the enable register onto stack
.
The stack
parameter is a cvmusbreadoutlist::CVMUSBReadoutList object.
name sLatch stack
Adds a command to stack
to latch the current value of the scaler
counter into the SRAMA memory for later readout. The stack
parameter is a cvmusbreadoutlist::CVMUSBReadoutList object.
name sReadAll stack
Adds a readout cycle to stack
. The values of the counters are
latched and then are readout using a BLT. After the BLT, the SRAMA data is reset. This handles the acquisition of the appropriate busses. The stack
parameter is a cvmusbreadoutlist::CVMUSBReadoutList object.
name sReset stack
Adds a write of 0 to SRAMA[0] to reset the data. The stack
parameter is a cvmusbreadoutlist::CVMUSBReadoutList object.