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

SctPixelRod::BocCard Class Reference

BocCard: A class for setting-up etc. the BOC. This class contains the methods to set up a BOC. The name BocCard was chosen because the possibly more obvious "BocModule" implies that this class is derived from VmeModule. In fact it relies on RodModule for the interface to the BOC. More...

#include <BocCard.h>

Collaboration diagram for SctPixelRod::BocCard:

Collaboration graph
[legend]

Public Member Functions

 BocCard (RodModule &rod)
UINT32 getSerialNumber ()
UINT32 getManufacturer ()
UINT32 getModuleType ()
UINT32 getHardwareRevision ()
UINT32 getFirmwareRevision ()
RodModulegetRod ()
void initialize ()
void reset ()
void status ()
void getLaserCurrent (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
UINT32 getLaserCurrent (const UINT32 channel) throw (BocException&)
void setLaserCurrent (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
void setLaserCurrent (const UINT32 channel, const UINT32 value) throw (BocException&)
void getRxThreshold (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
UINT32 getRxThreshold (const UINT32 channel) throw (BocException&)
void setRxThreshold (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
void setRxThreshold (const UINT32 channel, const UINT32 value) throw (BocException&)
void getRxDataDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
UINT32 getRxDataDelay (const UINT32 channel) throw (BocException&)
void setRxDataDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
void setRxDataDelay (const UINT32 channel, const UINT32 value) throw (BocException&)
void getStrobeDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
UINT32 getStrobeDelay (const UINT32 channel) throw (BocException&)
void setStrobeDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
void setStrobeDelay (const UINT32 channel, const UINT32 value) throw (BocException&)
void getBpmStreamInhibit (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
UINT32 getBpmStreamInhibit (const UINT32 channel) throw (BocException&)
void setBpmStreamInhibit (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
void setBpmStreamInhibit (const UINT32 channel, const UINT32 value) throw (BocException&)
void getBpmMarkSpace (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
UINT32 getBpmMarkSpace (const UINT32 channel) throw (BocException&)
void setBpmMarkSpace (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
void setBpmMarkSpace (const UINT32 channel, const UINT32 value) throw (BocException&)
void getBpmCoarseDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
UINT32 getBpmCoarseDelay (const UINT32 channel) throw (BocException&)
void setBpmCoarseDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
void setBpmCoarseDelay (const UINT32 channel, const UINT32 value) throw (BocException&)
void getBpmFineDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
UINT32 getBpmFineDelay (const UINT32 channel) throw (BocException&)
void setBpmFineDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&)
void setBpmFineDelay (const UINT32 channel, const UINT32 value) throw (BocException&)
UINT32 getClockControl ()
void setClockControl (const UINT32 value) throw (BocException&)
UINT32 getRxDataMode ()
void setRxDataMode (const UINT32 value) throw (BocException&)
UINT32 getRxDacClear ()
void clearRxDac ()
UINT32 getTxDacClear ()
void clearTxDac ()
UINT32 getVernierFinePhase ()
void setVernierFinePhase (const UINT32 value) throw (BocException&)
UINT32 getVernierClockPhase0 ()
void setVernierClockPhase0 (const UINT32 value) throw (BocException&)
UINT32 getVernierClockPhase1 ()
void setVernierClockPhase1 (const UINT32 value) throw (BocException&)
UINT32 getBpmClockPhase ()
void setBpmClockPhase (const UINT32 value) throw (BocException&)
UINT32 getBregClockPhase ()
void setBregClockPhase (const UINT32 value) throw (BocException&)
UINT32 getBocReset ()
void resetBoc ()
UINT32 getBpmReset ()
void resetBpm ()
UINT32 getVpinReset ()
void resetVpin ()
UINT32 getBocOkReset ()
void resetBocOk ()
UINT32 getBocStatusRegister ()
double getMonitorAdc (const UINT32 channel, std::string &units, std::string &type) throw (BocException&)
double getMonitorAdc (const UINT32 channel) throw (BocException&)
std::string getMonitorAdcUnits (const UINT32 channel) throw (BocException&)
std::string getMonitorAdcType (const UINT32 channel) throw (BocException&)
void resetMonitorAdc ()
UINT32 getInterlockStatus (UINT32 *localEnable, UINT32 *remoteEnable)
UINT32 getInterlockStatus ()

Private Member Functions

UINT32 singleRead (const UINT32 bocAddress) throw (BocException&)
 Read and write to single BOC registers.

void singleWrite (const UINT32 bocAddress, const UINT32 value) throw (BocException&)
void blockRead (const UINT32 bocAddress, UINT32 buffer[], const INT32 length)
 Read and write to a block of BOC registers.

void blockWrite (const UINT32 bocAddress, const UINT32 buffer[], const INT32 length)
UINT32 bpmRead (const UINT32 bpm, const UINT32 stream, const UINT32 offset)
 Read and write to BPM streams.

void bpmWrite (const UINT32 bpm, const UINT32 stream, const UINT32 offset, const UINT32 value)

Private Attributes

RodModulem_myrod
 Handle for the ROD through which this BOC is accessed.

UINT32 m_serialNumber
 BOC serial number (read in initialize method). Set on a pair of hex switches.

UINT32 m_manufacturer
 BOC manufacturer (read in initialize method). Should be 0xCB.

UINT32 m_moduleType
 BOC module type (read in initialize method).

UINT32 m_hardwareRevision
 BOC hardware revision (read in initialize method).

UINT32 m_firmwareRevision
 BOC firmware revision (read in initialize method).

UINT32 m_bocType
 BOC type.

UINT32 m_bocMask
 BOC setup bus mask.


Detailed Description

BocCard: A class for setting-up etc. the BOC. This class contains the methods to set up a BOC. The name BocCard was chosen because the possibly more obvious "BocModule" implies that this class is derived from VmeModule. In fact it relies on RodModule for the interface to the BOC.

Author:
John Hill (hill@hep.phy.cam.ac.uk) - originator

Definition at line 151 of file BocCard.h.


Member Function Documentation

void SctPixelRod::BocCard::blockRead const UINT32  bocAddress,
UINT32  buffer[],
const INT32  length
[private]
 

Read and write to a block of BOC registers.

UINT32 SctPixelRod::BocCard::bpmRead const UINT32  bpm,
const UINT32  stream,
const UINT32  offset
[private]
 

Read and write to BPM streams.

void SctPixelRod::BocCard::clearRxDac  ) 
 

clearRxDac() clears the Rx Dac register by writing 1 followed by 0 to the register. A method to write a specific value to the register is not provided, as this is not a meaningful operation for the user.

void SctPixelRod::BocCard::clearTxDac  ) 
 

clearTxDac() clears the Tx Dac register by writing 1 followed by 0 to the register. A method to write a specific value to the register is not provided, as this is not a meaningful operation for the user.

UINT32 SctPixelRod::BocCard::getBocOkReset  ) 
 

getBocOkReset() reads the contents of the BOC_OK Reset register.

UINT32 SctPixelRod::BocCard::getBocReset  ) 
 

getBocReset() reads the contents of the BOC Reset register.

UINT32 SctPixelRod::BocCard::getBocStatusRegister  ) 
 

getBocStatusRegister() reads the contents of the BOC Status register. This is a readonly register, hence there is no "set" method provided.

UINT32 SctPixelRod::BocCard::getBpmClockPhase  ) 
 

getBpmClockPhase() reads the contents of the BPM Clock Phase register.

void SctPixelRod::BocCard::getBpmCoarseDelay const UINT32  channel,
UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

getBpmCoarseDelay() reads the contents of one or more BPM coarse delay registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

void SctPixelRod::BocCard::getBpmFineDelay const UINT32  channel,
UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

getBpmFineDelay() reads the contents of one or more BPM fine delay registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

void SctPixelRod::BocCard::getBpmMarkSpace const UINT32  channel,
UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

getBpmMarkSpace() reads the contents of one or more BPM mark/space registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

UINT32 SctPixelRod::BocCard::getBpmReset  ) 
 

getBpmReset() reads the contents of the BPM Reset register.

void SctPixelRod::BocCard::getBpmStreamInhibit const UINT32  channel,
UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

getBpmStreamInhibit() reads the contents of one or more BPM stream inhibit registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

UINT32 SctPixelRod::BocCard::getBregClockPhase  ) 
 

getBregClockPhase() reads the contents of the BREG Clock Phase register.

UINT32 SctPixelRod::BocCard::getClockControl  ) 
 

getClockControl() reads the contents of the Clock Control register.

UINT32 SctPixelRod::BocCard::getInterlockStatus UINT32 *  localEnable,
UINT32 *  remoteEnable
 

getInterlockStatus() returns the status of the laser interlocks. The returned value is 0 if there is an interlock, 1 if not. The relevant bits on the status register are used. The state of the local enable and remote enable can be returned in the arguments, to give extra information if required - the method is overloaded so that the user can avoid this complication if necessary.

void SctPixelRod::BocCard::getLaserCurrent const UINT32  channel,
UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

getLaserCurrent() reads the contents of one or more Tx laser current DACs. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value.

double SctPixelRod::BocCard::getMonitorAdc const UINT32  channel,
std::string &  units,
std::string &  type
throw (BocException&)
 

getMonitorAdc() gets the reading for a single channel of the monitoring ADC on the BOC. The returned value is in "natural" units: mA for current, V for voltage and degrees C for temperature. The method is now (11 March 2004) overloaded to provide the units and type of quantity monitored if desired.

std::string SctPixelRod::BocCard::getMonitorAdcType const UINT32  channel  )  throw (BocException&)
 

getMonitorAdcType() returns the type of information monitored (PIN current, PIN voltage or temperature).

std::string SctPixelRod::BocCard::getMonitorAdcUnits const UINT32  channel  )  throw (BocException&)
 

getMonitorAdcUnits() returns the units in which the channel monitoring is reported by getMonitorAdc().

UINT32 SctPixelRod::BocCard::getRxDacClear  ) 
 

getRxDacClear() reads the contents of the Rx Dac Clear register.

void SctPixelRod::BocCard::getRxDataDelay const UINT32  channel,
UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

getRxDataDelay() reads the contents of one or more Rx data delay registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value.

UINT32 SctPixelRod::BocCard::getRxDataMode  ) 
 

getRxDataMode() reads the contents of the Data Mode register.

void SctPixelRod::BocCard::getRxThreshold const UINT32  channel,
UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

getRxThreshold() reads the contents of one or more Rx threshold DACs. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value.

void SctPixelRod::BocCard::getStrobeDelay const UINT32  channel,
UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

getStrobeDelay() reads the contents of one or more strobe delay registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value. Note that these registers no longer do anything that is of practical use - the methods are retained for completeness and might be made private at a later date.

UINT32 SctPixelRod::BocCard::getTxDacClear  ) 
 

getTxDacClear() reads the contents of the Tx Dac Clear register.

UINT32 SctPixelRod::BocCard::getVernierClockPhase0  ) 
 

getVernierClockPhase0() reads the contents of the Vernier Clock Phase register 0. This is one of two clock phase registers allowing the user to set a delay of up to 50 nsec.

UINT32 SctPixelRod::BocCard::getVernierClockPhase1  ) 
 

getVernierClockPhase1() reads the contents of the Vernier Clock Phase register 1. This is one of two clock phase registers allowing the user to set a delay of up to 50 nsec.

UINT32 SctPixelRod::BocCard::getVernierFinePhase  ) 
 

getVernierFinePhase() reads the contents of the Vernier Fine Phase register.

UINT32 SctPixelRod::BocCard::getVpinReset  ) 
 

getVpinReset() reads the contents of the Vpin Reset register.

void SctPixelRod::BocCard::initialize  ) 
 

initialize() sets the BOC into a well-defined state. Power-on should set the BOC into much the same state, but we may wish to do this to recover that state without power cycling.

Activities: Reset the BOC Read the read-only registers Set clock registers Initialize the I2C busses by writing to each in turn Set 0xFF into the Rx thresholds Set 0x00 into the data delays, strobe delays and laser current DACs Reset the BPM12 chips Set the defaults values for the BPM12 chips (including the test structures).

void SctPixelRod::BocCard::reset  ) 
 

reset() issues a reset to all parts of the BOC.

void SctPixelRod::BocCard::resetBoc  ) 
 

resetBoc() resets the BOC by writing 1 followed by 0 to the Reset register. A method to write a specific value to the register is not provided as this would not be a useful operation.

void SctPixelRod::BocCard::resetBocOk  ) 
 

resetBocOk() resets the BOC_OK register on the BOC by writing 1 followed by 0 to the BOC_OK Reset register. A method to write a specific value to the register is not provided as this would not be a useful operation.

void SctPixelRod::BocCard::resetBpm  ) 
 

resetBpm() resets the BPM registers on the BOC by writing 1 followed by 0 to the BPM Reset register. A method to write a specific value to the register is not provided as this would not be a useful operation.

void SctPixelRod::BocCard::resetMonitorAdc  ) 
 

resetMonitorAdc() initialises the monitoring ADC chip. This is done in the initialisation method, but can be redone any time.

void SctPixelRod::BocCard::resetVpin  ) 
 

resetVpin() resets the Vpin register on the BOC by writing 1 followed by 0 to the Vpin Reset register. A method to write a specific value to the register is not provided as this would not be a useful operation.

void SctPixelRod::BocCard::setBpmClockPhase const UINT32  value  )  throw (BocException&)
 

setBpmClockPhase() writes the contents of the BPM Clock Phase register.

void SctPixelRod::BocCard::setBpmCoarseDelay const UINT32  channel,
const UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

setBpmCoarseDelay() writes the contents of one or more BPM coarse delay registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

void SctPixelRod::BocCard::setBpmFineDelay const UINT32  channel,
const UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

setBpmFineDelay() writes the contents of one or more BPM fine delay registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

void SctPixelRod::BocCard::setBpmMarkSpace const UINT32  channel,
const UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

setBpmMarkSpace() writes the contents of one or more BPM mark/space registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

void SctPixelRod::BocCard::setBpmStreamInhibit const UINT32  channel,
const UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

setBpmStreamInhibit() writes the contents of one or more BPM stream inhibit registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

void SctPixelRod::BocCard::setBregClockPhase const UINT32  value  )  throw (BocException&)
 

setBregClockPhase() writes the contents of the BREG Clock Phase register.

void SctPixelRod::BocCard::setClockControl const UINT32  value  )  throw (BocException&)
 

setClockControl() writes the contents of the Clock Control register.

void SctPixelRod::BocCard::setLaserCurrent const UINT32  channel,
const UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

setLaserCurrent() writes the contents of one or more Tx laser current DACs. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel.

void SctPixelRod::BocCard::setRxDataDelay const UINT32  channel,
const UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

setRxDataDelay() writes the contents of one or more Rx data delay registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel.

void SctPixelRod::BocCard::setRxDataMode const UINT32  value  )  throw (BocException&)
 

setRxDataMode() writes the contents of the Data Mode register.

void SctPixelRod::BocCard::setRxThreshold const UINT32  channel,
const UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

setRxThreshold() writes the contents of one or more Rx threshold DACs. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel.

void SctPixelRod::BocCard::setStrobeDelay const UINT32  channel,
const UINT32  buffer[],
const UINT32  numChannels
throw (BocException&)
 

setStrobeDelay() writes the contents of one or more strobe delay registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel. Note that these registers no longer do anything that is of practical use - the methods are retained for completeness and might be made private at a later date.

void SctPixelRod::BocCard::setVernierClockPhase0 const UINT32  value  )  throw (BocException&)
 

setVernierClockPhase0() writes the contents of the Vernier Clock Phase register 0. This is one of two clock phase registers allowing the user to set a delay of up to 50 nsec.

void SctPixelRod::BocCard::setVernierClockPhase1 const UINT32  value  )  throw (BocException&)
 

setVernierClockPhase1() writes the contents of the Vernier Clock Phase register 1. This is one of two clock phase registers allowing the user to set a delay of up to 50 nsec.

void SctPixelRod::BocCard::setVernierFinePhase const UINT32  value  )  throw (BocException&)
 

setVernierFinePhase() writes the contents of the Vernier Fine Phase register.

UINT32 SctPixelRod::BocCard::singleRead const UINT32  bocAddress  )  throw (BocException&) [private]
 

Read and write to single BOC registers.


Field Documentation

UINT32 SctPixelRod::BocCard::m_bocMask [private]
 

BOC setup bus mask.

This is the maximum width of any data to be read or written via the setup bus.

Definition at line 633 of file BocCard.h.

UINT32 SctPixelRod::BocCard::m_bocType [private]
 

BOC type.

This identifies the different BOC revisions, deduced from the upper 3 bits of the Hardware Revision register (modified 3 March 2004).

Definition at line 629 of file BocCard.h.

UINT32 SctPixelRod::BocCard::m_firmwareRevision [private]
 

BOC firmware revision (read in initialize method).

Definition at line 624 of file BocCard.h.

UINT32 SctPixelRod::BocCard::m_hardwareRevision [private]
 

BOC hardware revision (read in initialize method).

This variable holds the lower 5 bits of the register only now.

Definition at line 620 of file BocCard.h.

UINT32 SctPixelRod::BocCard::m_manufacturer [private]
 

BOC manufacturer (read in initialize method). Should be 0xCB.

Definition at line 611 of file BocCard.h.

UINT32 SctPixelRod::BocCard::m_moduleType [private]
 

BOC module type (read in initialize method).

Definition at line 615 of file BocCard.h.

RodModule* SctPixelRod::BocCard::m_myrod [private]
 

Handle for the ROD through which this BOC is accessed.

Definition at line 603 of file BocCard.h.

UINT32 SctPixelRod::BocCard::m_serialNumber [private]
 

BOC serial number (read in initialize method). Set on a pair of hex switches.

Definition at line 607 of file BocCard.h.


The documentation for this class was generated from the following file:
Generated on Thu Jul 15 09:54:03 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5