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

Improve comment.

parent 29e5e8b8
No related branches found
No related tags found
1 merge request!288Resolve L2SDP-836
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- AUthor: E. Kooistra -- AUthor: E. Kooistra
-- Purpose: Test the 1GbE interface by sending and counting received packets. -- Purpose: Test the 1GbE interface by sending and counting received packets.
-- Description: Part of eth_tester, see detailed design in [1] -- Description: Tx part of eth_tester, see detailed design in [1]
-- --
-- References: -- References:
-- [1] https://support.astron.nl/confluence/display/L2M/L6+FWLIB+Design+Document%3A+ETH+tester+unit+for+1GbE -- [1] https://support.astron.nl/confluence/display/L2M/L6+FWLIB+Design+Document%3A+ETH+tester+unit+for+1GbE
...@@ -76,22 +76,23 @@ ARCHITECTURE str OF eth_tester_tx IS ...@@ -76,22 +76,23 @@ ARCHITECTURE str OF eth_tester_tx IS
CONSTANT c_fifo_fill : NATURAL := c_network_eth_payload_jumbo_max / c_word_sz; -- = 9000 / 4 = 2250 CONSTANT c_fifo_fill : NATURAL := c_network_eth_payload_jumbo_max / c_word_sz; -- = 9000 / 4 = 2250
CONSTANT c_fifo_size : NATURAL := true_log_pow2(c_fifo_fill); -- = 4096 CONSTANT c_fifo_size : NATURAL := true_log_pow2(c_fifo_fill); -- = 4096
CONSTANT c_nof_total_counts : NATURAL := 1; CONSTANT c_nof_total_counts : NATURAL := 1; -- one to count Tx packets
SIGNAL ip_total_length : NATURAL; SIGNAL ip_total_length : NATURAL;
SIGNAL udp_total_length : NATURAL; SIGNAL udp_total_length : NATURAL;
SIGNAL app_total_length : NATURAL; SIGNAL app_total_length : NATURAL;
SIGNAL bg_sosi : t_dp_sosi; SIGNAL bg_sosi : t_dp_sosi;
SIGNAL bg_ctrl_active : t_diag_block_gen; SIGNAL bg_ctrl_hold : t_diag_block_gen;
SIGNAL bg_block_len : NATURAL; SIGNAL bg_block_len : NATURAL;
SIGNAL tx_packed_sosi : t_dp_sosi; SIGNAL tx_packed_sosi : t_dp_sosi;
SIGNAL tx_fifo_sosi : t_dp_sosi; SIGNAL tx_fifo_sosi : t_dp_sosi;
SIGNAL tx_fifo_siso : t_dp_siso; SIGNAL tx_fifo_siso : t_dp_siso;
SIGNAL i_ref_sync : STD_LOGIC; SIGNAL i_ref_sync : STD_LOGIC := '0';
SIGNAL in_strobe_arr : STD_LOGIC_VECTOR(c_nof_total_counts-1 DOWNTO 0); SIGNAL in_strobe_arr : STD_LOGIC_VECTOR(c_nof_total_counts-1 DOWNTO 0);
SIGNAL hdr_fields_slv_in : STD_LOGIC_VECTOR(1023 DOWNTO 0); -- Use hdr_fields_slv_in default 0, to have DP driven fields ip_header_checksum = 0 and udp_checksum = 0
SIGNAL hdr_fields_slv_in : STD_LOGIC_VECTOR(1023 DOWNTO 0) := (OTHERS => '0');
SIGNAL hdr_fields_slv_tx : STD_LOGIC_VECTOR(1023 DOWNTO 0); SIGNAL hdr_fields_slv_tx : STD_LOGIC_VECTOR(1023 DOWNTO 0);
SIGNAL hdr_fields_rec_in : t_eth_tester_header; SIGNAL hdr_fields_rec_in : t_eth_tester_header;
SIGNAL hdr_fields_rec_tx : t_eth_tester_header; SIGNAL hdr_fields_rec_tx : t_eth_tester_header;
...@@ -100,6 +101,9 @@ BEGIN ...@@ -100,6 +101,9 @@ BEGIN
ref_sync <= i_ref_sync; ref_sync <= i_ref_sync;
-------------------------------------------------------------------------------
-- Generate packed data blocks
-------------------------------------------------------------------------------
u_bg : ENTITY diag_lib.mms_diag_block_gen u_bg : ENTITY diag_lib.mms_diag_block_gen
GENERIC MAP ( GENERIC MAP (
g_nof_streams => 1, g_nof_streams => 1,
...@@ -116,12 +120,10 @@ BEGIN ...@@ -116,12 +120,10 @@ BEGIN
reg_bg_ctrl_mosi => reg_bg_ctrl_copi, -- BG control register (one for all streams) reg_bg_ctrl_mosi => reg_bg_ctrl_copi, -- BG control register (one for all streams)
reg_bg_ctrl_miso => reg_bg_ctrl_cipo, reg_bg_ctrl_miso => reg_bg_ctrl_cipo,
-- ST interface -- ST interface
bg_ctrl_active_arr(0) => bg_ctrl_active, bg_ctrl_hold_arr(0) => bg_ctrl_hold,
out_sosi_arr(0) => bg_sosi out_sosi_arr(0) => bg_sosi
); );
bg_block_len <= TO_UINT(bg_ctrl_active.samples_per_packet(15 DOWNTO 0)); -- packet lenghts fit in 16b
u_repack : ENTITY dp_lib.dp_repack_data -- pack 8b octets into 32b words u_repack : ENTITY dp_lib.dp_repack_data -- pack 8b octets into 32b words
GENERIC MAP ( GENERIC MAP (
g_in_dat_w => c_octet_w, -- = 8 g_in_dat_w => c_octet_w, -- = 8
...@@ -196,7 +198,9 @@ BEGIN ...@@ -196,7 +198,9 @@ BEGIN
-- DP dp_sync -- DP dp_sync
-- DP dp_bsn -- DP dp_bsn
-- assume bg_block_len is still valid, no need to pass bg_block_len on via channel field in u_fifo -- The bg_block_len is still valid because bg_ctrl_hold holds the BG settings until it restarts,
-- so no need to pass bg_block_len on via e.g. the channel field in u_fifo
bg_block_len <= TO_UINT(bg_ctrl_hold.samples_per_packet(15 DOWNTO 0)); -- packet lenghts fit in 16b
app_total_length <= c_eth_tester_app_hdr_len + bg_block_len WHEN rising_edge(st_clk); app_total_length <= c_eth_tester_app_hdr_len + bg_block_len WHEN rising_edge(st_clk);
udp_total_length <= app_total_length + c_network_udp_header_len WHEN rising_edge(st_clk); udp_total_length <= app_total_length + c_network_udp_header_len WHEN rising_edge(st_clk);
ip_total_length <= udp_total_length + c_network_ip_header_len WHEN rising_edge(st_clk); ip_total_length <= udp_total_length + c_network_ip_header_len WHEN rising_edge(st_clk);
...@@ -209,6 +213,9 @@ BEGIN ...@@ -209,6 +213,9 @@ BEGIN
hdr_fields_slv_in(field_hi(c_eth_tester_hdr_field_arr, "dp_sync" ) DOWNTO field_lo(c_eth_tester_hdr_field_arr, "dp_sync" )) <= slv(tx_fifo_sosi.sync); hdr_fields_slv_in(field_hi(c_eth_tester_hdr_field_arr, "dp_sync" ) DOWNTO field_lo(c_eth_tester_hdr_field_arr, "dp_sync" )) <= slv(tx_fifo_sosi.sync);
hdr_fields_slv_in(field_hi(c_eth_tester_hdr_field_arr, "dp_bsn" ) DOWNTO field_lo(c_eth_tester_hdr_field_arr, "dp_bsn" )) <= tx_fifo_sosi.bsn; hdr_fields_slv_in(field_hi(c_eth_tester_hdr_field_arr, "dp_bsn" ) DOWNTO field_lo(c_eth_tester_hdr_field_arr, "dp_bsn" )) <= tx_fifo_sosi.bsn;
-------------------------------------------------------------------------------
-- Tx ETH/UDP/IP packets with packed BG data
-------------------------------------------------------------------------------
u_dp_offload_tx : ENTITY dp_lib.dp_offload_tx_v3 u_dp_offload_tx : ENTITY dp_lib.dp_offload_tx_v3
GENERIC MAP ( GENERIC MAP (
g_nof_streams => 1, g_nof_streams => 1,
...@@ -237,9 +244,13 @@ BEGIN ...@@ -237,9 +244,13 @@ BEGIN
hdr_fields_out_arr(0) => hdr_fields_slv_tx hdr_fields_out_arr(0) => hdr_fields_slv_tx
); );
-- View record in Wave Window
hdr_fields_rec_in <= func_eth_tester_map_header(hdr_fields_slv_in); hdr_fields_rec_in <= func_eth_tester_map_header(hdr_fields_slv_in);
hdr_fields_rec_tx <= func_eth_tester_map_header(hdr_fields_slv_tx); hdr_fields_rec_tx <= func_eth_tester_map_header(hdr_fields_slv_tx);
-------------------------------------------------------------------------------
-- Tx packet monitors
-------------------------------------------------------------------------------
i_ref_sync <= tx_fifo_sosi.sync WHEN rising_edge(st_clk); i_ref_sync <= tx_fifo_sosi.sync WHEN rising_edge(st_clk);
u_mms_dp_bsn_monitor_v2 : ENTITY dp_lib.mms_dp_bsn_monitor_v2 u_mms_dp_bsn_monitor_v2 : ENTITY dp_lib.mms_dp_bsn_monitor_v2
...@@ -263,7 +274,7 @@ BEGIN ...@@ -263,7 +274,7 @@ BEGIN
in_sosi_arr(0) => tx_fifo_sosi in_sosi_arr(0) => tx_fifo_sosi
); );
in_strobe_arr(0) <= tx_fifo_sosi.sop; in_strobe_arr(0) <= tx_fifo_sosi.sop; -- count total nof Tx packets
u_dp_strobe_total_count : ENTITY dp_lib.dp_strobe_total_count u_dp_strobe_total_count : ENTITY dp_lib.dp_strobe_total_count
GENERIC MAP ( GENERIC MAP (
......
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