diff --git a/fpga/hdl/action_config.v b/fpga/hdl/action_config.v index 2533bea2..fae508ed 100644 --- a/fpga/hdl/action_config.v +++ b/fpga/hdl/action_config.v @@ -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 diff --git a/fpga/hls/data_collection_fsm.cpp b/fpga/hls/data_collection_fsm.cpp index e166b9b1..d2301729 100644 --- a/fpga/hls/data_collection_fsm.cpp +++ b/fpga/hls/data_collection_fsm.cpp @@ -15,7 +15,7 @@ void data_collection_fsm(AXI_STREAM ð_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 diff --git a/fpga/hls/frame_summation.cpp b/fpga/hls/frame_summation.cpp index 2ce582ca..c15d08aa 100644 --- a/fpga/hls/frame_summation.cpp +++ b/fpga/hls/frame_summation.cpp @@ -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; diff --git a/fpga/hls/frame_summation_reorder_compl.cpp b/fpga/hls/frame_summation_reorder_compl.cpp index fdd2a91f..80da8305 100644 --- a/fpga/hls/frame_summation_reorder_compl.cpp +++ b/fpga/hls/frame_summation_reorder_compl.cpp @@ -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]; diff --git a/fpga/hls/hls_jfjoch.h b/fpga/hls/hls_jfjoch.h index 14c82891..05019169 100644 --- a/fpga/hls/hls_jfjoch.h +++ b/fpga/hls/hls_jfjoch.h @@ -57,7 +57,7 @@ typedef hls::stream 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 ð_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> &adu_histo_in,