FPGA: add spot finder to the design

This commit is contained in:
2023-09-24 19:04:58 +02:00
parent f4f4b50be7
commit df0b0d8b96
5 changed files with 72 additions and 40 deletions
+12 -4
View File
@@ -224,6 +224,7 @@ void HLSSimulatedDevice::HLSMainThread() {
STREAM_512 converted_3;
STREAM_512 converted_4;
STREAM_512 converted_5;
STREAM_512 converted_6;
hls::stream<axis_addr> addr0;
hls::stream<axis_addr> addr1;
@@ -233,6 +234,7 @@ void HLSSimulatedDevice::HLSMainThread() {
hls::stream<axis_completion> compl0, compl1, compl2, compl3;
hls::stream<ap_uint<16>> hbm_handles;
hls::stream<ap_uint<512>> 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;
@@ -334,12 +336,15 @@ void HLSSimulatedDevice::HLSMainThread() {
hls_cores.emplace_back([&] { integration(converted_3, converted_4, 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); });
// 6. Integration of pixels
hls_cores.emplace_back([&] { spot_finder(converted_4, converted_5, spot_finder_result);});
// 6. Prepare data to write to host memory
// 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_5, converted_6, counter_host); });
// 7. 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); });
@@ -386,6 +391,9 @@ 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 (!compl0.empty())
throw std::runtime_error("Compl0 queue not empty");