Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endif()

# Define project
project(ReadoutCard
VERSION 0.45.7
VERSION 0.46.0
DESCRIPTION "O2 ReadoutCard library"
LANGUAGES C CXX
)
Expand Down
3 changes: 3 additions & 0 deletions doc/releaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,6 @@ This file describes the main feature changes for released versions of ReadoutCar

## 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).

## v0.46.0 - 19/03/2025
- class DmaChannelInterface: added getCounterFirstOrbit(), c.f. JIRA OMON-800
7 changes: 7 additions & 0 deletions include/ReadoutCard/DmaChannelInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ class DmaChannelInterface
/// Gets card unique ID, such as an FPGA chip ID in the case of the CRU
/// \return A string containing the unique ID
virtual boost::optional<std::string> getCardId() = 0;

/// Gets the first orbit received by CRU
/// cf JIRA OMON-800
/// \return orbit number, or -1 if not found.
virtual int32_t getCounterFirstOrbit() {
return -1;
}
};

} // namespace roc
Expand Down
13 changes: 13 additions & 0 deletions src/Cru/CruDmaChannel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -481,5 +481,18 @@ boost::optional<std::string> CruDmaChannel::getCardId()
}
}

int32_t CruDmaChannel::getCounterFirstOrbit() {
int address = 0x0;
int endpoint = getBar()->getEndpointNumber();
if (endpoint == 0) {
address = 0x64002C;
} else if (endpoint == 1) {
address = 0x74002C;
} else {
return -1;
}
return getBar2()->readRegister(address / 4);
}

} // namespace roc
} // namespace o2
2 changes: 2 additions & 0 deletions src/Cru/CruDmaChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class CruDmaChannel final : public DmaChannelPdaBase
virtual boost::optional<std::string> getCardId() override;
AllowedChannels allowedChannels();

virtual int32_t getCounterFirstOrbit() override;

protected:
virtual void deviceStartDma() override;
virtual void deviceStopDma() override;
Expand Down
Loading