Skip to content
Snippets Groups Projects
Commit 61c0a510 authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

Merge branch 'L2SDP-917' into 'master'

Remove reference mmap with qsys addresses, because default addresses mmap is...

Closes L2SDP-917

See merge request desp/hdl!320
parents 2e4d3bb4 fd94c1cd
No related branches found
No related tags found
1 merge request!320Remove reference mmap with qsys addresses, because default addresses mmap is...
Pipeline #47020 passed
Showing
with 259 additions and 1859 deletions
......@@ -177,7 +177,8 @@ number_of_columns = 13
- - - - nyquist_zone_index 0x00058004 1 RW uint32 b[1:0] - - -
- - - - observation_id 0x00058005 1 RW uint32 b[31:0] - - -
- - - - antenna_band_index 0x00058006 1 RW uint32 b[0:0] - - -
- - - - station_id 0x00058007 1 RW uint32 b[15:0] - - -
- - - - station_id 0x00058007 1 RW uint32 b[9:0] - - -
- - - - antenna_field_index 0x00058008 1 RW uint32 b[5:0] - - -
REG_RING_INFO 1 1 REG use_cable_to_previous_rn 0x00060000 1 RW uint32 b[0:0] - - -
- - - - use_cable_to_next_rn 0x00060001 1 RW uint32 b[0:0] - - -
- - - - n_rn 0x00060002 1 RW uint32 b[7:0] - - -
......@@ -288,7 +289,8 @@ number_of_columns = 13
- - - - sdp_source_info_f_adc 0x000e800f 1 RW uint32 b[12:12] - - -
- - - - sdp_source_info_nyquist_zone_index 0x000e8010 1 RW uint32 b[14:13] - - -
- - - - sdp_source_info_antenna_band_index 0x000e8011 1 RW uint32 b[15:15] - - -
- - - - sdp_station_id 0x000e8012 1 RW uint32 b[15:0] - - -
- - - - sdp_station_info_station_id 0x000e8012 1 RW uint32 b[9:0] - - -
- - - - sdp_station_info_antenna_field_index 0x000e8012 1 RW uint32 b[15:10] - - -
- - - - sdp_observation_id 0x000e8013 1 RW uint32 b[31:0] - - -
- - - - sdp_version_id 0x000e8014 1 RW uint32 b[7:0] - - -
- - - - sdp_marker 0x000e8015 1 RW uint32 b[7:0] - - -
......@@ -366,7 +368,8 @@ number_of_columns = 13
- - - - sdp_source_info_f_adc 0x0012800f 1 RW uint32 b[12:12] - - -
- - - - sdp_source_info_nyquist_zone_index 0x00128010 1 RW uint32 b[14:13] - - -
- - - - sdp_source_info_antenna_band_index 0x00128011 1 RW uint32 b[15:15] - - -
- - - - sdp_station_id 0x00128012 1 RW uint32 b[15:0] - - -
- - - - sdp_station_info_station_id 0x00128012 1 RW uint32 b[9:0] - - -
- - - - sdp_station_info_antenna_field_index 0x00128012 1 RW uint32 b[15:10] - - -
- - - - sdp_observation_id 0x00128013 1 RW uint32 b[31:0] - - -
- - - - sdp_version_id 0x00128014 1 RW uint32 b[7:0] - - -
- - - - sdp_marker 0x00128015 1 RW uint32 b[7:0] - - -
......@@ -697,7 +700,8 @@ number_of_columns = 13
- - - - sdp_source_info_f_adc 0x001e000e 1 RW uint32 b[12:12] - - -
- - - - sdp_source_info_nyquist_zone_index 0x001e000f 1 RW uint32 b[14:13] - - -
- - - - sdp_source_info_antenna_band_index 0x001e0010 1 RW uint32 b[15:15] - - -
- - - - sdp_station_id 0x001e0011 1 RW uint32 b[15:0] - - -
- - - - sdp_station_info_station_id 0x001e0011 1 RW uint32 b[9:0] - - -
- - - - sdp_station_info_antenna_field_index 0x001e0011 1 RW uint32 b[15:10] - - -
- - - - sdp_observation_id 0x001e0012 1 RW uint32 b[31:0] - - -
- - - - sdp_version_id 0x001e0013 1 RW uint32 b[7:0] - - -
- - - - sdp_marker 0x001e0014 1 RW uint32 b[7:0] - - -
......@@ -746,7 +750,8 @@ number_of_columns = 13
- - - - sdp_source_info_f_adc 0x0020000f 1 RW uint32 b[12:12] - - -
- - - - sdp_source_info_nyquist_zone_index 0x00200010 1 RW uint32 b[14:13] - - -
- - - - sdp_source_info_antenna_band_index 0x00200011 1 RW uint32 b[15:15] - - -
- - - - sdp_station_id 0x00200012 1 RW uint32 b[15:0] - - -
- - - - sdp_station_info_station_id 0x00200012 1 RW uint32 b[9:0] - - -
- - - - sdp_station_info_antenna_field_index 0x00200012 1 RW uint32 b[15:10] - - -
- - - - sdp_observation_id 0x00200013 1 RW uint32 b[31:0] - - -
- - - - sdp_version_id 0x00200014 1 RW uint32 b[7:0] - - -
- - - - sdp_marker 0x00200015 1 RW uint32 b[7:0] - - -
......
......@@ -143,7 +143,8 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf IS
CONSTANT c_exp_beamlet_scale : NATURAL := NATURAL(g_beamlet_scale * REAL(c_sdp_unit_beamlet_scale)); -- c_sdp_unit_beamlet_scale = 2**15;
CONSTANT c_exp_sdp_info : t_sdp_info := (
TO_UVEC(601, 16), -- station_id
TO_UVEC(3, 6), -- antenna_field_index
TO_UVEC(601, 10), -- station_id
'0', -- antenna_band_index
x"7FFFFFFF", -- observation_id, use > 0 to avoid Warning: (vsim-151) NUMERIC_STD.TO_INTEGER: Value -2 is not in bounds of subtype NATURAL.
b"01", -- nyquist_zone_index, 0 = first, 1 = second, 2 = third
......@@ -525,7 +526,8 @@ BEGIN
-- Set and check SDP info
----------------------------------------------------------------------------
-- TYPE t_sdp_info IS RECORD
-- 7 station_id : STD_LOGIC_VECTOR(15 DOWNTO 0);
-- 8 antenna_field_index : STD_LOGIC_VECTOR(5 DOWNTO 0);
-- 7 station_id : STD_LOGIC_VECTOR(9 DOWNTO 0);
-- 6 antenna_band_index : STD_LOGIC;
-- 5 observation_id : STD_LOGIC_VECTOR(31 DOWNTO 0);
-- 4 nyquist_zone_index : STD_LOGIC_VECTOR(1 DOWNTO 0);
......@@ -535,6 +537,7 @@ BEGIN
-- 0 block_period : STD_LOGIC_VECTOR(15 DOWNTO 0);
-- END RECORD;
-- . Write
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 8, TO_UINT(c_exp_sdp_info.antenna_field_index), 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, 6, TO_UINT(slv(c_exp_sdp_info.antenna_band_index)), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 5, TO_UINT(c_exp_sdp_info.observation_id), tb_clk);
......@@ -593,7 +596,7 @@ BEGIN
-- 20 "sdp_marker" ), "RW", 8, field_default(c_sdp_marker_beamlets) ),
-- 19 "sdp_version_id" ), "RW", 8, field_default(c_sdp_cep_version_id) ),
-- 18 "sdp_observation_id" ), "RW", 32, field_default(0) ),
-- 17 "sdp_station_id" ), "RW", 16, field_default(0) ),
-- 17 "sdp_station_info" ), "RW", 16, field_default(0) ),
--
-- 16 "sdp_source_info_antenna_band_id" ), "RW", 1, field_default(0) ),
-- 15 "sdp_source_info_nyquist_zone_id" ), "RW", 2, field_default(0) ),
......@@ -1070,7 +1073,7 @@ BEGIN
exp_sdp_cep_header.app.sdp_marker <= TO_UVEC(c_sdp_marker_beamlets, 8); -- 98 = x"62" = 'b'
exp_sdp_cep_header.app.sdp_version_id <= TO_UVEC(c_sdp_cep_version_id, 8); -- 5
exp_sdp_cep_header.app.sdp_observation_id <= c_exp_sdp_info.observation_id;
exp_sdp_cep_header.app.sdp_station_id <= c_exp_sdp_info.station_id;
exp_sdp_cep_header.app.sdp_station_info <= c_exp_sdp_info.antenna_field_index & c_exp_sdp_info.station_id;
exp_sdp_cep_header.app.sdp_source_info_antenna_band_id <= slv(c_exp_sdp_info.antenna_band_index);
exp_sdp_cep_header.app.sdp_source_info_nyquist_zone_id <= c_exp_sdp_info.nyquist_zone_index;
......
......@@ -215,7 +215,8 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf IS
CONSTANT c_exp_beamlet_index : NATURAL := 0; -- depends on beamset bset * c_sdp_S_sub_bf
CONSTANT c_exp_sdp_info : t_sdp_info := (
TO_UVEC(601, 16), -- station_id
TO_UVEC(3, 6), -- antenna_field_index
TO_UVEC(601, 10), -- station_id
'0', -- antenna_band_index
x"7FFFFFFF", -- observation_id, use > 0 to avoid Warning: (vsim-151) NUMERIC_STD.TO_INTEGER: Value -2 is not in bounds of subtype NATURAL.
b"01", -- nyquist_zone_index, 0 = first, 1 = second, 2 = third
......@@ -661,7 +662,8 @@ BEGIN
-- Set and check SDP info
----------------------------------------------------------------------------
-- TYPE t_sdp_info IS RECORD
-- 7 station_id : STD_LOGIC_VECTOR(15 DOWNTO 0);
-- 8 antenna_field_index : STD_LOGIC_VECTOR(5 DOWNTO 0);
-- 7 station_id : STD_LOGIC_VECTOR(9 DOWNTO 0);
-- 6 antenna_band_index : STD_LOGIC;
-- 5 observation_id : STD_LOGIC_VECTOR(31 DOWNTO 0);
-- 4 nyquist_zone_index : STD_LOGIC_VECTOR(1 DOWNTO 0);
......@@ -671,6 +673,7 @@ BEGIN
-- 0 block_period : STD_LOGIC_VECTOR(15 DOWNTO 0);
-- END RECORD;
-- . Write
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 8, TO_UINT(c_exp_sdp_info.antenna_field_index), 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, 6, TO_UINT(slv(c_exp_sdp_info.antenna_band_index)), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 5, TO_UINT(c_exp_sdp_info.observation_id), tb_clk);
......@@ -729,7 +732,7 @@ BEGIN
-- 20 "sdp_marker" ), "RW", 8, field_default(c_sdp_marker_beamlets) ),
-- 19 "sdp_version_id" ), "RW", 8, field_default(c_sdp_cep_version_id) ),
-- 18 "sdp_observation_id" ), "RW", 32, field_default(0) ),
-- 17 "sdp_station_id" ), "RW", 16, field_default(0) ),
-- 17 "sdp_station_info" ), "RW", 16, field_default(0) ),
--
-- 16 "sdp_source_info_antenna_band_id" ), "RW", 1, field_default(0) ),
-- 15 "sdp_source_info_nyquist_zone_id" ), "RW", 2, field_default(0) ),
......
......@@ -84,7 +84,8 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_bst_offload IS
CONSTANT c_exp_beamlet_index : NATURAL := 0; -- depends on beamset bset * c_sdp_S_sub_bf
CONSTANT c_exp_sdp_info : t_sdp_info := (
TO_UVEC(601, 16), -- station_id
TO_UVEC(3, 6), -- antenna_field_index
TO_UVEC(601, 10), -- station_id
'0', -- antenna_band_index
x"7FFFFFFF", -- observation_id, use > 0 to avoid Warning: (vsim-151) NUMERIC_STD.TO_INTEGER: Value -2 is not in bounds of subtype NATURAL.
b"01", -- nyquist_zone_index, 0 = first, 1 = second, 2 = third
......@@ -237,6 +238,7 @@ BEGIN
----------------------------------------------------------------------------
-- Set SDP info
----------------------------------------------------------------------------
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 8, TO_UINT(c_exp_sdp_info.antenna_field_index), 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, 6, TO_UINT(slv(c_exp_sdp_info.antenna_band_index)), tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_sdp_info, 5, TO_UINT(c_exp_sdp_info.observation_id), tb_clk);
......
......@@ -227,7 +227,8 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_ring IS
CONSTANT c_exp_beamlet_index : NATURAL := 0; -- depends on beamset bset * c_sdp_S_sub_bf
CONSTANT c_exp_sdp_info : t_sdp_info := (
TO_UVEC(601, 16), -- station_id
TO_UVEC(3, 6), -- antenna_field_index
TO_UVEC(601, 10), -- station_id
'0', -- antenna_band_index
x"7FFFFFFF", -- observation_id, use > 0 to avoid Warning: (vsim-151) NUMERIC_STD.TO_INTEGER: Value -2 is not in bounds of subtype NATURAL.
b"01", -- nyquist_zone_index, 0 = first, 1 = second, 2 = third
......@@ -708,7 +709,8 @@ BEGIN
-- Set and check SDP info
----------------------------------------------------------------------------
-- TYPE t_sdp_info IS RECORD
-- 7 station_id : STD_LOGIC_VECTOR(15 DOWNTO 0);
-- 8 antenna_field_index : STD_LOGIC_VECTOR(5 DOWNTO 0);
-- 7 station_id : STD_LOGIC_VECTOR(9 DOWNTO 0);
-- 6 antenna_band_index : STD_LOGIC;
-- 5 observation_id : STD_LOGIC_VECTOR(31 DOWNTO 0);
-- 4 nyquist_zone_index : STD_LOGIC_VECTOR(1 DOWNTO 0);
......@@ -722,6 +724,7 @@ BEGIN
FOR RN IN 0 TO c_last_rn LOOP
v_gn := g_first_gn + RN;
mmf_mm_bus_wr(mmf_unb_file_prefix(v_gn / c_quad, v_gn MOD c_quad) & "REG_SDP_INFO", 8, TO_UINT(c_exp_sdp_info.antenna_field_index), tb_clk);
mmf_mm_bus_wr(mmf_unb_file_prefix(v_gn / c_quad, v_gn MOD c_quad) & "REG_SDP_INFO", 7, TO_UINT(c_exp_sdp_info.station_id), tb_clk);
mmf_mm_bus_wr(mmf_unb_file_prefix(v_gn / c_quad, v_gn MOD c_quad) & "REG_SDP_INFO", 6, TO_UINT(slv(c_exp_sdp_info.antenna_band_index)), tb_clk);
mmf_mm_bus_wr(mmf_unb_file_prefix(v_gn / c_quad, v_gn MOD c_quad) & "REG_SDP_INFO", 5, TO_UINT(c_exp_sdp_info.observation_id), tb_clk);
......@@ -787,7 +790,7 @@ BEGIN
-- 20 "sdp_marker" ), "RW", 8, field_default(c_sdp_marker_beamlets) ),
-- 19 "sdp_version_id" ), "RW", 8, field_default(c_sdp_cep_version_id) ),
-- 18 "sdp_observation_id" ), "RW", 32, field_default(0) ),
-- 17 "sdp_station_id" ), "RW", 16, field_default(0) ),
-- 17 "sdp_station_info" ), "RW", 16, field_default(0) ),
--
-- 16 "sdp_source_info_antenna_band_id" ), "RW", 1, field_default(0) ),
-- 15 "sdp_source_info_nyquist_zone_id" ), "RW", 2, field_default(0) ),
......
......@@ -14,11 +14,10 @@ peripherals:
mm_port_type: REG
mm_port_span: 16 * MM_BUS_SIZE
mm_port_description: |
"The SDP info contains central SDP information. The station_id applies to the entire station.
The other info fields apply per antenna band (low band or high band). An FPGA node only
participates in one band."
"The SDP info contains central SDP information."
fields:
- - { field_name: station_id, mm_width: 16, access_mode: RW, address_offset: 0x1C }
- - { field_name: antenna_field_index, mm_width: 6, access_mode: RW, address_offset: 0x20 }
- - { field_name: station_id, mm_width: 10, access_mode: RW, address_offset: 0x1C }
- - { field_name: antenna_band_index, mm_width: 1, access_mode: RW, address_offset: 0x18 }
- - { field_name: observation_id, mm_width: 32, access_mode: RW, address_offset: 0x14 }
- - { field_name: nyquist_zone_index, mm_width: 2, access_mode: RW, address_offset: 0x10 }
......@@ -252,7 +251,10 @@ peripherals:
- - { field_name: sdp_marker, mm_width: 8, access_mode: RW, address_offset: 0x50 }
- - { field_name: sdp_version_id, mm_width: 8, access_mode: RW, address_offset: 0x4C }
- - { field_name: sdp_observation_id, mm_width: 32, access_mode: RW, address_offset: 0x48 }
- - { field_name: sdp_station_id, mm_width: 16, access_mode: RW, address_offset: 0x44 }
- "sdp_station_info":
- { field_name: antenna_field_index, mm_width: 6, bit_offset: 10, access_mode: RW, address_offset: 0x44 }
- { field_name: station_id, mm_width: 10, bit_offset: 0, access_mode: RW, address_offset: 0x44 }
- - { field_name: sdp_source_info_antenna_band_index, mm_width: 1, bit_offset: 15, access_mode: RW, address_offset: 0x40 }
- - { field_name: sdp_source_info_nyquist_zone_index, mm_width: 2, bit_offset: 13, access_mode: RW, address_offset: 0x3C }
- - { field_name: sdp_source_info_f_adc, mm_width: 1, bit_offset: 12, access_mode: RW, address_offset: 0x38 }
......@@ -320,7 +322,10 @@ peripherals:
- - { field_name: sdp_marker, mm_width: 8, access_mode: RW, address_offset: 0x54 }
- - { field_name: sdp_version_id, mm_width: 8, access_mode: RW, address_offset: 0x50 }
- - { field_name: sdp_observation_id, mm_width: 32, access_mode: RW, address_offset: 0x4C }
- - { field_name: sdp_station_id, mm_width: 16, access_mode: RW, address_offset: 0x48 }
- "sdp_station_info":
- { field_name: antenna_field_index, mm_width: 6, bit_offset: 10, access_mode: RW, address_offset: 0x48 }
- { field_name: station_id, mm_width: 10, bit_offset: 0, access_mode: RW, address_offset: 0x48 }
- - { field_name: sdp_source_info_antenna_band_index, mm_width: 1, bit_offset: 15, access_mode: RW, address_offset: 0x44 }
- - { field_name: sdp_source_info_nyquist_zone_index, mm_width: 2, bit_offset: 13, access_mode: RW, address_offset: 0x40 }
- - { field_name: sdp_source_info_f_adc, mm_width: 1, bit_offset: 12, access_mode: RW, address_offset: 0x3C }
......@@ -393,7 +398,10 @@ peripherals:
- - { field_name: sdp_marker, mm_width: 8, access_mode: RW, address_offset: 0x54 }
- - { field_name: sdp_version_id, mm_width: 8, access_mode: RW, address_offset: 0x50 }
- - { field_name: sdp_observation_id, mm_width: 32, access_mode: RW, address_offset: 0x4C }
- - { field_name: sdp_station_id, mm_width: 16, access_mode: RW, address_offset: 0x48 }
- "sdp_station_info":
- { field_name: antenna_field_index, mm_width: 6, bit_offset: 10, access_mode: RW, address_offset: 0x48 }
- { field_name: station_id, mm_width: 10, bit_offset: 0, access_mode: RW, address_offset: 0x48 }
- - { field_name: sdp_source_info_antenna_band_index, mm_width: 1, bit_offset: 15, access_mode: RW, address_offset: 0x44 }
- - { field_name: sdp_source_info_nyquist_zone_index, mm_width: 2, bit_offset: 13, access_mode: RW, address_offset: 0x40 }
- - { field_name: sdp_source_info_f_adc, mm_width: 1, bit_offset: 12, access_mode: RW, address_offset: 0x3C }
......@@ -467,7 +475,10 @@ peripherals:
- - { field_name: sdp_marker, mm_width: 8, access_mode: RW, address_offset: 0x54 }
- - { field_name: sdp_version_id, mm_width: 8, access_mode: RW, address_offset: 0x50 }
- - { field_name: sdp_observation_id, mm_width: 32, access_mode: RW, address_offset: 0x4C }
- - { field_name: sdp_station_id, mm_width: 16, access_mode: RW, address_offset: 0x48 }
- "sdp_station_info":
- { field_name: antenna_field_index, mm_width: 6, bit_offset: 10, access_mode: RW, address_offset: 0x48 }
- { field_name: station_id, mm_width: 10, bit_offset: 0, access_mode: RW, address_offset: 0x48 }
- - { field_name: sdp_source_info_antenna_band_index, mm_width: 1, bit_offset: 15, access_mode: RW, address_offset: 0x44 }
- - { field_name: sdp_source_info_nyquist_zone_index, mm_width: 2, bit_offset: 13, access_mode: RW, address_offset: 0x40 }
- - { field_name: sdp_source_info_f_adc, mm_width: 1, bit_offset: 12, access_mode: RW, address_offset: 0x3C }
......
......@@ -98,7 +98,8 @@ ARCHITECTURE str OF sdp_beamformer_output IS
SIGNAL common_fifo_rd_req : STD_LOGIC;
SIGNAL payload_err : STD_LOGIC_VECTOR(0 DOWNTO 0);
SIGNAL station_info : STD_LOGIC_VECTOR(15 DOWNTO 0) := (OTHERS => '0');
-- Default set all data path driven header fields to 0
SIGNAL dp_offload_tx_hdr_fields : STD_LOGIC_VECTOR(1023 DOWNTO 0) := (OTHERS=>'0');
......@@ -238,7 +239,7 @@ BEGIN
-- MM sdp_marker
-- MM sdp_version_id
-- DP sdp_observation_id
-- DP sdp_station_id
-- DP sdp_station_info
--
-- DP sdp_source_info_antenna_band_id
-- DP sdp_source_info_nyquist_zone_id
......@@ -262,12 +263,15 @@ BEGIN
-- beamlet packets from different stations must have different source MAC/IP/UDP.
-- Hence the eth_src_mac, udp_src_port and ip_src_addr are ignored, because c_sdp_cep_hdr_field_sel selects MM control,
-- but keep the code to be able to enable using them by just changing the selection bit.
station_info <= sdp_info.antenna_field_index & sdp_info.station_id;
dp_offload_tx_hdr_fields(field_hi(c_sdp_cep_hdr_field_arr, "eth_src_mac" ) DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "eth_src_mac" )) <= eth_src_mac;
dp_offload_tx_hdr_fields(field_hi(c_sdp_cep_hdr_field_arr, "udp_src_port") DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "udp_src_port")) <= udp_src_port;
dp_offload_tx_hdr_fields(field_hi(c_sdp_cep_hdr_field_arr, "ip_src_addr" ) DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "ip_src_addr" )) <= ip_src_addr;
dp_offload_tx_hdr_fields(field_hi(c_sdp_cep_hdr_field_arr, "sdp_observation_id" ) DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_observation_id" )) <= sdp_info.observation_id;
dp_offload_tx_hdr_fields(field_hi(c_sdp_cep_hdr_field_arr, "sdp_station_id" ) DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_station_id" )) <= sdp_info.station_id;
dp_offload_tx_hdr_fields(field_hi(c_sdp_cep_hdr_field_arr, "sdp_station_info" ) DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_station_info" )) <= station_info;
dp_offload_tx_hdr_fields(field_hi(c_sdp_cep_hdr_field_arr, "sdp_source_info_antenna_band_id" ) DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_source_info_antenna_band_id" )) <= SLV(sdp_info.antenna_band_index);
dp_offload_tx_hdr_fields(field_hi(c_sdp_cep_hdr_field_arr, "sdp_source_info_nyquist_zone_id" ) DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_source_info_nyquist_zone_id" )) <= sdp_info.nyquist_zone_index;
dp_offload_tx_hdr_fields(field_hi(c_sdp_cep_hdr_field_arr, "sdp_source_info_f_adc" ) DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_source_info_f_adc" )) <= SLV(sdp_info.f_adc);
......
......@@ -60,8 +60,9 @@ END sdp_info_reg;
ARCHITECTURE str OF sdp_info_reg IS
CONSTANT c_field_arr : t_common_field_arr(7 DOWNTO 0) :=
( (field_name_pad("station_id"), "RW", 16, field_default(0)),
CONSTANT c_field_arr : t_common_field_arr(8 DOWNTO 0) :=
( (field_name_pad("antenna_field_index"), "RW", 6, field_default(0)), -- = station_info[15:10]
(field_name_pad("station_id"), "RW", 10, field_default(0)), -- = station_info[9:0]
(field_name_pad("antenna_band_index"), "RW", 1, field_default(0)),
(field_name_pad("observation_id"), "RW", 32, field_default(0)),
(field_name_pad("nyquist_zone_index"), "RW", 2, field_default(0)),
......@@ -119,6 +120,7 @@ BEGIN
mm_fields_in(field_hi(c_field_arr, "block_period") DOWNTO field_lo(c_field_arr, "block_period")) <= sdp_info_rd.block_period;
-- get "RW" fields from mm_fields
sdp_info_wr.antenna_field_index <= mm_fields_out(field_hi(c_field_arr, "antenna_field_index") DOWNTO field_lo(c_field_arr, "antenna_field_index"));
sdp_info_wr.station_id <= mm_fields_out(field_hi(c_field_arr, "station_id") DOWNTO field_lo(c_field_arr, "station_id"));
sdp_info_wr.antenna_band_index <= sl(mm_fields_out(field_hi(c_field_arr, "antenna_band_index") DOWNTO field_lo(c_field_arr, "antenna_band_index")));
sdp_info_wr.observation_id <= mm_fields_out(field_hi(c_field_arr, "observation_id") DOWNTO field_lo(c_field_arr, "observation_id"));
......
......@@ -47,7 +47,8 @@ PACKAGE sdp_pkg is
-- LOFAR2-9258-SDP info per antenna band
-------------------------------------------------
TYPE t_sdp_info IS RECORD
station_id : STD_LOGIC_VECTOR(15 DOWNTO 0);
antenna_field_index : STD_LOGIC_VECTOR(5 DOWNTO 0); -- = station_info[15:10]
station_id : STD_LOGIC_VECTOR(9 DOWNTO 0); -- = station_info[9:0]
antenna_band_index : STD_LOGIC;
observation_id : STD_LOGIC_VECTOR(31 DOWNTO 0);
nyquist_zone_index : STD_LOGIC_VECTOR(1 DOWNTO 0);
......@@ -58,7 +59,7 @@ PACKAGE sdp_pkg is
END RECORD;
CONSTANT c_sdp_info_rst : t_sdp_info :=
( (OTHERS => '0'), '0', (OTHERS => '0'), (OTHERS => '0'),
( (OTHERS => '0'), (OTHERS => '0'), '0', (OTHERS => '0'), (OTHERS => '0'),
'0', '0', '0',
(OTHERS => '0') );
......@@ -315,7 +316,7 @@ PACKAGE sdp_pkg is
( field_name_pad("sdp_marker" ), "RW", 8, field_default(0) ), -- differs for SST, BST, XST so set by data path
( field_name_pad("sdp_version_id" ), "RW", 8, field_default(c_sdp_stat_version_id) ),
( field_name_pad("sdp_observation_id" ), "RW", 32, field_default(0) ),
( field_name_pad("sdp_station_id" ), "RW", 16, field_default(0) ),
( field_name_pad("sdp_station_info" ), "RW", 16, field_default(0) ),
( field_name_pad("sdp_source_info_antenna_band_id" ), "RW", 1, field_default(0) ),
( field_name_pad("sdp_source_info_nyquist_zone_id" ), "RW", 2, field_default(0) ),
......@@ -343,7 +344,7 @@ PACKAGE sdp_pkg is
sdp_marker : STD_LOGIC_VECTOR( 7 DOWNTO 0);
sdp_version_id : STD_LOGIC_VECTOR( 7 DOWNTO 0);
sdp_observation_id : STD_LOGIC_VECTOR(31 DOWNTO 0);
sdp_station_id : STD_LOGIC_VECTOR(15 DOWNTO 0);
sdp_station_info : STD_LOGIC_VECTOR(15 DOWNTO 0);
sdp_source_info_antenna_band_id : STD_LOGIC_VECTOR( 0 DOWNTO 0);
sdp_source_info_nyquist_zone_id : STD_LOGIC_VECTOR( 1 DOWNTO 0);
......@@ -449,7 +450,7 @@ PACKAGE sdp_pkg is
( field_name_pad("sdp_marker" ), "RW", 8, field_default(c_sdp_marker_beamlets) ),
( field_name_pad("sdp_version_id" ), "RW", 8, field_default(c_sdp_cep_version_id) ),
( field_name_pad("sdp_observation_id" ), "RW", 32, field_default(0) ),
( field_name_pad("sdp_station_id" ), "RW", 16, field_default(0) ),
( field_name_pad("sdp_station_info" ), "RW", 16, field_default(0) ),
( field_name_pad("sdp_source_info_antenna_band_id" ), "RW", 1, field_default(0) ),
( field_name_pad("sdp_source_info_nyquist_zone_id" ), "RW", 2, field_default(0) ),
......@@ -475,7 +476,7 @@ PACKAGE sdp_pkg is
sdp_marker : STD_LOGIC_VECTOR( 7 DOWNTO 0);
sdp_version_id : STD_LOGIC_VECTOR( 7 DOWNTO 0);
sdp_observation_id : STD_LOGIC_VECTOR(31 DOWNTO 0);
sdp_station_id : STD_LOGIC_VECTOR(15 DOWNTO 0);
sdp_station_info : STD_LOGIC_VECTOR(15 DOWNTO 0);
sdp_source_info_antenna_band_id : STD_LOGIC_VECTOR( 0 DOWNTO 0);
sdp_source_info_nyquist_zone_id : STD_LOGIC_VECTOR( 1 DOWNTO 0);
......@@ -850,7 +851,7 @@ PACKAGE BODY sdp_pkg IS
v.app.sdp_marker := hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "sdp_marker") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_marker"));
v.app.sdp_version_id := hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "sdp_version_id") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_version_id"));
v.app.sdp_observation_id := hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "sdp_observation_id") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_observation_id"));
v.app.sdp_station_id := hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "sdp_station_id") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_station_id"));
v.app.sdp_station_info := hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "sdp_station_info") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_station_info"));
v.app.sdp_source_info_antenna_band_id := hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "sdp_source_info_antenna_band_id") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_source_info_antenna_band_id"));
v.app.sdp_source_info_nyquist_zone_id := hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "sdp_source_info_nyquist_zone_id") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_source_info_nyquist_zone_id"));
......@@ -912,7 +913,7 @@ PACKAGE BODY sdp_pkg IS
v.app.sdp_marker := hdr_fields_raw(field_hi(c_sdp_cep_hdr_field_arr, "sdp_marker") DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_marker"));
v.app.sdp_version_id := hdr_fields_raw(field_hi(c_sdp_cep_hdr_field_arr, "sdp_version_id") DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_version_id"));
v.app.sdp_observation_id := hdr_fields_raw(field_hi(c_sdp_cep_hdr_field_arr, "sdp_observation_id") DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_observation_id"));
v.app.sdp_station_id := hdr_fields_raw(field_hi(c_sdp_cep_hdr_field_arr, "sdp_station_id") DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_station_id"));
v.app.sdp_station_info := hdr_fields_raw(field_hi(c_sdp_cep_hdr_field_arr, "sdp_station_info") DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_station_info"));
v.app.sdp_source_info_antenna_band_id := hdr_fields_raw(field_hi(c_sdp_cep_hdr_field_arr, "sdp_source_info_antenna_band_id") DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_source_info_antenna_band_id"));
v.app.sdp_source_info_nyquist_zone_id := hdr_fields_raw(field_hi(c_sdp_cep_hdr_field_arr, "sdp_source_info_nyquist_zone_id") DOWNTO field_lo(c_sdp_cep_hdr_field_arr, "sdp_source_info_nyquist_zone_id"));
......
......@@ -257,10 +257,11 @@ ARCHITECTURE str OF sdp_statistics_offload IS
SIGNAL udp_sosi : t_dp_sosi;
SIGNAL dp_header_info : STD_LOGIC_VECTOR(1023 DOWNTO 0):= (OTHERS => '0');
SIGNAL dp_header_info : STD_LOGIC_VECTOR(1023 DOWNTO 0) := (OTHERS => '0');
SIGNAL r_dp_header_sop : STD_LOGIC;
SIGNAL r_dp_header_rec : t_sdp_stat_header;
SIGNAL fsub_type : STD_LOGIC := '0';
SIGNAL station_info : STD_LOGIC_VECTOR(15 DOWNTO 0) := (OTHERS => '0');
-- Debug signals for view in Wave window
SIGNAL dbg_c_marker : NATURAL := c_marker;
......@@ -313,7 +314,7 @@ BEGIN
-- DP sdp_marker
-- MM sdp_version_id
-- DP sdp_observation_id
-- DP sdp_station_id
-- DP sdp_station_info
--
-- DP sdp_source_info_antenna_band_id
-- DP sdp_source_info_nyquist_zone_id
......@@ -335,6 +336,8 @@ BEGIN
--
-- DP dp_bsn
station_info <= sdp_info.antenna_field_index & sdp_info.station_id;
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "eth_src_mac" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "eth_src_mac" )) <= eth_src_mac;
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "ip_total_length" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "ip_total_length" )) <= TO_UVEC(c_ip_total_length, 16);
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "ip_src_addr" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "ip_src_addr" )) <= ip_src_addr;
......@@ -342,7 +345,7 @@ BEGIN
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "udp_total_length" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "udp_total_length" )) <= TO_UVEC(c_udp_total_length, 16);
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "sdp_marker" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_marker" )) <= TO_UVEC(c_marker, 8);
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "sdp_observation_id" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_observation_id" )) <= sdp_info.observation_id;
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "sdp_station_id" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_station_id" )) <= sdp_info.station_id;
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "sdp_station_info" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_station_info" )) <= station_info;
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "sdp_source_info_antenna_band_id" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_source_info_antenna_band_id" )) <= SLV(sdp_info.antenna_band_index);
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "sdp_source_info_nyquist_zone_id" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_source_info_nyquist_zone_id" )) <= sdp_info.nyquist_zone_index;
dp_header_info(field_hi(c_sdp_stat_hdr_field_arr, "sdp_source_info_f_adc" ) DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_source_info_f_adc" )) <= SLV(sdp_info.f_adc);
......
......@@ -58,7 +58,8 @@ ARCHITECTURE tb OF tb_sdp_info IS
CONSTANT c_mm_addr_observation_id : NATURAL := 5;
CONSTANT c_mm_addr_antenna_band_index : NATURAL := 6;
CONSTANT c_mm_addr_station_id : NATURAL := 7;
CONSTANT c_mm_addr_antenna_field_index : NATURAL := 8;
SIGNAL tb_end : STD_LOGIC := '0';
SIGNAL tb_mm_reg_end : STD_LOGIC := '0';
......@@ -103,6 +104,7 @@ BEGIN
proc_mem_mm_bus_wr(c_mm_addr_observation_id ,16 ,mm_clk, reg_miso, reg_mosi);
proc_mem_mm_bus_wr(c_mm_addr_antenna_band_index ,1 ,mm_clk, reg_miso, reg_mosi);
proc_mem_mm_bus_wr(c_mm_addr_station_id ,17 ,mm_clk, reg_miso, reg_mosi);
proc_mem_mm_bus_wr(c_mm_addr_antenna_field_index ,15 ,mm_clk, reg_miso, reg_mosi);
proc_common_wait_cross_clock_domain_latency(dp_clk, mm_clk);
proc_mem_mm_bus_rd(c_mm_addr_block_period, mm_clk, reg_mosi);
......@@ -152,6 +154,12 @@ BEGIN
proc_common_wait_some_cycles(mm_clk, 1);
ASSERT mm_natural_response = 17 REPORT "Wrong station_id" SEVERITY ERROR;
proc_mem_mm_bus_rd(c_mm_addr_antenna_field_index, mm_clk, reg_mosi);
proc_mem_mm_bus_rd_latency(c_mem_reg_rd_latency, mm_clk);
mm_natural_response <= TO_UINT(reg_miso.rddata);
proc_common_wait_some_cycles(mm_clk, 1);
ASSERT mm_natural_response = 15 REPORT "Wrong antenna_field_index" SEVERITY ERROR;
-- check block_period if f_adc and fsub_type are changed
-- f_adc = '0' and fsub_type = '0' => block_period = 6400
-- f_adc = '1' and fsub_type = '0' => block_period = 5120
......@@ -205,6 +213,7 @@ BEGIN
ASSERT TO_UINT(sdp_info.observation_id) = 16 REPORT "wrong sdp_info.observation_id value" SEVERITY ERROR;
ASSERT sdp_info.antenna_band_index = '1' REPORT "wrong sdp_info.antenna_band_index value" SEVERITY ERROR;
ASSERT TO_UINT(sdp_info.station_id) = 17 REPORT "wrong sdp_info.station_id value" SEVERITY ERROR;
ASSERT TO_UINT(sdp_info.antenna_field_index)= 15 REPORT "wrong sdp_info.antenna_field_index value" SEVERITY ERROR;
proc_common_wait_some_cycles(mm_clk, 100);
tb_end <= '1';
......
......@@ -177,7 +177,7 @@ PACKAGE BODY tb_sdp_pkg IS
v_hdr.app.sdp_marker := TO_UVEC(c_marker, 8);
v_hdr.app.sdp_version_id := TO_UVEC(c_sdp_stat_version_id, 8);
v_hdr.app.sdp_observation_id := sdp_info.observation_id;
v_hdr.app.sdp_station_id := sdp_info.station_id;
v_hdr.app.sdp_station_info := sdp_info.antenna_field_index & sdp_info.station_id;
v_hdr.app.sdp_source_info_antenna_band_id := slv(sdp_info.antenna_band_index);
v_hdr.app.sdp_source_info_nyquist_zone_id := sdp_info.nyquist_zone_index;
......@@ -243,7 +243,7 @@ PACKAGE BODY tb_sdp_pkg IS
ASSERT in_hdr.app.sdp_marker = exp_hdr.app.sdp_marker REPORT "Wrong " & g_statistics_type & " app.sdp_marker" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_version_id = exp_hdr.app.sdp_version_id REPORT "Wrong " & g_statistics_type & " app.sdp_version_id" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_observation_id = exp_hdr.app.sdp_observation_id REPORT "Wrong " & g_statistics_type & " app.sdp_observation_id" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_station_id = exp_hdr.app.sdp_station_id REPORT "Wrong " & g_statistics_type & " app.sdp_station_id" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_station_info = exp_hdr.app.sdp_station_info REPORT "Wrong " & g_statistics_type & " app.sdp_station_info" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_source_info_antenna_band_id = exp_hdr.app.sdp_source_info_antenna_band_id REPORT "Wrong " & g_statistics_type & " app.sdp_source_info_antenna_band_id" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_source_info_nyquist_zone_id = exp_hdr.app.sdp_source_info_nyquist_zone_id REPORT "Wrong " & g_statistics_type & " app.sdp_source_info_nyquist_zone_id" SEVERITY ERROR;
......@@ -321,7 +321,7 @@ PACKAGE BODY tb_sdp_pkg IS
v_hdr.app.sdp_marker := TO_UVEC(c_sdp_marker_beamlets, 8);
v_hdr.app.sdp_version_id := TO_UVEC(c_sdp_cep_version_id, 8);
v_hdr.app.sdp_observation_id := sdp_info.observation_id;
v_hdr.app.sdp_station_id := sdp_info.station_id;
v_hdr.app.sdp_station_info := sdp_info.antenna_field_index & sdp_info.station_id;
v_hdr.app.sdp_source_info_antenna_band_id := slv(sdp_info.antenna_band_index);
v_hdr.app.sdp_source_info_nyquist_zone_id := sdp_info.nyquist_zone_index;
......@@ -394,7 +394,7 @@ PACKAGE BODY tb_sdp_pkg IS
ASSERT in_hdr.app.sdp_marker = exp_hdr.app.sdp_marker REPORT "Wrong beamlet app.sdp_marker" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_version_id = exp_hdr.app.sdp_version_id REPORT "Wrong beamlet app.sdp_version_id" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_observation_id = exp_hdr.app.sdp_observation_id REPORT "Wrong beamlet app.sdp_observation_id" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_station_id = exp_hdr.app.sdp_station_id REPORT "Wrong beamlet app.sdp_station_id" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_station_info = exp_hdr.app.sdp_station_info REPORT "Wrong beamlet app.sdp_station_info" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_source_info_antenna_band_id = exp_hdr.app.sdp_source_info_antenna_band_id REPORT "Wrong beamlet app.sdp_source_info_antenna_band_id" SEVERITY ERROR;
ASSERT in_hdr.app.sdp_source_info_nyquist_zone_id = exp_hdr.app.sdp_source_info_nyquist_zone_id REPORT "Wrong beamlet app.sdp_source_info_nyquist_zone_id" SEVERITY ERROR;
......
......@@ -100,7 +100,8 @@ ARCHITECTURE tb OF tb_sdp_statistics_offload IS
CONSTANT c_exp_ip_header_checksum : NATURAL := 0; -- 0 in this local tb, calculated by IO eth when used in design
CONSTANT c_exp_sdp_info : t_sdp_info := (TO_UVEC(601, 16), -- station_id
CONSTANT c_exp_sdp_info : t_sdp_info := (TO_UVEC(7, 6), -- antenna_field_index
TO_UVEC(601, 10), -- station_id
'0', -- antenna_band_index
x"FFFFFFFF", -- observation_id
b"01", -- nyquist_zone_index, 0 = first, 1 = second, 2 = third
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment