Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

SctPixelRod::TimModule Class Reference

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

#include <TimModule.h>

Inheritance diagram for SctPixelRod::TimModule:

Inheritance graph
[legend]
Collaboration diagram for SctPixelRod::TimModule:

Collaboration graph
[legend]
List of all members.

Public Methods

 TimModule (UINT32 baseAddr, UINT32 mapSize, VmeInterface &ourInterface)
 This is the only constructor to use. More...

virtual ~TimModule ()
UINT32 getFirmware ()
UINT32 getSerialNumber ()
VmePort * getVmePort ()
void initialize ()
void reset ()
void status ()
UINT32 fetchL1ID ()
 Read trigger number. More...

UINT16 fetchTimID ()
 Read TIM ID register. More...

void intTrigStart (const TimMaskFrequency frequency)
 Internal Trigger. More...

void intTrigStop ()
 Stop Internal Trigger. More...

void issueCommand (const TimBitCommand mask)
 Issue TIM command. More...

void issueVCAL (const UINT8 pipelineDelay)
 Issue VCAL + L1A command. More...

void loadBitClear (const TimRegister addr, const UINT16 mask)
 Clear bit. More...

void loadBitSet (const TimRegister addr, const UINT16 mask)
 Set bit. More...

void loadByteHi (const TimRegister addr, const UINT8 byte)
 Upper byte. More...

void loadByteLo (const TimRegister addr, const UINT8 byte)
 Lower byte. More...

UINT16 regFetch (const TimRegister addr)
 Read from a 16-bit VME register. More...

void regLoad (const TimRegister addr, const UINT16 data)
 Write to a 16-bit VME register. More...

void seqFetch (const UINT16 size, UINT16 buffer[])
 Read sequencer. More...

void seqLoad (const UINT16 size, const UINT16 buffer[])
 Load sequencer. More...

void seqRun (const UINT16 size)
 Run sequencer. More...

UINT16 vmeFetch (const UINT32 addr) throw (VmeException &)
 Read from a 16-bit VME register. More...

void vmeLoad (const UINT32 addr, const UINT16 data) throw (VmeException &)
 Write to a 16-bit VME register. More...


Private Attributes

UINT32 m_firmware
 Firmware version number. More...

UINT32 m_serialNumber
 Board serial number. More...

VmePort * m_vmePort
 VME Port handle. More...


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 76 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 69 of file TimModule.cxx.

References baseAddr, m_serialNumber, m_vmePort, mapSize, and vme.

SctPixelRod::TimModule::~TimModule   [virtual]
 

This deletes all its VME Ports.

Definition at line 95 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 154 of file TimModule.cxx.

References m_firmware, regFetch, SctPixelRod::TIM_REG_TRIGGER_IDHI, and SctPixelRod::TIM_REG_TRIGGER_IDLO.

Referenced by status.

UINT16 SctPixelRod::TimModule::fetchTimID  
 

Read TIM ID register.

This method reads the TIM ID register.

Definition at line 170 of file TimModule.cxx.

References m_firmware, m_serialNumber, regFetch, and SctPixelRod::TIM_REG_TIM_ID.

Referenced by initialize.

UINT32 SctPixelRod::TimModule::getFirmware   [inline]
 

Definition at line 89 of file TimModule.h.

References m_firmware.

UINT32 SctPixelRod::TimModule::getSerialNumber   [inline]
 

Definition at line 90 of file TimModule.h.

References m_serialNumber.

VmePort* SctPixelRod::TimModule::getVmePort   [inline]
 

Definition at line 91 of file TimModule.h.

References m_vmePort.

void SctPixelRod::TimModule::initialize  
 

This method configures the TIM into its initialized state.

Definition at line 110 of file TimModule.cxx.

References fetchTimID, regLoad, SctPixelRod::TIM_BCID_OFFSET, SctPixelRod::TIM_BIT_EN_ID, SctPixelRod::TIM_BIT_EN_TYPE, SctPixelRod::TIM_REG_COMMAND, SctPixelRod::TIM_REG_RUN_ENABLES, and SctPixelRod::TIM_REG_TRIGGER_BCID.

void SctPixelRod::TimModule::intTrigStart const TimMaskFrequency    frequency
 

Internal Trigger.

This method Enables Internal Triggers with the given repeat frequency.

Definition at line 184 of file TimModule.cxx.

References loadBitSet, loadByteLo, SctPixelRod::TIM_BIT_EN_INT_TRIG, SctPixelRod::TIM_REG_ENABLES, SctPixelRod::TIM_REG_FREQUENCY, and SctPixelRod::TimMaskFrequency.

void SctPixelRod::TimModule::intTrigStop void   
 

Stop Internal Trigger.

This method stops Internal Triggers.

Definition at line 195 of file TimModule.cxx.

References loadBitClear, SctPixelRod::TIM_BIT_EN_INT_TRIG, and SctPixelRod::TIM_REG_ENABLES.

void SctPixelRod::TimModule::issueCommand const TimBitCommand    mask
 

Issue TIM command.

This method issues a TIM command edge-mode bit - experimental!

Definition at line 205 of file TimModule.cxx.

References loadBitClear, loadBitSet, SctPixelRod::TIM_REG_COMMAND, SctPixelRod::TIM_VSPA, and SctPixelRod::TimBitCommand.

Referenced by issueVCAL.

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 218 of file TimModule.cxx.

References issueCommand, loadByteLo, SctPixelRod::TIM_REG_DELAY, and SctPixelRod::TIM_VCAL.

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 242 of file TimModule.cxx.

References SctPixelRod::TimRegister, vmeFetch, and vmeLoad.

Referenced by intTrigStop, and issueCommand.

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 230 of file TimModule.cxx.

References SctPixelRod::TimRegister, vmeFetch, and vmeLoad.

Referenced by intTrigStart, and issueCommand.

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 254 of file TimModule.cxx.

References SctPixelRod::TimRegister, vmeFetch, and vmeLoad.

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 266 of file TimModule.cxx.

References SctPixelRod::TimRegister, vmeFetch, and vmeLoad.

Referenced by intTrigStart, and issueVCAL.

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 277 of file TimModule.cxx.

References SctPixelRod::TimRegister, and vmeFetch.

Referenced by fetchL1ID, fetchTimID, and status.

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 288 of file TimModule.cxx.

References SctPixelRod::TimRegister, and vmeLoad.

Referenced by initialize, reset, and seqRun.

void SctPixelRod::TimModule::reset  
 

This method issues a reset to the TIM.

Definition at line 124 of file TimModule.cxx.

References regLoad, SctPixelRod::TIM_BIT_VRESET, and SctPixelRod::TIM_REG_COMMAND.

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

Read sequencer.

This method reads the Sequencer memory into a buffer.

Definition at line 312 of file TimModule.cxx.

References SctPixelRod::TIM_SEQ_ADDR, and vmeFetch.

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

Load sequencer.

This method writes a buffer into the Sequencer memory.

Definition at line 324 of file TimModule.cxx.

References SctPixelRod::TIM_SEQ_ADDR, and vmeLoad.

void SctPixelRod::TimModule::seqRun const UINT16    size
 

Run sequencer.

This method starts the Sequencer executing.

Definition at line 298 of file TimModule.cxx.

References regLoad, SctPixelRod::TIM_BIT_SEQ_EN_ALL, SctPixelRod::TIM_BIT_SEQ_GO, SctPixelRod::TIM_BIT_SEQ_RESET, SctPixelRod::TIM_REG_SEQ_CONTROL, and SctPixelRod::TIM_REG_SEQ_END.

void SctPixelRod::TimModule::status  
 

This method reports the status of the TIM. For now, it simply prints to standard output.

Definition at line 135 of file TimModule.cxx.

References fetchL1ID, m_firmware, m_serialNumber, regFetch, SctPixelRod::TIM_REG_STATUS, and SctPixelRod::TIM_REG_TRIGGER_BCID.

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 338 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 357 of file TimModule.cxx.

Referenced by loadBitClear, loadBitSet, loadByteHi, loadByteLo, regLoad, and seqLoad.


Member Data Documentation

UINT32 SctPixelRod::TimModule::m_firmware [private]
 

Firmware version number.

Definition at line 131 of file TimModule.h.

Referenced by fetchL1ID, fetchTimID, getFirmware, and status.

UINT32 SctPixelRod::TimModule::m_serialNumber [private]
 

Board serial number.

Definition at line 132 of file TimModule.h.

Referenced by fetchTimID, getSerialNumber, status, and TimModule.

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

VME Port handle.

Definition at line 133 of file TimModule.h.

Referenced by getVmePort, TimModule, and ~TimModule.


The documentation for this class was generated from the following files:
Generated on Sun Jun 27 19:57:37 2004 for TimModule by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002