Skip to content
Snippets Groups Projects
Commit c4f0235c authored by Eric Kooistra's avatar Eric Kooistra Committed by Pieter Donker
Browse files

Made antenne_band_index RW in sdp_info. Removed O_si, N_si from sdp_info...

Made antenne_band_index RW in sdp_info. Removed O_si, N_si from sdp_info because not used. Moved O_rn, N_rn to ring_info.
parent 5898470e
No related branches found
No related tags found
1 merge request!207Made antenne_band_index RW in sdp_info. Removed O_si, N_si from sdp_info...
...@@ -97,8 +97,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf IS ...@@ -97,8 +97,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf 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_gn_index : NATURAL := c_unb_nr * 4 + c_node_nr; -- this node GN CONSTANT c_gn_index : NATURAL := c_unb_nr * 4 + c_node_nr; -- this node GN
CONSTANT c_O_rn : NATURAL := 0;
CONSTANT c_N_rn : NATURAL := 16;
CONSTANT c_init_bsn : NATURAL := 17; -- some recognizable value >= 0 CONSTANT c_init_bsn : NATURAL := 17; -- some recognizable value >= 0
CONSTANT c_id : STD_LOGIC_VECTOR(7 DOWNTO 0) := TO_UVEC(c_gn_index, 8); CONSTANT c_id : STD_LOGIC_VECTOR(7 DOWNTO 0) := TO_UVEC(c_gn_index, 8);
...@@ -115,7 +113,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf IS ...@@ -115,7 +113,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf IS
CONSTANT c_sa_clk_period : TIME := tech_pll_clk_644_period; -- 644MHz CONSTANT c_sa_clk_period : TIME := tech_pll_clk_644_period; -- 644MHz
CONSTANT c_tb_clk_period : TIME := 100 ps; -- use fast tb_clk to speed up M&C CONSTANT c_tb_clk_period : TIME := 100 ps; -- use fast tb_clk to speed up M&C
CONSTANT c_cross_clock_domain_latency : NATURAL := 20;
CONSTANT c_nof_block_per_sync : NATURAL := 16; CONSTANT c_nof_block_per_sync : NATURAL := 16;
CONSTANT c_nof_clk_per_sync : NATURAL := c_nof_block_per_sync * c_sdp_N_fft; CONSTANT c_nof_clk_per_sync : NATURAL := c_nof_block_per_sync * c_sdp_N_fft;
...@@ -150,10 +147,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf IS ...@@ -150,10 +147,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf IS
'1', -- f_adc, 0 = 160 MHz, 1 = 200 MHz '1', -- f_adc, 0 = 160 MHz, 1 = 200 MHz
'0', -- fsub_type, 0 = critically sampled, 1 = oversampled '0', -- fsub_type, 0 = critically sampled, 1 = oversampled
'0', -- beam_repositioning_flag '0', -- beam_repositioning_flag
x"01", -- O_si, not used
x"02", -- N_si, not used
TO_UVEC(c_O_rn, 8), -- O_rn
TO_UVEC(c_N_rn, 8), -- N_rn
x"1400" -- block_period = 5120 x"1400" -- block_period = 5120
); );
...@@ -531,36 +524,27 @@ BEGIN ...@@ -531,36 +524,27 @@ BEGIN
-- Set and check SDP info -- Set and check SDP info
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
-- TYPE t_sdp_info IS RECORD -- TYPE t_sdp_info IS RECORD
-- 11 station_id : STD_LOGIC_VECTOR(15 DOWNTO 0); -- 7 station_id : STD_LOGIC_VECTOR(15 DOWNTO 0);
-- 10 antenna_band_index : STD_LOGIC; -- 6 antenna_band_index : STD_LOGIC;
-- 9 observation_id : STD_LOGIC_VECTOR(31 DOWNTO 0); -- 5 observation_id : STD_LOGIC_VECTOR(31 DOWNTO 0);
-- 8 nyquist_zone_index : STD_LOGIC_VECTOR(1 DOWNTO 0); -- 4 nyquist_zone_index : STD_LOGIC_VECTOR(1 DOWNTO 0);
-- 7 f_adc : STD_LOGIC; -- 3 f_adc : STD_LOGIC;
-- 6 fsub_type : STD_LOGIC; -- 2 fsub_type : STD_LOGIC;
-- 5 beam_repositioning_flag : STD_LOGIC; -- 1 beam_repositioning_flag : STD_LOGIC;
-- 4 O_si : STD_LOGIC_VECTOR(7 DOWNTO 0);
-- 3 N_si : STD_LOGIC_VECTOR(7 DOWNTO 0);
-- 2 O_rn : STD_LOGIC_VECTOR(7 DOWNTO 0);
-- 1 N_rn : STD_LOGIC_VECTOR(7 DOWNTO 0);
-- 0 block_period : STD_LOGIC_VECTOR(15 DOWNTO 0); -- 0 block_period : STD_LOGIC_VECTOR(15 DOWNTO 0);
-- END RECORD; -- END RECORD;
-- . Write -- . Write
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 11, TO_UINT(c_exp_sdp_info.station_id), tb_clk); mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 7, TO_UINT(c_exp_sdp_info.station_id), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 9, TO_UINT(c_exp_sdp_info.observation_id), tb_clk); mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 6, TO_UINT(slv(c_exp_sdp_info.antenna_band_index)), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 8, TO_UINT(c_exp_sdp_info.nyquist_zone_index), tb_clk); mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 5, TO_UINT(c_exp_sdp_info.observation_id), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 5, TO_UINT(slv(c_exp_sdp_info.beam_repositioning_flag)), tb_clk); mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 4, TO_UINT(c_exp_sdp_info.nyquist_zone_index), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 4, TO_UINT(c_exp_sdp_info.O_si), tb_clk); mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 1, TO_UINT(slv(c_exp_sdp_info.beam_repositioning_flag)), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 3, TO_UINT(c_exp_sdp_info.N_si), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 2, TO_UINT(c_exp_sdp_info.O_rn), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 1, TO_UINT(c_exp_sdp_info.N_rn), tb_clk);
-- . Read -- . Read
mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 10, rd_data, tb_clk); rd_sdp_info.antenna_band_index <= rd_data(0); mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 3, rd_data, tb_clk); rd_sdp_info.f_adc <= rd_data(0);
mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 7, rd_data, tb_clk); rd_sdp_info.f_adc <= rd_data(0); mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 2, rd_data, tb_clk); rd_sdp_info.fsub_type <= rd_data(0);
mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 6, rd_data, tb_clk); rd_sdp_info.fsub_type <= rd_data(0);
mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 0, rd_data, tb_clk); rd_sdp_info.block_period <= rd_data(15 DOWNTO 0); mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 0, rd_data, tb_clk); rd_sdp_info.block_period <= rd_data(15 DOWNTO 0);
proc_common_wait_some_cycles(tb_clk, 1); proc_common_wait_some_cycles(tb_clk, 1);
-- . Verify read -- . Verify read
ASSERT c_exp_sdp_info.antenna_band_index = rd_sdp_info.antenna_band_index REPORT "Wrong MM read SDP info antenna_band_index" SEVERITY ERROR;
ASSERT c_exp_sdp_info.f_adc = rd_sdp_info.f_adc REPORT "Wrong MM read SDP info f_adc" SEVERITY ERROR; ASSERT c_exp_sdp_info.f_adc = rd_sdp_info.f_adc REPORT "Wrong MM read SDP info f_adc" SEVERITY ERROR;
ASSERT c_exp_sdp_info.fsub_type = rd_sdp_info.fsub_type REPORT "Wrong MM read SDP info fsub_type" SEVERITY ERROR; ASSERT c_exp_sdp_info.fsub_type = rd_sdp_info.fsub_type REPORT "Wrong MM read SDP info fsub_type" SEVERITY ERROR;
ASSERT c_exp_sdp_info.block_period = rd_sdp_info.block_period REPORT "Wrong MM read SDP info block_period" SEVERITY ERROR; ASSERT c_exp_sdp_info.block_period = rd_sdp_info.block_period REPORT "Wrong MM read SDP info block_period" SEVERITY ERROR;
......
...@@ -97,8 +97,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf IS ...@@ -97,8 +97,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf 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_gn_index : NATURAL := c_unb_nr * 4 + c_node_nr; -- this node GN CONSTANT c_gn_index : NATURAL := c_unb_nr * 4 + c_node_nr; -- this node GN
CONSTANT c_O_rn : NATURAL := 0;
CONSTANT c_N_rn : NATURAL := 16;
CONSTANT c_init_bsn : NATURAL := 17; -- some recognizable value >= 0 CONSTANT c_init_bsn : NATURAL := 17; -- some recognizable value >= 0
CONSTANT c_id : STD_LOGIC_VECTOR(7 DOWNTO 0) := TO_UVEC(c_gn_index, 8); CONSTANT c_id : STD_LOGIC_VECTOR(7 DOWNTO 0) := TO_UVEC(c_gn_index, 8);
...@@ -149,10 +147,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf IS ...@@ -149,10 +147,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf IS
'1', -- f_adc, 0 = 160 MHz, 1 = 200 MHz '1', -- f_adc, 0 = 160 MHz, 1 = 200 MHz
'0', -- fsub_type, 0 = critically sampled, 1 = oversampled '0', -- fsub_type, 0 = critically sampled, 1 = oversampled
'0', -- beam_repositioning_flag '0', -- beam_repositioning_flag
x"01", -- O_si, not used
x"02", -- N_si, not used
TO_UVEC(c_O_rn, 8), -- O_rn
TO_UVEC(c_N_rn, 8), -- N_rn
x"1400" -- block_period = 5120 x"1400" -- block_period = 5120
); );
...@@ -512,36 +506,27 @@ BEGIN ...@@ -512,36 +506,27 @@ BEGIN
-- Set and check SDP info -- Set and check SDP info
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
-- TYPE t_sdp_info IS RECORD -- TYPE t_sdp_info IS RECORD
-- 11 station_id : STD_LOGIC_VECTOR(15 DOWNTO 0); -- 7 station_id : STD_LOGIC_VECTOR(15 DOWNTO 0);
-- 10 antenna_band_index : STD_LOGIC; -- 6 antenna_band_index : STD_LOGIC;
-- 9 observation_id : STD_LOGIC_VECTOR(31 DOWNTO 0); -- 5 observation_id : STD_LOGIC_VECTOR(31 DOWNTO 0);
-- 8 nyquist_zone_index : STD_LOGIC_VECTOR(1 DOWNTO 0); -- 4 nyquist_zone_index : STD_LOGIC_VECTOR(1 DOWNTO 0);
-- 7 f_adc : STD_LOGIC; -- 3 f_adc : STD_LOGIC;
-- 6 fsub_type : STD_LOGIC; -- 2 fsub_type : STD_LOGIC;
-- 5 beam_repositioning_flag : STD_LOGIC; -- 1 beam_repositioning_flag : STD_LOGIC;
-- 4 O_si : STD_LOGIC_VECTOR(7 DOWNTO 0);
-- 3 N_si : STD_LOGIC_VECTOR(7 DOWNTO 0);
-- 2 O_rn : STD_LOGIC_VECTOR(7 DOWNTO 0);
-- 1 N_rn : STD_LOGIC_VECTOR(7 DOWNTO 0);
-- 0 block_period : STD_LOGIC_VECTOR(15 DOWNTO 0); -- 0 block_period : STD_LOGIC_VECTOR(15 DOWNTO 0);
-- END RECORD; -- END RECORD;
-- . Write -- . Write
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 11, TO_UINT(c_exp_sdp_info.station_id), tb_clk); mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 7, TO_UINT(c_exp_sdp_info.station_id), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 9, TO_UINT(c_exp_sdp_info.observation_id), tb_clk); mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 6, TO_UINT(slv(c_exp_sdp_info.antenna_band_index)), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 8, TO_UINT(c_exp_sdp_info.nyquist_zone_index), tb_clk); mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 5, TO_UINT(c_exp_sdp_info.observation_id), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 5, TO_UINT(slv(c_exp_sdp_info.beam_repositioning_flag)), tb_clk); mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 4, TO_UINT(c_exp_sdp_info.nyquist_zone_index), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 4, TO_UINT(c_exp_sdp_info.O_si), tb_clk); mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 1, TO_UINT(slv(c_exp_sdp_info.beam_repositioning_flag)), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 3, TO_UINT(c_exp_sdp_info.N_si), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 2, TO_UINT(c_exp_sdp_info.O_rn), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 1, TO_UINT(c_exp_sdp_info.N_rn), tb_clk);
-- . Read -- . Read
mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 10, rd_data, tb_clk); rd_sdp_info.antenna_band_index <= rd_data(0); mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 3, rd_data, tb_clk); rd_sdp_info.f_adc <= rd_data(0);
mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 7, rd_data, tb_clk); rd_sdp_info.f_adc <= rd_data(0); mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 2, rd_data, tb_clk); rd_sdp_info.fsub_type <= rd_data(0);
mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 6, rd_data, tb_clk); rd_sdp_info.fsub_type <= rd_data(0);
mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 0, rd_data, tb_clk); rd_sdp_info.block_period <= rd_data(15 DOWNTO 0); mmf_mm_bus_rd(c_mm_file_reg_sdp_info, 0, rd_data, tb_clk); rd_sdp_info.block_period <= rd_data(15 DOWNTO 0);
proc_common_wait_some_cycles(tb_clk, 1); proc_common_wait_some_cycles(tb_clk, 1);
-- . Verify read -- . Verify read
ASSERT c_exp_sdp_info.antenna_band_index = rd_sdp_info.antenna_band_index REPORT "Wrong MM read SDP info antenna_band_index" SEVERITY ERROR;
ASSERT c_exp_sdp_info.f_adc = rd_sdp_info.f_adc REPORT "Wrong MM read SDP info f_adc" SEVERITY ERROR; ASSERT c_exp_sdp_info.f_adc = rd_sdp_info.f_adc REPORT "Wrong MM read SDP info f_adc" SEVERITY ERROR;
ASSERT c_exp_sdp_info.fsub_type = rd_sdp_info.fsub_type REPORT "Wrong MM read SDP info fsub_type" SEVERITY ERROR; ASSERT c_exp_sdp_info.fsub_type = rd_sdp_info.fsub_type REPORT "Wrong MM read SDP info fsub_type" SEVERITY ERROR;
ASSERT c_exp_sdp_info.block_period = rd_sdp_info.block_period REPORT "Wrong MM read SDP info block_period" SEVERITY ERROR; ASSERT c_exp_sdp_info.block_period = rd_sdp_info.block_period REPORT "Wrong MM read SDP info block_period" SEVERITY ERROR;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment