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

Merge branch 'master' into L2SDP-832

parents 8d26cf21 57171a38
Branches
No related tags found
1 merge request!284Resolve L2SDP-832
Pipeline #37362 passed
Showing with 47 additions and 18 deletions
...@@ -75,6 +75,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf_bst_offload IS ...@@ -75,6 +75,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf_bst_offload IS
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;
CONSTANT c_pps_period : NATURAL := c_nof_clk_per_sync; CONSTANT c_pps_period : NATURAL := c_nof_clk_per_sync;
CONSTANT c_wpfb_sim : t_wpfb := func_wpfb_set_nof_block_per_sync(c_sdp_wpfb_subbands, c_nof_block_per_sync); CONSTANT c_wpfb_sim : t_wpfb := func_wpfb_set_nof_block_per_sync(c_sdp_wpfb_subbands, c_nof_block_per_sync);
CONSTANT c_nof_sync : NATURAL := 1;
-- MM -- MM
CONSTANT c_mm_file_reg_bsn_source_v2 : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SOURCE_V2"; CONSTANT c_mm_file_reg_bsn_source_v2 : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SOURCE_V2";
...@@ -88,12 +89,14 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf_bst_offload IS ...@@ -88,12 +89,14 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_bf_bst_offload IS
SIGNAL eth_done : STD_LOGIC := '0'; SIGNAL eth_done : STD_LOGIC := '0';
-- . 1GbE output -- . 1GbE output
CONSTANT c_eth_check_nof_packets : NATURAL := 1; -- received packets in 1 sync period CONSTANT c_eth_check_nof_packets : NATURAL := c_nof_sync * 1; -- 1 received packet per sync interval
CONSTANT c_eth_header_size : NATURAL := 19; -- words CONSTANT c_eth_header_size : NATURAL := 19; -- words
CONSTANT c_eth_crc_size : NATURAL := 1; -- word CONSTANT c_eth_crc_size : NATURAL := 1; -- word
CONSTANT c_eth_packet_size : NATURAL := c_eth_header_size + c_eth_crc_size + (c_sdp_W_statistic / c_word_w) * c_sdp_S_sub_bf * c_sdp_N_pol; -- 20 + 2 * 488 * 2 = 1972 CONSTANT c_eth_packet_size : NATURAL := c_eth_header_size + c_eth_crc_size + (c_sdp_W_statistic / c_word_w) * c_sdp_S_sub_bf * c_sdp_N_pol; -- 20 + 2 * 488 * 2 = 1972
CONSTANT c_eth_check_nof_valid : NATURAL := c_eth_check_nof_packets * c_eth_packet_size; CONSTANT c_eth_check_nof_valid : NATURAL := c_eth_check_nof_packets * c_eth_packet_size;
CONSTANT c_eth_runtime_timeout : TIME := 2 * c_nof_clk_per_sync * c_ext_clk_period; -- eth statistics should be done at the second sync interval
-- eth statistics should be done after c_nof_sync + 1 intervals (+1 because first new_interval is skipped)
CONSTANT c_eth_runtime_timeout : TIME := (c_nof_sync + 2) * c_nof_clk_per_sync * c_ext_clk_period;
-- DUT -- DUT
SIGNAL ext_clk : STD_LOGIC := '0'; SIGNAL ext_clk : STD_LOGIC := '0';
......
...@@ -74,6 +74,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_fsub_sst_offload IS ...@@ -74,6 +74,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_fsub_sst_offload IS
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;
CONSTANT c_pps_period : NATURAL := c_nof_clk_per_sync; CONSTANT c_pps_period : NATURAL := c_nof_clk_per_sync;
CONSTANT c_wpfb_sim : t_wpfb := func_wpfb_set_nof_block_per_sync(c_sdp_wpfb_subbands, c_nof_block_per_sync); CONSTANT c_wpfb_sim : t_wpfb := func_wpfb_set_nof_block_per_sync(c_sdp_wpfb_subbands, c_nof_block_per_sync);
CONSTANT c_nof_sync : NATURAL := 1;
-- MM -- MM
CONSTANT c_mm_file_reg_bsn_source_v2 : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SOURCE_V2"; CONSTANT c_mm_file_reg_bsn_source_v2 : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SOURCE_V2";
...@@ -87,12 +88,14 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_fsub_sst_offload IS ...@@ -87,12 +88,14 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_fsub_sst_offload IS
SIGNAL eth_done : STD_LOGIC := '0'; SIGNAL eth_done : STD_LOGIC := '0';
-- . 1GbE output -- . 1GbE output
CONSTANT c_eth_check_nof_packets : NATURAL := c_sdp_S_pn; -- received packets in 1 sync period CONSTANT c_eth_check_nof_packets : NATURAL := c_nof_sync * c_sdp_S_pn; -- S_pn = 12 received packets per sync interval
CONSTANT c_eth_header_size : NATURAL := 19; -- words CONSTANT c_eth_header_size : NATURAL := 19; -- words
CONSTANT c_eth_crc_size : NATURAL := 1; -- word CONSTANT c_eth_crc_size : NATURAL := 1; -- word
CONSTANT c_eth_packet_size : NATURAL := c_eth_header_size + c_eth_crc_size + c_sdp_N_sub * (c_sdp_W_statistic / c_word_w); -- 20 + 512 * 2 = 1044 CONSTANT c_eth_packet_size : NATURAL := c_eth_header_size + c_eth_crc_size + c_sdp_N_sub * (c_sdp_W_statistic / c_word_w); -- 20 + 512 * 2 = 1044
CONSTANT c_eth_check_nof_valid : NATURAL := c_eth_check_nof_packets * c_eth_packet_size; CONSTANT c_eth_check_nof_valid : NATURAL := c_eth_check_nof_packets * c_eth_packet_size;
CONSTANT c_eth_runtime_timeout : TIME := 2 * c_nof_clk_per_sync * c_ext_clk_period; -- eth statistics should be done at the second sync interval
-- eth statistics should be done after c_nof_sync + 1 intervals (+1 because first new_interval is skipped)
CONSTANT c_eth_runtime_timeout : TIME := (c_nof_sync + 2) * c_nof_clk_per_sync * c_ext_clk_period;
-- DUT -- DUT
SIGNAL ext_clk : STD_LOGIC := '0'; SIGNAL ext_clk : STD_LOGIC := '0';
......
...@@ -108,7 +108,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_bst_offload IS ...@@ -108,7 +108,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_bf_bst_offload IS
SIGNAL eth_done : STD_LOGIC := '0'; SIGNAL eth_done : STD_LOGIC := '0';
-- . 1GbE output -- . 1GbE output
CONSTANT c_eth_check_nof_packets : NATURAL := c_nof_sync * 1; CONSTANT c_eth_check_nof_packets : NATURAL := c_nof_sync * 1; -- 1 received packet per sync interval
CONSTANT c_eth_header_size : NATURAL := 19; -- words CONSTANT c_eth_header_size : NATURAL := 19; -- words
CONSTANT c_eth_crc_size : NATURAL := 1; -- word CONSTANT c_eth_crc_size : NATURAL := 1; -- word
CONSTANT c_eth_packet_size : NATURAL := c_eth_header_size + c_eth_crc_size + (c_sdp_W_statistic / c_word_w) * c_sdp_S_sub_bf * c_sdp_N_pol; -- 20 + 2 * 488 * 2 = 1972 CONSTANT c_eth_packet_size : NATURAL := c_eth_header_size + c_eth_crc_size + (c_sdp_W_statistic / c_word_w) * c_sdp_S_sub_bf * c_sdp_N_pol; -- 20 + 2 * 488 * 2 = 1972
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
-- > as 7 # default -- > as 7 # default
-- > as 12 # for detailed debugging -- > as 12 # for detailed debugging
-- > run -a -- > run -a
-- -- Takes about 1h 15 m
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
LIBRARY IEEE, common_lib, unb2c_board_lib, i2c_lib, mm_lib, dp_lib, diag_lib, lofar2_sdp_lib, wpfb_lib, lofar2_unb2c_sdp_station_lib, eth_lib; LIBRARY IEEE, common_lib, unb2c_board_lib, i2c_lib, mm_lib, dp_lib, diag_lib, lofar2_sdp_lib, wpfb_lib, lofar2_unb2c_sdp_station_lib, eth_lib;
USE IEEE.std_logic_1164.ALL; USE IEEE.std_logic_1164.ALL;
...@@ -74,7 +74,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_fsub_sst_offload IS ...@@ -74,7 +74,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_fsub_sst_offload IS
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;
CONSTANT c_pps_period : NATURAL := c_nof_clk_per_sync; CONSTANT c_pps_period : NATURAL := c_nof_clk_per_sync;
CONSTANT c_wpfb_sim : t_wpfb := func_wpfb_set_nof_block_per_sync(c_sdp_wpfb_subbands, c_nof_block_per_sync); CONSTANT c_wpfb_sim : t_wpfb := func_wpfb_set_nof_block_per_sync(c_sdp_wpfb_subbands, c_nof_block_per_sync);
CONSTANT c_nof_sync : NATURAL := 2; CONSTANT c_nof_sync : NATURAL := 1;
-- MM -- MM
CONSTANT c_mm_file_reg_bsn_source_v2 : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SOURCE_V2"; CONSTANT c_mm_file_reg_bsn_source_v2 : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SOURCE_V2";
...@@ -88,12 +88,14 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_fsub_sst_offload IS ...@@ -88,12 +88,14 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_fsub_sst_offload IS
SIGNAL eth_done : STD_LOGIC := '0'; SIGNAL eth_done : STD_LOGIC := '0';
-- . 1GbE output -- . 1GbE output
CONSTANT c_eth_check_nof_packets : NATURAL := c_nof_sync * c_sdp_S_pn; CONSTANT c_eth_check_nof_packets : NATURAL := c_nof_sync * c_sdp_S_pn; -- S_pn = 12 received packets per sync interval
CONSTANT c_eth_header_size : NATURAL := 19; -- words CONSTANT c_eth_header_size : NATURAL := 19; -- words
CONSTANT c_eth_crc_size : NATURAL := 1; -- word CONSTANT c_eth_crc_size : NATURAL := 1; -- word
CONSTANT c_eth_packet_size : NATURAL := c_eth_header_size + c_eth_crc_size + c_sdp_N_sub * (c_sdp_W_statistic / c_word_w); -- 20 + 512 * 2 = 1044 CONSTANT c_eth_packet_size : NATURAL := c_eth_header_size + c_eth_crc_size + c_sdp_N_sub * (c_sdp_W_statistic / c_word_w); -- 20 + 512 * 2 = 1044
CONSTANT c_eth_check_nof_valid : NATURAL := c_eth_check_nof_packets * c_eth_packet_size; CONSTANT c_eth_check_nof_valid : NATURAL := c_eth_check_nof_packets * c_eth_packet_size;
CONSTANT c_eth_runtime_timeout : TIME := (c_nof_sync + 1) * c_nof_clk_per_sync * c_ext_clk_period; -- eth statistics should be done after c_nof_sync intervals
-- eth statistics should be done after c_nof_sync + 1 intervals (+1 because first new_interval is skipped)
CONSTANT c_eth_runtime_timeout : TIME := (c_nof_sync + 2) * c_nof_clk_per_sync * c_ext_clk_period;
-- DUT -- DUT
SIGNAL ext_clk : STD_LOGIC := '0'; SIGNAL ext_clk : STD_LOGIC := '0';
......
Detailed design: Transient Buffer function (LIFT) Detailed design: Transient Buffer function (LIFT)
References:
[1] https://plm.astron.nl/polarion/#/project/LOFAR2System/workitem?id=LOFAR2-12060 Transient buffer data
1) DDR4 memory per receiver input 1) DDR4 memory per receiver input
...@@ -12,8 +14,14 @@ The receiver input data rate is f_adc = 200 MHz and sample width is W_adc = 14 b ...@@ -12,8 +14,14 @@ The receiver input data rate is f_adc = 200 MHz and sample width is W_adc = 14 b
Assume the samples are stored in 16 b (= 2 bytes), this creates 16/14 = 14 % storage overhead Assume the samples are stored in 16 b (= 2 bytes), this creates 16/14 = 14 % storage overhead
Assume 4 % storage overhead for packet header information Assume 4 % storage overhead for packet header information
==> Per recveiver input T_tbuf = 1.33 GByte / (2 byte/sample) / 1.04 / f_adc = 3.2 sec maximum storage time. ==> Per recveiver input T_tbuf = 1.33 GByte / (2 byte/sample) / 1.04 / f_adc = 3.2 sec maximum storage time.
==> Per recveiver input T_tbuf = 1.33 GByte = 10.6 Gbit, so at full 10GbE rate it takes about 1 s to read all samples from 1 receiver input
==> 192 * 1.33 = 256 GByte / LB for T_tbuf = 3.2 s ==> 192 * 1.33 = 256 GByte / LB for T_tbuf = 3.2 s
In [1] time series data en pulse data, wat is pulse data ?
Hoe streng is de 3.33 s, mag 3.2 s ook ? Hoe streng is de 3.33 s, mag 3.2 s ook ?
Moeten we nog grotere 16 GByte modules gaan aanschaffen en te testen met unb2c, zodat we 2x zoveel storage tijd hebben ? Gebruik een 16 GByte module per FPGA, zodat uitbreiding naar 6.66 s mopgelijkl is door beide slots the gebruiken
Uitlezen per receiver input, zodat uitlezen van een deel vd receiver inputs mogelijk is (bijv 12 vd 192 in [1])
Defineer TB functie per receiver input:
. zodat de TB functie makkelijk uitbreidbaar is naar meer inputs en naar meer DDR4 modules.
. data capture en uitlezen van een receiver input onafhankelijk kan van de andere receiver inputs
...@@ -438,8 +438,13 @@ sdp_rw.py --host 10.99.0.250 --port 4842 -w boot_image [1]*16 ...@@ -438,8 +438,13 @@ sdp_rw.py --host 10.99.0.250 --port 4842 -w boot_image [1]*16
__pycache__ dir met gecompileerde pyc deleten __pycache__ dir met gecompileerde pyc deleten
# login on regtest@dop349
mystep
regtest
ll ~/bitstream/lofar2_unb2b_sdp_station_full_wg-r*
# flash image # flash image
scp regtest@10.87.6.144:~/bitstream/lofar2*wg* /home/kooistra/Downloads/ # dop349 = 10.87.6.144 scp -p regtest@10.87.6.144:~/bitstream/lofar2*wg* /home/kooistra/Downloads/ # dop349 = 10.87.6.144
sdp_firmware.py --host 10.99.0.250 --port 4842 -h sdp_firmware.py --host 10.99.0.250 --port 4842 -h
sdp_rw.py --host 10.99.0.250 --port 4842 -r firmware_version sdp_rw.py --host 10.99.0.250 --port 4842 -r firmware_version
......
...@@ -104,6 +104,7 @@ ARCHITECTURE rtl OF dp_bsn_monitor_v2 IS ...@@ -104,6 +104,7 @@ ARCHITECTURE rtl OF dp_bsn_monitor_v2 IS
SIGNAL nxt_valid : STD_LOGIC; SIGNAL nxt_valid : STD_LOGIC;
SIGNAL sop : STD_LOGIC; SIGNAL sop : STD_LOGIC;
SIGNAL nxt_sop : STD_LOGIC; SIGNAL nxt_sop : STD_LOGIC;
SIGNAL sync_reg : STD_LOGIC;
SIGNAL sync : STD_LOGIC; SIGNAL sync : STD_LOGIC;
SIGNAL nxt_sync : STD_LOGIC; SIGNAL nxt_sync : STD_LOGIC;
SIGNAL bsn : STD_LOGIC_VECTOR(c_bsn_w-1 DOWNTO 0); SIGNAL bsn : STD_LOGIC_VECTOR(c_bsn_w-1 DOWNTO 0);
...@@ -162,14 +163,17 @@ BEGIN ...@@ -162,14 +163,17 @@ BEGIN
nxt_mon_nof_sop <= nof_sop WHEN sync='1' ELSE i_mon_nof_sop; nxt_mon_nof_sop <= nof_sop WHEN sync='1' ELSE i_mon_nof_sop;
nxt_mon_nof_err <= nof_err WHEN sync='1' ELSE i_mon_nof_err; nxt_mon_nof_err <= nof_err WHEN sync='1' ELSE i_mon_nof_err;
nxt_mon_nof_valid <= nof_valid WHEN sync='1' ELSE i_mon_nof_valid; nxt_mon_nof_valid <= nof_valid WHEN sync='1' ELSE i_mon_nof_valid;
nxt_mon_latency <= latency WHEN sync='1' ELSE i_mon_latency; nxt_mon_latency <= latency WHEN sync_reg='1' ELSE i_mon_latency; -- use sync_reg due to ref_sync_reg
nof_sop <= cnt_sop; nof_sop <= cnt_sop;
nof_err <= cnt_err; nof_err <= cnt_err;
nof_valid <= cnt_valid; nof_valid <= cnt_valid;
latency <= cnt_latency; latency <= cnt_latency;
-- Register ref_sync to ease timing closure for ref_sync fanout to (many) dp_bsn_monitor_v2 instances -- Register ref_sync to ease timing closure for ref_sync fanout to (many) dp_bsn_monitor_v2
-- instances. The ref_sync_reg is used to restart cnt_latency. Therefore the sync_reg
-- (instead of sync) is needed to capture latency (= cnt_latency) not too early, so capture
-- cnt_latency at or after the cnt_latency has restarted.
ref_sync_reg <= ref_sync WHEN rising_edge(clk); ref_sync_reg <= ref_sync WHEN rising_edge(clk);
u_sync_timeout_cnt : ENTITY common_lib.common_counter u_sync_timeout_cnt : ENTITY common_lib.common_counter
...@@ -211,6 +215,7 @@ BEGIN ...@@ -211,6 +215,7 @@ BEGIN
sop <= '0'; sop <= '0';
err <= '0'; err <= '0';
sync <= '0'; sync <= '0';
sync_reg <= '0';
bsn <= (OTHERS=>'0'); bsn <= (OTHERS=>'0');
-- output -- output
mon_evt <= '0'; mon_evt <= '0';
...@@ -231,6 +236,7 @@ BEGIN ...@@ -231,6 +236,7 @@ BEGIN
sop <= nxt_sop; sop <= nxt_sop;
err <= nxt_err; err <= nxt_err;
sync <= nxt_sync; sync <= nxt_sync;
sync_reg <= sync;
bsn <= nxt_bsn; bsn <= nxt_bsn;
-- output -- output
mon_evt <= nxt_mon_evt; mon_evt <= nxt_mon_evt;
......
...@@ -263,9 +263,11 @@ BEGIN ...@@ -263,9 +263,11 @@ BEGIN
mon_latency_input_arr(I) <= TO_SINT(reg_input_monitor_cipo.rddata(31 DOWNTO 0)); mon_latency_input_arr(I) <= TO_SINT(reg_input_monitor_cipo.rddata(31 DOWNTO 0));
proc_common_wait_some_cycles(mm_clk, 1); proc_common_wait_some_cycles(mm_clk, 1);
IF g_lost_input = TRUE AND I = c_nof_streams-1 THEN IF g_lost_input = TRUE AND I = c_nof_streams-1 THEN
ASSERT mon_latency_input_arr(I) = -1 REPORT "Wrong input BSN monitor latency timeout for input " & int_to_str(I) SEVERITY ERROR; ASSERT mon_latency_input_arr(I) = -1 REPORT "Wrong input BSN monitor latency timeout for input " & int_to_str(I) &
" (" & int_to_str(mon_latency_input_arr(I)) & " /= -1)" SEVERITY ERROR;
ELSE ELSE
ASSERT mon_latency_input_arr(I) = func_input_delay(I) REPORT "Wrong input BSN monitor latency for input " & int_to_str(I) SEVERITY ERROR; ASSERT mon_latency_input_arr(I) = func_input_delay(I) REPORT "Wrong input BSN monitor latency for input " & int_to_str(I) &
" (" & int_to_str(mon_latency_input_arr(I)) & " /= " & int_to_str(func_input_delay(I)) & ")" SEVERITY ERROR;
END IF; END IF;
END LOOP; END LOOP;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment