Class LpGbtParent
This is the abstract base class for the GBT.
The class maintains a register mirror BitSet that is supposed to faithfully reflect the GBT register settings. Therefore, when updating a GBT register, the register bits in the mirror are updated first, then the array of bytes that span the updated register bit-field are written to the hardware. In this way, any other registers that share the same bytes are re-written with unchanged values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) static enumNested classes/interfaces inherited from interface Sc
Sc.AdcCurrentSourceMode, Sc.GpioDirection, Sc.GpioState -
Field Summary
FieldsModifier and TypeFieldDescription(package private) int[](package private) int[](package private) intFields inherited from class GbtGrandParent
activeEPorts, activeInEGroups, activeOutEGroups, activePSClocks, address, cfgTF, csr, feIo, gbi, i2c, id, lpGbtCali, mgt, prefs, puStateTF, regNameCB, regs, regValueTF, sc, sca, serialNumber, tcmMgt, type -
Constructor Summary
ConstructorsConstructorDescriptionLpGbtParent(GbtxType gbtx) Constructor called by unmarshaller via LpGbtAdapter. -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigures the GBTvoidBurn the e-fuses.Get the GBT Chip ID(package private) voidgetIcEc(int offset, int len, byte command) Appends an IC/EC read command block to the multi-block ByteBuffer.Convenience method that makes a GUI panel.voidminimal()Overwrites the mirrored register bits with the minimal set(package private) voidPrepare (re-initialise) the multi-command IC/EC buffer.(package private) voidputIcEc(int offset, byte[] regBuf, byte command) Appends an IC/EC write command block to the multi-block ByteBuffer.voidputParity(ByteBuffer bb) Compute and insert LpGbt parity byte at end of command buffer.voidReads the GBT register file into the register mirror and builds lists of active e-links and clocksvoidreset()Reset the GBT.voidPerforms a reset of the active GBT ePortsvoidPerforms a reset of the GBT phase shifter logicvoidWrites a register bit-field to the GBTUpdates the GBT status field in the GUI panelvoidPerforms a soft reset of the GBTbyte[]Performs the automatic GBT ePort phase training.Methods inherited from class GbtGrandParent
chooseConfigurationFile, get, getActiveEPorts, getAdc, getAdcCalibrated, getAdcGain, getGpioDirections, getGpioState, getGpioStates, getId, gpioControl, init, load, makePanel, put, put, SetAdcCurrentGlobal, setAdcCurrentSource, setAdcGain, setDac, setGpio, setGpio, setPreferencesRoot, toString, verify
-
Field Details
-
icecSelect
int icecSelect -
i2cSpeed
int[] i2cSpeed -
i2cSclMode
int[] i2cSclMode
-
-
Constructor Details
-
LpGbtParent
Constructor called by unmarshaller via LpGbtAdapter.
- Parameters:
gbtx- The unmarshalled data.
-
-
Method Details
-
makePanel
Convenience method that makes a GUI panel.
- Specified by:
makePanelin classGbtGrandParent- Returns:
- The panel.
-
set
Writes a register bit-field to the GBT
Field keys are treated as regular expressions for bit-field names except for some special cases when the name is enclosed in []. These update the register mirror with predefined settings but do not write the settings to the GBT.
- Specified by:
setin classGbtGrandParent- Parameters:
key- The register bit-field key nameval- The value to write
-
minimal
public void minimal()Overwrites the mirrored register bits with the minimal set
Does not write the values to the GBT.
The minimal set should be enough to get the TCM link alive on power up.
-
readConfigurationFile
public void readConfigurationFile()Reads the GBT register file into the register mirror and builds lists of active e-links and clocks
- Overrides:
readConfigurationFilein classGbtGrandParent
-
showStatus
Updates the GBT status field in the GUI panel
- Specified by:
showStatusin classGbtGrandParent- Returns:
- Status summary string
-
putParity
Compute and insert LpGbt parity byte at end of command buffer.
- Specified by:
putParityin classGbtGrandParent- Parameters:
bb- The pre-filled command buffer positioned at parity byte.
-
prepareIcEc
void prepareIcEc()Prepare (re-initialise) the multi-command IC/EC buffer.
-
putIcEc
void putIcEc(int offset, byte[] regBuf, byte command) Appends an IC/EC write command block to the multi-block ByteBuffer.
- Parameters:
offset- Offset to hardware register.regBuf- Array of register values.command- LpGbt command byte..
-
getIcEc
void getIcEc(int offset, int len, byte command) Appends an IC/EC read command block to the multi-block ByteBuffer.
- Parameters:
offset- Offset to hardware register.len- Number of bytes to read.command- LpGbt command byte.
-
configure
public void configure()Configures the GBT
Disables the watchdog feature during the configuration otherwise a timeout might cause the volatile registers to be reset.
This puts the downlinks in 320Mbs mode since this is required for the module tester use case for phase training.
Performs a soft reset.
- Specified by:
configurein interfaceSc- Specified by:
configurein classGbtGrandParent
-
resetPhaseShifter
public void resetPhaseShifter()Performs a reset of the GBT phase shifter logic
When calling this it is advisable/mandatory to disable the watchdog feature.
- Specified by:
resetPhaseShifterin classGbtGrandParent
-
resetEPorts
public void resetEPorts()Performs a reset of the active GBT ePorts
When calling this it is advisable/mandatory to disable the watchdog/timeout feature.
- Specified by:
resetEPortsin classGbtGrandParent
-
softReset
public void softReset()Performs a soft reset of the GBT
When fused with the minimal configuration the GBT startup completes with many registers not yet programmed. This means that when the remaining registers are set parts of the GBT need to be manually reset.
This method manually triggers the required resets.
When calling this it is advisable/mandatory to disable the watchdog.
- Specified by:
softResetin classGbtGrandParent
-
trainEports
public byte[] trainEports()Performs the automatic GBT ePort phase training.
The GBT phase scan range is 2*UI in total. This means that there are two sampling positions that should give stable data.
For FastRICH lanes either the FastRICH aurora lane scrambling should be enabled or the lane should be configured to send a PRBS sequence.
For use with muDAQ, FastRICH aurora scrambling should be disabled so FastRICH serialisers must be in PRBS mode before calling this method.
- Specified by:
trainEportsin classGbtGrandParent- Returns:
- Array of phases
-
reset
-
fuse
Description copied from class:GbtGrandParentBurn the e-fuses.
- Specified by:
fusein classGbtGrandParent- Parameters:
pulse- A runnable that generates the fuse pulse signal
-
getChipId
Get the GBT Chip ID
Reads the five copies of the chip id in the e-fuses and uses bitwise majority logic to compute the ID. The calculated value is saved into the lpgbt.id register and returned as a hexadecimal string.
- Overrides:
getChipIdin classGbtGrandParent- Returns:
- The chip ID as a hexadecimal string
-