File tree Expand file tree Collapse file tree 5 files changed +14
-0
lines changed
Expand file tree Collapse file tree 5 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ class ProgramCtpEmulator : public Program
5656 options.add_options ()(" hbkeep" ,
5757 po::value<uint32_t >(&mOptions .hbKeep )->default_value (15000 ),
5858 " Sets the number Heartbeats to drop" );
59+ options.add_options ()(" init-orbit" ,
60+ po::value<uint32_t >(&mOptions .orbitInit )->default_value (0 ),
61+ " Sets the initial orbit id" );
5962 options.add_options ()(" trigger-mode" ,
6063 po::value<std::string>(&mOptions .triggerModeString )->default_value (" periodic" ),
6164 " Sets the trigger mode. Options are periodic, manual, continuous and fixed" );
@@ -110,6 +113,7 @@ class ProgramCtpEmulator : public Program
110113 mOptions .triggerFrequency ,
111114 mOptions .generateEox ,
112115 mOptions .generateSingleTrigger ,
116+ mOptions .orbitInit
113117 });
114118 }
115119
@@ -119,6 +123,7 @@ class ProgramCtpEmulator : public Program
119123 uint32_t hbDrop = 15000 ;
120124 uint32_t hbKeep = 15000 ;
121125 uint32_t hbMax = 255 ;
126+ uint32_t orbitInit = 0 ;
122127
123128 std::string triggerModeString = " periodic" ;
124129 uint32_t triggerFrequency = 8 ;
Original file line number Diff line number Diff line change @@ -161,6 +161,8 @@ struct CtpInfo {
161161
162162 bool generateEox;
163163 bool generateSingleTrigger;
164+
165+ uint32_t orbitInit;
164166};
165167
166168uint32_t getWrapperBaseAddress (int wrapper);
Original file line number Diff line number Diff line change @@ -1002,6 +1002,7 @@ void CruBar::emulateCtp(Cru::CtpInfo ctpInfo)
10021002 } else {
10031003 log (" Starting CTP emulator" , LogInfoDevel);
10041004 ttc.resetCtpEmulator (true );
1005+ ttc.setEmulatorORBITINIT (ctpInfo.orbitInit );
10051006
10061007 if (ctpInfo.triggerMode == Cru::TriggerMode::Periodic) {
10071008 ttc.setEmulatorPHYSDIV (ctpInfo.triggerFrequency );
Original file line number Diff line number Diff line change @@ -390,6 +390,11 @@ void Ttc::setFixedBCTrigger(std::vector<uint32_t> FBCTVector)
390390 }
391391}
392392
393+ void Ttc::setEmulatorORBITINIT (uint32_t orbitInit)
394+ {
395+ mBar ->writeRegister (Cru::Registers::CTP_EMU_ORBIT_INIT.index , orbitInit);
396+ }
397+
393398uint32_t Ttc::getPonQuality ()
394399{
395400 return mBar ->readRegister (Cru::Registers::TTC_PON_QUALITY.index );
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ class Ttc
4646 void setEmulatorPHYSDIV (uint32_t physdiv);
4747 void setEmulatorCALDIV (uint32_t caldiv);
4848 void setEmulatorHCDIV (uint32_t hcdiv);
49+ void setEmulatorORBITINIT (uint32_t orbitInit);
4950 void setFixedBCTrigger (std::vector<uint32_t > FBCTVector);
5051
5152 OnuStatus onuStatus ();
You can’t perform that action at this time.
0 commit comments