FPGA: Modify HLS for jf_conversion, so it is running after HBM buffer
This commit is contained in:
@@ -228,13 +228,15 @@ void HLSSimulatedDevice::HLSMainThread() {
|
||||
STREAM_512 converted_5;
|
||||
STREAM_512 converted_6;
|
||||
STREAM_512 converted_7;
|
||||
STREAM_512 converted_8;
|
||||
|
||||
hls::stream<axis_addr> addr0;
|
||||
hls::stream<axis_addr> addr1;
|
||||
hls::stream<axis_addr> addr2;
|
||||
hls::stream<axis_addr> addr3;
|
||||
|
||||
hls::stream<axis_completion> compl0, compl1, compl2, compl3;
|
||||
hls::stream<axis_completion> compl0, compl1, compl2, compl3, compl4;
|
||||
|
||||
hls::stream<ap_uint<16>> hbm_handles;
|
||||
hls::stream<ap_uint<192>> integration_result;
|
||||
hls::stream<ap_uint<512>> spot_finder_result;
|
||||
@@ -304,9 +306,21 @@ void HLSSimulatedDevice::HLSMainThread() {
|
||||
// Timer procedure - count how many times pedestal_corr/gain_corr is not accepting input (to help track down latency issues)
|
||||
hls_cores.emplace_back([&] { timer_host(raw1, raw2, counter_hbm); });
|
||||
|
||||
|
||||
// 3. Cache images in HBM
|
||||
hls_cores.emplace_back([&] { save_to_hbm(raw2, converted_1, addr1, compl0, hbm_handles,
|
||||
datamover_out_hbm_0.GetDataStream(), datamover_out_hbm_1.GetDataStream(),
|
||||
datamover_out_hbm_0.GetCtrlStream(), datamover_out_hbm_1.GetCtrlStream(),
|
||||
hbm_if_size);});
|
||||
|
||||
hls_cores.emplace_back([&] { load_from_hbm(converted_1, converted_2, compl0, compl1, hbm_handles,
|
||||
datamover_in_hbm_0.GetDataStream(), datamover_in_hbm_1.GetDataStream(),
|
||||
datamover_in_hbm_0.GetCtrlStream(), datamover_in_hbm_1.GetCtrlStream(),
|
||||
hbm_if_size);});
|
||||
|
||||
// 2. Apply pedestal & gain corrections
|
||||
hls_cores.emplace_back([&] { jf_conversion(raw2, converted_0,
|
||||
addr1, addr2,
|
||||
hls_cores.emplace_back([&] { jf_conversion(converted_2, converted_3,
|
||||
compl1, compl2,
|
||||
hbm.data(),
|
||||
hbm.data(),
|
||||
hbm.data(),
|
||||
@@ -321,36 +335,25 @@ void HLSSimulatedDevice::HLSMainThread() {
|
||||
hbm.data(),
|
||||
hbm_if_size); });
|
||||
|
||||
// 3. Cache images in HBM
|
||||
hls_cores.emplace_back([&] { save_to_hbm(converted_0, converted_1, addr2, compl0, hbm_handles,
|
||||
datamover_out_hbm_0.GetDataStream(), datamover_out_hbm_1.GetDataStream(),
|
||||
datamover_out_hbm_0.GetCtrlStream(), datamover_out_hbm_1.GetCtrlStream(),
|
||||
hbm_if_size);});
|
||||
|
||||
hls_cores.emplace_back([&] { load_from_hbm(converted_1, converted_2, compl0, compl1, hbm_handles,
|
||||
datamover_in_hbm_0.GetDataStream(), datamover_in_hbm_1.GetDataStream(),
|
||||
datamover_in_hbm_0.GetCtrlStream(), datamover_in_hbm_1.GetCtrlStream(),
|
||||
hbm_if_size);});
|
||||
|
||||
// 4. Mask missing pixels
|
||||
hls_cores.emplace_back([&] { mask_missing(converted_2, converted_3, compl1, compl2);});
|
||||
hls_cores.emplace_back([&] { mask_missing(converted_3, converted_4, compl2, compl3);});
|
||||
|
||||
hls_cores.emplace_back([&] { axis_broadcast(converted_3, converted_4, converted_7);});
|
||||
hls_cores.emplace_back([&] { axis_broadcast(converted_4, converted_5, converted_8);});
|
||||
|
||||
// 5. Spot finding
|
||||
hls_cores.emplace_back([&] { spot_finder(converted_7, spot_finder_result);});
|
||||
hls_cores.emplace_back([&] { spot_finder(converted_8, spot_finder_result);});
|
||||
|
||||
// 5. Integration of pixels
|
||||
hls_cores.emplace_back([&] { integration(converted_4, converted_5, integration_result, compl2, compl3,
|
||||
hls_cores.emplace_back([&] { integration(converted_5, converted_6, integration_result, compl3, compl4,
|
||||
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_5, converted_6, counter_host); });
|
||||
hls_cores.emplace_back([&] { timer_host(converted_6, converted_7, counter_host); });
|
||||
|
||||
// 6. Prepare data to write to host memory
|
||||
hls_cores.emplace_back([&] {
|
||||
host_writer(converted_6, integration_result, spot_finder_result,
|
||||
compl3, datamover_out.GetDataStream(),
|
||||
host_writer(converted_7, integration_result, spot_finder_result,
|
||||
compl4, datamover_out.GetDataStream(),
|
||||
datamover_out.GetCtrlStream(), work_request_stream, completion_stream,
|
||||
packets_processed, host_writer_idle, err_reg); });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user