Extend frame summation to 64

This commit is contained in:
2023-10-28 17:07:22 +02:00
parent 270dd1224b
commit 05a35855eb
5 changed files with 7 additions and 7 deletions

View File

@@ -91,7 +91,7 @@ module action_config
output reg [31:0] nframes ,
output reg [7:0] nmodules ,
output reg [3:0] nstorage_cells ,
output reg [3:0] nsummation ,
output reg [5:0] nsummation ,
output wire [31:0] hbm_size_bytes ,
output reg [15:0] spot_finder_count_threshold,
output reg [7:0] spot_finder_snr_threshold,
@@ -529,7 +529,7 @@ always @(posedge clk) begin
nsummation <= 0;
else if (reg_data_collection_idle) begin
if (w_hs && waddr == `ADDR_NSUMMATION)
nsummation <= (s_axi_WDATA[3:0] & wmask[3:0]) | (nsummation & !wmask[3:0]);
nsummation <= (s_axi_WDATA[5:0] & wmask[5:0]) | (nsummation & !wmask[5:0]);
end
end

View File

@@ -15,7 +15,7 @@ void data_collection_fsm(AXI_STREAM &eth_in,
ap_uint<32> nframes,
ap_uint<8> nmodules,
ap_uint<4> nstorage_cells,
ap_uint<4> nsummation) {
ap_uint<6> nsummation) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both port=eth_in

View File

@@ -36,7 +36,7 @@ void frame_summation(STREAM_512 &data_in, STREAM_768 &data_out,
packet_768_t packet_out;
data_in >> packet_in;
ap_uint<4> sum = ACT_REG_NSUMMATION(packet_in.data); // 0..15
ap_uint<6> sum = ACT_REG_NSUMMATION(packet_in.data); // 0..63
data_out << packet_768_t{.data = packet_in.data, .user = 0, .last = 0};
data_in >> packet_in;

View File

@@ -14,7 +14,7 @@ void frame_summation_reorder_compl(STREAM_512 &data_in,
packet_512_t packet_in;
data_in >> packet_in;
ap_uint<4> sum = ACT_REG_NSUMMATION(packet_in.data); // 0..15
ap_uint<6> sum = ACT_REG_NSUMMATION(packet_in.data); // 0..63
data_out << packet_in;
axis_completion completions[MAX_FPGA_SUMMATION * MAX_MODULES_FPGA];

View File

@@ -57,7 +57,7 @@ typedef hls::stream<packet_768_t> STREAM_768;
#define ACT_REG_NFRAMES(x) ((x)(95 , 64)) // 32 bit
#define ACT_REG_NMODULES(x) ((x)(132, 128)) // 5 bit (0..31)
#define ACT_REG_NSTORAGE_CELLS(x) ((x)(148, 144)) // 5 bit
#define ACT_REG_NSUMMATION(x) ((x)(163, 160)) // 4 bit (0..15)
#define ACT_REG_NSUMMATION(x) ((x)(165, 160)) // 6 bit (0..63)
struct axis_datamover_ctrl {
ap_uint<40+64> data;
@@ -278,7 +278,7 @@ void data_collection_fsm(AXI_STREAM &eth_in,
ap_uint<32> nframes,
ap_uint<8> nmodules,
ap_uint<4> nstorage_cells,
ap_uint<4> nsummation);
ap_uint<6> nsummation);
void host_writer(STREAM_512 &data_in,
hls::stream<ap_uint<512>> &adu_histo_in,