pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
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 (word-level adjustment)
 
virtual int scanBitslip (int ilink)
 enable auto-setting of bitslip value (word-level adjustment)
 
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)
 scan the input link attempting to bitalign it
 
virtual void setAlignPhase (int ilink, int iphase)
 Set the bitalign delay for the input link.
 
virtual int getAlignPhase (int ilink)
 Get the bit 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::bittware::OptoElinksBW, pflib::Capture_zcu, and pflib::zcu::OptoElinksZCU.

◆ getAlignPhase()

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

Get the bit 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::bittware::OptoElinksBW, pflib::Capture_zcu, and pflib::zcu::OptoElinksZCU.

◆ 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::bittware::OptoElinksBW, pflib::Capture_zcu, and pflib::zcu::OptoElinksZCU.

◆ scanAlign()

int pflib::Elinks::scanAlign ( int ilink,
bool debug = false )
virtual

scan the input link attempting to bitalign it

Parameters
[in]ilinklink index

◆ scanBitslip()

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

enable auto-setting of bitslip value (word-level adjustment)

Parameters
[in]ilinklink index

Reimplemented in pflib::bittware::OptoElinksBW, and pflib::zcu::OptoElinksZCU.

◆ setAlignPhase()

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

Set the bitalign 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 (word-level adjustment)

Parameters
[in]ilinklink index
[in]bitslipvalue for bitslip

Implemented in pflib::bittware::OptoElinksBW, pflib::Capture_zcu, and pflib::zcu::OptoElinksZCU.

◆ 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::bittware::OptoElinksBW, pflib::Capture_zcu, and pflib::zcu::OptoElinksZCU.


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