This page describes new AMC13 C++ support software under development as of June 2014. The temporary home is in our private svn. It will be hosted on CACTUS once released.

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

-- EricHazen - 04 Jun 2014

Edit | Attach | Watch | Print version | History: r24 | r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 17 Jun 2014 - DavidZou
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback