From f41dafcc8b1290ef0a825fd68adccd89232f287f Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Tue, 25 Jun 2024 08:02:44 +0200 Subject: [PATCH] Read xon, read from rd_bsn_monitor_v2_beamlet_output per beamset. --- .../tb_lofar2_unb2c_sdp_station_bf.vhd | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd b/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd index 499fa927b4..358a5cbd1c 100644 --- a/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd +++ b/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd @@ -429,8 +429,8 @@ architecture tb of tb_lofar2_unb2c_sdp_station_bf is signal rd_nof_destinations_max : natural; signal rd_nof_blocks_per_packet : natural; signal rd_bsn_monitor_v2_beamlet_output : std_logic := '0'; -- strobe - signal rd_bsn_monitor_v2_beamlet_output_xon : std_logic; - signal rd_bsn_monitor_v2_beamlet_output_ready : std_logic; + signal rd_bsn_monitor_v2_beamlet_output_xon : std_logic_vector(0 to c_sdp_N_beamsets - 1); + signal rd_bsn_monitor_v2_beamlet_output_ready : std_logic_vector(0 to c_sdp_N_beamsets - 1); -- WG signal current_bsn_wg : std_logic_vector(c_dp_stream_bsn_w - 1 downto 0); @@ -745,17 +745,6 @@ begin report "Wrong MM read SDP info block_period" severity ERROR; - ---------------------------------------------------------------------------- - -- Read 10GbE beamlet output SISO status before enable beamlet output - ---------------------------------------------------------------------------- - mmf_mm_bus_rd(c_mm_file_reg_bsn_monitor_v2_beamlet_output, 0, rd_data, tb_clk); - proc_common_wait_some_cycles(tb_clk, 1); - rd_bsn_monitor_v2_beamlet_output <= '1'; - rd_bsn_monitor_v2_beamlet_output_xon <= rd_data(0); - rd_bsn_monitor_v2_beamlet_output_ready <= rd_data(1); - proc_common_wait_some_cycles(tb_clk, 10); - rd_bsn_monitor_v2_beamlet_output <= '0'; - ------------------------------------------------------------------------------ ---- Set and check BF per beamset ------------------------------------------------------------------------------ @@ -952,6 +941,7 @@ begin report "Wrong MM read rd_nof_blocks_per_packet for beamset " & natural'image(bset) severity ERROR; end if; + ---------------------------------------------------------------------------- -- Enable BST offload (not verified here, but only for view in Wave window) ---------------------------------------------------------------------------- @@ -961,6 +951,18 @@ begin --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); + ---------------------------------------------------------------------------- + -- Read 10GbE beamlet output SISO status before enable beamlet output + ---------------------------------------------------------------------------- + v_offset := bset * c_mm_span_reg_bsn_monitor_v2; + mmf_mm_bus_rd(c_mm_file_reg_bsn_monitor_v2_beamlet_output, v_offset + 0, rd_data, tb_clk); + proc_common_wait_some_cycles(tb_clk, 1); + rd_bsn_monitor_v2_beamlet_output <= '1'; + rd_bsn_monitor_v2_beamlet_output_xon(bset) <= rd_data(0); + rd_bsn_monitor_v2_beamlet_output_ready(bset) <= rd_data(1); + proc_common_wait_some_cycles(tb_clk, 10); + rd_bsn_monitor_v2_beamlet_output <= '0'; + ---------------------------------------------------------------------------- -- Enable beamlet output (dp_xonoff) ---------------------------------------------------------------------------- @@ -1193,13 +1195,16 @@ begin -- is active beamlet output data and because ready remains '0' when it -- toggles during a sync interval. ---------------------------------------------------------------------------- - mmf_mm_bus_rd(c_mm_file_reg_bsn_monitor_v2_beamlet_output, 0, rd_data, tb_clk); - proc_common_wait_some_cycles(tb_clk, 1); - rd_bsn_monitor_v2_beamlet_output <= '1'; - rd_bsn_monitor_v2_beamlet_output_xon <= rd_data(0); - rd_bsn_monitor_v2_beamlet_output_ready <= rd_data(1); - proc_common_wait_some_cycles(tb_clk, 10); - rd_bsn_monitor_v2_beamlet_output <= '0'; + for bset in 0 to c_sdp_N_beamsets - 1 loop + v_offset := bset * c_mm_span_reg_bsn_monitor_v2; + mmf_mm_bus_rd(c_mm_file_reg_bsn_monitor_v2_beamlet_output, v_offset + 0, rd_data, tb_clk); + proc_common_wait_some_cycles(tb_clk, 1); + rd_bsn_monitor_v2_beamlet_output <= '1'; + rd_bsn_monitor_v2_beamlet_output_xon(bset) <= rd_data(0); + rd_bsn_monitor_v2_beamlet_output_ready(bset) <= rd_data(1); + proc_common_wait_some_cycles(tb_clk, 10); + rd_bsn_monitor_v2_beamlet_output <= '0'; + end loop; --------------------------------------------------------------------------- -- Read subband statistics -- GitLab