Draft: Merge Changes from BETSEE Work
Draft:
-
Document all the changes that happened. -
A few tests with modules in the cold box. -
Test on massive tester to ensure backwards compatibility.
Support For SETID Via EFuse
The AMACv2
class now supports setting the communication ID using the AMAC efuse ID.
Added an AMACv2::m_efuseid
member property that contains the efuse ID of the AMAC to address using SETID. The default value is 0xFFFFF
, which disabled efuse addressing in SETID. It can be set using a new AMACv2::setEFuse
function. In principle, it is possible to set both the m_padid
and m_efuseid
to a "valid" (not all 1) value.
Added an EndeavourCom::setid(uint8_t padid, uint32_t efuseid)
function that replaces EndeavourCom::setid(REFMODE mode, unsigned int refid)
. This is now called by AMACv2::init()
to set the communication id using the m_padid
and m_efuseid
properties. The values are directly (with bitmask for right number of bits) put into the endeavour command. One should set the not used ID to all ones, but there is no protection to ensure that this is true. The EndeavourCom::setid(REFMODE mode, unsigned int refid)
still exists for convenience as a wrapper around the new function.
The default values of m_padid
and m_efuseid
are set to 0x0
and 0xFFFFF
. This defaults to calling SETID with pad id of 0. Thus this is a backwards compatible change.
Configuring EFuse vs PadID
The PBv3TBModule
is the only testbench that supports selection between efuse and padid. It is also the only testbench that currently supports changing the padid. This is done by adding a new configuration key, efuse
, to the powerboard configuration block (pbs
list used by the PBV3TBModule
). The value is then set via AMACv2::setEFuse
.
Channel Selection For FMC-DP
The channel can now be configured on a per-powerboard basis, enabling support for all FMC-DP ports.
Added a EndeavourRawITSDAQ::m_channel
member that is set via an optional argument to the EndeavourRawITSDAQ
constructor. The default value is zero. It is inserted into the ITSDAQ command during all powerboard communications.
Configurable PS Channels
The powerboard object in a testbench now takes an optional Vin
and HVin
properties that allow to select different power supply channels for each powerboard. This is useful when different powerboards on a testbench are powered by different channels.
The default values are "Vin"
and "HVin"
correspondingly. This maintains backwards compatibility.
List Based Testbench Definitions
The "testbenches"
block inside the equipement configuration file is now a list of testbench objects. This follows the conventions used by all of the other labRemote configuration blocks. It will also allow schema checking in the future using json-schema
.
An example of what this block should look like:
{
testbenches": [
{
"name": "massive_20210524",
"type": "PBv3TBMassive20210524",
"pbdev": "/dev/uio0",
"i2cdev": "/dev/i2c-2",
"zturn_adapter": true
},
{
"name": "massive_20190718",
"type": "PBv3TBMassive20190718"
},
{
"name": "single",
"type": "PBv3TBSingle",
"bkdev": "/dev/ttyUSB0"
},
{
"name": "module",
"type": "PBv3TBModule",
"ip": "192.168.222.16",
"port": 60003,
"pbs": [
{
"idpads": 4,
"commid": 0
},
{
"idpads": 0,
"commid": 1
}
]
}
]
}
WARNING: This is not a backwards compatible change!
Multiple Testbench Definitions
There can now be multiple testbenches defined inside the requiement configuration file. This was always possible ("testbenches"
is a list of testbenches, with name="default"
being selected). However this MR adds a convention for specifying a testbench not named "default"
via the -t
/--testbench
argument. This convention was only added to a few programs and will be added to more on-demand.
This is useful for using a single configuration file for a setup with multiple testbenches. For example, running two modules independently via the same FMC-DP card.
Added SEU Test
Added an PBv3TestTools::checkSEUs
test that checks for Single Event Upsets. It reads out all registers and compares the actual value against the expected value. The actual value is read using the low-evel amac->read_reg(addr)
call. The expected value is obtained via the internal map (reg->getValue()
).
On an SEU, the following action is taken:
- Error is printed to screen.
- The expected value is written to the AMAC (correcting the SEU).
- If the corrected value does not match expected value on a second try, an exception is raised (possible latchup).
ITSDAQ Scripts
Added two folders to help with operation of a module.
-
scripts
: contains shell scripts implementing common workflows. -
itsdaq
: contains ROOT macros for running hybrid operation via ITSDAQ.
The itsdaq
might be moved in the future to a BETSEE project. Also most of the scripts should be replaced with programs following the typical interface conventions for powerboard tools.
The generic scripts are:
-
module-setup_fpga.sh
: loads the latest tested FPGA firmware for FMC-DP. -
EXEITSDAQ.sh
: a version ofRUNITSDAQ.sh
that does not launch the GUI. To be used with the macros insideitsdaq
folder.
BETSEE Running
Added a pbv3_betsee
program that runs the monitoring of (multiple) BETSEE's. It can be started with (in addition to ITSDAQ) using the betsee-run.sh
scripts.