#include <TimModule.h>
Public Member Functions | |
TimModule (UINT32 baseAddr, UINT32 mapSize, VmeInterface &ourInterface) | |
This is the only constructor to use. | |
virtual | ~TimModule () |
UINT32 | getFirmware () |
UINT32 | getSerialNumber () |
VmePort * | getVmePort () |
void | initialize () |
void | reset () throw (TimException &) |
void | status () |
UINT32 | fetchL1ID () |
Read trigger number. | |
UINT16 | fetchTimID () |
Read TIM ID register. | |
void | intTrigStart (const double frequency) |
Internal Trigger. | |
void | intTrigStart (const TimMaskFrequency frequency) |
Internal Trigger. | |
void | intTrigStop () |
Stop Internal Trigger. | |
void | issueCommand (const TimBitCommand mask) |
Issue TIM command. | |
void | issueVCAL (const UINT8 pipelineDelay) |
Issue VCAL + L1A command. | |
void | loadBitClear (const TimRegister addr, const UINT16 mask) |
Clear bit. | |
void | loadBitSet (const TimRegister addr, const UINT16 mask) |
Set bit. | |
void | loadByteHi (const TimRegister addr, const UINT8 byte) |
Upper byte. | |
void | loadByteLo (const TimRegister addr, const UINT8 byte) |
Lower byte. | |
void | loadFrequencyFECR (const double frequency) |
Load FER/ECR frequency. | |
void | loadFrequencyTrig (const double frequency) |
Load trigger frequency. | |
void | msleep (const double milliSecs) |
UINT16 | regFetch (const TimRegister addr) |
Read from a 16-bit VME register. | |
void | regLoad (const TimRegister addr, const UINT16 data) |
Write to a 16-bit VME register. | |
int | regTimeout (const TimRegister addr, const int mask1, const int mask2, const int timeout) |
void | seqFetch (const UINT16 size, UINT16 buffer[]) |
Read sequencer. | |
void | seqLoad (const UINT16 size, const UINT16 buffer[]) |
Load sequencer. | |
void | seqRun (const UINT16 size) |
Run sequencer. | |
void | setupTTC () |
Setup TTC operation. | |
void | setupVME () |
Setup VME operation. | |
void | statusPrint (std::ostream &os) |
Print TIM status. | |
UINT16 | vmeFetch (const UINT32 addr) throw (VmeException &) |
Read from a 16-bit VME register. | |
void | vmeLoad (const UINT32 addr, const UINT16 data) throw (VmeException &) |
Write to a 16-bit VME register. | |
Private Attributes | |
UINT32 | m_firmware |
Firmware version number. | |
UINT32 | m_serialNumber |
Board serial number. | |
VmePort * | m_vmePort |
VME Port handle. |
This is the implementation of a TIM class derived from the VmeModule base class. It should be the sole interface for VME communication with TIM.
Contributors: John Lane <jbl@hep.ucl.ac.uk> - originator
Definition at line 92 of file TimModule.h.
|
This is the only constructor to use. Objects of this class cannot be copied or assigned. This could lead to VME conflicts. Definition at line 102 of file TimModule.cxx. References m_serialNumber, and m_vmePort. |
|
This deletes all its VME Ports. Definition at line 128 of file TimModule.cxx. References m_vmePort. |
|
Read trigger number. This method reads the last TIM L1ID value. Definition at line 200 of file TimModule.cxx. References m_firmware, and regFetch(). Referenced by SctApi::CrateImpl::sendTimBurst(), statusPrint(), and SctApi::CrateImpl::timRunSequence(). |
Here is the call graph for this function:
|
Read TIM ID register. This method reads the TIM ID register. Definition at line 216 of file TimModule.cxx. References m_firmware, m_serialNumber, and regFetch(). Referenced by initialize(). |
Here is the call graph for this function:
|
This method configures the TIM into its initialized state. Definition at line 143 of file TimModule.cxx. References fetchTimID(), loadFrequencyFECR(), loadFrequencyTrig(), regLoad(), and setupVME(). Referenced by SctApi::CrateImpl::initialiseTim(). |
Here is the call graph for this function:
|
Internal Trigger. This method Enables Internal Triggers with the given repeat frequency. Definition at line 249 of file TimModule.cxx. References loadBitSet(), loadByteLo(), and SctPixelRod::TIM_BIT_EN_INT_TRIG. |
Here is the call graph for this function:
|
Internal Trigger. This method Enables Internal Triggers with the given repeat frequency. Definition at line 238 of file TimModule.cxx. References loadBitSet(), loadFrequencyTrig(), and SctPixelRod::TIM_BIT_EN_INT_TRIG. |
Here is the call graph for this function:
|
Stop Internal Trigger. This method stops Internal Triggers. Definition at line 260 of file TimModule.cxx. References loadBitClear(), and SctPixelRod::TIM_BIT_EN_INT_TRIG. Referenced by SctApi::CrateImpl::stopTriggers(). |
Here is the call graph for this function:
|
Issue TIM command. This method issues a TIM command edge-mode bit - experimental! Definition at line 270 of file TimModule.cxx. References loadBitClear(), loadBitSet(), and SctPixelRod::TIM_VSPA. Referenced by issueVCAL(), and SctApi::CrateImpl::timL1A(). |
Here is the call graph for this function:
|
Issue VCAL + L1A command. This method issues a VME CAL command followed by an L1A, after the given pipeline delay. Definition at line 283 of file TimModule.cxx. References issueCommand(), loadByteLo(), and SctPixelRod::TIM_VCAL. Referenced by SctApi::CrateImpl::timCalL1A(). |
Here is the call graph for this function:
|
Clear bit. This method clears the bits set in a 16-bit bit mask into a VME register, leaving the other bits unchanged. Definition at line 307 of file TimModule.cxx. References vmeFetch(), and vmeLoad(). Referenced by intTrigStop(), issueCommand(), SctApi::CrateImpl::sendTimBurst(), SctApi::CrateImpl::timL1A(), and SctApi::CrateImpl::timRunSequence(). |
Here is the call graph for this function:
|
Set bit. This method writes the bits set in a 16-bit bit mask into a VME register, leaving the other bits unchanged. Definition at line 295 of file TimModule.cxx. References vmeFetch(), and vmeLoad(). Referenced by SctApi::CrateImpl::freeTriggers(), intTrigStart(), issueCommand(), SctApi::CrateImpl::sendTimBurst(), and SctApi::CrateImpl::timRunSequence(). |
Here is the call graph for this function:
|
Upper byte. This method writes a byte into the upper half of a 16-bit VME register, leaving the other byte unchanged. Definition at line 319 of file TimModule.cxx. References vmeFetch(), and vmeLoad(). Referenced by loadFrequencyFECR(), and SctApi::CrateImpl::modifyTIMParam(). |
Here is the call graph for this function:
|
Lower byte. This method writes a byte into the lower half of a 16-bit VME register, leaving the other byte unchanged. Definition at line 331 of file TimModule.cxx. References vmeFetch(), and vmeLoad(). Referenced by intTrigStart(), issueVCAL(), loadFrequencyTrig(), and SctApi::CrateImpl::modifyTIMParam(). |
Here is the call graph for this function:
|
Load FER/ECR frequency. This method loads the FER/ECR repeat frequency given in Hz. Definition at line 342 of file TimModule.cxx. References loadByteHi(). Referenced by initialize(), and SctApi::CrateImpl::timSetFrequency(). |
Here is the call graph for this function:
|
Load trigger frequency. This method loads the trigger repeat frequency given in kHz. Definition at line 365 of file TimModule.cxx. References loadByteLo(). Referenced by initialize(), intTrigStart(), and SctApi::CrateImpl::timSetFrequency(). |
Here is the call graph for this function:
|
This method waits until milliseconds of time elapses. Definition at line 388 of file TimModule.cxx. Referenced by regTimeout(). |
|
Read from a 16-bit VME register. This method reads a 16-bit value from a VME register. Definition at line 402 of file TimModule.cxx. References vmeFetch(). Referenced by fetchL1ID(), fetchTimID(), regTimeout(), SctApi::CrateImpl::sendTimBurst(), statusPrint(), SctApi::CrateImpl::timGetResetFrequency(), SctApi::CrateImpl::timGetTriggerFrequency(), SctApi::CrateImpl::timRegRead(), and SctApi::CrateImpl::timVerbose(). |
Here is the call graph for this function:
|
Write to a 16-bit VME register. This method writes a 16-bit value into a VME register. Definition at line 413 of file TimModule.cxx. References vmeLoad(). Referenced by initialize(), SctApi::CrateImpl::sendTimBurst(), seqRun(), setupTTC(), setupVME(), and SctApi::CrateImpl::timRegLoad(). |
Here is the call graph for this function:
|
This method waits for a given register value. Definition at line 423 of file TimModule.cxx. References msleep(), and regFetch(). Referenced by setupTTC(). |
Here is the call graph for this function:
|
This method issues a reset to the TIM and waits for the reset bit to clear. For TIM 3C, also check the PLLSTABLE bit. Definition at line 166 of file TimModule.cxx. Referenced by SctApi::CrateImpl::initialiseTim(). |
|
Read sequencer. This method reads the Sequencer memory into a buffer. Definition at line 454 of file TimModule.cxx. References SctPixelRod::TIM_SEQ_ADDR, and vmeFetch(). |
Here is the call graph for this function:
|
Load sequencer. This method writes a buffer into the Sequencer memory. Definition at line 466 of file TimModule.cxx. References SctPixelRod::TIM_SEQ_ADDR, and vmeLoad(). |
Here is the call graph for this function:
|
Run sequencer. This method starts the Sequencer executing. Definition at line 440 of file TimModule.cxx. References regLoad(). |
Here is the call graph for this function:
|
Setup TTC operation. This method configures the TIM into its TTC-mode state. Definition at line 480 of file TimModule.cxx. References regLoad(), regTimeout(), and SctPixelRod::TIM_BIT_EN_TTC. |
Here is the call graph for this function:
|
Setup VME operation. This method configures the TIM into its VME-mode state. Definition at line 497 of file TimModule.cxx. References regLoad(). Referenced by initialize(). |
Here is the call graph for this function:
|
This method reports the status of the TIM. For now, it simply prints to standard output. Definition at line 191 of file TimModule.cxx. References statusPrint(). Referenced by SctApi::CrateImpl::initialiseTim(). |
Here is the call graph for this function:
|
Print TIM status. This method reports the status of the TIM. Definition at line 510 of file TimModule.cxx. References fetchL1ID(), m_firmware, m_serialNumber, and regFetch(). Referenced by status(). |
Here is the call graph for this function:
|
Read from a 16-bit VME register. This method reads a 16-bit value from a VME register. Definition at line 530 of file TimModule.cxx. Referenced by loadBitClear(), loadBitSet(), loadByteHi(), loadByteLo(), regFetch(), and seqFetch(). |
|
Write to a 16-bit VME register. This method writes a 16-bit value into a VME register. Definition at line 556 of file TimModule.cxx. Referenced by loadBitClear(), loadBitSet(), loadByteHi(), loadByteLo(), regLoad(), and seqLoad(). |
|
Firmware version number.
Definition at line 159 of file TimModule.h. Referenced by fetchL1ID(), fetchTimID(), and statusPrint(). |
|
Board serial number.
Definition at line 160 of file TimModule.h. Referenced by fetchTimID(), statusPrint(), and TimModule(). |
|
VME Port handle.
Definition at line 161 of file TimModule.h. Referenced by TimModule(), and ~TimModule(). |