Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

SctPixelRod::TimModule Class Reference

TimModule: A derived class for VME TIM modules. More...

#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.


Detailed Description

TimModule: A derived class for VME TIM modules.

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.


Constructor & Destructor Documentation

SctPixelRod::TimModule::TimModule UINT32  baseAddr,
UINT32  mapSize,
VmeInterface &  vme
 

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.

SctPixelRod::TimModule::~TimModule  )  [virtual]
 

This deletes all its VME Ports.

Definition at line 128 of file TimModule.cxx.

References m_vmePort.


Member Function Documentation

UINT32 SctPixelRod::TimModule::fetchL1ID  ) 
 

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:

UINT16 SctPixelRod::TimModule::fetchTimID  ) 
 

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:

void SctPixelRod::TimModule::initialize  ) 
 

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:

void SctPixelRod::TimModule::intTrigStart const TimMaskFrequency  frequency  ) 
 

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:

void SctPixelRod::TimModule::intTrigStart const double  frequency  ) 
 

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:

void SctPixelRod::TimModule::intTrigStop void   ) 
 

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:

void SctPixelRod::TimModule::issueCommand const TimBitCommand  mask  ) 
 

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:

void SctPixelRod::TimModule::issueVCAL const UINT8  pipelineDelay  ) 
 

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:

void SctPixelRod::TimModule::loadBitClear const TimRegister  addr,
const UINT16  mask
 

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:

void SctPixelRod::TimModule::loadBitSet const TimRegister  addr,
const UINT16  mask
 

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:

void SctPixelRod::TimModule::loadByteHi const TimRegister  addr,
const UINT8  byte
 

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:

void SctPixelRod::TimModule::loadByteLo const TimRegister  addr,
const UINT8  byte
 

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:

void SctPixelRod::TimModule::loadFrequencyFECR const double  frequency  ) 
 

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:

void SctPixelRod::TimModule::loadFrequencyTrig const double  frequency  ) 
 

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:

void SctPixelRod::TimModule::msleep const double  milliSecs  ) 
 

This method waits until milliseconds of time elapses.

Definition at line 388 of file TimModule.cxx.

Referenced by regTimeout().

UINT16 SctPixelRod::TimModule::regFetch const TimRegister  addr  ) 
 

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:

void SctPixelRod::TimModule::regLoad const TimRegister  addr,
const UINT16  data
 

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:

int SctPixelRod::TimModule::regTimeout const TimRegister  addr,
const int  mask1,
const int  mask2,
const int  timeout
 

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:

void SctPixelRod::TimModule::reset  )  throw (TimException &)
 

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().

void SctPixelRod::TimModule::seqFetch const UINT16  size,
UINT16  buffer[]
 

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:

void SctPixelRod::TimModule::seqLoad const UINT16  size,
const UINT16  buffer[]
 

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:

void SctPixelRod::TimModule::seqRun const UINT16  size  ) 
 

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:

void SctPixelRod::TimModule::setupTTC  ) 
 

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:

void SctPixelRod::TimModule::setupVME  ) 
 

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:

void SctPixelRod::TimModule::status  ) 
 

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:

void SctPixelRod::TimModule::statusPrint std::ostream &  os  ) 
 

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:

UINT16 SctPixelRod::TimModule::vmeFetch const UINT32  addr  )  throw (VmeException &)
 

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().

void SctPixelRod::TimModule::vmeLoad const UINT32  addr,
const UINT16  data
throw (VmeException &)
 

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().


Field Documentation

UINT32 SctPixelRod::TimModule::m_firmware [private]
 

Firmware version number.

Definition at line 159 of file TimModule.h.

Referenced by fetchL1ID(), fetchTimID(), and statusPrint().

UINT32 SctPixelRod::TimModule::m_serialNumber [private]
 

Board serial number.

Definition at line 160 of file TimModule.h.

Referenced by fetchTimID(), statusPrint(), and TimModule().

VmePort* SctPixelRod::TimModule::m_vmePort [private]
 

VME Port handle.

Definition at line 161 of file TimModule.h.

Referenced by TimModule(), and ~TimModule().


The documentation for this class was generated from the following files:
Generated on Thu Dec 22 20:23:32 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5