Tests are adjusted to use blocking FPGA mode

This commit is contained in:
2023-09-06 12:35:44 +02:00
parent 3aeb3e09ee
commit da045c023b
2 changed files with 20 additions and 8 deletions
+3 -2
View File
@@ -77,7 +77,7 @@ TEST_CASE("HLS_C_Simulation_internal_packet_generator_custom_frame", "[FPGA][Ful
HLSSimulatedDevice test(0, 64);
test.SetCustomInternalGeneratorFrame(test_frame);
test.SetFPGANonBlockingMode(true);
test.SetFPGANonBlockingMode(false);
REQUIRE_NOTHROW(test.StartAction(x));
REQUIRE_NOTHROW(test.WaitForActionComplete());
@@ -119,7 +119,7 @@ TEST_CASE("HLS_C_Simulation_check_raw", "[FPGA][Full]") {
HLSSimulatedDevice test(0, 64);
test.CreatePackets(x, 1, 5, 0, raw_frames.data(), true);
test.CreateFinalPacket(x);
test.SetFPGANonBlockingMode(false);
REQUIRE_NOTHROW(test.StartAction(x));
REQUIRE_NOTHROW(test.WaitForActionComplete());
@@ -253,6 +253,7 @@ TEST_CASE("HLS_C_Simulation_check_lost_frame_raw", "[FPGA][Full]") {
test.CreatePacketJF(x, 1, 0, 0, data, false);
test.CreateFinalPacket(x);
test.SetFPGANonBlockingMode(false);
REQUIRE_NOTHROW(test.StartAction(x));
REQUIRE_NOTHROW(test.WaitForActionComplete());
+17 -6
View File
@@ -20,8 +20,9 @@ TEST_CASE("JFJochReceiverTest_Raw", "[JFJochReceiver]") {
std::vector<std::unique_ptr<AcquisitionDevice>> aq_devices;
for (int i = 0; i < x.GetDataStreamsNum(); i++) {
AcquisitionDevice *test;
HLSSimulatedDevice *test;
test = new HLSSimulatedDevice(i, 64);
test->SetFPGANonBlockingMode(false);
aq_devices.emplace_back(test);
}
@@ -51,9 +52,10 @@ TEST_CASE("JFJochReceiverTest_Conversion", "[JFJochReceiver]") {
std::vector<std::unique_ptr<AcquisitionDevice>> aq_devices;
for (int i = 0; i < x.GetDataStreamsNum(); i++) {
AcquisitionDevice *test;
HLSSimulatedDevice *test;
test = new HLSSimulatedDevice(i, 64);
test->EnableLogging(&logger);
test->SetFPGANonBlockingMode(false);
aq_devices.emplace_back(test);
}
@@ -79,8 +81,9 @@ TEST_CASE("JFJochReceiverTest_Conversion_Bin2x2", "[JFJochReceiver]") {
std::vector<std::unique_ptr<AcquisitionDevice>> aq_devices;
for (int i = 0; i < x.GetDataStreamsNum(); i++) {
AcquisitionDevice *test;
HLSSimulatedDevice *test;
test = new HLSSimulatedDevice(i, 64);
test->SetFPGANonBlockingMode(false);
test->EnableLogging(&logger);
aq_devices.emplace_back(test);
}
@@ -107,9 +110,10 @@ TEST_CASE("JFJochReceiverTest_ConversionOnCPU", "[JFJochReceiver]") {
std::vector<std::unique_ptr<AcquisitionDevice>> aq_devices;
for (int i = 0; i < x.GetDataStreamsNum(); i++) {
AcquisitionDevice *test;
HLSSimulatedDevice *test;
test = new HLSSimulatedDevice(i, 64);
test->EnableLogging(&logger);
test->SetFPGANonBlockingMode(false);
aq_devices.emplace_back(test);
}
@@ -136,9 +140,10 @@ TEST_CASE("JFJochReceiverTest_ConversionOnCPU_Bin2x2", "[JFJochReceiver]") {
std::vector<std::unique_ptr<AcquisitionDevice>> aq_devices;
for (int i = 0; i < x.GetDataStreamsNum(); i++) {
AcquisitionDevice *test;
HLSSimulatedDevice *test;
test = new HLSSimulatedDevice(i, 64);
test->EnableLogging(&logger);
test->SetFPGANonBlockingMode(false);
aq_devices.emplace_back(test);
}
@@ -167,9 +172,10 @@ TEST_CASE("JFJochReceiverTest_Conversion_StorageCell", "[JFJochReceiver]") {
std::vector<std::unique_ptr<AcquisitionDevice>> aq_devices;
for (int i = 0; i < x.GetDataStreamsNum(); i++) {
AcquisitionDevice *test;
HLSSimulatedDevice *test;
test = new HLSSimulatedDevice(i, 64);
test->EnableLogging(&logger);
test->SetFPGANonBlockingMode(false);
aq_devices.emplace_back(test);
}
@@ -214,6 +220,7 @@ TEST_CASE("JFJochReceiverTest_PedestalG1", "[JFJochReceiver]") {
test = new HLSSimulatedDevice(i, 64);
test->CreatePackets(x, 1, nframes, 0, pedestal_in.data(), false);
test->CreateFinalPacket(x);
test->SetFPGANonBlockingMode(false);
aq_devices.emplace_back(test);
}
@@ -282,6 +289,7 @@ TEST_CASE("JFJochReceiverTest_PedestalG2_storage_cell", "[JFJochReceiver]") {
pedestal_in.data() + j * RAW_MODULE_SIZE, false);
}
test->CreateFinalPacket(x);
test->SetFPGANonBlockingMode(false);
aq_devices.emplace_back(test);
}
@@ -336,6 +344,7 @@ TEST_CASE("JFJochReceiverTest_PedestalG0", "[JFJochReceiver]") {
test = new HLSSimulatedDevice(i, 64);
test->CreatePackets(x, 1, nframes, 0, pedestal_in.data(), false);
test->CreateFinalPacket(x);
test->SetFPGANonBlockingMode(false);
aq_devices.emplace_back(test);
}
@@ -388,6 +397,7 @@ TEST_CASE("JFJochReceiverTest_PedestalG0_StorageCell", "[JFJochReceiver]") {
test->CreatePackets(x, i*4+4, 1, 0, pedestal_in_3.data(), false);
}
test->CreateFinalPacket(x);
test->SetFPGANonBlockingMode(false);
aq_devices.emplace_back(test);
Logger logger("JFJochReceiverTest_PedestalG0_StorageCell");
@@ -469,6 +479,7 @@ TEST_CASE("JFJochReceiverTest_PacketLost_Raw", "[JFJochReceiver]") {
test->CreatePackets(x, 4, 1, 1, frame_in.data(), false);
test->CreateFinalPacket(x);
test->SetFPGANonBlockingMode(false);
aq_devices.emplace_back(test);
}
Logger logger("JFJochReceiverTest_PacketLost_Raw");