|
JLab Pipeline TD Library
3v6.1
|
Functions | |
| int | tdSlot (unsigned int i) |
| Convert an index into a slot number, where the index is the element of an array of TDs in the order in which they were initialized. More... | |
| unsigned int | tdSlotMask () |
| Return the VME Slot mask of initialized TDs. More... | |
| int | tdCheckAddresses () |
| Test of register map. More... | |
| void | tdStatus (int id, int pflag) |
| Print some status information of the TD to standard out. More... | |
| int | tdGetPortName (int id, int iport, char **name) |
| Get the current specified port name. More... | |
| int | tdSavePortNames (char *filename) |
| Save the current port names to a file (with file name: filename) More... | |
| void | tdPrintPortNames () |
| Print the current port names to standard out. More... | |
| void | tdGStatus (int pflag) |
| Print a summary of all configured TD modules and ports to standard out. More... | |
| int | tdGetFirmwareVersion (int id) |
| Get the Firmware Version. More... | |
| int | tdSetSyncSource (int id, unsigned int sync) |
| Set the Sync source mask. More... | |
| unsigned int | tdGetSerialNumber (int id, char **rSN) |
| Get the Module Serial Number. More... | |
| unsigned int | tdGetLiveTime (int id) |
| Return the current "live" time of the module. More... | |
| unsigned int | tdGetBusyTime (int id) |
| Return the current "busy" time of the module. More... | |
| int | tdSyncResetRequestStatus (int id, int pflag) |
| Status of SyncReset Request received bits. More... | |
| int | tdGetConnectedFiberMask (int id) |
| Returns the mask of fiber channels that report a "connected" status from a TI. More... | |
| int | tdGetTrigSrcEnabledFiberMask (int id) |
| Returns the mask of fiber channels that report a "connected" status from a TI has it's trigger source enabled. More... | |
| int | tdGetCrateID (int id, int port) |
| Get the crate ID of the selected port. More... | |
| int | tdGetPortTrigSrcEnabled (int id, int port) |
| Get the trigger sources enabled bits of the selected port. More... | |
| int | tdGetSlaveBlocklevel (int id, int port) |
| Get the blocklevel of the TI Slave on the selected port. More... | |
| void | tdSlaveStatus (int id, int pflag) |
| Print a summary of all fiber port connections to potential TI Slaves. More... | |
| unsigned int | tdGetBlockStatus (int id, int port, int pflag) |
| Obtain the status of blocks sent readout acknowledges received from the TI Slaves. More... | |
| unsigned int | tdGetTrigCount (int id) |
| Return the number of triggers received from the trigger supervisor. More... | |
| unsigned int | tdGetBusyCounter (int id, int busysrc) |
| Return BUSY counter for specified Busy Source. More... | |
| int | tdPrintBusyCounters (int id) |
| Print the BUSY counters for all busy sources. More... | |
| int tdCheckAddresses | ( | ) |
Test of register map.
References TD_A24RegStruct::adr24, TD_A24RegStruct::boardID, TD_A24RegStruct::fpBusy, TD_A24RegStruct::JTAGFPGABase, TD_A24RegStruct::JTAGPROMBase, TD_A24RegStruct::master_tiID, TD_A24RegStruct::reset, TD_A24RegStruct::syncWidth, TD_A24RegStruct::trigsrc, and TD_A24RegStruct::trigTable.
| unsigned int tdGetBlockStatus | ( | int | id, |
| int | port, | ||
| int | pflag | ||
| ) |
Obtain the status of blocks sent readout acknowledges received from the TI Slaves.
| id | Slot number |
| port | Port number (1-8) |
| pflag |
|
References TD_A24RegStruct::blockStatus, TD_A24RegStruct::fiber, TD_BLOCKSTATUS_NBLOCKS_NEEDACK0, TD_BLOCKSTATUS_NBLOCKS_NEEDACK1, TD_BLOCKSTATUS_NBLOCKS_READY0, TD_BLOCKSTATUS_NBLOCKS_READY1, tdID, TDLOCK, and TDUNLOCK.
| unsigned int tdGetBusyCounter | ( | int | id, |
| int | busysrc | ||
| ) |
Return BUSY counter for specified Busy Source.
| id | Slot number |
| busysrc |
|
References TD_A24RegStruct::busy_scaler1, TD_A24RegStruct::busy_scaler2, tdID, TDLOCK, and TDUNLOCK.
| unsigned int tdGetBusyTime | ( | int | id | ) |
Return the current "busy" time of the module.
| id | Slot number |
References TD_A24RegStruct::busytime, tdID, TDLOCK, and TDUNLOCK.
| int tdGetConnectedFiberMask | ( | int | id | ) |
Returns the mask of fiber channels that report a "connected" status from a TI.
| id | Slot number |
References TD_A24RegStruct::fiber, TD_FIBER_CONNECTED_MASK, tdID, TDLOCK, and TDUNLOCK.
| int tdGetCrateID | ( | int | id, |
| int | port | ||
| ) |
Get the crate ID of the selected port.
| id | Slot number |
| port |
|
References TD_A24RegStruct::hfbr_tiID, TD_ID_CRATEID_MASK, tdID, TDLOCK, and TDUNLOCK.
Referenced by tdSetPortNamesFromCrateID().
| int tdGetFirmwareVersion | ( | int | id | ) |
Get the Firmware Version.
| id | Slot number |
References TD_A24RegStruct::JTAGFPGABase, TD_A24RegStruct::reset, TD_RESET_JTAG, tdID, TDLOCK, and TDUNLOCK.
Referenced by tdInit().
| unsigned int tdGetLiveTime | ( | int | id | ) |
Return the current "live" time of the module.
| id | Slot number |
References TD_A24RegStruct::livetime, tdID, TDLOCK, and TDUNLOCK.
| int tdGetPortName | ( | int | id, |
| int | iport, | ||
| char ** | name | ||
| ) |
Get the current specified port name.
| id | Slot Number |
| iport | Port Number |
| name | Where to return port name |
References TD_MAX_FIBER_PORTS, and tdID.
| int tdGetPortTrigSrcEnabled | ( | int | id, |
| int | port | ||
| ) |
Get the trigger sources enabled bits of the selected port.
| id | Slot number |
| port |
|
References TD_A24RegStruct::hfbr_tiID, TD_ID_TRIGSRC_ENABLE_MASK, tdID, TDLOCK, and TDUNLOCK.
| unsigned int tdGetSerialNumber | ( | int | id, |
| char ** | rSN | ||
| ) |
Get the Module Serial Number.
| id | Slot number |
| rSN | Pointer to string to pass Serial Number |
References TD_A24RegStruct::JTAGPROMBase, TD_A24RegStruct::reset, TD_RESET_JTAG, tdID, TDLOCK, and TDUNLOCK.
| int tdGetSlaveBlocklevel | ( | int | id, |
| int | port | ||
| ) |
Get the blocklevel of the TI Slave on the selected port.
| id | Slot number |
| port |
|
References TD_A24RegStruct::hfbr_tiID, TD_ID_BLOCKLEVEL_MASK, tdID, TDLOCK, and TDUNLOCK.
| unsigned int tdGetTrigCount | ( | int | id | ) |
Return the number of triggers received from the trigger supervisor.
| id | Slot number |
References tdID, TDLOCK, TDUNLOCK, and TD_A24RegStruct::trigCount.
| int tdGetTrigSrcEnabledFiberMask | ( | int | id | ) |
Returns the mask of fiber channels that report a "connected" status from a TI has it's trigger source enabled.
| id | Slot number |
References TD_A24RegStruct::fiber, TD_FIBER_TRIGSRC_ENABLED_MASK, tdID, TDLOCK, and TDUNLOCK.
| void tdGStatus | ( | int | pflag | ) |
Print a summary of all configured TD modules and ports to standard out.
| pflag |
|
References TD_A24RegStruct::adr24, TD_A24RegStruct::blockBuffer, TD_A24RegStruct::blockStatus, TD_A24RegStruct::busy, TD_A24RegStruct::busytime, TD_A24RegStruct::fiber, TD_A24RegStruct::fiber_busy, TD_A24RegStruct::inputCounter, TD_A24RegStruct::livetime, nTD, TD_A24RegStruct::sync, TD_BUSY_HFBR1, TD_BUSY_HFBR2, TD_BUSY_HFBR3, TD_BUSY_HFBR4, TD_BUSY_HFBR5, TD_BUSY_HFBR6, TD_BUSY_HFBR7, TD_BUSY_HFBR8, TD_BUSY_LOOPBACK, TD_BUSY_MONITOR_HFBR1, TD_BUSY_MONITOR_HFBR2, TD_BUSY_MONITOR_HFBR3, TD_BUSY_MONITOR_HFBR4, TD_BUSY_MONITOR_HFBR5, TD_BUSY_MONITOR_HFBR6, TD_BUSY_MONITOR_HFBR7, TD_BUSY_MONITOR_HFBR8, TD_BUSY_MONITOR_LOOPBACK, TD_BUSY_MONITOR_P2, TD_BUSY_MONITOR_TRIG_LOST, TD_BUSY_P2, TD_BUSY_TRIGGER_LOCK, TD_FIBER_CONNECTED_TI, TD_FIBER_MASK, TD_FIBER_TRIGSRC_ENABLED_TI, TD_MAX_FIBER_PORTS, TD_MAX_PORTNAME_CHARS, TD_MAX_VME_SLOTS, TD_SYNC_FP, TD_SYNC_HFBR1, TD_SYNC_HFBR5, TD_SYNC_LOOPBACK, TD_SYNC_P0, TDLOCK, tdSlaveMask, tdSlot(), TDUNLOCK, TD_A24RegStruct::trigCount, and TD_A24RegStruct::trigsrc.
| int tdPrintBusyCounters | ( | int | id | ) |
Print the BUSY counters for all busy sources.
| id | Slot number |
References TD_A24RegStruct::busy_scaler1, TD_A24RegStruct::busy_scaler2, tdID, TDLOCK, and TDUNLOCK.
| void tdPrintPortNames | ( | ) |
Print the current port names to standard out.
References TD_MAX_FIBER_PORTS, TD_MAX_PORTNAME_CHARS, and TD_MAX_VME_SLOTS.
| int tdSavePortNames | ( | char * | filename | ) |
Save the current port names to a file (with file name: filename)
Format is the same which is expected by tdLoadPortNames(...)
| filename | Name of output file |
References TD_MAX_FIBER_PORTS, TD_MAX_PORTNAME_CHARS, and TD_MAX_VME_SLOTS.
| int tdSetSyncSource | ( | int | id, |
| unsigned int | sync | ||
| ) |
Set the Sync source mask.
| id | Slot number |
| sync | - MASK indicating the sync source
|
References TD_SYNC_SOURCEMASK, tdID, TDLOCK, and TDUNLOCK.
Referenced by tdInit().
| void tdSlaveStatus | ( | int | id, |
| int | pflag | ||
| ) |
Print a summary of all fiber port connections to potential TI Slaves.
| id | Slot number |
| pflag |
|
References TD_A24RegStruct::blockStatus, TD_A24RegStruct::busy, TD_A24RegStruct::fiber, TD_A24RegStruct::hfbr_tiID, TD_BLOCKSTATUS_NBLOCKS_NEEDACK0, TD_BLOCKSTATUS_NBLOCKS_NEEDACK1, TD_BLOCKSTATUS_NBLOCKS_READY0, TD_BLOCKSTATUS_NBLOCKS_READY1, TD_BUSY_MONITOR_FIBER_BUSY, TD_FIBER_CONNECTED_TI, TD_FIBER_TRIGSRC_ENABLED_TI, TD_ID_BLOCKLEVEL_MASK, TD_ID_CRATEID_MASK, tdA24Offset, tdID, TDLOCK, tdSlaveMask, TDUNLOCK, and TD_A24RegStruct::trigsrc.
| int tdSlot | ( | unsigned int | i | ) |
Convert an index into a slot number, where the index is the element of an array of TDs in the order in which they were initialized.
| i | Integer referring to the order of which TDs were initialized |
Referenced by tdGSetPortNamesFromCrateID(), tdGSetTriggerLock(), and tdGStatus().
| unsigned int tdSlotMask | ( | ) |
| void tdStatus | ( | int | id, |
| int | pflag | ||
| ) |
Print some status information of the TD to standard out.
| pflag |
|
References TD_A24RegStruct::adr24, TD_A24RegStruct::adr32, TD_A24RegStruct::blockBuffer, TD_A24RegStruct::blocklevel, TD_A24RegStruct::blockStatus, TD_A24RegStruct::boardID, TD_A24RegStruct::busy, TD_A24RegStruct::busytime, TD_A24RegStruct::fiber, TD_A24RegStruct::fiber_busy, TD_A24RegStruct::inputCounter, TD_A24RegStruct::intsetup, TD_A24RegStruct::livetime, TD_A24RegStruct::output, TD_A24RegStruct::sync, TD_BLOCKLEVEL_MASK, TD_BLOCKSTATUS_NBLOCKS_NEEDACK0, TD_BLOCKSTATUS_NBLOCKS_NEEDACK1, TD_BLOCKSTATUS_NBLOCKS_READY0, TD_BLOCKSTATUS_NBLOCKS_READY1, TD_BOARDID_CRATEID_MASK, TD_BUSY_HFBR1, TD_BUSY_HFBR2, TD_BUSY_HFBR3, TD_BUSY_HFBR4, TD_BUSY_HFBR5, TD_BUSY_HFBR6, TD_BUSY_HFBR7, TD_BUSY_HFBR8, TD_BUSY_LOOPBACK, TD_BUSY_MONITOR_HFBR1, TD_BUSY_MONITOR_HFBR2, TD_BUSY_MONITOR_HFBR3, TD_BUSY_MONITOR_HFBR4, TD_BUSY_MONITOR_HFBR5, TD_BUSY_MONITOR_HFBR6, TD_BUSY_MONITOR_HFBR7, TD_BUSY_MONITOR_HFBR8, TD_BUSY_MONITOR_LOOPBACK, TD_BUSY_MONITOR_P2, TD_BUSY_MONITOR_TRIG_LOST, TD_BUSY_P2, TD_BUSY_SOURCEMASK, TD_BUSY_TRIGGER_LOCK, TD_FIBER_BUSY_HFBR1, TD_FIBER_BUSY_HFBR2, TD_FIBER_BUSY_HFBR3, TD_FIBER_BUSY_HFBR4, TD_FIBER_BUSY_HFBR5, TD_FIBER_BUSY_HFBR6, TD_FIBER_BUSY_HFBR7, TD_FIBER_BUSY_HFBR8, TD_FIBER_CONNECTED_TI, TD_FIBER_MASK, TD_FIBER_TRIGSRC_ENABLED_TI, TD_SYNC_FP, TD_SYNC_HFBR1, TD_SYNC_HFBR5, TD_SYNC_LOOPBACK, TD_SYNC_P0, TD_SYNC_SOURCEMASK, TD_TRIGSRC_ENABLE, TD_TRIGSRC_FPTRG, TD_TRIGSRC_HFBR1, TD_TRIGSRC_LOOPBACK, TD_TRIGSRC_P0, TD_TRIGSRC_PULSER, TD_TRIGSRC_SOURCEMASK, TD_TRIGSRC_TSINPUTS, TD_TRIGSRC_TSREV2, TD_TRIGSRC_VME, tdA24Offset, tdID, tdLatchTimers(), TDLOCK, tdSlaveMask, TDUNLOCK, TD_A24RegStruct::trigCount, TD_A24RegStruct::trigDelay, TD_A24RegStruct::trigsrc, TD_A24RegStruct::tsInput, and TD_A24RegStruct::vmeControl.
| int tdSyncResetRequestStatus | ( | int | id, |
| int | pflag | ||
| ) |
Status of SyncReset Request received bits.
| id | Slot number |
| pflag | Print to standard out if not 0 |
References TD_A24RegStruct::rocEnable, TD_ROCENABLE_SYNCRESET_REQUEST_MONITOR_MASK, tdID, TDLOCK, and TDUNLOCK.