mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-01 18:30:05 +02:00
Merge pull request #1200 from slsdetectorgroup/fix/dbitreorder_should_only_be_defined_for_chip_and_xilinx
Fix/dbitreorder should only be defined for chip and xilinx
This commit is contained in:
commit
1b0e891912
@ -72,14 +72,6 @@ void DataProcessor::SetStreamingStartFnum(uint32_t value) {
|
|||||||
|
|
||||||
void DataProcessor::SetFramePadding(bool enable) { framePadding = enable; }
|
void DataProcessor::SetFramePadding(bool enable) { framePadding = enable; }
|
||||||
|
|
||||||
void DataProcessor::SetCtbDbitList(std::vector<int> value) {
|
|
||||||
ctbDbitList = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DataProcessor::SetCtbDbitOffset(int value) { ctbDbitOffset = value; }
|
|
||||||
|
|
||||||
void DataProcessor::SetCtbDbitReorder(bool value) { ctbDbitReorder = value; }
|
|
||||||
|
|
||||||
void DataProcessor::SetQuadEnable(bool value) { quadEnable = value; }
|
void DataProcessor::SetQuadEnable(bool value) { quadEnable = value; }
|
||||||
|
|
||||||
void DataProcessor::SetFlipRows(bool fd) {
|
void DataProcessor::SetFlipRows(bool fd) {
|
||||||
@ -303,7 +295,7 @@ void DataProcessor::ThreadExecution() {
|
|||||||
memImage->data);
|
memImage->data);
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
fifo->FreeAddress(buffer);
|
fifo->FreeAddress(buffer);
|
||||||
return;
|
throw RuntimeError(e.what());
|
||||||
}
|
}
|
||||||
|
|
||||||
// stream (if time/freq to stream) or free
|
// stream (if time/freq to stream) or free
|
||||||
@ -361,13 +353,14 @@ void DataProcessor::ProcessAnImage(sls_receiver_header &header, size_t &size,
|
|||||||
PadMissingPackets(header, data);
|
PadMissingPackets(header, data);
|
||||||
|
|
||||||
// rearrange ctb digital bits
|
// rearrange ctb digital bits
|
||||||
if (!ctbDbitList.empty()) {
|
if (!generalData->ctbDbitList.empty()) {
|
||||||
ArrangeDbitData(size, data);
|
ArrangeDbitData(size, data);
|
||||||
} else if (ctbDbitReorder) {
|
} else if (generalData->ctbDbitReorder) {
|
||||||
ctbDbitList.resize(64);
|
std::vector<int> ctbDbitList(64);
|
||||||
std::iota(ctbDbitList.begin(), ctbDbitList.end(), 0);
|
std::iota(ctbDbitList.begin(), ctbDbitList.end(), 0);
|
||||||
|
generalData->SetctbDbitList(ctbDbitList);
|
||||||
ArrangeDbitData(size, data);
|
ArrangeDbitData(size, data);
|
||||||
} else if (ctbDbitOffset > 0) {
|
} else if (generalData->ctbDbitOffset > 0) {
|
||||||
RemoveTrailingBits(size, data);
|
RemoveTrailingBits(size, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -542,6 +535,7 @@ void DataProcessor::RemoveTrailingBits(size_t &size, char *data) {
|
|||||||
const size_t nDigitalDataBytes = generalData->GetNumberOfDigitalDatabytes();
|
const size_t nDigitalDataBytes = generalData->GetNumberOfDigitalDatabytes();
|
||||||
const size_t nTransceiverDataBytes =
|
const size_t nTransceiverDataBytes =
|
||||||
generalData->GetNumberOfTransceiverDatabytes();
|
generalData->GetNumberOfTransceiverDatabytes();
|
||||||
|
const size_t ctbDbitOffset = generalData->ctbDbitOffset;
|
||||||
|
|
||||||
const size_t ctbDigitalDataBytes = nDigitalDataBytes - ctbDbitOffset;
|
const size_t ctbDigitalDataBytes = nDigitalDataBytes - ctbDbitOffset;
|
||||||
|
|
||||||
@ -568,10 +562,14 @@ void DataProcessor::ArrangeDbitData(size_t &size, char *data) {
|
|||||||
std::to_string(generalData->detType));
|
std::to_string(generalData->detType));
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t nAnalogDataBytes = generalData->GetNumberOfAnalogDatabytes();
|
const size_t nAnalogDataBytes = generalData->GetNumberOfAnalogDatabytes();
|
||||||
size_t nDigitalDataBytes = generalData->GetNumberOfDigitalDatabytes();
|
const size_t nDigitalDataBytes = generalData->GetNumberOfDigitalDatabytes();
|
||||||
size_t nTransceiverDataBytes =
|
const size_t nTransceiverDataBytes =
|
||||||
generalData->GetNumberOfTransceiverDatabytes();
|
generalData->GetNumberOfTransceiverDatabytes();
|
||||||
|
const size_t ctbDbitOffset = generalData->ctbDbitOffset;
|
||||||
|
const bool ctbDbitReorder = generalData->ctbDbitReorder;
|
||||||
|
const auto ctbDbitList = generalData->ctbDbitList;
|
||||||
|
|
||||||
// TODO! (Erik) Refactor and add tests
|
// TODO! (Erik) Refactor and add tests
|
||||||
int ctbDigitalDataBytes = nDigitalDataBytes - ctbDbitOffset;
|
int ctbDigitalDataBytes = nDigitalDataBytes - ctbDbitOffset;
|
||||||
|
|
||||||
|
@ -45,9 +45,6 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
void SetStreamingTimerInMs(uint32_t value);
|
void SetStreamingTimerInMs(uint32_t value);
|
||||||
void SetStreamingStartFnum(uint32_t value);
|
void SetStreamingStartFnum(uint32_t value);
|
||||||
void SetFramePadding(bool enable);
|
void SetFramePadding(bool enable);
|
||||||
void SetCtbDbitList(std::vector<int> value);
|
|
||||||
void SetCtbDbitOffset(int value);
|
|
||||||
void SetCtbDbitReorder(bool value);
|
|
||||||
void SetQuadEnable(bool value);
|
void SetQuadEnable(bool value);
|
||||||
void SetFlipRows(bool fd);
|
void SetFlipRows(bool fd);
|
||||||
void SetNumberofTotalFrames(uint64_t value);
|
void SetNumberofTotalFrames(uint64_t value);
|
||||||
@ -171,11 +168,8 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
uint32_t streamingTimerInMs;
|
uint32_t streamingTimerInMs;
|
||||||
uint32_t streamingStartFnum;
|
uint32_t streamingStartFnum;
|
||||||
uint32_t currentFreqCount{0};
|
uint32_t currentFreqCount{0};
|
||||||
struct timespec timerbegin {};
|
struct timespec timerbegin{};
|
||||||
bool framePadding;
|
bool framePadding;
|
||||||
std::vector<int> ctbDbitList{};
|
|
||||||
int ctbDbitOffset{0};
|
|
||||||
bool ctbDbitReorder{true};
|
|
||||||
std::atomic<bool> startedFlag{false};
|
std::atomic<bool> startedFlag{false};
|
||||||
std::atomic<uint64_t> firstIndex{0};
|
std::atomic<uint64_t> firstIndex{0};
|
||||||
bool quadEnable{false};
|
bool quadEnable{false};
|
||||||
|
@ -52,6 +52,9 @@ class GeneralData {
|
|||||||
uint32_t nAnalogSamples{0};
|
uint32_t nAnalogSamples{0};
|
||||||
uint32_t nDigitalSamples{0};
|
uint32_t nDigitalSamples{0};
|
||||||
uint32_t nTransceiverSamples{0};
|
uint32_t nTransceiverSamples{0};
|
||||||
|
std::vector<int> ctbDbitList{};
|
||||||
|
int ctbDbitOffset{0};
|
||||||
|
bool ctbDbitReorder{false};
|
||||||
slsDetectorDefs::readoutMode readoutType{slsDetectorDefs::ANALOG_ONLY};
|
slsDetectorDefs::readoutMode readoutType{slsDetectorDefs::ANALOG_ONLY};
|
||||||
uint32_t adcEnableMaskOneGiga{BIT32_MASK};
|
uint32_t adcEnableMaskOneGiga{BIT32_MASK};
|
||||||
uint32_t adcEnableMaskTenGiga{BIT32_MASK};
|
uint32_t adcEnableMaskTenGiga{BIT32_MASK};
|
||||||
@ -148,6 +151,18 @@ class GeneralData {
|
|||||||
virtual void SetTransceiverEnableMask(int n) {
|
virtual void SetTransceiverEnableMask(int n) {
|
||||||
ThrowGenericError("SetTransceiverEnableMask");
|
ThrowGenericError("SetTransceiverEnableMask");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtual void SetctbDbitOffset(const int n) {
|
||||||
|
ThrowGenericError("SetctbDbitOffset");
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual void SetctbDbitList(const std::vector<int> &value) {
|
||||||
|
ThrowGenericError("SetctbDbitList");
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual void SetctbDbitReorder(const bool reorder) {
|
||||||
|
ThrowGenericError("SetctbDbitReorder");
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class EigerData : public GeneralData {
|
class EigerData : public GeneralData {
|
||||||
@ -387,6 +402,7 @@ class ChipTestBoardData : public GeneralData {
|
|||||||
framesPerFile = CTB_MAX_FRAMES_PER_FILE;
|
framesPerFile = CTB_MAX_FRAMES_PER_FILE;
|
||||||
fifoDepth = 2500;
|
fifoDepth = 2500;
|
||||||
standardheader = true;
|
standardheader = true;
|
||||||
|
ctbDbitReorder = true;
|
||||||
UpdateImageSize();
|
UpdateImageSize();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -412,6 +428,12 @@ class ChipTestBoardData : public GeneralData {
|
|||||||
UpdateImageSize();
|
UpdateImageSize();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void SetctbDbitOffset(const int value) { ctbDbitOffset = value; }
|
||||||
|
|
||||||
|
void SetctbDbitList(const std::vector<int> &value) { ctbDbitList = value; }
|
||||||
|
|
||||||
|
void SetctbDbitReorder(const bool value) { ctbDbitReorder = value; }
|
||||||
|
|
||||||
void SetOneGigaAdcEnableMask(int n) {
|
void SetOneGigaAdcEnableMask(int n) {
|
||||||
adcEnableMaskOneGiga = n;
|
adcEnableMaskOneGiga = n;
|
||||||
UpdateImageSize();
|
UpdateImageSize();
|
||||||
@ -518,6 +540,7 @@ class XilinxChipTestBoardData : public GeneralData {
|
|||||||
dataSize = 8144;
|
dataSize = 8144;
|
||||||
packetSize = headerSizeinPacket + dataSize;
|
packetSize = headerSizeinPacket + dataSize;
|
||||||
tengigaEnable = true;
|
tengigaEnable = true;
|
||||||
|
ctbDbitReorder = true;
|
||||||
UpdateImageSize();
|
UpdateImageSize();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -543,6 +566,12 @@ class XilinxChipTestBoardData : public GeneralData {
|
|||||||
UpdateImageSize();
|
UpdateImageSize();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void SetctbDbitOffset(const int value) { ctbDbitOffset = value; }
|
||||||
|
|
||||||
|
void SetctbDbitList(const std::vector<int> &value) { ctbDbitList = value; }
|
||||||
|
|
||||||
|
void SetctbDbitReorder(const bool value) { ctbDbitReorder = value; }
|
||||||
|
|
||||||
void SetOneGigaAdcEnableMask(int n) {
|
void SetOneGigaAdcEnableMask(int n) {
|
||||||
adcEnableMaskOneGiga = n;
|
adcEnableMaskOneGiga = n;
|
||||||
UpdateImageSize();
|
UpdateImageSize();
|
||||||
|
@ -200,9 +200,6 @@ void Implementation::SetupDataProcessor(int i) {
|
|||||||
dataProcessor[i]->SetStreamingTimerInMs(streamingTimerInMs);
|
dataProcessor[i]->SetStreamingTimerInMs(streamingTimerInMs);
|
||||||
dataProcessor[i]->SetStreamingStartFnum(streamingStartFnum);
|
dataProcessor[i]->SetStreamingStartFnum(streamingStartFnum);
|
||||||
dataProcessor[i]->SetFramePadding(framePadding);
|
dataProcessor[i]->SetFramePadding(framePadding);
|
||||||
dataProcessor[i]->SetCtbDbitList(ctbDbitList);
|
|
||||||
dataProcessor[i]->SetCtbDbitOffset(ctbDbitOffset);
|
|
||||||
dataProcessor[i]->SetCtbDbitReorder(ctbDbitReorder);
|
|
||||||
dataProcessor[i]->SetQuadEnable(quadEnable);
|
dataProcessor[i]->SetQuadEnable(quadEnable);
|
||||||
dataProcessor[i]->SetFlipRows(flipRows);
|
dataProcessor[i]->SetFlipRows(flipRows);
|
||||||
dataProcessor[i]->SetNumberofTotalFrames(numberOfTotalFrames);
|
dataProcessor[i]->SetNumberofTotalFrames(numberOfTotalFrames);
|
||||||
@ -991,11 +988,11 @@ void Implementation::StartMasterWriter() {
|
|||||||
? 1
|
? 1
|
||||||
: 0;
|
: 0;
|
||||||
masterAttributes.digitalSamples = generalData->nDigitalSamples;
|
masterAttributes.digitalSamples = generalData->nDigitalSamples;
|
||||||
masterAttributes.dbitoffset = ctbDbitOffset;
|
masterAttributes.dbitoffset = generalData->ctbDbitOffset;
|
||||||
masterAttributes.dbitreorder = ctbDbitReorder;
|
masterAttributes.dbitreorder = generalData->ctbDbitReorder;
|
||||||
masterAttributes.dbitlist = 0;
|
masterAttributes.dbitlist = 0;
|
||||||
|
|
||||||
for (auto &i : ctbDbitList) {
|
for (auto &i : generalData->ctbDbitList) {
|
||||||
masterAttributes.dbitlist |= (static_cast<uint64_t>(1) << i);
|
masterAttributes.dbitlist |= (static_cast<uint64_t>(1) << i);
|
||||||
}
|
}
|
||||||
masterAttributes.transceiverSamples =
|
masterAttributes.transceiverSamples =
|
||||||
@ -1751,31 +1748,29 @@ void Implementation::setTenGigaADCEnableMask(uint32_t mask) {
|
|||||||
LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame);
|
LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> Implementation::getDbitList() const { return ctbDbitList; }
|
std::vector<int> Implementation::getDbitList() const {
|
||||||
|
return generalData->ctbDbitList;
|
||||||
|
}
|
||||||
|
|
||||||
void Implementation::setDbitList(const std::vector<int> &v) {
|
void Implementation::setDbitList(const std::vector<int> &v) {
|
||||||
ctbDbitList = v;
|
generalData->SetctbDbitList(v);
|
||||||
for (const auto &it : dataProcessor)
|
LOG(logINFO) << "Dbit list: " << ToString(v);
|
||||||
it->SetCtbDbitList(ctbDbitList);
|
|
||||||
LOG(logINFO) << "Dbit list: " << ToString(ctbDbitList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Implementation::getDbitOffset() const { return ctbDbitOffset; }
|
int Implementation::getDbitOffset() const { return generalData->ctbDbitOffset; }
|
||||||
|
|
||||||
void Implementation::setDbitOffset(const int s) {
|
void Implementation::setDbitOffset(const int s) {
|
||||||
ctbDbitOffset = s;
|
generalData->SetctbDbitOffset(s);
|
||||||
for (const auto &it : dataProcessor)
|
LOG(logINFO) << "Dbit offset: " << s;
|
||||||
it->SetCtbDbitOffset(ctbDbitOffset);
|
|
||||||
LOG(logINFO) << "Dbit offset: " << ctbDbitOffset;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Implementation::getDbitReorder() const { return ctbDbitReorder; }
|
bool Implementation::getDbitReorder() const {
|
||||||
|
return generalData->ctbDbitReorder;
|
||||||
|
}
|
||||||
|
|
||||||
void Implementation::setDbitReorder(const bool reorder) {
|
void Implementation::setDbitReorder(const bool reorder) {
|
||||||
ctbDbitReorder = reorder;
|
generalData->SetctbDbitReorder(reorder);
|
||||||
for (const auto &it : dataProcessor)
|
LOG(logINFO) << "Dbit reorder: " << reorder;
|
||||||
it->SetCtbDbitReorder(ctbDbitReorder);
|
|
||||||
LOG(logINFO) << "Dbit reorder: " << ctbDbitReorder;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t Implementation::getTransceiverEnableMask() const {
|
uint32_t Implementation::getTransceiverEnableMask() const {
|
||||||
|
@ -370,9 +370,6 @@ class Implementation : private virtual slsDetectorDefs {
|
|||||||
int thresholdEnergyeV{-1};
|
int thresholdEnergyeV{-1};
|
||||||
std::array<int, 3> thresholdAllEnergyeV = {{-1, -1, -1}};
|
std::array<int, 3> thresholdAllEnergyeV = {{-1, -1, -1}};
|
||||||
std::vector<int64_t> rateCorrections;
|
std::vector<int64_t> rateCorrections;
|
||||||
std::vector<int> ctbDbitList;
|
|
||||||
int ctbDbitOffset{0};
|
|
||||||
bool ctbDbitReorder{true};
|
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
void (*startAcquisitionCallBack)(const startCallbackHeader,
|
void (*startAcquisitionCallBack)(const startCallbackHeader,
|
||||||
|
@ -32,17 +32,23 @@ class GeneralDataTest : public GeneralData {
|
|||||||
nTransceiverBytes = value;
|
nTransceiverBytes = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetCtbDbitOffset(const int value) { ctbDbitOffset = value; }
|
||||||
|
|
||||||
|
void SetCtbDbitList(const std::vector<int> &value) { ctbDbitList = value; }
|
||||||
|
|
||||||
|
void SetCtbDbitReorder(const bool value) { ctbDbitReorder = value; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int nAnalogBytes;
|
int nAnalogBytes{};
|
||||||
int nDigitalBytes;
|
int nDigitalBytes{};
|
||||||
int nTransceiverBytes;
|
int nTransceiverBytes{};
|
||||||
};
|
};
|
||||||
|
|
||||||
// dummy DataProcessor class for testing
|
// dummy DataProcessor class for testing
|
||||||
class DataProcessorTest : public DataProcessor {
|
class DataProcessorTest : public DataProcessor {
|
||||||
public:
|
public:
|
||||||
DataProcessorTest() : DataProcessor(0){};
|
DataProcessorTest() : DataProcessor(0) {};
|
||||||
~DataProcessorTest(){};
|
~DataProcessorTest() {};
|
||||||
void ArrangeDbitData(size_t &size, char *data) {
|
void ArrangeDbitData(size_t &size, char *data) {
|
||||||
DataProcessor::ArrangeDbitData(size, data);
|
DataProcessor::ArrangeDbitData(size, data);
|
||||||
}
|
}
|
||||||
@ -67,8 +73,6 @@ class DataProcessorTestFixture {
|
|||||||
dataprocessor = new DataProcessorTest;
|
dataprocessor = new DataProcessorTest;
|
||||||
generaldata = new GeneralDataTest;
|
generaldata = new GeneralDataTest;
|
||||||
|
|
||||||
// set_num_samples(num_samples);
|
|
||||||
|
|
||||||
generaldata->SetNumberOfAnalogDatabytes(num_analog_bytes);
|
generaldata->SetNumberOfAnalogDatabytes(num_analog_bytes);
|
||||||
generaldata->SetNumberOfTransceiverDatabytes(num_transceiver_bytes);
|
generaldata->SetNumberOfTransceiverDatabytes(num_transceiver_bytes);
|
||||||
generaldata->SetNumberOfDigitalDatabytes(num_digital_bytes +
|
generaldata->SetNumberOfDigitalDatabytes(num_digital_bytes +
|
||||||
@ -140,7 +144,7 @@ TEST_CASE_METHOD(DataProcessorTestFixture, "Remove Trailing Bits",
|
|||||||
set_random_offset_bytes(num_random_offset_bytes);
|
set_random_offset_bytes(num_random_offset_bytes);
|
||||||
set_data();
|
set_data();
|
||||||
|
|
||||||
dataprocessor->SetCtbDbitOffset(num_random_offset_bytes);
|
generaldata->SetCtbDbitOffset(num_random_offset_bytes);
|
||||||
|
|
||||||
size_t expected_size = get_size() - num_random_offset_bytes;
|
size_t expected_size = get_size() - num_random_offset_bytes;
|
||||||
|
|
||||||
@ -183,8 +187,8 @@ TEST_CASE_METHOD(DataProcessorTestFixture, "Reorder all",
|
|||||||
|
|
||||||
std::vector<int> bitlist(64);
|
std::vector<int> bitlist(64);
|
||||||
std::iota(bitlist.begin(), bitlist.end(), 0);
|
std::iota(bitlist.begin(), bitlist.end(), 0);
|
||||||
dataprocessor->SetCtbDbitList(bitlist);
|
generaldata->SetCtbDbitList(bitlist);
|
||||||
dataprocessor->SetCtbDbitReorder(true); // set reorder to true
|
generaldata->SetCtbDbitReorder(true); // set reorder to true
|
||||||
|
|
||||||
const size_t expected_size =
|
const size_t expected_size =
|
||||||
num_analog_bytes + num_transceiver_bytes + expected_num_digital_bytes;
|
num_analog_bytes + num_transceiver_bytes + expected_num_digital_bytes;
|
||||||
@ -222,9 +226,9 @@ TEST_CASE_METHOD(DataProcessorTestFixture,
|
|||||||
|
|
||||||
std::vector<int> bitlist(64);
|
std::vector<int> bitlist(64);
|
||||||
std::iota(bitlist.begin(), bitlist.end(), 0);
|
std::iota(bitlist.begin(), bitlist.end(), 0);
|
||||||
dataprocessor->SetCtbDbitList(bitlist);
|
generaldata->SetCtbDbitList(bitlist);
|
||||||
dataprocessor->SetCtbDbitOffset(num_random_offset_bytes);
|
generaldata->SetCtbDbitOffset(num_random_offset_bytes);
|
||||||
dataprocessor->SetCtbDbitReorder(true); // set reorder to true
|
generaldata->SetCtbDbitReorder(true); // set reorder to true
|
||||||
|
|
||||||
const size_t expected_num_digital_bytes = 64;
|
const size_t expected_num_digital_bytes = 64;
|
||||||
std::vector<uint8_t> expected_digital_part{0b00011111};
|
std::vector<uint8_t> expected_digital_part{0b00011111};
|
||||||
@ -272,9 +276,9 @@ TEST_CASE_METHOD(DataProcessorTestFixture, "Arrange bitlist with reorder false",
|
|||||||
std::tie(num_samples, bitlist, expected_num_digital_bytes,
|
std::tie(num_samples, bitlist, expected_num_digital_bytes,
|
||||||
expected_digital_part) = parameters;
|
expected_digital_part) = parameters;
|
||||||
|
|
||||||
dataprocessor->SetCtbDbitList(bitlist);
|
generaldata->SetCtbDbitList(bitlist);
|
||||||
|
|
||||||
dataprocessor->SetCtbDbitReorder(false);
|
generaldata->SetCtbDbitReorder(false);
|
||||||
|
|
||||||
set_num_samples(num_samples);
|
set_num_samples(num_samples);
|
||||||
set_data();
|
set_data();
|
||||||
@ -324,9 +328,9 @@ TEST_CASE_METHOD(DataProcessorTestFixture, "Arrange bitlist with reorder true",
|
|||||||
std::tie(num_samples, bitlist, expected_num_digital_bytes,
|
std::tie(num_samples, bitlist, expected_num_digital_bytes,
|
||||||
expected_digital_part) = parameters;
|
expected_digital_part) = parameters;
|
||||||
|
|
||||||
dataprocessor->SetCtbDbitList(bitlist);
|
generaldata->SetCtbDbitList(bitlist);
|
||||||
|
|
||||||
dataprocessor->SetCtbDbitReorder(true);
|
generaldata->SetCtbDbitReorder(true);
|
||||||
|
|
||||||
set_num_samples(num_samples);
|
set_num_samples(num_samples);
|
||||||
set_data();
|
set_data();
|
||||||
@ -368,11 +372,11 @@ TEST_CASE_METHOD(DataProcessorTestFixture,
|
|||||||
set_random_offset_bytes(num_random_offset_bytes);
|
set_random_offset_bytes(num_random_offset_bytes);
|
||||||
set_data();
|
set_data();
|
||||||
|
|
||||||
dataprocessor->SetCtbDbitList(bitlist);
|
generaldata->SetCtbDbitList(bitlist);
|
||||||
|
|
||||||
dataprocessor->SetCtbDbitReorder(false);
|
generaldata->SetCtbDbitReorder(false);
|
||||||
|
|
||||||
dataprocessor->SetCtbDbitOffset(num_random_offset_bytes);
|
generaldata->SetCtbDbitOffset(num_random_offset_bytes);
|
||||||
|
|
||||||
std::vector<uint8_t> expected_digital_part{0b00000111};
|
std::vector<uint8_t> expected_digital_part{0b00000111};
|
||||||
const size_t expected_num_digital_bytes = 5;
|
const size_t expected_num_digital_bytes = 5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user