diff --git a/fpga/hls/hls_jfjoch.h b/fpga/hls/hls_jfjoch.h index cbcc47a6..c16ac8d1 100644 --- a/fpga/hls/hls_jfjoch.h +++ b/fpga/hls/hls_jfjoch.h @@ -82,6 +82,7 @@ struct axis_completion { ap_uint<16> packet_count; ap_uint<5> module; ap_uint<1> flushing; + ap_uint<1> last; }; void setup_datamover (hls::stream &datamover_cmd_stream, uint64_t address, size_t bytes_to_write); diff --git a/fpga/hls/save_to_hbm.cpp b/fpga/hls/save_to_hbm.cpp index 31a9902a..c44e4dce 100644 --- a/fpga/hls/save_to_hbm.cpp +++ b/fpga/hls/save_to_hbm.cpp @@ -34,6 +34,7 @@ inline void write_completion(hls::stream &m_axis_completion, cmpl.exptime = exptime; cmpl.data_collection_id = data_collection_id; cmpl.flushing = flushing; + cmpl.last = 0; } void save_to_hbm(STREAM_512 &data_in, @@ -198,6 +199,12 @@ void save_to_hbm(STREAM_512 &data_in, debug[m], timestamp[m], jf_bunchid[m], exptime[m], data_collection_id, 1); } + data_in >> packet_in; + + axis_completion cmpl; + cmpl.last = 1; + completion_out << cmpl; + idle = 1; }