v1.0.0-rc.31

This commit is contained in:
2025-03-02 13:15:28 +01:00
parent aeabc81a4c
commit ddf4c75645
309 changed files with 8705 additions and 1421 deletions
+16 -8
View File
@@ -1992,18 +1992,24 @@ TEST_CASE("HLS_C_Simulation_count_sat_and_err_pixels", "[FPGA][Full]") {
DiffractionExperiment x((DetectorGeometry(nmodules)));
x.Mode(DetectorMode::Raw);
x.UseInternalPacketGenerator(true).ImagesPerTrigger(4).PedestalG0Frames(0);
x.UseInternalPacketGenerator(true).ImagesPerTrigger(4).PedestalG0Frames(0).PixelSigned(true);
HLSSimulatedDevice test(0, 64);
std::vector<uint16_t> v(RAW_MODULE_SIZE, 0);
v[567] = 0xc000;
v[RAW_MODULE_COLS * 511 + 255] = 0xc000;
v[RAW_MODULE_COLS * 250 + 233] = 0xffff;
v[0] = 0xffff;
v[RAW_MODULE_SIZE-1] = 0xffff;
std::vector<int16_t> v(RAW_MODULE_SIZE, 0);
v[567] = INT16_MAX;
v[RAW_MODULE_COLS * 511 + 255] = INT16_MAX;
v[RAW_MODULE_COLS * 250 + 233] = INT16_MIN;
v[0] = INT16_MIN;
v[RAW_MODULE_SIZE-1] = INT16_MIN;
v[23] = 23;
v[24] = -24;
v[25] = 27;
v[1500] = -25;
v[1501] = 30;
v[1502] = INT16_MIN + 25;
for (int m = 0; m < x.GetModulesNum(); m++)
test.SetInternalGeneratorFrame(v.data(), m);
test.SetInternalGeneratorFrame((uint16_t *) v.data(), m);
REQUIRE_NOTHROW(test.StartAction(x));
@@ -2014,6 +2020,8 @@ TEST_CASE("HLS_C_Simulation_count_sat_and_err_pixels", "[FPGA][Full]") {
for (int m = 0; m < nmodules; m++) {
CHECK(test.GetDeviceOutput(image, m)->module_statistics.saturated_pixels == 2);
CHECK(test.GetDeviceOutput(image, m)->module_statistics.err_pixels == 3);
CHECK(test.GetDeviceOutput(image, m)->module_statistics.max_value == 30);
CHECK(test.GetDeviceOutput(image, m)->module_statistics.load_calibration_destination == INT16_MIN + 25);
}
}
}