diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ff9873d..32d5743b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ endif() # Define project project(ReadoutCard - VERSION 0.45.6 + VERSION 0.45.7 DESCRIPTION "O2 ReadoutCard library" LANGUAGES C CXX ) diff --git a/doc/releaseNotes.md b/doc/releaseNotes.md index c7ad2a23..518eaddc 100644 --- a/doc/releaseNotes.md +++ b/doc/releaseNotes.md @@ -90,3 +90,6 @@ This file describes the main feature changes for released versions of ReadoutCar ## v0.45.6 - 07/02/2025 - Updated list of firmwares. + +## v0.45.7 - 13/03/2025 +- 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). diff --git a/src/CommandLineUtilities/ProgramConfig.cxx b/src/CommandLineUtilities/ProgramConfig.cxx index c2fbb1a2..bca58c58 100644 --- a/src/CommandLineUtilities/ProgramConfig.cxx +++ b/src/CommandLineUtilities/ProgramConfig.cxx @@ -36,6 +36,14 @@ namespace po = boost::program_options; std::string cmd; // program command invoked +namespace o2 +{ +namespace roc +{ +extern bool testModeORC501; // testMode flag used for some FW dev, cf JIRA ORC-501 +} +} + /// Get a status report of given card std::string getStatusReport(Parameters::CardIdType cardId) { @@ -322,6 +330,9 @@ class ProgramConfig : public Program options.add_options()("drop-bad-rdh", po::bool_switch(&mOptions.dropBadRdhEnabled), "Flag to enable dropping of packets with bad RDH"); + options.add_options()("test-mode-ORC501", + po::bool_switch(&o2::roc::testModeORC501), + "Flag to enable test mode as described in JIRA ORC-501"); Options::addOptionCardId(options); } diff --git a/src/Cru/CruBar.cxx b/src/Cru/CruBar.cxx index 5ff90329..a966bd01 100644 --- a/src/Cru/CruBar.cxx +++ b/src/Cru/CruBar.cxx @@ -39,6 +39,8 @@ namespace o2 namespace roc { +bool testModeORC501 = false; // testMode flag used for some FW dev, cf JIRA ORC-501 + using Link = Cru::Link; CruBar::CruBar(const Parameters& parameters, std::unique_ptr rocPciDevice) @@ -776,9 +778,14 @@ void CruBar::configure(bool force) } if (mGbtEnabled /*|| !checkClockConsistent(reportInfo.linkMap)*/) { + if (testModeORC501) { + log("GBT : using test mode, cf JIRA ORC-501", LogInfoDevel_(4601)); + } Gbt gbt = Gbt(mPdaBar, mLinkMap, mWrapperCount, mEndpoint); gbt.calibrateGbt(mLinkMap); - Cru::fpllref(mLinkMap, mPdaBar, 2); + if (!testModeORC501) { // testMode flag used for some FW dev, cf JIRA ORC-501 + Cru::fpllref(mLinkMap, mPdaBar, 2); + } Cru::fpllcal(mLinkMap, mPdaBar); gbt.resetFifo(); } diff --git a/src/Cru/Gbt.cxx b/src/Cru/Gbt.cxx index 442abd31..3fbc35f5 100644 --- a/src/Cru/Gbt.cxx +++ b/src/Cru/Gbt.cxx @@ -84,7 +84,10 @@ void Gbt::calibrateGbt(std::map linkMap) { //Cru::fpllref(linkMap, mPdaBar, 2); //Has been bound with clock configuration //Cru::fpllcal(linkMap, mPdaBar); //same - cdrref(linkMap, 2); + extern bool testModeORC501; // testMode flag used for some FW dev, cf JIRA ORC-501 + if (!testModeORC501) { // testMode flag used for some FW dev, cf JIRA ORC-501 + cdrref(linkMap, 2); + } txcal(linkMap); rxcal(linkMap); } diff --git a/src/ReadoutCardVersion.cxx b/src/ReadoutCardVersion.cxx index 0257d1ba..03977c6c 100644 --- a/src/ReadoutCardVersion.cxx +++ b/src/ReadoutCardVersion.cxx @@ -11,7 +11,7 @@ #include "ReadoutCard/Version.h" -#define O2_READOUTCARD_VERSION "0.45.6" +#define O2_READOUTCARD_VERSION "0.45.7" namespace o2 {