Class TesterSequence
This class encapsulates a sequence of Commands.
It also implements many of the static methods called by Command
The command sequence is unmarshalled from XML and executed by reflection.
A very basic sequence in XML that configures a PDMDB (H-type) could be:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testerSequence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<command label="muDAQ configure" targetClass="TesterSequence" targetMethod="configureMuDaq"/>
<command label="Configure master link" targetClass="TesterSequence" targetMethod="configureMasterLink" data="i2c" stopOnFail="true"/>
<command label="SCA setup" targetClass="TesterSequence" targetMethod="setupSca"/>
<command label="DTM0 program GBTX" targetClass="TesterSequence" targetMethod="configureDtm" data="0"/>
<command label="DTM0 program FPGA" targetClass="TesterSequence" targetMethod="programFpga" data="0"/>
<command label="DTM2 program GBTX" targetClass="TesterSequence" targetMethod="configureDtm" data="1"/>
<command label="DTM2 program FPGA" targetClass="TesterSequence" targetMethod="programFpga" data="1"/>
<command label="Train e-ports" targetClass="TesterSequence" targetMethod="trainEports" data="0?1"/>
<command label="Configure EC0" targetClass="TesterSequence" targetMethod="configureClaros" data="0"/>
<command label="Configure EC1" targetClass="TesterSequence" targetMethod="configureClaros" data="1"/>
<command label="Configure EC2" targetClass="TesterSequence" targetMethod="configureClaros" data="2"/>
<command label="Configure EC3" targetClass="TesterSequence" targetMethod="configureClaros" data="3"/>
</testerSequence>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static BufferedWriter(package private) static BiConsumer<HashMap<String, String>, Integer> (package private) static Inventory(package private) static Path(package private) static Inventory(package private) static BiConsumer<HashMap<String, String>, Integer> (package private) static BiConsumer<HashMap<String, String>, Integer> (package private) static BiConsumer<HashMap<String, String>, Integer> (package private) static BiConsumer<HashMap<String, String>, Integer> (package private) static BiConsumer<HashMap<String, String>, Integer> (package private) static JTextField(package private) static TesterSequence(package private) static Inventorystatic Path(package private) static String(package private) static BufferedWriter(package private) static JTextArea(package private) static BiConsumer<HashMap<String, String>, Integer> ** -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbitflipSummary(String[] args) Writes summary of bitflip measurements to XML.voidCreates dialog to choose the root directory for test datastatic StringclockSummary(String[] args) Writes summary of clock measurements to XML.static StringconfigureAsics(String[] args) Deprecated.static StringconfigureDtm(String[] args) Configures the DTM module.static StringconfigureEc(String[] args) Configures ASICs for one EC.static StringconfigureGbts(String[] args) Deprecated.UseActions.configureGbts(String[])insteadstatic StringconfigureMasterLink(String[] args) Configures the master GBTXstatic StringconfigureMuDaq(String[] args) Deprecated.UseActions.configureMuDaq(String[])insteadstatic StringconfigurePicoTDC(String[] args) Deprecated.UseActions.configurePicoTDC(String[])insteadstatic StringDoes MGT eye scan.static StringPerforms a 2D (2 parameter) scan.static StringendOfTests(String[] args) Closes test data files.static StringfuseMasterGbtx(String[] args) Fuses GBTX registersstatic StringAcquires ADC test samples.voidgo()Executes all the steps of the sequence.static StringJumps to a specified step in the sequence.static StringgpioControl(String[] args) Controls the GPIOs.static StringidDialog()static StringPrompts for the (Challenger) assembly ID of the PDMDB.voidlaunch()Launches the sequence in its own thread (usingSwingWorker).static StringloadInventory(String[] args) Loads the inventory document of PDMDBs.static voidlogMessage(CharSequence msg) Writes a message to the command/response file.Convenience method to make a GUI panelvoidpause()Pauses the sequence.static StringpostSeafTestOpens(String[] args) Updates the inventory with results of the SEAF open pins test.static StringpostSeafTestShorts(String[] args) Updates the inventory with results of the SEAF shorted pair test.static StringpowerSummary(String[] args) Writes summary of power measurements to XML.voidprepare()Prepares to run the sequence.static StringprepareTests(String[] args) Creates directories and files for test data.static StringprogramFpga(String[] args) Programs the PDMDB FPGA.voidToggles the recording flag.static StringresetMuDaq(String[] args) Resets muDaq.voidresume()Continues the sequence after pause.static StringScan PDMDB/TCM/DTM barcodes(package private) static StringscanModule(String name) static StringsetAdcCurrentSource(String[] args) Enables/disables ADC current source.static StringsetAdcGain(String[] args) Sets ADC gain.static StringSets DAC.static StringSets GPIO outputs.static StringsetGpioDirection(String[] args) Sets GPIO direction.static StringsetMgtOnOff(String[] args) Switches muDaq K7 transceiver on or off.static StringsetMgtReset(String[] args) Resets muDaq MGT transceiver.static StringConfigures up the SCA.static StringPerforms a test of the SPI interface.voidstep()Executes the next step of the sequence.static StringtemperatureSummary(String[] args) Writes summary of temperature measurements to XML.static StringtrainEports(String[] args) Deprecated.UseActions.trainEports(String[])insteadstatic StringwriteInventory(String[] args) Writes the modfied inventory of PDMDBs.static voidxml(CharSequence text) Writes lines to XML summary file.
-
Field Details
-
textArea
-
rootDirectoryTF
-
testSubdirectory
-
testDirectory
-
commandResponseFile
-
testSummaryXml
-
eyeScanDataDirectory
-
inventory
-
tcmInventory
-
dtmInventory
-
staticThis
-
bg
-
thrAction
** -
ps1Action
-
ps2Action
-
ps3Action
-
ps4Action
-
ps5Action
-
dacAction
-
-
Constructor Details
-
TesterSequence
public TesterSequence()No-argument constructor called during unmarshalling
-
-
Method Details
-
makePanel
-
chooseDataDirectory
public void chooseDataDirectory()Creates dialog to choose the root directory for test data
Timestamped subdirectories are created in this directory for each cycle of a sequence
-
logMessage
Writes a message to the command/response file.
Does nothing if testDirectory or commandResponseFile are null.
- Parameters:
msg- The CharSequence to write.
-
scanModule
-
scan
-
loadInventory
-
writeInventory
-
idDialog
-
identify
-
prepareTests
-
endOfTests
-
xml
Writes lines to XML summary file.
If testDirectory or testSummaryXml are null, this method does nothing.
- Parameters:
text- CharSequence to write.
-
configureDtm
Configures the DTM module.
Callable by
Command.- Holds both DTM GBTXs in reset.
- Deasserts reset for GBTX0 and configures it.
- Deasserts reset for GBTX1 and configures it.
- Parameters:
args- {dtmIndex}.dtmIndex is the index of the DTM in the list unmarshalled from XML, not the DTM label.
- Returns:
- Command response.
-
trainEports
Deprecated.UseActions.trainEports(String[])insteadPerforms the automatic GBTX ePort phase training.
Callable by
Command.- Parameters:
args- {dtmIndex}.dtmIndex is the index of the DTM in the list unmarshalled from XML, not the DTM label.
- Returns:
- Command response.
-
programFpga
Programs the PDMDB FPGA.
Callable by
Command.- Parameters:
args- {dtmIndex,binFile}.dtmIndex is the index of the DTM in the list unmarshalled from XML, not the DTM label. binFile is the FPGA configuration .bin file location.
- Returns:
- Command response.
-
configureMuDaq
Deprecated.UseActions.configureMuDaq(String[])insteadConfigures the muDaq registers
Callable by
Command.- Parameters:
args- See MuDaq.configure().- Returns:
- Command response provided by MuDaq.configure().
-
resetMuDaq
-
setMgtOnOff
-
setMgtReset
Resets muDaq MGT transceiver.
Callable by
Command.- Parameters:
args- {mgtId,txReset,rxReset}.There are 8 transceivers with mgtId=0-7. txReset=0 to deassert the receiver reset, txReset=1 to assert reset. Similarly for the receiver.
- Returns:
- Command response.
-
configureMasterLink
Configures the master GBTX
Callable by
Command.To allow configuration of un-fused master GBTX this function selects either the I2C interface (<gbtI2c> in XML) or the generic interface (<gbtx> in XML) which can be set to either I2C or IC
- Parameters:
args- {interface}.interface=i2c to use the I2C interface, anything else to use the generic interface.
- Returns:
- Command response.
-
configureGbts
Deprecated.UseActions.configureGbts(String[])insteadConfigures the master LpGBT
Callable by
Command.To allow configuration of un-fused master GBT this function selects either the I2C interface (<gbtI2c> in XML) or the generic interface (<gbt> in XML) which can be set to either I2C or IC
- Parameters:
args- {interface}.interface=i2c to use the I2C interface, anything else to use the generic interface.
- Returns:
- Command response.
-
fuseMasterGbtx
Fuses GBTX registers
Callable by
Command.This function is called as part of the module testing sequence.
Caution - it irreversibly burns the TCM GBTX e-fuses.
The GBTX must have CONFIGSEL=1 (I2C) for this procedure and GBTFUSE3V3 must be enabled.
- Parameters:
args- {fuseMode}fuseMode="enable" to allow fusing, "ignore" to disallow fusing, "force" to force re-fusing an already fused GBTX.
- Returns:
- Command response.
-
setupSca
-
setDac
-
setGpio
-
setGpioDirection
-
gpioControl
- Parameters:
args- {testid:expected,gpio:direction:value,gpio:direction:value,...}.testid is a word to identify this test. expected is the expected value when read back (0 or 1). gpio is the integer GPIO ID. direction can be in or out. value=0 to deassert the GPIO, value=1 to assert.
- Returns:
- Command response.
-
setAdcCurrentSource
Enables/disables ADC current source.
Callable by
Command.- Parameters:
args- {channel,enable}.There are 31 ADCs for which the current source may be enabled with channel=0-30. enable=0 to disable the current source, enable=1 to enable.
- Returns:
- Command response.
-
setAdcGain
-
getAdc
-
configureEc
-
doEyeScan
-
doScan2
Performs a 2D (2 parameter) scan.
Callable by
Command.Does nothing if testDirectory is null.
The actions performed at each step are defined by Consumer instances. The scan index [1,2] respectively refer to the [inner,outer] scan loop.
- Parameters:
args- {scanMode,scanRepeat,scan1Start,scan1End,scan1Increment,scan2Start,scan2End,scan2Increment}. Optional. Defaults {scanType1,1,0,511,1,0,511,1}.- Returns:
- Command response.
-
spiTest
-
bitflipSummary
-
clockSummary
-
powerSummary
-
postSeafTestOpens
-
postSeafTestShorts
-
temperatureSummary
-
configureAsics
Deprecated.UseActions.configureAsics(java.util.HashMap)insteadConfigures FE ASICs.
Callable by
Command.All ASICs connected to boards with identifier matching regex are configured.
- Parameters:
args- 0=identifier- Returns:
- Command response.
-
configurePicoTDC
Deprecated.UseActions.configurePicoTDC(String[])insteadConfigures picoTDC.
Callable by
Command.- Parameters:
args- 0=configFile- Returns:
- Command response.
-
goTo
Jumps to a specified step in the sequence.
Callable by
Command.Use this method to implement simple loops in a sequence.
- Parameters:
args- {goto,iterations,wait}.goto is an integer that identifies the step in the sequence to jump to. iterations is the integer number of iterations. wait is the time in seconds to wait between iterations.
- Returns:
- Command response.
-
prepare
public void prepare()Prepares to run the sequence.
The current sequence position is set to the beginning.
-
pause
public void pause()Pauses the sequence.
The currently running step will continue to execute until it completes.
-
resume
public void resume()Continues the sequence after pause.
-
recording
public void recording()Toggles the recording flag.
-
step
public void step()Executes the next step of the sequence.
-
go
public void go()Executes all the steps of the sequence.
-
launch
public void launch()Launches the sequence in its own thread (using
SwingWorker).
-
Actions.configureAsics(java.util.HashMap)instead