Skip to content

Commit a38e8d5

Browse files
committed
ORC-501: new option for tests
1 parent 134bba8 commit a38e8d5

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

doc/releaseNotes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,6 @@ This file describes the main feature changes for released versions of ReadoutCar
9090

9191
## v0.45.6 - 07/02/2025
9292
- Updated list of firmwares.
93+
94+
## v0.45.7 - 13/03/2025
95+
- o2-roc-config: added (temporary) option --test-mode-ORC501 to enable testing of new firmware as described in [ORC-501](https://its.cern.ch/jira/browse/ORC-501).

src/CommandLineUtilities/ProgramConfig.cxx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ namespace po = boost::program_options;
3636

3737
std::string cmd; // program command invoked
3838

39+
namespace o2
40+
{
41+
namespace roc
42+
{
43+
extern bool testModeORC501; // testMode flag used for some FW dev, cf JIRA ORC-501
44+
}
45+
}
46+
3947
/// Get a status report of given card
4048
std::string getStatusReport(Parameters::CardIdType cardId)
4149
{
@@ -322,6 +330,9 @@ class ProgramConfig : public Program
322330
options.add_options()("drop-bad-rdh",
323331
po::bool_switch(&mOptions.dropBadRdhEnabled),
324332
"Flag to enable dropping of packets with bad RDH");
333+
options.add_options()("test-mode-ORC501",
334+
po::bool_switch(&o2::roc::testModeORC501),
335+
"Flag to enable test mode as described in JIRA ORC-501");
325336
Options::addOptionCardId(options);
326337
}
327338

src/Cru/CruBar.cxx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ namespace o2
3939
namespace roc
4040
{
4141

42+
bool testModeORC501 = false; // testMode flag used for some FW dev, cf JIRA ORC-501
43+
4244
using Link = Cru::Link;
4345

4446
CruBar::CruBar(const Parameters& parameters, std::unique_ptr<RocPciDevice> rocPciDevice)
@@ -776,9 +778,14 @@ void CruBar::configure(bool force)
776778
}
777779

778780
if (mGbtEnabled /*|| !checkClockConsistent(reportInfo.linkMap)*/) {
781+
if (testModeORC501) {
782+
log("GBT : using test mode, cf JIRA ORC-501", LogInfoDevel_(4601));
783+
}
779784
Gbt gbt = Gbt(mPdaBar, mLinkMap, mWrapperCount, mEndpoint);
780785
gbt.calibrateGbt(mLinkMap);
781-
Cru::fpllref(mLinkMap, mPdaBar, 2);
786+
if (!testModeORC501) { // testMode flag used for some FW dev, cf JIRA ORC-501
787+
Cru::fpllref(mLinkMap, mPdaBar, 2);
788+
}
782789
Cru::fpllcal(mLinkMap, mPdaBar);
783790
gbt.resetFifo();
784791
}

src/Cru/Gbt.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ void Gbt::calibrateGbt(std::map<int, Link> linkMap)
8484
{
8585
//Cru::fpllref(linkMap, mPdaBar, 2); //Has been bound with clock configuration
8686
//Cru::fpllcal(linkMap, mPdaBar); //same
87-
cdrref(linkMap, 2);
87+
extern bool testModeORC501; // testMode flag used for some FW dev, cf JIRA ORC-501
88+
if (!testModeORC501) { // testMode flag used for some FW dev, cf JIRA ORC-501
89+
cdrref(linkMap, 2);
90+
}
8891
txcal(linkMap);
8992
rxcal(linkMap);
9093
}

0 commit comments

Comments
 (0)