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

Keep src_diag_en enabled during link fault.

parent 746d6505
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
-- --
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Purpose: Test bench for tr_xaui using diagnostics -- Purpose: Test bench for tr_xaui using diagnostics and PHY loop back with delay and link_fault
-- Description: -- Description:
-- Usage: -- Usage:
-- > as 10 -- > as 10
...@@ -112,18 +112,17 @@ BEGIN ...@@ -112,18 +112,17 @@ BEGIN
-- verify link -- verify link
proc_common_wait_until_low(rx_clk, rx_rst); proc_common_wait_until_low(rx_clk, rx_rst);
proc_common_wait_some_cycles(rx_clk, 20);
snk_diag_en <= (OTHERS=>'1');
proc_common_wait_some_cycles(tx_clk, 20); proc_common_wait_some_cycles(tx_clk, 20);
src_diag_en <= (OTHERS=>'1'); src_diag_en <= (OTHERS=>'1'); -- first enable Tx seq
proc_common_wait_some_cycles(rx_clk, 20);
snk_diag_en <= (OTHERS=>'1'); -- then enable Rx seq
proc_common_wait_some_cycles(rx_clk, 50); proc_common_wait_some_cycles(rx_clk, 50);
verify_en <= '1'; verify_en <= '1'; -- p_verify that Rx seq result is OK
WAIT FOR 5 us; WAIT FOR 5 us;
-- model link fault -- model link fault
snk_diag_en <= (OTHERS=>'0'); verify_en <= '0'; -- p_verify stop
src_diag_en <= (OTHERS=>'0'); snk_diag_en <= (OTHERS=>'0'); -- disable Rx seq to avoid Error due to link_fault, keep Tx seq enabled
verify_en <= '0';
link_fault <= '1'; link_fault <= '1';
WAIT FOR 1 us; WAIT FOR 1 us;
...@@ -132,11 +131,9 @@ BEGIN ...@@ -132,11 +131,9 @@ BEGIN
WAIT FOR 1 us; WAIT FOR 1 us;
proc_common_wait_until_low(rx_clk, rx_rst); proc_common_wait_until_low(rx_clk, rx_rst);
proc_common_wait_some_cycles(rx_clk, 20); proc_common_wait_some_cycles(rx_clk, 20);
snk_diag_en <= (OTHERS=>'1'); snk_diag_en <= (OTHERS=>'1'); -- enable Rx seq again
proc_common_wait_some_cycles(tx_clk, 20);
src_diag_en <= (OTHERS=>'1');
proc_common_wait_some_cycles(rx_clk, 50); proc_common_wait_some_cycles(rx_clk, 50);
verify_en <= '1'; verify_en <= '1'; -- p_verify that Rx seq result is OK
WAIT FOR 5 us; WAIT FOR 5 us;
-- Stop the simulation -- Stop the simulation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment