FPGA: spot_finder added

This commit is contained in:
2023-09-26 18:54:31 +02:00
parent 84bf69b8a6
commit 79aef71ce3
9 changed files with 104 additions and 28 deletions

View File

@@ -226,6 +226,8 @@ void HLSSimulatedDevice::HLSMainThread() {
STREAM_512 converted_3;
STREAM_512 converted_4;
STREAM_512 converted_5;
STREAM_512 converted_6;
STREAM_512 converted_7;
hls::stream<axis_addr> addr0;
hls::stream<axis_addr> addr1;
@@ -235,6 +237,7 @@ void HLSSimulatedDevice::HLSMainThread() {
hls::stream<axis_completion> compl0, compl1, compl2, compl3;
hls::stream<ap_uint<16>> hbm_handles;
hls::stream<ap_uint<192>> integration_result;
hls::stream<ap_uint<512>> spot_finder_result;
hls::stream<ap_uint<UDP_METADATA_STREAM_WIDTH> > udp_metadata;
ap_uint<1> idle_data_collection;
@@ -332,16 +335,21 @@ void HLSSimulatedDevice::HLSMainThread() {
// 4. Mask missing pixels
hls_cores.emplace_back([&] { mask_missing(converted_2, converted_3, compl1, compl2);});
hls_cores.emplace_back([&] { axis_broadcast(converted_3, converted_4, converted_7);});
// 5. Spot finding
hls_cores.emplace_back([&] { spot_finder(converted_7, spot_finder_result);});
// 5. Integration of pixels
hls_cores.emplace_back([&] { integration(converted_3, converted_4, integration_result, compl2, compl3,
hls_cores.emplace_back([&] { integration(converted_4, converted_5, integration_result, compl2, compl3,
hbm.data(), hbm.data(), hbm_if_size);});
// 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_4, converted_5, counter_host); });
hls_cores.emplace_back([&] { timer_host(converted_5, converted_6, counter_host); });
// 6. Prepare data to write to host memory
hls_cores.emplace_back([&] {
host_writer(converted_5, integration_result,
host_writer(converted_6, integration_result, spot_finder_result,
compl3, datamover_out.GetDataStream(),
datamover_out.GetCtrlStream(), work_request_stream, completion_stream,
packets_processed, host_writer_idle, err_reg); });
@@ -388,6 +396,12 @@ void HLSSimulatedDevice::HLSMainThread() {
if (!converted_5.empty())
throw std::runtime_error("Converted_5 queue not empty");
if (!converted_6.empty())
throw std::runtime_error("Converted_6 queue not empty");
if (!converted_7.empty())
throw std::runtime_error("Converted_7 queue not empty");
if (!compl0.empty())
throw std::runtime_error("Compl0 queue not empty");