Represents the full interface of an nXYTER. More...
#include <NxChip.h>
Public Member Functions | |
NxChip (base::Board *board, int port, int addr, int nxnum) | |
Constructor with full addressing path information. | |
virtual | ~NxChip () |
void | setNxNumber (int nxnum) |
Set the nXYTER number. | |
int | getNxNumber () |
Returns the nXYTER number. | |
int | activate () |
Activate data taking of nXYTER. | |
int | deactivate () |
Deactivate data taking of nXYTER. | |
bool | isactive () |
Return actual active state of nXYTER. | |
int | setChannelDelay (uint32_t val) |
Set the delay compensation between nXYTER and ROC. | |
int | getChannelDelay (uint32_t &val) |
Returns the delay compensation between nXYTER and ROC. | |
nxyter::NxI2c & | i2c () |
Gives access to the NxI2c object. | |
base::Board & | board () |
Return reference to roc::Board which hosts the Peripheral . | |
base::Board * | getBoard () const |
Returns pointer to the roc::Board which hosts the Peripheral . | |
Protected Attributes | |
nxyter::NxI2c | fI2c |
I2C interface of Nx. | |
int | fNxNumber |
the Nx number | |
base::Board * | fBoard |
board pointer |
Represents the full interface of an nXYTER.
This class provides the access to the ROC and I2C interface parts of an nXYTER. It holds the full address information but no further context.
The I2C interface is accessible via a separate nxyter::NxI2c object which can be accessed via the i2c() method. The ROC part of the interface control the parameters specific to one nXYTER chip.
Definition at line 16 of file NxChip.h.
nxyter::NxChip::NxChip | ( | base::Board * | board, | |
int | port, | |||
int | addr, | |||
int | nxnum | |||
) |
Constructor with full addressing path information.
Sets up NxChip
object with full addressing information
board | ROC board pointer | |
port | the ROC port (equivalent to the I2C bus interface port) | |
addr | the I2C device slave address | |
nxnum | see nXYTER number |
Definition at line 35 of file NxChip.cxx.
nxyter::NxChip::~NxChip | ( | ) | [virtual] |
Definition at line 45 of file NxChip.cxx.
int nxyter::NxChip::activate | ( | ) |
Activate data taking of nXYTER.
This method enables the acceptance of data valid bits comming from the nXYTER.
Definition at line 76 of file NxChip.cxx.
References fNxNumber, base::Peripheral::getBoard(), nxyter::RocNx::getNxActive(), base::Board::operErrBuildInc(), and nxyter::RocNx::setNxActive().
Referenced by nxyter::FebBase::initRoc().
base::Board & base::Peripheral::board | ( | ) | [inherited] |
Return reference to roc::Board
which hosts the Peripheral
.
std::runtime_error | if board pointer not initialized or 0. |
Definition at line 30 of file Peripheral.cxx.
References base::Peripheral::fBoard.
Referenced by nxyter::RocNx::fireTestPulse(), nxyter::MainAdc::getAdcDirect(), getChannelDelay(), nxyter::MainAdc::getChannelLatency(), nxyter::MainAdc::getClockDelayBufg(), nxyter::MainAdc::getClockDelaySrInit(), base::Gpio::getConfig(), nxyter::RocNx::getDataDebug(), nxyter::RocNx::getFifoEmpty(), nxyter::RocNx::getFifoFull(), nxyter::RocNx::getNxActive(), roc::I2cDevice::getRegister(), nxyter::MainAdc::getRegister(), roc::I2cDevice::getRegister16(), base::Gpio::getSyncBaud(), base::Gpio::getSyncScale(), nxyter::FebBase::initRoc(), nxyter::FebBase::resetNxI2cBus(), nxyter::FebBase::resetNxI2cRegister(), nxyter::RocNx::resetRocNxTs(), setChannelDelay(), nxyter::MainAdc::setChannelLatency(), nxyter::MainAdc::setChannelMux(), nxyter::MainAdc::setClockDelay(), nxyter::MainAdc::setClockDelayBufg(), nxyter::MainAdc::setClockDelaySrInit(), base::Gpio::setConfig(), nxyter::RocNx::setDebugMode(), nxyter::RocNx::setLTSDelay(), nxyter::RocNx::setNxActive(), setNxNumber(), nxyter::RocNx::setParityCheck(), roc::I2cDevice::setRegister(), nxyter::MainAdc::setRegister(), roc::I2cDevice::setRegisterVerify(), base::Gpio::setSyncBaud(), base::Gpio::setSyncScale(), and nxyter::RocNx::setToDefault().
int nxyter::NxChip::deactivate | ( | ) |
Deactivate data taking of nXYTER.
This method enables the acceptance of data valid bits comming from the nXYTER, no further hit messages will be generated.
Definition at line 99 of file NxChip.cxx.
References fNxNumber, base::Peripheral::getBoard(), nxyter::RocNx::getNxActive(), base::Board::operErrBuildInc(), and nxyter::RocNx::setNxActive().
Referenced by nxyter::FebBase::initRoc().
base::Board* base::Peripheral::getBoard | ( | ) | const [inline, inherited] |
Returns pointer to the roc::Board which hosts the Peripheral
.
Note: normally using board()
is more convenient.
Definition at line 38 of file Peripheral.h.
References base::Peripheral::fBoard.
Referenced by nxyter::FebUtil::acquireTestTriggerData(), activate(), nxyter::FebBase::addNxChip(), deactivate(), isactive(), and nxyter::QuickDaq::QuickDaq().
int nxyter::NxChip::getChannelDelay | ( | uint32_t & | val | ) |
Returns the delay compensation between nXYTER and ROC.
Definition at line 138 of file NxChip.cxx.
References base::Peripheral::board(), fNxNumber, base::Board::get(), ROC_NX_DELAY_NX0, ROC_NX_DELAY_NX1, ROC_NX_DELAY_NX2, and ROC_NX_DELAY_NX3.
int nxyter::NxChip::getNxNumber | ( | ) | [inline] |
Returns the nXYTER number.
Definition at line 28 of file NxChip.h.
References fNxNumber.
Referenced by nxyter::FebUtil::acquireTestTriggerData(), cmd_printstatus(), cmd_scanadclat(), cmd_scanvbiasf(), get_vbiass_data(), and nxyter::FebBase::printNxHeadLine().
nxyter::NxI2c& nxyter::NxChip::i2c | ( | ) | [inline] |
Gives access to the NxI2c object.
Definition at line 39 of file NxChip.h.
References fI2c.
Referenced by nxyter::FebUtil::acquireTestPulserData(), autoped_setnxmode(), roc::BoardsVector::autoped_setnxmode(), NxyterWidget::biasRegChanged(), cmd_autosettrh(), cmd_autotrim(), cmd_autovbiass(), cmd_getnx(), cmd_idsigch(), cmd_printnx(), cmd_printstatus(), cmd_scanadclat(), cmd_scanmonadc(), cmd_scanvbiasf(), cmd_scanvbiass(), cmd_setnx(), cmd_setnxaddr(), cmd_setnxdef(), cmd_setnxmask(), cmd_setnxmode(), cmd_setnxpower(), cmd_setnxtrim(), nxyter::FebBase::discoverFebs(), get_vbiass_data(), NxyterWidget::getSubConfig(), nxyter::FebBase::printRegisters(), nxyter::FebBase::probe(), nxyter::FebUtil::restoreFeb(), nxyter::FebUtil::saveFeb(), nxyter::FebBase::setNxRegisterAll(), nxyter::FebBase::setNxTestModes(), NxyterWidget::setSubConfig(), nxyter::FebBase::setToDefault(), nxyter::FebUtil::testFebControlPathCombo(), nxyter::FebUtil::testNxControlPath(), and nxyter::FebUtil::testNxRegisters().
bool nxyter::NxChip::isactive | ( | ) |
Return actual active state of nXYTER.
Definition at line 113 of file NxChip.cxx.
References fNxNumber, base::Peripheral::getBoard(), and nxyter::RocNx::getNxActive().
Referenced by nxyter::FebBase::getFebState().
int nxyter::NxChip::setChannelDelay | ( | uint32_t | val | ) |
Set the delay compensation between nXYTER and ROC.
Definition at line 125 of file NxChip.cxx.
References base::Peripheral::board(), fNxNumber, base::Board::put(), ROC_NX_DELAY_NX0, ROC_NX_DELAY_NX1, ROC_NX_DELAY_NX2, and ROC_NX_DELAY_NX3.
void nxyter::NxChip::setNxNumber | ( | int | nxnum | ) |
Set the nXYTER number.
Sets the nXYTER number, used to address nXYYER specific ROC resources.
nxnum | see nXYTER number |
Definition at line 58 of file NxChip.cxx.
References base::Peripheral::board(), base::Board::Debug(), and fNxNumber.
base::Board* base::Peripheral::fBoard [protected, inherited] |
board pointer
Definition at line 26 of file Peripheral.h.
Referenced by base::Peripheral::board(), base::Peripheral::getBoard(), and base::Peripheral::Peripheral().
nxyter::NxI2c nxyter::NxChip::fI2c [protected] |
int nxyter::NxChip::fNxNumber [protected] |
the Nx number
Definition at line 19 of file NxChip.h.
Referenced by activate(), deactivate(), getChannelDelay(), getNxNumber(), isactive(), setChannelDelay(), and setNxNumber().