Skip to content
Snippets Groups Projects
Commit 1ee12a36 authored by Daniel van der Schuur's avatar Daniel van der Schuur
Browse files

-Using eth_statistics to make TB self-checking.

parent 3c4a0f5e
No related branches found
No related tags found
No related merge requests found
...@@ -65,17 +65,19 @@ ARCHITECTURE tb OF tb_arts_unb1_sc1_bg_1GbE IS ...@@ -65,17 +65,19 @@ ARCHITECTURE tb OF tb_arts_unb1_sc1_bg_1GbE IS
SIGNAL TESTIO : STD_LOGIC_VECTOR(c_unb1_board_aux.testio_w-1 DOWNTO 0); SIGNAL TESTIO : STD_LOGIC_VECTOR(c_unb1_board_aux.testio_w-1 DOWNTO 0);
-- Ethernet stats -- Ethernet stats
CONSTANT c_eth_check_nof_packets : NATURAL := 10;
CONSTANT c_eth_packet_size : NATURAL := 1221; --(24 subbands*50 timesamples=) 1200 (2pols*16b=) 32b words + 21 header words
SIGNAL eth_statistics_serial_in : STD_LOGIC; SIGNAL eth_statistics_serial_in : STD_LOGIC;
SIGNAL eth_statistics_pkt_cnt : NATURAL; SIGNAL tb_end : STD_LOGIC;
SIGNAL eth_statistics_pkt_len : NATURAL;
BEGIN BEGIN
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
-- System setup -- System setup
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
clk <= NOT clk AFTER c_clk_period/2; -- External clock (200 MHz) clk <= NOT clk OR tb_end AFTER c_clk_period/2; -- External clock (200 MHz)
eth_clk <= NOT eth_clk AFTER c_eth_clk_period/2; -- Ethernet ref clock (25 MHz) eth_clk <= NOT eth_clk OR tb_end AFTER c_eth_clk_period/2; -- Ethernet ref clock (25 MHz)
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- External PPS -- External PPS
...@@ -106,12 +108,15 @@ BEGIN ...@@ -106,12 +108,15 @@ BEGIN
-- Verify proper DUT output using Ethernet packet statistics -- Verify proper DUT output using Ethernet packet statistics
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
u_eth_statistics : ENTITY eth_lib.eth_statistics u_eth_statistics : ENTITY eth_lib.eth_statistics
GENERIC MAP (
g_runtime_nof_packets => c_eth_check_nof_packets,
g_runtime_timeout => 1000000 ns,
g_check_nof_valid => TRUE,
g_check_nof_valid_ref => c_eth_check_nof_packets*c_eth_packet_size
)
PORT MAP ( PORT MAP (
eth_clk => eth_clk,
eth_serial_in => eth_statistics_serial_in, eth_serial_in => eth_statistics_serial_in,
tb_end => tb_end
pkt_cnt => eth_statistics_pkt_cnt,
pkt_len => eth_statistics_pkt_len
); );
END tb; END tb;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment