This page describes new AMC13 C++ support software under development as of June 2014. The software is now in cactus here: <b>Current tag:</b> [[https://svnweb.cern.ch/trac/cactus/browser/tags/amc13/amc13_v1_0_0][browse]] <pre> svn co svn+ssh://svnuser@svn.cern.ch/reps/cactus/tags/amc13/amc13_v1_0_0 </pre> <b>Trunk:</b> [[https://svnweb.cern.ch/trac/cactus/browser/trunk/cactusupgrades/boards/amc13/software/amc13][browse]] <pre> svn co svn+ssh://svnuser@svn.cern.ch/reps/cactus/trunk/cactusupgrades/boards/amc13/software/amc13 </pre> [[http://cactus.web.cern.ch/cactus/nightly/api/html_dev_amc13/index.html][API Documentation]] (night Doxygen build) The AMC13 low-level libraries are in the =amc13= folder, while =AMC13Tool= and other command-line utilities are in the =tools= folder. *Please keep up-to-date:* Amc13CppProductionSoftwareToDoList ---++ Class AMC13 This class inherits low-level access from =AMC13Simple= | *Method* | *Description* | | =AMC13::AMC13( string& connection_file)= | Constructor with uHAL connection file [Note 1] | | =AMC13::AMC13( string& URI1, string& AT1, string& URI2, string& AT2)= | Constructor with URIs and Address Table File paths | | =AMC13::~AMC13()= | Clean up and delete connections | Notes: 1. The uHAL connection file must contain exactly two entries with =id="T1"= and ="id="T2"= ---+++ Accessors to uHAL interfaces | *Method* | *Description* | | =uhal::HwInterface* AMC13::T1()= | Returns pointer to T1 interface | | =uhal::HwInterface* AMC13::T2()= | Returns pointer to T2 interface | ---+++ Read/Write functions | *Method* | *Description* | | =uint32_t AMC13::read( int chip, string& reg)= | Single read from named register | | =uint32_t AMC13::read( int chip, uint32_t addr)= | Single read from address | | =size_t AMC13::read( int chip, string& reg, size_t nwords, uint32_t* buffer)= | Block read from named register [Note 1] | | =size_t AMC13::read( int chip, uint32_t addr, size_t nwords, uint32_t buffer)= | Block read from address | | =void AMC13::write( int chip, string& reg, uint32_t val)= | Single write to named register | | =void AMC13::write( int chip, uint32_t addr, uint32_t val)= | Single write to address | | =size_t AMC13::write( int chip, string& reg, size_t nwords, uint32_t* buffer)= | Block write to named register [Note 1] | | =size_t AMC13::write( int chip, uint32_t addr, size_t nwords, uint32_t* buffer)= | Block write to address | Notes: 1. The address table item must have =mode="incremental"= and =size=nnnn= attributes defined for the block read/write operations to work ---+++ Control Functions | *Method* | *Description* | | =void AMC13::reset(int chip)= | Issues a general reset to tongue =chip= | | =void AMC13::AMCInputEnable( uint32_t mask)= | Enable AMC backplane inputs using bit mask (bit 0=AMC1 etc) | | =void AMC13::enableAllTTC()= | Enable all AMC13 TTC backplane outputs | | =void AMC13::daqLinkEnable(int n, bool b)= | Enable/disable DAQ fiber link =n= (0..2) with boolean =b= | | =void AMC13::fakeDataEnable(bool b)= | Enable/disable fake data generation in the AMC13 event builder with boolean =b= | | =void AMC13::setFakeSize( int n)= | set fake event size (0..0x3ffff) | | =void AMC13::localTtcSignalEnable(bool b)= | Enables/disable the locally generated TTC signal in the AMC13 with boolean =b= | | =void AMC13::genInternalL1AsEnable(bool b)= | Enable/disable locally generated L1As in the AMC13 with boolean =b= | | =void AMC13::ttcRxEnable(bool b)= | Enable/disable the TTC Rx module on the AMC13 with boolean =b= | | =void AMC13::monBufBackPressEnable(bool b)= | Enable/disable SDRAM backpressure on the AMC13 with boolean =b= | | =void AMC13::genInternalPeriodicL1As(bool b)= | Start/stop the sending of locally generated periodic triggers on the AMC13 with boolean =b= | | =void AMC13::megaMonitorScale(bool b)= | Enable/disable event-number masked prescaling boolean =b= | | =void AMC13::setPreScaleFactor(uint32_t noZos)= | Sets the number of lower bits set to zero in the prescale factor with argument =noZos= | | =void AMC13::genInternalSingleL1A(uint32_t n)= | Generate a burst of =n= internally generated L1As on the AMC13 | | =void AMC13::setTrigType(uint32_t type)= | Set the type of periodic trigger to be generated on the AMC13 with argument =type= | | =void AMC13::setLocalL1APeriod(uint32_t n)= | Set the local L1A period to =n= for internally generated L1As on the AMC13 | | =void AMC13::sendLocalEvnOrnReset(uint32_t a, uint32_t b)= | Send a local EvN reset if =a= and OrN reset if =b= | | =void AMC13::setFEDid(uint32_t id)= | Set the AMC13 FED ID to =id= | | =void AMC13::sfpOutputEnable(uint32_t mask)= | Enable SFPs using 3-bit =mask=, mask enables SFPs 2,1,0 | | =void AMC13::startRun()= | Put the AMC13 into run mode | | =void AMC13::endRun()= | Take the AMC13 out of run mode | ---+++ DAQ Functions | *Method* | *Description* | | =uint64_t * AMC13::readEvent( size_t& nwords, int& rc)= | Read one (possibly segmented) event. Set =nwords= to size, return ptr to malloc()'d buffer | ---+++ Flash Memory Support | *Method* | *Description* | | =Flash* AMC13::getFlash()= | Returns a pointer to flash programming object for an AMC13 | | =void writeFlashPage(uint32_t, std::vector<uint32_t>)= | Write 256-byte page | | =void eraseFlashSector(uint32_t)= | Erase sector (256K bytes) | | =void programFlash(const std::string&, uint32_t)= | Program flash from MCS file to specified address | | =void verifyFlash(const std::string&, uint32_t)= | Verify flash from MCS file at specified address | | =void loadFlash()= | Force reconfiguration of T1 and T2 FPGAs from flash sectors | | =void loadFlashT1()= | Force reconfiguration of T1 FPGA only | -- Main.EricHazen - 04 Jun 2014
This topic: BUCMSPublic
>
WebHome
>
HcalDTC
>
AMC13CppSoftware
>
AMC13CppProductionSoftware
Topic revision: r8 - 28 Aug 2014 - DanielGastler
Copyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback