bu_cms_history/NewDCCSoftwareFunctions

SiteMap (Historical BU CMS wiki main page)

Here are the functions in hcalDCC::DCC which must be (re-)implemented for the new DCC. There are probably some more in hcalDCCExpertView.cc which are missing from this list.

  setupHAL()
  initialize()
  reloadFirmware()
  setSpigotInUse()
  prepareForRun()
  startRun()

  readItem()
  writeItem( "err_ctrl...")

  getFirmwareVersions()
  getLRBFirmwareVersions()
  getSourceId()
  testTTS()
  setLogger()

  getFirmwareVersions()
  getLRBFirmwareVersions()

Detailed documentation follows.

DCC::setupHAL()

  DCC::setupHAL(onst std::string& lrbAddrTableFile,
                     const std::string& ltbAddrTableFile,
                     const std::string& log12AddrTableFile,
                     const std::string& log123ConfAddrTableFile,
                     const std::string& logicboardAddrTableFile)

Just stores it's 5 string arguments in member variables.

DCC::initialize()

  bool DCC::initialize(HAL::VMEBusAdapterInterface* intf, 
                       int slot, 
                       bool swap, 
                       bool readonly) throw (std::exception)

Initialize DCC software interface. Create HAL VME devices using address tables specified in setupHAL. Reset hardware to known (unconfigured) state. Check access to DCC hardware. Read all firmware versions for future reference.

DCC::reloadFirmware()

Trigger reload of FPGAs from flash memory. Used as a "super reset" in old DCC. It would speed things up significantly if this is skipped in the new DCC (maybe this should be a NOP?).

DCC::setSpigotInUse()

Sets a bool to indicate that a particular spigot is in use. No effect on hardware until prepareForRun() is called.

bool DCC::prepareForRun()

Set DCC configuration registers from m_config variable of DCC (a DCCConfigInfo object).

DCC::startRun()

Reset all monitoring counters, put DCC in run mode. L1A should be disabled when this function is called.

DCC::readItem()

Read a register on the DCC, name from HAL address table given.

DCC::writeItem()

  void hcalDCC::DCC::writeItem ( const std::string &name,
		                 uint32_t value)

Write a register on the DCC with name from HAL address table.

DCC::getAllDevices()

  std::map* DCC::getAllDevices()

Return a list of VMEDeviceBundles for all PCI devices on the DCC.

For old DCC, returns a map with keys "log3_fmem", "log1_mem" etc with a hcal::VMEDeviceBundle as a value for each. For the new DCC probably any code using this should be excised. For compatibility purposes it could initially return a map with a single entry for "log3_fmem" with the VMEDeviceBundle for the whole DCC.