pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
Elinks.h
1#ifndef pflib_Elinks_h_
2#define pflib_Elinks_h_
3
4#include "pflib/WishboneTarget.h"
5#include <vector>
6
7namespace pflib {
8
12class Elinks : public WishboneTarget {
13 public:
17 Elinks(WishboneInterface* wb, int target = tgt_Elinks);
18
24 int nlinks() const { return n_links; }
25
35 void markActive(int ilink, bool active) {
36 if (ilink<n_links && ilink>=0)
37 m_linksActive[ilink]=active;
38 }
39
46 bool isActive(int ilink) const {
47 return (ilink>=n_links || ilink<0)?(false):(m_linksActive[ilink]);
48 }
49
56 std::vector<uint8_t> spy(int ilink);
57
64 void setBitslip(int ilink, int bitslip);
65
77 void setBitslipAuto(int ilink,bool enable);
78
85 bool isBitslipAuto(int ilink);
86
93 int getBitslip(int ilink);
94
101 uint32_t getStatusRaw(int ilink);
102
108 void clearErrorCounters(int ilink);
109
118 void readCounters(int link, uint32_t& nonidles, uint32_t& resyncs);
119
123 void resetHard();
124
137 void setupBigspy(int mode, int ilink, int presamples);
138
146 void getBigspySetup(int& mode, int& ilink, int& presamples);
147
152 bool bigspyDone();
153
159
164 void scanAlign(int ilink);
165
171 void setDelay(int ilink, int idelay);
172 private:
179};
180
181}
182
183#endif // pflib_Elinks_h_
Abstract interface for wishbone transactions, used by ~all classes in pflib.
Definition: WishboneInterface.h:15
Parent class for standard wishbone targets providing some utilities.
Definition: WishboneTarget.h:29
Polarfire Interaction Library.
Definition: Backend.h:8