pflib v3.0.0-rc1-29-g3a901ac
Pretty Fine HGCROC Interaction Library
All Classes Namespaces Files Functions Variables Typedefs Pages
pflib::Elinks Class Referenceabstract

Interface for configuring the elinks. More...

#include <Elinks.h>

Inheritance diagram for pflib::Elinks:
[legend]
Collaboration diagram for pflib::Elinks:
[legend]

Public Member Functions

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.
 

Protected Member Functions

 Elinks (int nlinks)
 

Private Attributes

int n_links
 number of links available, read from chip
 
std::vector< bool > m_linksActive
 which links are "active", set by user
 

Detailed Description

Interface for configuring the elinks.

Member Function Documentation

◆ clearErrorCounters()

virtual void pflib::Elinks::clearErrorCounters ( int ilink)
pure virtual

Clear the error counters for the input link.

Parameters
[in]ilinklink index

Implemented in pflib::Capture_zcu.

◆ getAlignPhase()

virtual int pflib::Elinks::getAlignPhase ( int ilink)
inlinevirtual

Get the alignment phase.

Reimplemented in pflib::Capture_zcu.

◆ getStatusRaw()

virtual uint32_t pflib::Elinks::getStatusRaw ( int ilink)
pure virtual

Get the status of the input link.

Parameters
[in]ilinklink index
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
[in]ilinklink index
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]ilinklink index
[in]activetrue 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]linklink index
[out]nonidlesset to the number of non-idles
[out]resyncsset to the number or resyncs

◆ resetHard()

virtual void pflib::Elinks::resetHard ( )
pure virtual

Hard reset the links.

Implemented in pflib::Capture_zcu.

◆ 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]modetype of bigspy to setup
[in]ilinklink index
[in]presamplesnumber of presamples Read the current setup for a bigspy
[out]modetype of bigspy to setup
[out]ilinklink index
[out]presamplesnumber 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
[in]ilinklink index

◆ scanBitslip()

int pflib::Elinks::scanBitslip ( int ilink)
virtual

enable auto-setting of bitslip value

Parameters
[in]ilinklink index

◆ setAlignPhase()

virtual void pflib::Elinks::setAlignPhase ( int ilink,
int iphase )
inlinevirtual

Set the l1a delay for the input link.

Parameters
[in]ilinklink index
[in]idelaydelay 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]ilinklink index
[in]bitslipvalue 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
[in]ilinklink index
Returns
the bytes retreived from the spy

Implemented in pflib::Capture_zcu.


The documentation for this class was generated from the following files: