Interface for configuring the elinks.
More...
#include <Elinks.h>
|
int | nlinks () const |
| Get the number of links stored in this class.
|
|
void | markActive (int ilink, bool active) |
| Mark a specific link as active (or inactive) depending on input.
|
|
bool | isActive (int ilink) const |
| Check if a link is active.
|
|
virtual std::vector< uint32_t > | spy (int ilink)=0 |
| spy into the passed link
|
|
virtual void | setBitslip (int ilink, int bitslip)=0 |
| set the bitslip value for the link
|
|
virtual int | scanBitslip (int ilink) |
| enable auto-setting of bitslip value
|
|
virtual int | getBitslip (int ilink)=0 |
|
virtual uint32_t | getStatusRaw (int ilink)=0 |
| Get the status of the input link.
|
|
virtual void | clearErrorCounters (int ilink)=0 |
| Clear the error counters for the input link.
|
|
virtual void | readCounters (int link, uint32_t &nonidles, uint32_t &resyncs) |
| Decode the counters for non-idles and resyncs from the status bytes for the input link.
|
|
virtual void | resetHard ()=0 |
| Hard reset the links.
|
|
virtual int | scanAlign (int ilink, bool debug=false) |
| Prepare for a big spy of the link.
|
|
virtual void | setAlignPhase (int ilink, int iphase) |
| Set the l1a delay for the input link.
|
|
virtual int | getAlignPhase (int ilink) |
| Get the alignment phase.
|
|
|
int | n_links |
| number of links available, read from chip
|
|
std::vector< bool > | m_linksActive |
| which links are "active", set by user
|
|
Interface for configuring the elinks.
◆ clearErrorCounters()
virtual void pflib::Elinks::clearErrorCounters |
( |
int | ilink | ) |
|
|
pure virtual |
Clear the error counters for the input link.
- Parameters
-
Implemented in pflib::Capture_zcu.
◆ getAlignPhase()
virtual int pflib::Elinks::getAlignPhase |
( |
int | ilink | ) |
|
|
inlinevirtual |
◆ getStatusRaw()
virtual uint32_t pflib::Elinks::getStatusRaw |
( |
int | ilink | ) |
|
|
pure virtual |
Get the status of the input link.
- Parameters
-
- Returns
- encoded 4-bytes of link status
Implemented in pflib::Capture_zcu.
◆ isActive()
bool pflib::Elinks::isActive |
( |
int | ilink | ) |
const |
|
inline |
Check if a link is active.
- Parameters
-
- Returns
- true if link is active, false if invalid index or link is inactive
◆ markActive()
void pflib::Elinks::markActive |
( |
int | ilink, |
|
|
bool | active ) |
|
inline |
Mark a specific link as active (or inactive) depending on input.
If the passed link index is outside the range of valid links, then this does nothing.
- Parameters
-
[in] | ilink | link index |
[in] | active | true if link is active |
◆ readCounters()
virtual void pflib::Elinks::readCounters |
( |
int | link, |
|
|
uint32_t & | nonidles, |
|
|
uint32_t & | resyncs ) |
|
inlinevirtual |
Decode the counters for non-idles and resyncs from the status bytes for the input link.
- Parameters
-
[in] | link | link index |
[out] | nonidles | set to the number of non-idles |
[out] | resyncs | set to the number or resyncs |
◆ resetHard()
virtual void pflib::Elinks::resetHard |
( |
| ) |
|
|
pure virtual |
◆ scanAlign()
int pflib::Elinks::scanAlign |
( |
int | ilink, |
|
|
bool | debug = false ) |
|
virtual |
Prepare for a big spy of the link.
Modes
- 0 -> software
- 1 -> L1A
- 2 -> Non-idle
- Parameters
-
[in] | mode | type of bigspy to setup |
[in] | ilink | link index |
[in] | presamples | number of presamples Read the current setup for a bigspy |
[out] | mode | type of bigspy to setup |
[out] | ilink | link index |
[out] | presamples | number of presamples Check if the current bigspy is done |
- Returns
- true if we are done with the bigspy Readout the bigspy and return the data
-
vector of 4-byte words readout from bigspy scan the input link attempting to align it
- Parameters
-
◆ scanBitslip()
int pflib::Elinks::scanBitslip |
( |
int | ilink | ) |
|
|
virtual |
enable auto-setting of bitslip value
- Parameters
-
◆ setAlignPhase()
virtual void pflib::Elinks::setAlignPhase |
( |
int | ilink, |
|
|
int | iphase ) |
|
inlinevirtual |
Set the l1a delay for the input link.
- Parameters
-
[in] | ilink | link index |
[in] | idelay | delay to use |
Reimplemented in pflib::Capture_zcu.
◆ setBitslip()
virtual void pflib::Elinks::setBitslip |
( |
int | ilink, |
|
|
int | bitslip ) |
|
pure virtual |
set the bitslip value for the link
- Parameters
-
[in] | ilink | link index |
[in] | bitslip | value for bitslip |
Implemented in pflib::Capture_zcu.
◆ spy()
virtual std::vector< uint32_t > pflib::Elinks::spy |
( |
int | ilink | ) |
|
|
pure virtual |
spy into the passed link
- Parameters
-
- Returns
- the bytes retreived from the spy
Implemented in pflib::Capture_zcu.
The documentation for this class was generated from the following files:
- include/pflib/Elinks.h
- src/pflib/Elinks.cxx