FPGA: Add option to invert modules upside down

This commit is contained in:
2023-10-25 22:20:45 +02:00
parent 439d6fa12a
commit 4e60bb2f9e
8 changed files with 205 additions and 22 deletions

View File

@@ -231,6 +231,7 @@ void HLSSimulatedDevice::HLSMainThread() {
STREAM_512 converted_8;
STREAM_512 converted_9;
STREAM_512 converted_10;
STREAM_512 converted_11;
hls::stream<axis_addr> addr0;
hls::stream<axis_addr> addr1;
@@ -359,18 +360,21 @@ void HLSSimulatedDevice::HLSMainThread() {
hls_cores.emplace_back([&] { axis_128_to_512(integration_result_0, integration_result_1);});
// 8. Extend multipixels
hls_cores.emplace_back([&] { add_multipixel(converted_7, converted_8);});
// 8. Invert module upside down
hls_cores.emplace_back([&] { module_upside_down(converted_7, converted_8);});
// 9. Apply bitshuffle
hls_cores.emplace_back([&] { bitshuffle(converted_8, converted_9);});
// 9. Extend multipixels
hls_cores.emplace_back([&] { add_multipixel(converted_8, converted_9);});
// 10. Apply bitshuffle
hls_cores.emplace_back([&] { bitshuffle(converted_9, converted_10);});
// Timer procedure - count how many times write_data is not accepting input (to help track down latency issues)
hls_cores.emplace_back([&] { timer_host(converted_9, converted_10, counter_host); });
hls_cores.emplace_back([&] { timer_host(converted_10, converted_11, counter_host); });
// 8. Prepare data to write to host memory
// 11. Prepare data to write to host memory
hls_cores.emplace_back([&] {
host_writer(converted_10, adu_histo_result, integration_result_1, spot_finder_result_1,
host_writer(converted_11, adu_histo_result, integration_result_1, spot_finder_result_1,
compl5, datamover_out.GetDataStream(),
datamover_out.GetCtrlStream(), work_request_stream, completion_stream,
packets_processed, host_writer_idle, err_reg); });
@@ -423,6 +427,18 @@ void HLSSimulatedDevice::HLSMainThread() {
if (!converted_7.empty())
throw std::runtime_error("Converted_7 queue not empty");
if (!converted_8.empty())
throw std::runtime_error("Converted_8 queue not empty");
if (!converted_9.empty())
throw std::runtime_error("Converted_9 queue not empty");
if (!converted_10.empty())
throw std::runtime_error("Converted_10 queue not empty");
if (!converted_11.empty())
throw std::runtime_error("Converted_11 queue not empty");
if (!compl0.empty())
throw std::runtime_error("Compl0 queue not empty");
@@ -435,6 +451,12 @@ void HLSSimulatedDevice::HLSMainThread() {
if (!compl3.empty())
throw std::runtime_error("Compl3 queue not empty");
if (!compl4.empty())
throw std::runtime_error("Compl4 queue not empty");
if (!compl5.empty())
throw std::runtime_error("Compl5 queue not empty");
if (!hbm_handles.empty())
throw std::runtime_error("Handles queue not empty");