@@ -15,7 +15,7 @@ namespace CFOLib {
1515// / </summary>
1616enum CFO_Register : uint16_t
1717{
18- DTCLIB_COMMON_REGISTERS, // Moved here all registers in common with DTC
18+ DTCLIB_COMMON_REGISTERS, // Moved here all registers in common with DTC
1919
2020 CFO_Register_SFPSERDESStatus = 0x9140 ,
2121 CFO_Register_BeamOnTimerPreset = 0x9144 ,
@@ -93,9 +93,8 @@ enum CFO_Register : uint16_t
9393 CFO_Register_FPGACoreAccess = 0x9408 ,
9494 CFO_Register_JitterAttenuatorCSR = 0x9500 ,
9595 CFO_Register_Invalid,
96- // };
97- }; // end CFO_Register enum
98-
96+ // };
97+ }; // end CFO_Register enum
9998
10099// / <summary>
101100// / The links of the CFO
@@ -120,7 +119,6 @@ enum CFO_Link_ID : uint8_t
120119static const std::vector<CFO_Link_ID> CFO_Links{CFO_Link_0, CFO_Link_1, CFO_Link_2, CFO_Link_3,
121120 CFO_Link_4, CFO_Link_5, CFO_Link_6, CFO_Link_7};
122121
123-
124122// / <summary>
125123// / The CFO_Registers class represents the CFO Register space, and all the methods necessary to read and write those
126124// / registers. Each register has, at the very least, a read method, a write method, and a RegisterFormatter method
@@ -160,13 +158,12 @@ class CFO_Registers : public DTCLib::CFOandDTC_Registers
160158 // / CFO firmware does not match</param> <param name="mode">Mode to set</param> <param name="CFO">CFO/DTC card instance
161159 // / to use</param> <param name="skipInit">Whether to skip initializing the CFO using the SimMode. Used to read
162160 // / state.</param> <returns></returns>
163- DTC_SimMode SetSimMode (std::string expectedDesignVersion, DTC_SimMode mode, int CFO,
164- bool skipInit = false , const std::string& uid = " " );
161+ DTC_SimMode SetSimMode (std::string expectedDesignVersion, DTC_SimMode mode, int CFO,
162+ bool skipInit = false , const std::string& uid = " " );
165163
164+ virtual void ResetPCIe () override { throw std::runtime_error (" CFO-TODO!" ); };
165+ virtual void FlashLEDs () override { throw std::runtime_error (" CFO-TODO!" ); };
166166
167- virtual void ResetPCIe () { throw std::runtime_error (" CFO-TODO!" ); };
168- virtual void FlashLEDs () { throw std::runtime_error (" CFO-TODO!" ); };
169-
170167 // Design Status Register
171168 // / <summary>
172169 // / Determine if the DDR FIFO is empty
@@ -184,7 +181,6 @@ class CFO_Registers : public DTCLib::CFOandDTC_Registers
184181 // / <returns>RegisterFormatter object containing register information</returns>
185182 RegisterFormatter FormatDesignStatus ();
186183
187-
188184 // CFO Control Register
189185 void ResetCFORunPlan ();
190186 bool ReadResetCFORunPlan (std::optional<uint32_t > val = std::nullopt );
@@ -526,13 +522,12 @@ class CFO_Registers : public DTCLib::CFOandDTC_Registers
526522 void ResetSERDESOscillatorIICInterface ();
527523
528524 // Jitter Attenuator CSR Register
529- virtual std::bitset<2 > ReadJitterAttenuatorSelect (std::optional<uint32_t > val = std::nullopt );
530- virtual void SetJitterAttenuatorSelect (std::bitset<2 > data, bool alsoResetJA = false );
531- virtual bool ReadJitterAttenuatorReset (std::optional<uint32_t > val = std::nullopt );
532- virtual bool ReadJitterAttenuatorLocked (std::optional<uint32_t > val = std::nullopt );
533- virtual void ResetJitterAttenuator ();
534- virtual RegisterFormatter FormatJitterAttenuatorCSR ();
535-
525+ virtual std::bitset<2 > ReadJitterAttenuatorSelect (std::optional<uint32_t > val = std::nullopt ) override ;
526+ virtual void SetJitterAttenuatorSelect (std::bitset<2 > data, bool alsoResetJA = false ) override ;
527+ virtual bool ReadJitterAttenuatorReset (std::optional<uint32_t > val = std::nullopt ) override ;
528+ virtual bool ReadJitterAttenuatorLocked (std::optional<uint32_t > val = std::nullopt ) override ;
529+ virtual void ResetJitterAttenuator () override ;
530+ virtual RegisterFormatter FormatJitterAttenuatorCSR () override ;
536531
537532 // / <summary>
538533 // / Read the current Oscillator program for the SERDES Oscillator
@@ -565,7 +560,6 @@ class CFO_Registers : public DTCLib::CFOandDTC_Registers
565560 // / <returns>RegisterFormatter object containing register information</returns>
566561 RegisterFormatter FormatSERDESOscillatorControl ();
567562
568-
569563 // Timestamp Preset Registers
570564 // / <summary>
571565 // / Set the Timestamp preset for Timing system emulation mode
@@ -1432,18 +1426,16 @@ class CFO_Registers : public DTCLib::CFOandDTC_Registers
14321426 uint32_t maxDTCs_; // /< Map of active DTCs
14331427 bool usingDetectorEmulator_; // /< Whether Detector Emulation mode is enabled
14341428 uint16_t dmaSize_; // /< Size of DMAs, in bytes (default 32k)
1435-
1436- public:
1437-
1438- virtual const std::vector<std::function<RegisterFormatter()>>& getFormattedDumpFunctions () {return formattedDumpFunctions_;}; // pure virtual
1439- virtual const std::vector<std::function<RegisterFormatter()>>& getFormattedSimpleDumpFunctions () {return formattedSimpleDumpFunctions_;}; // pure virtual
14401429
1430+ public:
1431+ virtual const std::vector<std::function<RegisterFormatter()>>& getFormattedDumpFunctions () override { return formattedDumpFunctions_; };
1432+ virtual const std::vector<std::function<RegisterFormatter()>>& getFormattedSimpleDumpFunctions () override { return formattedSimpleDumpFunctions_; };
14411433
1442- const std::vector<std::function<RegisterFormatter()>> formattedSimpleDumpFunctions_{
1434+ const std::vector<std::function<RegisterFormatter()>> formattedSimpleDumpFunctions_{
14431435 [this ] { return this ->FormatCFOControl (); },
14441436 [this ] { return this ->FormatSERDESPLLLocked (); },
14451437 [this ] { return this ->FormatLinkEnable (); },
1446- // [this] { return this->FormatRXCDRLockStatus(); },
1438+ // [this] { return this->FormatRXCDRLockStatus(); },
14471439 [this ] { return this ->FormatSERDESResetDone (); },
14481440 [this ] { return this ->FormatSERDESReset (); },
14491441 };
0 commit comments