Skip to content

Commit 22ab99e

Browse files
committed
changed test settings
1 parent 4f6d1f6 commit 22ab99e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/testROC.cxx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ class ROCdevice
5757

5858
private:
5959
std::string bankId = "testROC";
60-
size_t bankSize = 2 * 1024 * 1024 * 1024L;
60+
size_t bankSize = 1024 * 1024 * 1024L; // buffer siye
6161

62-
size_t memoryPoolNumberOfPages = 1000;
6362
size_t memoryPoolPageSize = 2 * 1024 * 1024;
63+
size_t memoryPoolNumberOfPages = 10 * int((bankSize / memoryPoolPageSize) / 10); // number of pages fitting in memory, round down to ten
64+
const char* memoryPoolType = "malloc";
6465

6566
std::string cardId = "0:0.0";
6667
int cfgChannelNumber = 0;
@@ -80,7 +81,7 @@ ROCdevice::ROCdevice(std::string id)
8081

8182
bankId += id;
8283

83-
bank = getMemoryBank(bankSize, "MemoryMappedFile", bankId);
84+
bank = getMemoryBank(bankSize, memoryPoolType, bankId);
8485
theMemoryBankManager.addBank(bank);
8586
mp = theMemoryBankManager.getPagedPool(memoryPoolPageSize, memoryPoolNumberOfPages, bankId); // pool of pages
8687

@@ -91,6 +92,7 @@ ROCdevice::ROCdevice(std::string id)
9192
params.setCardId(AliceO2::roc::Parameters::cardIdFromString(cardId));
9293
params.setChannelNumber(cfgChannelNumber);
9394
params.setDataSource(AliceO2::roc::DataSource::fromString(cfgDataSource));
95+
params.setFirmwareCheckEnabled(0);
9496

9597
params.setBufferParameters(AliceO2::roc::buffer_parameters::Memory{ mp->getBaseBlockAddress(), mp->getBaseBlockSize() });
9698

@@ -106,6 +108,8 @@ ROCdevice::ROCdevice(std::string id)
106108
std::string infoFirmwareVersion = channel->getFirmwareInfo().value_or("unknown");
107109
std::string infoCardId = channel->getCardId().value_or("unknown");
108110
theLog.log(LogInfoDevel_(3010), "ROC PCI %s @ NUMA node %d, serial number %s, firmware version %s, card id %s", infoPciAddress.c_str(), infoNumaNode, infoSerialNumber.c_str(), infoFirmwareVersion.c_str(), infoCardId.c_str());
111+
// test getCounterFirstOrbit()
112+
// printf("get = %X\n", (int)(channel->getCounterFirstOrbit()));
109113
}
110114

111115
ROCdevice::~ROCdevice() {}

0 commit comments

Comments
 (0)