Skip to content

Commit 039ce0e

Browse files
authored
Merge pull request #391 from sy-c/master
v0.38.0
2 parents e4d6a58 + c23ee7a commit 039ce0e

File tree

7 files changed

+69
-2
lines changed

7 files changed

+69
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ add_library(ReadoutCard SHARED
159159
src/Pda/PdaBar.cxx
160160
src/Pda/PdaDevice.cxx
161161
src/Pda/PdaDmaBuffer.cxx
162+
src/ReadoutCardVersion.cxx
162163
src/RocPciDevice.cxx
163164
src/Utilities/Hugetlbfs.cxx
164165
src/Utilities/MemoryMaps.cxx

doc/releaseNotes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ReadoutCard release notes
2+
3+
This file describes the main feature changes for released versions of ReadoutCard library and tools.
4+
5+
## v0.38.0 - 05/09/2022
6+
- Added release notes as part of source code.
7+
- Added library version number. Can be retrieved at runtime with o2::roc::getReadoutCardVersion().
8+
- Fixed bug in DMA reset. Old data from previous run could stay in the pipeline if previous process was stopped abruptly.

include/ReadoutCard/ReadoutCard.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@
2222
#include "ReadoutCard/Exception.h"
2323
#include "ReadoutCard/Parameters.h"
2424
#include "ReadoutCard/RegisterReadWriteInterface.h"
25+
#include "ReadoutCard/Version.h"

include/ReadoutCard/Version.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
3+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
4+
// All rights not expressly granted are reserved.
5+
//
6+
// This software is distributed under the terms of the GNU General Public
7+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
8+
//
9+
// In applying this license CERN does not waive the privileges and immunities
10+
// granted to it by virtue of its status as an Intergovernmental Organization
11+
// or submit itself to any jurisdiction.
12+
13+
#ifndef O2_READOUTCARD_INCLUDE_VERSION_H_
14+
#define O2_READOUTCARD_INCLUDE_VERSION_H_
15+
16+
namespace o2
17+
{
18+
namespace roc
19+
{
20+
21+
/// Get the ReadoutCard library version
22+
const char* getReadoutCardVersion();
23+
24+
} // namespace roc
25+
} // namespace o2
26+
27+
#endif

src/Cru/Constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static constexpr uint32_t DATA_MIDTRG(0x2);*/
200200

201201
/// Registers for getting TTC info
202202
static constexpr Register TTC_ONU_STICKY(0x00200014);
203-
static constexpr Register TTC_ONU_STICKY_MON(0x0020001c);
203+
static constexpr Register TTC_ONU_STICKY_MON(0x00200014);
204204
static constexpr Register TTC_PON_QUALITY(0x0010000C);
205205

206206
/// Registers used for TTC calibration

src/Cru/CruDmaChannel.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ void CruDmaChannel::deviceStartDma()
142142
log("Did not set data source, feature not supported by firmware", LogWarningDevel_(4254));
143143
}
144144

145+
if (dataSourceSelection == Cru::Registers::DATA_SOURCE_SELECT_GBT) {
146+
getBar2()->disableDataTaking(); // Make sure we don't start from a bad state - shall be done before reset
147+
}
148+
145149
// Reset CRU (should be done after link mask set)
146150
resetCru();
147151

@@ -162,7 +166,6 @@ void CruDmaChannel::deviceStartDma()
162166

163167
// Enable data taking
164168
if (dataSourceSelection == Cru::Registers::DATA_SOURCE_SELECT_GBT) {
165-
getBar2()->disableDataTaking(); // Make sure we don't start from a bad state
166169
getBar2()->enableDataTaking();
167170
}
168171
}

src/ReadoutCardVersion.cxx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#include "ReadoutCard/Version.h"
13+
14+
#define O2_READOUTCARD_VERSION "0.38.0"
15+
16+
namespace o2
17+
{
18+
namespace roc
19+
{
20+
21+
const char* getReadoutCardVersion()
22+
{
23+
return O2_READOUTCARD_VERSION;
24+
}
25+
26+
} // namespace roc
27+
} // namespace o2

0 commit comments

Comments
 (0)