Skip to content
Snippets Groups Projects
Commit 37deae19 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Correct start_address for SST.

parent 87499c60
Branches
No related tags found
1 merge request!179Resolve L2SDP-551
......@@ -108,26 +108,28 @@ ARCHITECTURE str OF sdp_statistics_offload IS
CONSTANT c_mm_data_size : NATURAL := func_sdp_get_stat_from_mm_data_size(g_statistics_type);
CONSTANT c_mm_step_size : NATURAL := func_sdp_get_stat_from_mm_step_size(g_statistics_type);
CONSTANT c_mm_nof_data : NATURAL := func_sdp_get_stat_from_mm_nof_data(g_statistics_type);
CONSTANT c_mm_ram_size : NATURAL := c_mm_nof_data * c_mm_data_size * c_nof_packets_max;
-- offload control
TYPE t_reg IS RECORD
packet_count : NATURAL;
start_address : NATURAL;
packet_count : NATURAL RANGE 0 TO c_nof_packets_max;
start_address : NATURAL RANGE 0 TO c_mm_ram_size;
start_pulse : STD_LOGIC;
dp_header_info : STD_LOGIC_VECTOR(1023 DOWNTO 0);
payload_err : STD_LOGIC;
in_sop_cnt : NATURAL;
integration_interval : NATURAL;
interleave_count : NATURAL RANGE 0 TO c_sdp_Q_fft;
interleave_address : NATURAL RANGE 0 TO c_mm_ram_size;
crosslet_count : NATURAL RANGE 0 TO c_sdp_N_crosslets_max;
instance_count : NATURAL RANGE 0 TO c_sdp_P_sq;
instance_address : NATURAL;
instance_address : NATURAL RANGE 0 TO c_mm_ram_size;
nof_crosslets : NATURAL RANGE 0 TO c_sdp_N_crosslets_max;
crosslets_info_rec : t_sdp_crosslets_info;
END RECORD;
CONSTANT c_crosslets_info_rst : t_sdp_crosslets_info := (offset_arr => (OTHERS => 0), step => 0);
CONSTANT c_reg_rst : t_reg := (0, 0, '0', (OTHERS => '0'), '0', 0, 0, 0, 0, 0, 0, 0, c_crosslets_info_rst);
CONSTANT c_reg_rst : t_reg := (0, 0, '0', (OTHERS => '0'), '0', 0, 0, 0, 0, 0, 0, 0, 0, c_crosslets_info_rst);
SIGNAL r : t_reg;
SIGNAL nxt_r : t_reg;
......@@ -158,6 +160,18 @@ ARCHITECTURE str OF sdp_statistics_offload IS
SIGNAL bsn_at_sync : STD_LOGIC_VECTOR(63 DOWNTO 0) := (OTHERS => '0');
SIGNAL dp_header_info : STD_LOGIC_VECTOR(1023 DOWNTO 0):= (OTHERS => '0');
-- Debug signals for view in Wave window
SIGNAL dbg_c_marker : NATURAL := c_marker;
SIGNAL dbg_c_nof_signal_inputs : NATURAL := c_nof_signal_inputs;
SIGNAL dbg_c_nof_statistics_per_packet : NATURAL := c_nof_statistics_per_packet;
SIGNAL dbg_c_udp_total_length : NATURAL := c_udp_total_length;
SIGNAL dbg_c_ip_total_length : NATURAL := c_ip_total_length;
SIGNAL dbg_c_nof_packets_max : NATURAL := c_nof_packets_max;
SIGNAL dbg_c_beamlet_id : NATURAL := c_beamlet_id;
SIGNAL dbg_c_mm_data_size : NATURAL := c_mm_data_size;
SIGNAL dbg_c_mm_step_size : NATURAL := c_mm_step_size;
SIGNAL dbg_c_mm_nof_data : NATURAL := c_mm_nof_data;
BEGIN
bsn_at_sync <= RESIZE_UVEC(in_sosi.bsn, 64) WHEN rising_edge(dp_clk) AND in_sosi.sync = '1';
......@@ -286,13 +300,14 @@ BEGIN
-- Issue start_pulse per packet offload
IF trigger_offload = '1' THEN
-- Use trigger_offload to start first packet offload, all g_statistics_type start from start address 0
v.start_pulse := '1';
v.start_address := 0;
v.packet_count := 0;
v.interleave_count := 0; -- only used for SST
v.crosslet_count := 0; -- only used for XST
v.instance_count := 0; -- only used for XST
v.instance_address := 0; -- only used for XST
v.start_pulse := '1';
v.start_address := 0;
v.packet_count := 0;
v.interleave_count := 0; -- only used for SST
v.interleave_address := 0; -- only used for SST
v.crosslet_count := 0; -- only used for XST
v.instance_count := 0; -- only used for XST
v.instance_address := 0; -- only used for XST
ELSIF mm_done = '1' THEN
-- Use mm_done to start next packets offloads.
......@@ -303,8 +318,10 @@ BEGIN
v.start_address := r.start_address + c_mm_data_size; -- default step to next packet in this step
v.interleave_count := r.interleave_count + 1;
IF r.interleave_count = c_sdp_Q_fft - 1 THEN
v.start_address := r.packet_count * c_sdp_N_sub * c_sdp_Q_fft * c_sdp_W_statistic_sz; -- jump to first packet for next step
-- jump to first packet for next step,
v.start_address := r.interleave_address + c_sdp_N_sub * c_sdp_Q_fft * c_sdp_W_statistic_sz; -- = + 512 * 2 * 2 = + 2048
v.interleave_count := 0;
v.interleave_address := v.start_address;
END IF;
v.start_pulse := '1';
v.packet_count := r.packet_count + 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment