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

Enable BST offload. Select last g_beamlet, to check that it is covered.

parent 64f68a28
No related branches found
No related tags found
1 merge request!254Corrected c_block_size_w, by using +1 to ensure that g_block_size that is...
Pipeline #30249 failed
...@@ -146,7 +146,7 @@ ENTITY tb_lofar2_unb2c_sdp_station_bf_ring IS ...@@ -146,7 +146,7 @@ ENTITY tb_lofar2_unb2c_sdp_station_bf_ring IS
g_sp_remnant_ampl : REAL := 0.1; -- WG normalized amplitude for remnant sp g_sp_remnant_ampl : REAL := 0.1; -- WG normalized amplitude for remnant sp
g_sp_remnant_phase : REAL := 15.0; -- WG phase in degrees for remnant sp g_sp_remnant_phase : REAL := 15.0; -- WG phase in degrees for remnant sp
g_subband : NATURAL := 102; -- select g_subband at index 102 = 102/1024 * 200MHz = 19.921875 MHz g_subband : NATURAL := 102; -- select g_subband at index 102 = 102/1024 * 200MHz = 19.921875 MHz
g_beamlet : NATURAL := 10; -- map g_subband to g_beamlet index in beamset in range(c_sdp_S_sub_bf = 488) g_beamlet : NATURAL := c_sdp_S_sub_bf-1; -- map g_subband to g_beamlet index in beamset in range(c_sdp_S_sub_bf = 488)
g_beamlet_scale : REAL := 1.0 / 2.0**9; -- g_beamlet output scale factor g_beamlet_scale : REAL := 1.0 / 2.0**9; -- g_beamlet output scale factor
g_bf_x_gain : REAL := 0.7; -- g_beamlet X BF weight normalized gain for g_sp g_bf_x_gain : REAL := 0.7; -- g_beamlet X BF weight normalized gain for g_sp
g_bf_y_gain : REAL := 0.6; -- g_beamlet Y BF weight normalized gain for g_sp g_bf_y_gain : REAL := 0.6; -- g_beamlet Y BF weight normalized gain for g_sp
...@@ -167,7 +167,9 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS ...@@ -167,7 +167,9 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS
CONSTANT c_unb_nr : NATURAL := 0; -- UniBoard 0 CONSTANT c_unb_nr : NATURAL := 0; -- UniBoard 0
CONSTANT c_node_nr : NATURAL := 0; CONSTANT c_node_nr : NATURAL := 0;
CONSTANT c_nof_rn : NATURAL := 2; CONSTANT c_nof_rn : NATURAL := 2;
CONSTANT c_gn_index : NATURAL := c_unb_nr * 4 + c_nof_rn-1; -- end node GN CONSTANT c_last_unb_nr : NATURAL := (c_nof_rn-1) / c_quad;
CONSTANT c_last_rn_nr : NATURAL := c_nof_rn-1;
CONSTANT c_gn_index : NATURAL := c_unb_nr * c_quad + c_nof_rn-1; -- end node GN
CONSTANT c_init_bsn : NATURAL := 17; -- some recognizable value >= 0 CONSTANT c_init_bsn : NATURAL := 17; -- some recognizable value >= 0
CONSTANT c_nof_lanes : NATURAL := c_sdp_N_beamsets; CONSTANT c_nof_lanes : NATURAL := c_sdp_N_beamsets;
...@@ -175,8 +177,8 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS ...@@ -175,8 +177,8 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS
CONSTANT c_version : STD_LOGIC_VECTOR(1 DOWNTO 0) := "00"; CONSTANT c_version : STD_LOGIC_VECTOR(1 DOWNTO 0) := "00";
CONSTANT c_fw_version : t_unb2c_board_fw_version := (1, 0); CONSTANT c_fw_version : t_unb2c_board_fw_version := (1, 0);
CONSTANT c_mac_15_0 : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(c_unb_nr + ((c_nof_rn-1) / c_quad), 8) & TO_UVEC((c_nof_rn-1) MOD c_quad, 8); CONSTANT c_mac_15_0 : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(c_unb_nr + c_last_unb_nr, 8) & TO_UVEC(c_last_rn_nr MOD c_quad, 8);
CONSTANT c_ip_15_0 : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(c_unb_nr + ((c_nof_rn-1) / c_quad), 8) & TO_UVEC(((c_nof_rn-1) MOD c_quad) +1, 8); -- +1 to avoid IP = *.*.*.0 CONSTANT c_ip_15_0 : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(c_unb_nr + c_last_unb_nr, 8) & TO_UVEC((c_last_rn_nr MOD c_quad) +1, 8); -- +1 to avoid IP = *.*.*.0
CONSTANT c_eth_clk_period : TIME := 8 ns; -- 125 MHz XO on UniBoard CONSTANT c_eth_clk_period : TIME := 8 ns; -- 125 MHz XO on UniBoard
CONSTANT c_ext_clk_period : TIME := 5 ns; CONSTANT c_ext_clk_period : TIME := 5 ns;
...@@ -335,6 +337,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS ...@@ -335,6 +337,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS
CONSTANT c_addr_w_ram_bf_weights : NATURAL := ceil_log2(c_sdp_N_pol_bf * c_sdp_P_pfb * c_sdp_S_sub_bf * c_sdp_Q_fft); CONSTANT c_addr_w_ram_bf_weights : NATURAL := ceil_log2(c_sdp_N_pol_bf * c_sdp_P_pfb * c_sdp_S_sub_bf * c_sdp_Q_fft);
CONSTANT c_addr_w_reg_bf_scale : NATURAL := 1; CONSTANT c_addr_w_reg_bf_scale : NATURAL := 1;
CONSTANT c_addr_w_reg_hdr_dat : NATURAL := ceil_log2(field_nof_words(c_sdp_cep_hdr_field_arr, c_word_w)); CONSTANT c_addr_w_reg_hdr_dat : NATURAL := ceil_log2(field_nof_words(c_sdp_cep_hdr_field_arr, c_word_w));
CONSTANT c_addr_w_reg_stat_enable_bst : NATURAL := c_sdp_reg_stat_enable_addr_w;
CONSTANT c_addr_w_reg_dp_xonoff : NATURAL := 1; CONSTANT c_addr_w_reg_dp_xonoff : NATURAL := 1;
CONSTANT c_addr_w_ram_st_bst : NATURAL := ceil_log2(c_sdp_S_sub_bf*c_sdp_N_pol_bf*c_stat_data_sz); CONSTANT c_addr_w_ram_st_bst : NATURAL := ceil_log2(c_sdp_S_sub_bf*c_sdp_N_pol_bf*c_stat_data_sz);
-- . Address spans of a single MM instance -- . Address spans of a single MM instance
...@@ -345,6 +348,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS ...@@ -345,6 +348,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS
CONSTANT c_mm_span_ram_bf_weights : NATURAL := 2**c_addr_w_ram_bf_weights; CONSTANT c_mm_span_ram_bf_weights : NATURAL := 2**c_addr_w_ram_bf_weights;
CONSTANT c_mm_span_reg_bf_scale : NATURAL := 2**c_addr_w_reg_bf_scale; CONSTANT c_mm_span_reg_bf_scale : NATURAL := 2**c_addr_w_reg_bf_scale;
CONSTANT c_mm_span_reg_hdr_dat : NATURAL := 2**c_addr_w_reg_hdr_dat; CONSTANT c_mm_span_reg_hdr_dat : NATURAL := 2**c_addr_w_reg_hdr_dat;
CONSTANT c_mm_span_reg_stat_enable_bst : NATURAL := 2**c_addr_w_reg_stat_enable_bst;
CONSTANT c_mm_span_reg_dp_xonoff : NATURAL := 2**c_addr_w_reg_dp_xonoff; CONSTANT c_mm_span_reg_dp_xonoff : NATURAL := 2**c_addr_w_reg_dp_xonoff;
CONSTANT c_mm_span_ram_st_bst : NATURAL := 2**c_addr_w_ram_st_bst; CONSTANT c_mm_span_ram_st_bst : NATURAL := 2**c_addr_w_ram_st_bst;
...@@ -355,8 +359,9 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS ...@@ -355,8 +359,9 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS
CONSTANT c_mm_file_ram_equalizer_gains : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "RAM_EQUALIZER_GAINS"; CONSTANT c_mm_file_ram_equalizer_gains : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "RAM_EQUALIZER_GAINS";
CONSTANT c_mm_file_reg_dp_selector : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_DP_SELECTOR"; CONSTANT c_mm_file_reg_dp_selector : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_DP_SELECTOR";
CONSTANT c_mm_file_ram_st_sst : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "RAM_ST_SST"; CONSTANT c_mm_file_ram_st_sst : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "RAM_ST_SST";
CONSTANT c_mm_file_ram_st_bst : STRING := mmf_unb_file_prefix(c_unb_nr + ((c_nof_rn-1) / c_quad), (c_nof_rn-1) MOD c_quad) & "RAM_ST_BST"; --end RN CONSTANT c_mm_file_ram_st_bst : STRING := mmf_unb_file_prefix(c_unb_nr + c_last_unb_nr, c_last_rn_nr MOD c_quad) & "RAM_ST_BST"; --end RN
CONSTANT c_mm_file_reg_dp_xonoff : STRING := mmf_unb_file_prefix(c_unb_nr + ((c_nof_rn-1) / c_quad), (c_nof_rn-1) MOD c_quad) & "REG_DP_XONOFF"; --end RN CONSTANT c_mm_file_reg_stat_enable_bst : STRING := mmf_unb_file_prefix(c_unb_nr + c_last_unb_nr, c_last_rn_nr MOD c_quad) & "REG_STAT_ENABLE_BST"; --end RN
CONSTANT c_mm_file_reg_dp_xonoff : STRING := mmf_unb_file_prefix(c_unb_nr + c_last_unb_nr, c_last_rn_nr MOD c_quad) & "REG_DP_XONOFF"; --end RN
CONSTANT c_mm_file_ram_ss_ss_wide : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "RAM_SS_SS_WIDE"; CONSTANT c_mm_file_ram_ss_ss_wide : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "RAM_SS_SS_WIDE";
CONSTANT c_mm_file_ram_bf_weights : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "RAM_BF_WEIGHTS"; CONSTANT c_mm_file_ram_bf_weights : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "RAM_BF_WEIGHTS";
CONSTANT c_mm_file_reg_bf_scale : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BF_SCALE"; CONSTANT c_mm_file_reg_bf_scale : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BF_SCALE";
...@@ -820,7 +825,13 @@ BEGIN ...@@ -820,7 +825,13 @@ BEGIN
ASSERT rd_cep_udp_dst_port = c_sdp_cep_udp_dst_port REPORT "Wrong MM read rd_cep_udp_dst_port for beamset " & NATURAL'IMAGE(bset) SEVERITY ERROR; -- 5000 ASSERT rd_cep_udp_dst_port = c_sdp_cep_udp_dst_port REPORT "Wrong MM read rd_cep_udp_dst_port for beamset " & NATURAL'IMAGE(bset) SEVERITY ERROR; -- 5000
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
-- Enable beamlet UDP offload off end node (dp_xonoff) -- Enable BST offload on end node (not verified here, but only for view in Wave window)
----------------------------------------------------------------------------
v_offset := bset * c_mm_span_reg_stat_enable_bst;
mmf_mm_bus_wr(c_mm_file_reg_stat_enable_bst, v_offset + 0, 1, tb_clk);
----------------------------------------------------------------------------
-- Enable beamlet output on end node (dp_xonoff)
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
v_offset := bset * c_mm_span_reg_dp_xonoff; v_offset := bset * c_mm_span_reg_dp_xonoff;
mmf_mm_bus_wr(c_mm_file_reg_dp_xonoff, v_offset + 0, 1, tb_clk); mmf_mm_bus_wr(c_mm_file_reg_dp_xonoff, v_offset + 0, 1, tb_clk);
...@@ -854,8 +865,8 @@ BEGIN ...@@ -854,8 +865,8 @@ BEGIN
mmf_mm_bus_wr(mmf_unb_file_prefix(c_unb_nr, 0) & "REG_RING_INFO", 1, 0, tb_clk); -- use_ring_to_next_rn = 0 mmf_mm_bus_wr(mmf_unb_file_prefix(c_unb_nr, 0) & "REG_RING_INFO", 1, 0, tb_clk); -- use_ring_to_next_rn = 0
-- End node specific settings -- End node specific settings
mmf_mm_bus_wr(mmf_unb_file_prefix(c_unb_nr + ((c_nof_rn-1) / c_quad), (c_nof_rn-1) MOD c_quad) & "REG_RING_INFO", 0, 0, tb_clk); -- use_ring_to_previous_rn = 0 mmf_mm_bus_wr(mmf_unb_file_prefix(c_unb_nr + c_last_unb_nr, c_last_rn_nr MOD c_quad) & "REG_RING_INFO", 0, 0, tb_clk); -- use_ring_to_previous_rn = 0
mmf_mm_bus_wr(mmf_unb_file_prefix(c_unb_nr + ((c_nof_rn-1) / c_quad), (c_nof_rn-1) MOD c_quad) & "REG_RING_INFO", 1, 1, tb_clk); -- use_ring_to_next_rn = 1 mmf_mm_bus_wr(mmf_unb_file_prefix(c_unb_nr + c_last_unb_nr, c_last_rn_nr MOD c_quad) & "REG_RING_INFO", 1, 1, tb_clk); -- use_ring_to_next_rn = 1
-- Access scheme 1. Each RN uses and sends them along the ring. -- Access scheme 1. Each RN uses and sends them along the ring.
FOR RN IN 0 TO c_nof_rn-1 LOOP FOR RN IN 0 TO c_nof_rn-1 LOOP
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment