FPGA: integration calculates sum^2

This commit is contained in:
2023-09-25 22:23:06 +02:00
parent 7e3b9cfeba
commit 0f7c14c267
6 changed files with 44 additions and 38 deletions
+5 -1
View File
@@ -1063,14 +1063,18 @@ TEST_CASE("HLS_C_Simulation_internal_packet_generator_integration", "[FPGA][Full
auto integration_result = test.GetIntegrationResult(0, 0);
CHECK(integration_result[0].sum == 32754LU * (RAW_MODULE_SIZE / 2 - 1));
CHECK(integration_result[0].sum2 == 32754LU * 32754LU * (RAW_MODULE_SIZE / 2 - 1));
CHECK(integration_result[0].count == RAW_MODULE_SIZE / 2 - 1);
CHECK(integration_result[1].sum == 0);
CHECK(integration_result[1].sum2 == 0);
CHECK(integration_result[1].count == 0);
CHECK(integration_result[FPGA_INTEGRATION_BIN_COUNT - 1].sum == 32754LU * (RAW_MODULE_SIZE / 2 - 2));
CHECK(integration_result[FPGA_INTEGRATION_BIN_COUNT - 1].sum2 == 32754LU * 32754LU * (RAW_MODULE_SIZE / 2 - 2));
CHECK(integration_result[FPGA_INTEGRATION_BIN_COUNT - 1].count == RAW_MODULE_SIZE / 2 - 2);
integration_result = test.GetIntegrationResult(0, 1);
CHECK(integration_result[54].sum == 32754 * (RAW_MODULE_SIZE - 2));
CHECK(integration_result[54].sum == 32754LU * (RAW_MODULE_SIZE - 2));
CHECK(integration_result[54].sum2 == 32754LU * 32754LU * (RAW_MODULE_SIZE - 2));
CHECK(integration_result[54].count == RAW_MODULE_SIZE - 2);
integration_result = test.GetIntegrationResult(0, 2);