v1.0.0-rc.72

This commit is contained in:
2025-09-08 20:28:59 +02:00
parent 6c88c6902e
commit c67337cfe1
275 changed files with 7525 additions and 1039 deletions

View File

@@ -43,6 +43,37 @@ TEST_CASE("HLS_C_Simulation_internal_packet_generator", "[FPGA][Full]") {
REQUIRE(test.GetExpectedDescriptorsPerModule() == DMA_DESCRIPTORS_PER_MODULE);
}
TEST_CASE("HLS_C_Simulation_internal_packet_generator_data_stream", "[FPGA][Full]") {
Logger logger(Catch::getResultCapture().getCurrentTestName());
const uint16_t nmodules = 4;
DiffractionExperiment x(DetJF(nmodules));
x.DataStreams(4);
x.Mode(DetectorMode::Raw);
x.UseInternalPacketGenerator(true).ImagesPerTrigger(4).PedestalG0Frames(0);
HLSSimulatedDevice test(3, 64);
std::vector<uint16_t> ref_data(RAW_MODULE_SIZE);
for (int i = 0; i < RAW_MODULE_SIZE; i++)
ref_data[i] = i % 65536;
test.SetInternalGeneratorFrame(ref_data.data(), 0);
REQUIRE_NOTHROW(test.StartAction(x));
REQUIRE_NOTHROW(test.WaitForActionComplete());
REQUIRE(test.GetBytesReceived() == 128 * nmodules * JUNGFRAU_PACKET_SIZE_BYTES);
for (int image = 0; image < 4; image++) {
auto imageBuf = (uint16_t *) test.GetDeviceOutput(image, 0)->pixels;
for (int i = 0; i < RAW_MODULE_SIZE; i++)
REQUIRE(imageBuf[i] == i % 65536);
}
REQUIRE(test.GetExpectedDescriptorsPerModule() == DMA_DESCRIPTORS_PER_MODULE);
}
TEST_CASE("HLS_C_Simulation_internal_packet_generator_custom_frame", "[FPGA][Full]") {
Logger logger(Catch::getResultCapture().getCurrentTestName());