FPGA: remove transfer to HBM for the time being

This commit is contained in:
2023-09-11 20:24:20 +02:00
parent 0c524f9a3c
commit 05000bab1f
9 changed files with 12 additions and 596 deletions
-79
View File
@@ -1041,82 +1041,3 @@ TEST_CASE("HLS_C_Simulation_internal_packet_generator_storage_cell_convert_G1",
}
}
TEST_CASE("HLS_C_transfer_hbm_1_interface", "[FPGA][Full]") {
std::vector<uint16_t> test_frame_1(RAW_MODULE_SIZE);
std::vector<uint16_t> test_frame_2(RAW_MODULE_SIZE);
std::mt19937 g1(1387);
std::uniform_int_distribution<uint16_t> dist(0, 65535);
for (auto &i: test_frame_1)
i = dist(g1);
HLSSimulatedDevice test(0, 64);
REQUIRE(test_frame_1 != test_frame_2);
test.HBMTransfer(test_frame_1.data(), 14, 16*1024, false, 1, 0);
test.HBMTransfer(test_frame_2.data(), 14, 16*1024, true, 1, 0);
REQUIRE(test_frame_1 == test_frame_2);
}
TEST_CASE("HLS_C_transfer_hbm_2_interfaces", "[FPGA][Full]") {
std::vector<uint16_t> test_frame_1(RAW_MODULE_SIZE);
std::vector<uint16_t> test_frame_2(RAW_MODULE_SIZE);
std::mt19937 g1(1388);
std::uniform_int_distribution<uint16_t> dist(0, 65535);
for (auto &i: test_frame_1)
i = dist(g1);
HLSSimulatedDevice test(0, 64);
REQUIRE(test_frame_1 != test_frame_2);
test.HBMTransfer(test_frame_1.data(), 14, 16*1024, false, 2, 0);
test.HBMTransfer(test_frame_1.data(), 15, 16*1024, false, 2, 1);
test.HBMTransfer(test_frame_2.data(), 14, 16*1024, true, 2, 0);
test.HBMTransfer(test_frame_2.data(), 15, 16*1024, true, 2, 1);
REQUIRE(test_frame_1 == test_frame_2);
}
TEST_CASE("HLS_C_Simulation_internal_packet_generator_write_to_hbm", "[FPGA][Full]") {
const uint16_t nmodules = 1;
DiffractionExperiment x((DetectorGeometry(nmodules)));
x.Mode(DetectorMode::Raw);
x.UseInternalPacketGenerator(true).ImagesPerTrigger(4).PedestalG0Frames(0);
HLSSimulatedDevice test(0, 64);
test.SetFPGANonBlockingMode(false);
std::vector<uint16_t> test_frame_1(RAW_MODULE_SIZE);
std::vector<uint16_t> test_frame_2(RAW_MODULE_SIZE);
std::mt19937 g1(1387);
std::uniform_int_distribution<uint16_t> dist(0, 65535);
for (auto &i: test_frame_1)
i = dist(g1);
REQUIRE_NOTHROW(test.SetCustomInternalGeneratorFrame(test_frame_1));
REQUIRE_NOTHROW(test.StartAction(x));
REQUIRE_NOTHROW(test.WaitForActionComplete());
REQUIRE(test.OutputStream().size() == 1);
JFJochProtoBuf::AcquisitionDeviceStatistics device_statistics;
REQUIRE_NOTHROW(test.SaveStatistics(x, device_statistics));
REQUIRE(device_statistics.bytes_received() == 128 * nmodules * 4 * JUNGFRAU_PACKET_SIZE_BYTES);
REQUIRE(test_frame_1 != test_frame_2);
test.HBMTransfer(test_frame_2.data(), 12, 2*512*1024, true, 2, 0);
test.HBMTransfer(test_frame_2.data(), 14, 2*512*1024, true, 2, 1);
REQUIRE(test_frame_1 == test_frame_2);
}