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

SctPixelRod::RodModule Class Reference

RodModule: This is a derived class providing the software interface for VME ROD modules. More...

#include <RodModule.h>

Collaboration diagram for SctPixelRod::RodModule:

Collaboration graph
[legend]

Public Member Functions

 RodModule (unsigned long baseAddr, unsigned long mapSize, VmeInterface &ourInterface, long numSlaves) throw (RodException&, VmeException &)
unsigned long getBaseAddress ()
long getSlot () const
unsigned long getSerialNumber ()
unsigned long getRevision ()
void setNumSlaves (long numSlaves)
long getNumSlaves () const
void setFinBufferSize (long finBufferSize)
long getFinBufferSize () const
std::string getMasterImageName ()
std::string getslaveIpramName (long slaveNum)
std::string getslaveIdramName (long slaveNum)
std::string getslaveExtName (long slaveNum)
unsigned long getVmeCommandRegVal (long regNum)
VmePort * getVmePort ()
void setBoc (BocCard *myBoc)
BocCardgetBocCard ()
void setOutList (RodOutList *outList)
RodOutListgetOutList ()
PrimState getPrimState ()
TextBuffState getTextState ()
long getMode ()
long getOverwrite ()
long getOverflow ()
long getWrap ()
TEXT_BUFFER_TYPE getTextBufferType ()
void initialize ()
void initialize (bool resetFlag) throw (RodException &, VmeException &)
void reset () throw (RodException&, VmeException &)
void status () throw ()
void status (std::ostream &oss) throw ()
bool verify () throw ()
void initSlaveDsp (const std::string &ipramFile, const std::string &idramFile, const std::string &extFile, const long slaveNumber, char opt='n') throw (RodException&, NoImageFile&, VmeException &)
void loadSlaveImage (const std::string &filename, const unsigned long address, const long slaveNumber, char opt='n') throw (NoImageFile &, RodException &, VmeException &)
void startSlave (const long slaveNumber, char mode='s') throw (RodException &, VmeException &)
void synchSendPrim (RodPrimitive &prim) throw (RodException &, VmeException &)
void sendPrimList (RodPrimList *l) throw (PrimListException &, VmeException &)
PrimState primHandler () throw (RodException &, VmeException &)
bool getDspAck ()
 Get DspAck bit.

void setInListReady ()
 Set InListReady bit.

void deleteOutList () throw ()
 Delete reply buffer object.

long getAllTextBuffBits ()
TextBuffState textHandler () throw (VmeException &)
void getTextBuffer (char *buffer, long &length, TEXT_BUFFER_TYPE &type) throw ()
void clearTextBuffer () throw ()
unsigned long readRodStatusReg (long regNumber)
 Inline method to read one ROD Status Register via HPI.

unsigned long readRodCommandReg (long regNumber)
 Inline method to read one ROD Command Register via HPI.

bool readRodStatusBit (long regNumber, long bitNumber)
 Inline method to read one ROD Status Register Bit via HPI.

void setVmeCommandRegBit (const long bitNumber)
 Inline method to set VmeCommand Register Bit.

void clearVmeCommandRegBit (const long bitNumber)
 Inline method to clear VmeCommand Register Bit.

void hpiLoad (const unsigned long hpiReg, const unsigned long hpiValue) throw (VmeException &)
unsigned long hpiFetch (const unsigned long hpiReg) throw (VmeException &)
unsigned long mdspSingleRead (const unsigned long dspAddr) throw (VmeException &)
void mdspSingleWrite (unsigned long dspAddr, unsigned long buffer) throw (VmeException &)
void mdspBlockRead (const unsigned long dspAddr, unsigned long *buffer, long wordCount, HpidMode mode=DYNAMIC) throw (HpiException &, VmeException &)
void mdspBlockWrite (const unsigned long dspAddr, unsigned long *buffer, long wordCount, HpidMode mode=DYNAMIC) throw (HpiException &, VmeException &)
void mdspBlockDump (const unsigned long firstAddress, const unsigned long lastAddress, const std::string &fileName) throw (RodException &, VmeException &)
void slvHpiLoad (unsigned long hpiReg, unsigned long hpiValue, long slaveNum) throw (VmeException &)
unsigned long slvHpiFetch (unsigned long hpiReg, long slaveNum) throw (VmeException &)
unsigned long slvSingleRead (unsigned long dspAddr, long slaveNum) throw (VmeException &)
void slvSingleWrite (unsigned long dspAddr, unsigned long buffer, long slaveNum) throw (VmeException &)
void slvBlockRead (const unsigned long dspAddr, unsigned long buffer[], const long wordCount, long slaveNum, HpidMode mode=DYNAMIC) throw (HpiException &, VmeException &)
void slvBlockWrite (unsigned long dspAddr, unsigned long buffer[], const long wordCount, long slaveNum, HpidMode mode=DYNAMIC) throw (HpiException &, VmeException &)
void resetMasterDsp () throw (RodException &, VmeException &)
void resetSlaveDsp (long slaveNumber) throw (RodException &, VmeException &)
void resetAllDsps () throw (RodException &, VmeException &)
void chipEraseHpi () throw (VmeException &)
void sectorErase (unsigned long sectorBaseAddress) throw (RodException &, VmeException &)
void writeByteToFlash (unsigned long address, UINT8 data) throw (RodException &, VmeException &)
void writeBlockToFlash (unsigned long address, UINT8 *data, unsigned long numBytes) throw (RodException &, VmeException &)
void writeBlockToFlashHpi (unsigned long address, UINT8 *data, unsigned long numBytes) throw (RodException &, VmeException &)
UINT8 readByteFromFlash (unsigned long address, long updateAddress) throw (RodException &, VmeException &)
void vmeWriteElementFlash (UINT8 value, unsigned long address, long handshakeBit) throw (RodException &, VmeException &)
void readBlockFromFlash (unsigned long address, UINT8 *buffer, unsigned long numBytes) throw (RodException &, VmeException &)
void commonEraseCommands (unsigned long flashBaseAddr) throw (RodException &, VmeException &)
void commonEraseCommandsHpi (unsigned long flashBaseAddr) throw (VmeException &)
unsigned long getFlashSectorSize ()
void sleep (const double milliSecs)
unsigned long checkSum (const unsigned long *sourceArray, const long wordCount)
unsigned long endianReverse32 (const unsigned long inVal)

Private Member Functions

 RodModule (const RodModule &rhs)
RodModuleoperator= (const RodModule &rhs)
void setBit (unsigned long *var, long bitNumber)
 inline bit manipulation functions

void clearBit (unsigned long *var, long bitNumber)
bool readBit (unsigned long var, long bitNumber)

Private Attributes

long m_slot
 Slot number in VME crate.

unsigned long m_serialNumber
 Board serial number (read during init, dummy valued loaded by constructor.

unsigned long m_revision
 Board vesion (read during init, dummy value loaded by constructor).

VmePort * m_myVmePort
 VME Port handle.

long m_numSlaves
 Number of slave DSPs on this ROD.

long m_finBufferSize
 Size of file input buffer, in bytes. Default=4096 bytes, probably good enough.

std::string m_masterImageName
 string holding name of master image file

std::string m_slaveIpramName [4]
 string array holding names of slave IPRAM image files

std::string m_slaveIdramName [4]
 string array holding names of slave IDRAM image files

std::string m_slaveExtName [4]
 string array holding names of slave external image files

unsigned long m_vmeCommandReg [2]
 Cached copy of VME command registers and ROD status registers.

unsigned long m_rodStatusReg [3]
RodOutListm_myOutList
 A pointer to the array holding a reply buffer from a PrimList.

PrimState m_myPrimState
 State variable for sending primitive lists.

TextBuffState m_myTextState
 State variable for reading text buffers.

TEXT_BUFFER_TYPE m_textType
 Text buffer type.

TXTBUFFER m_txtBuffer
 A struct holding text buffer info from txtbuffer.h.

char m_textData [TEXT_BUFF_SIZE]
 A local buffer to hold the text data.

unsigned long * m_textBuff [N_TXT_BUFFS]
 Array of pointers to the text buffers in MasterDSP space.

BocCardm_myBoc
 BocCard handle.


Detailed Description

RodModule: This is a derived class providing the software interface for VME ROD modules.

This is the implementation of a ROD class derived from the VmeModules base class It should be the sole interface for VME communication with the ROD modules.

Author:
Tom Meyer (meyer@iastate.edu) - originator

Definition at line 126 of file RodDaq/RodCrate/RodModule.h.


Member Function Documentation

unsigned long SctPixelRod::RodModule::checkSum const unsigned long *  sourceArray,
const long  wordCount
 

checkSum() calculates a bit-wise XOR checksum on an array

Definition at line 1716 of file RodModule.cxx.

void SctPixelRod::RodModule::chipEraseHpi  )  throw (VmeException &)
 

chipEraseHpi(VmeException &) erases the master program flash memory chip.

Definition at line 1350 of file RodModule.cxx.

void SctPixelRod::RodModule::clearTextBuffer  )  throw ()
 

clearTextBuffer() clears a text buffer so it can be reused.

Definition at line 825 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::doTextBuffer(), and SctApi::CrateImpl::getRodMessage().

void SctPixelRod::RodModule::clearVmeCommandRegBit const long  bitNumber  )  [inline]
 

Inline method to clear VmeCommand Register Bit.

Definition at line 322 of file RodDaq/RodCrate/RodModule.h.

References m_vmeCommandReg, and mdspSingleWrite().

Referenced by SctApi::CrateImpl::primListControl().

Here is the call graph for this function:

void SctPixelRod::RodModule::commonEraseCommands unsigned long  flashBaseAddr  )  throw (RodException &, VmeException &)
 

commonEraseCommands() implements common erase commands for the FPGA flash.

Definition at line 1627 of file RodModule.cxx.

void SctPixelRod::RodModule::commonEraseCommandsHpi unsigned long  flashBaseAddr  )  throw (VmeException &)
 

commonEraseCommandsHpi() implements common erase commands for the master program flash.

Definition at line 1653 of file RodModule.cxx.

void SctPixelRod::RodModule::deleteOutList  )  throw ()
 

Delete reply buffer object.

Definition at line 735 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::getResponse(), and SctApi::CrateImpl::sendPrimList().

unsigned long SctPixelRod::RodModule::endianReverse32 const unsigned long  inVal  ) 
 

endianReverse32( reverses the endian-ness of a 32 bit value

Definition at line 1728 of file RodModule.cxx.

long SctPixelRod::RodModule::getAllTextBuffBits  )  [inline]
 

getAllTextBuffBits() reads all four text_buffer_not_empty bits at once, do if checkAllTextBuffs returns a TRUE value.

Definition at line 268 of file RodDaq/RodCrate/RodModule.h.

References readRodStatusReg().

Here is the call graph for this function:

bool SctPixelRod::RodModule::getDspAck  )  [inline]
 

Get DspAck bit.

Definition at line 257 of file RodDaq/RodCrate/RodModule.h.

References readRodStatusBit().

Here is the call graph for this function:

unsigned long SctPixelRod::RodModule::getFlashSectorSize  ) 
 

getFlashSectorSize() test the board revision and returns the correct value for the flash sector size.

Definition at line 1685 of file RodModule.cxx.

References m_revision.

void SctPixelRod::RodModule::getTextBuffer char *  buffer,
long &  length,
TEXT_BUFFER_TYPE &  type
throw ()
 

getTextBuffer() reads a complete text buffer into destBuffer. Buffnumber is 0 for ERR buffer, 1 for INFO buffer, 2 for DIAG buffer, and 3 for the XFER buffer. This function should be called only if checkAllTextBits shows the corresponding bit set in Status Register 0.

Definition at line 813 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::doTextBuffer(), and SctApi::CrateImpl::getRodMessage().

unsigned long SctPixelRod::RodModule::hpiFetch const unsigned long  hpiReg  )  throw (VmeException &)
 

hpiFetch() fetches a 32-bit value from one of the HPI registers. Although the HPI has a 16-bit data path, we use a 32-bit VME access, with the ROD firmware doing the necessary conversion.

Definition at line 843 of file RodModule.cxx.

void SctPixelRod::RodModule::hpiLoad const unsigned long  hpiReg,
const unsigned long  hpiValue
throw (VmeException &)
 

hpiLoad() loads a 32-bit value into the HPIA or HPID register. Although the HPI has a 16-bit data path, we use a 32-bit VME access and the word is broken into two 16-bit values in the ROD firmware.

Definition at line 834 of file RodModule.cxx.

void SctPixelRod::RodModule::initialize  ) 
 

initialize() performs all actions necessary to place a properly loaded ROD in its initialized state, except for initializing the slave DSPs. This must be done separately using initSlaveDsp().

Activities: Reset the ROD Read ROD serial number Load 0x000l000l into Master DSP HPIC register. (Says low order 16-bit word comes first) Read back HPIC to verify Retrieve pointers to text buffer structs Initialize PrimList and TextBuff state variables

Definition at line 192 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::initialiseRod().

void SctPixelRod::RodModule::initSlaveDsp const std::string &  ipramFile,
const std::string &  idramFile,
const std::string &  extFile,
const long  slaveNumber,
char  opt = 'n'
throw (RodException&, NoImageFile&, VmeException &)
 

initSlaveDsp() initializes a given slave DSP. Activities:

  • set HPIC to make first halfword most significant
  • load the binary images for IPRAM, IDRAM, and external memory
  • start the slave executing. This should start flashing the green front panel LED for this slave.

Definition at line 421 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::initialiseRod().

void SctPixelRod::RodModule::loadSlaveImage const std::string &  filename,
const unsigned long  address,
const long  slaveNumber,
char  opt = 'n'
throw (NoImageFile &, RodException &, VmeException &)
 

loadSlaveImage() reads a binary file from disk and loads it into the slave memory space at the specified location. Usually, the optional last argument should be omitted.

Definition at line 466 of file RodModule.cxx.

void SctPixelRod::RodModule::mdspBlockDump const unsigned long  firstAddress,
const unsigned long  lastAddress,
const std::string &  fileName
throw (RodException &, VmeException &)
 

mdspBlockDump() reads a block of MDSP memory and write it to a binary file (debug use only)

Definition at line 1038 of file RodModule.cxx.

void SctPixelRod::RodModule::mdspBlockRead const unsigned long  dspAddr,
unsigned long *  buffer,
long  wordCount,
HpidMode  mode = DYNAMIC
throw (HpiException &, VmeException &)
 

mdspBlockRead() reads a block of size wordCount 32-bit words from the Master DSP SDRAM via its Host Port Interface (HPI). The present version uses a loop over single word reads instead of a block read.

Referenced by SctApi::CrateImpl::mdspBlockRead().

void SctPixelRod::RodModule::mdspBlockWrite const unsigned long  dspAddr,
unsigned long *  buffer,
long  wordCount,
HpidMode  mode = DYNAMIC
throw (HpiException &, VmeException &)
 

mdspBlockWrite() writes a buffer of wordCount 32-bit words to the Master DSP SDRAM via its Host Port Interface (HPI). The present version uses a loop over single word writes instead of a block write.

Referenced by SctApi::CrateImpl::mdspBlockWrite().

unsigned long SctPixelRod::RodModule::mdspSingleRead const unsigned long  dspAddr  )  throw (VmeException &)
 

mdspSingleRead() reads a single 32-bit word from the Master DSP SDRAM via its Host Port Interface (HPI).

Definition at line 856 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::dspSingleRead(), readRodCommandReg(), and readRodStatusReg().

void SctPixelRod::RodModule::mdspSingleWrite unsigned long  dspAddr,
unsigned long  buffer
throw (VmeException &)
 

mdspSingleWrite() writes a single 32-bit word to the Master DSP SDRAM via its Host Port Interface (HPI).

Definition at line 873 of file RodModule.cxx.

Referenced by clearVmeCommandRegBit(), SctApi::CrateImpl::dspSingleWrite(), setVmeCommandRegBit(), and SctApi::CrateImpl::slvBlockRead().

PrimState SctPixelRod::RodModule::primHandler  )  throw (RodException &, VmeException &)
 

primHandler() handles steps 2-4 in sending a primitive list to the master DSP. Its action depends on the value of the m_myPrimState state variable.

Definition at line 671 of file RodModule.cxx.

References SctPixelRod::RodOutList::getBody().

Referenced by SctApi::CrateImpl::awaitResponse().

Here is the call graph for this function:

void SctPixelRod::RodModule::readBlockFromFlash unsigned long  address,
UINT8 *  buffer,
unsigned long  numBytes
throw (RodException &, VmeException &)
 

readBlockFromFlash() reads a block from FPGA flash memory.

Definition at line 1616 of file RodModule.cxx.

UINT8 SctPixelRod::RodModule::readByteFromFlash unsigned long  address,
long  updateAddress
throw (RodException &, VmeException &)
 

readByteFromFlash( reads a byte from FPGA flash memory.

Definition at line 1556 of file RodModule.cxx.

unsigned long SctPixelRod::RodModule::readRodCommandReg long  regNumber  )  [inline]
 

Inline method to read one ROD Command Register via HPI.

Definition at line 301 of file RodDaq/RodCrate/RodModule.h.

References mdspSingleRead().

Referenced by SctApi::CrateImpl::readRodCommandReg().

Here is the call graph for this function:

bool SctPixelRod::RodModule::readRodStatusBit long  regNumber,
long  bitNumber
[inline]
 

Inline method to read one ROD Status Register Bit via HPI.

Definition at line 308 of file RodDaq/RodCrate/RodModule.h.

References readRodStatusReg().

Referenced by getDspAck().

Here is the call graph for this function:

unsigned long SctPixelRod::RodModule::readRodStatusReg long  regNumber  )  [inline]
 

Inline method to read one ROD Status Register via HPI.

Definition at line 294 of file RodDaq/RodCrate/RodModule.h.

References mdspSingleRead().

Referenced by getAllTextBuffBits(), readRodStatusBit(), SctApi::CrateImpl::readRodStatusReg(), SctApi::CrateImpl::slvBlockRead(), and SctApi::CrateImpl::status().

Here is the call graph for this function:

void SctPixelRod::RodModule::reset  )  throw (RodException&, VmeException &)
 

reset() issues a reset signal to the ROD, clears IDRAM, resets all DSPs, and re-initializes all state variables.

Definition at line 293 of file RodModule.cxx.

void SctPixelRod::RodModule::resetAllDsps  )  throw (RodException &, VmeException &)
 

resetAllDsps() resets all five DSPs via FPGA Control Register 2

Definition at line 1323 of file RodModule.cxx.

void SctPixelRod::RodModule::resetMasterDsp  )  throw (RodException &, VmeException &)
 

resetMasterDsp() resets the Master DSP via FPGA Control Register 2

Definition at line 1266 of file RodModule.cxx.

void SctPixelRod::RodModule::resetSlaveDsp long  slaveNumber  )  throw (RodException &, VmeException &)
 

resetSlaveDsp() resets a slave DSP via FPGA Control Register 2

Definition at line 1295 of file RodModule.cxx.

void SctPixelRod::RodModule::sectorErase unsigned long  sectorBaseAddress  )  throw (RodException &, VmeException &)
 

sectorErase() erases a sector of FPGA flash memory.

Definition at line 1366 of file RodModule.cxx.

void SctPixelRod::RodModule::sendPrimList RodPrimList l  )  throw (PrimListException &, VmeException &)
 

sendPrimList() is the first of five steps in sending a primitive list to the master DSP. It writes the primitive list to the InListBuffer in SDRAM0.

To send a PrimList: 1. sendPrimList(destAddr, &primBuffer) 2. Poll until DspAck = 0 using getDspAck() 3. Set InListReady bit using setInListReady() 4. poll until DspAck = 1 using getDspAck() 5. getOutList(repAddr, &repBuffer) Note: repBuffer=0 if there is no reply Buffer

Definition at line 647 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::sendPrimList().

void SctPixelRod::RodModule::setBit unsigned long *  var,
long  bitNumber
[inline, private]
 

inline bit manipulation functions

Definition at line 500 of file RodDaq/RodCrate/RodModule.h.

Referenced by setVmeCommandRegBit().

void SctPixelRod::RodModule::setInListReady  )  [inline]
 

Set InListReady bit.

Definition at line 260 of file RodDaq/RodCrate/RodModule.h.

References setVmeCommandRegBit().

Here is the call graph for this function:

void SctPixelRod::RodModule::setVmeCommandRegBit const long  bitNumber  )  [inline]
 

Inline method to set VmeCommand Register Bit.

Definition at line 315 of file RodDaq/RodCrate/RodModule.h.

References m_vmeCommandReg, mdspSingleWrite(), and setBit().

Referenced by SctApi::CrateImpl::primListControl(), and setInListReady().

Here is the call graph for this function:

void SctPixelRod::RodModule::sleep const double  milliSecs  ) 
 

sleep() sleeps for a given number of milliseconds, VmeException &

Definition at line 1703 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::awaitResponse(), and SctPixelRod::BocCard::resetVpin().

void SctPixelRod::RodModule::slvBlockRead const unsigned long  dspAddr,
unsigned long  buffer[],
const long  wordCount,
long  slaveNum,
HpidMode  mode = DYNAMIC
throw (HpiException &, VmeException &)
 

slvBlockRead() reads a block of size wordCount 32-bit words from a slave DSP's SDRAM via its Host Port Interface (HPI). Endian swapping, if needed, is done in mdspBlockRead. Usually, the optional last argument should be omitted.

Definition at line 1128 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::slvBlockRead().

void SctPixelRod::RodModule::slvBlockWrite unsigned long  dspAddr,
unsigned long  buffer[],
const long  wordCount,
long  slaveNum,
HpidMode  mode = DYNAMIC
throw (HpiException &, VmeException &)
 

slvBlockWrite() writes a buffer of wordCount 32-bit words to a slave DSP's SDRAM via its Host Port Interface (HPI). Endian swapping, if needed, is done in mdspBlockWrite. Usually, the optional last argument should be omitted.

Definition at line 1196 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::slvBlockWrite().

unsigned long SctPixelRod::RodModule::slvHpiFetch unsigned long  hpiReg,
long  slaveNum
throw (VmeException &)
 

slvHpiFetch() fetches a 32-bit value from a slave's HPI registers. Endian swapping, if needed, is done in mdspSingleRead.

Definition at line 1079 of file RodModule.cxx.

void SctPixelRod::RodModule::slvHpiLoad unsigned long  hpiReg,
unsigned long  hpiValue,
long  slaveNum
throw (VmeException &)
 

slvHpiLoad() loads a 32-bit value into a slave's HPIA or HPID register. Endian swapping, if needed, is done in mdspSingleWrite.

Definition at line 1068 of file RodModule.cxx.

unsigned long SctPixelRod::RodModule::slvSingleRead unsigned long  dspAddr,
long  slaveNum
throw (VmeException &)
 

slvSingleRead() reads a single 32-bit word from the the memory space of a slave DSP. Endian swapping, if needed, is done in mdspSingleRead.

Definition at line 1092 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::dspSingleRead().

void SctPixelRod::RodModule::slvSingleWrite unsigned long  dspAddr,
unsigned long  buffer,
long  slaveNum
throw (VmeException &)
 

slvSingleWrite() writes a single 32-bit word to a slave DSP SDRAM via its Host Port Interface (HPI). Endian swapping, if needed, is done in mdspSingleWrite.

Definition at line 1111 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::dspSingleWrite().

void SctPixelRod::RodModule::startSlave const long  slaveNumber,
char  mode = 's'
throw (RodException &, VmeException &)
 

startSlave() sends a START_SLAVE_EXECUTING primitive to start a given slave DSP. Usually, the optional last argument should be omitted.

Definition at line 546 of file RodModule.cxx.

void SctPixelRod::RodModule::status  )  throw ()
 

status() reports the status of the ROD. For now, it simply prints to standard output. AJB modified this to print to a string. Later we will add a structured report of name=value pairs.

Definition at line 379 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::initialiseRod().

void SctPixelRod::RodModule::synchSendPrim RodPrimitive &  prim  )  throw (RodException &, VmeException &)
 

synchSendPrim() synchronously sends a single primitive to the MDSP and handles the calls to primHandler() to finish the transfer before returning control to its calling routine. It is not the normal way to send primitives, but is useful for initialization where time criticality is not so much of a factor.

The present version writes to cout. This needs to be changed.

Definition at line 575 of file RodModule.cxx.

References SctPixelRod::RodPrimList::bufferBuild().

Here is the call graph for this function:

TextBuffState SctPixelRod::RodModule::textHandler  )  throw (VmeException &)
 

textHandler() handles reading a text buffer from the rod into a RodTextBuff object. Its action depends on the value of the m_myTextState state variable.

Returns:
The value of the text buffer state variable at the end of execution.

Definition at line 743 of file RodModule.cxx.

Referenced by SctApi::CrateImpl::awaitResponse(), SctApi::CrateImpl::doTextBuffer(), SctApi::CrateImpl::getRodMessage(), and SctApi::CrateImpl::initialiseRod().

bool SctPixelRod::RodModule::verify  )  throw ()
 

verify checks the h.o. byte of the serial number register to see that it contains the hex value 'ad', which is the signature of a ROD. It returns true if this is\ the case, false otherwise.

Definition at line 366 of file RodModule.cxx.

void SctPixelRod::RodModule::vmeWriteElementFlash UINT8  value,
unsigned long  address,
long  handshakeBit
throw (RodException &, VmeException &)
 

vmeWriteElementFlash() does a VME write of an element to an FPGA flash.

Definition at line 1588 of file RodModule.cxx.

void SctPixelRod::RodModule::writeBlockToFlash unsigned long  address,
UINT8 *  data,
unsigned long  numBytes
throw (RodException &, VmeException &)
 

writeBlockToFlash() writes a block to FPGA flash memory.

Definition at line 1451 of file RodModule.cxx.

void SctPixelRod::RodModule::writeBlockToFlashHpi unsigned long  address,
UINT8 *  data,
unsigned long  numBytes
throw (RodException &, VmeException &)
 

writeBlockToFlashHpi() writes a block to the master program flash memory.

Definition at line 1476 of file RodModule.cxx.

void SctPixelRod::RodModule::writeByteToFlash unsigned long  address,
UINT8  data
throw (RodException &, VmeException &)
 

writeByteToFlash() writes a byte to FPGA flash memory.

Definition at line 1421 of file RodModule.cxx.


Field Documentation

long SctPixelRod::RodModule::m_finBufferSize [private]
 

Size of file input buffer, in bytes. Default=4096 bytes, probably good enough.

Definition at line 529 of file RodDaq/RodCrate/RodModule.h.

std::string SctPixelRod::RodModule::m_masterImageName [private]
 

string holding name of master image file

Definition at line 532 of file RodDaq/RodCrate/RodModule.h.

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

BocCard handle.

Definition at line 569 of file RodDaq/RodCrate/RodModule.h.

RodOutList* SctPixelRod::RodModule::m_myOutList [private]
 

A pointer to the array holding a reply buffer from a PrimList.

Definition at line 548 of file RodDaq/RodCrate/RodModule.h.

PrimState SctPixelRod::RodModule::m_myPrimState [private]
 

State variable for sending primitive lists.

Definition at line 551 of file RodDaq/RodCrate/RodModule.h.

TextBuffState SctPixelRod::RodModule::m_myTextState [private]
 

State variable for reading text buffers.

Definition at line 554 of file RodDaq/RodCrate/RodModule.h.

VmePort* SctPixelRod::RodModule::m_myVmePort [private]
 

VME Port handle.

Definition at line 523 of file RodDaq/RodCrate/RodModule.h.

long SctPixelRod::RodModule::m_numSlaves [private]
 

Number of slave DSPs on this ROD.

Definition at line 526 of file RodDaq/RodCrate/RodModule.h.

unsigned long SctPixelRod::RodModule::m_revision [private]
 

Board vesion (read during init, dummy value loaded by constructor).

Definition at line 520 of file RodDaq/RodCrate/RodModule.h.

Referenced by getFlashSectorSize().

unsigned long SctPixelRod::RodModule::m_serialNumber [private]
 

Board serial number (read during init, dummy valued loaded by constructor.

Definition at line 517 of file RodDaq/RodCrate/RodModule.h.

std::string SctPixelRod::RodModule::m_slaveExtName[4] [private]
 

string array holding names of slave external image files

Definition at line 541 of file RodDaq/RodCrate/RodModule.h.

std::string SctPixelRod::RodModule::m_slaveIdramName[4] [private]
 

string array holding names of slave IDRAM image files

Definition at line 538 of file RodDaq/RodCrate/RodModule.h.

std::string SctPixelRod::RodModule::m_slaveIpramName[4] [private]
 

string array holding names of slave IPRAM image files

Definition at line 535 of file RodDaq/RodCrate/RodModule.h.

long SctPixelRod::RodModule::m_slot [private]
 

Slot number in VME crate.

Definition at line 514 of file RodDaq/RodCrate/RodModule.h.

unsigned long* SctPixelRod::RodModule::m_textBuff[N_TXT_BUFFS] [private]
 

Array of pointers to the text buffers in MasterDSP space.

Definition at line 566 of file RodDaq/RodCrate/RodModule.h.

char SctPixelRod::RodModule::m_textData[TEXT_BUFF_SIZE] [private]
 

A local buffer to hold the text data.

Definition at line 563 of file RodDaq/RodCrate/RodModule.h.

TEXT_BUFFER_TYPE SctPixelRod::RodModule::m_textType [private]
 

Text buffer type.

Definition at line 557 of file RodDaq/RodCrate/RodModule.h.

struct TXTBUFFER SctPixelRod::RodModule::m_txtBuffer [private]
 

A struct holding text buffer info from txtbuffer.h.

Definition at line 560 of file RodDaq/RodCrate/RodModule.h.

unsigned long SctPixelRod::RodModule::m_vmeCommandReg[2] [private]
 

Cached copy of VME command registers and ROD status registers.

Definition at line 544 of file RodDaq/RodCrate/RodModule.h.

Referenced by clearVmeCommandRegBit(), and setVmeCommandRegBit().


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