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

Added some verification of wg-ctrl_act.

parent dc391437
No related branches found
No related tags found
1 merge request!210MM readback the currently active crosslets info, instead of the initial MM...
...@@ -82,6 +82,7 @@ ARCHITECTURE tb OF tb_diag_wg_wideband IS ...@@ -82,6 +82,7 @@ ARCHITECTURE tb OF tb_diag_wg_wideband IS
SIGNAL restart : STD_LOGIC; SIGNAL restart : STD_LOGIC;
SIGNAL wg_ctrl : t_diag_wg; SIGNAL wg_ctrl : t_diag_wg;
SIGNAL wg_ctrl_act : t_diag_wg;
SIGNAL wg_mode : NATURAL; SIGNAL wg_mode : NATURAL;
SIGNAL wg_freq : NATURAL; SIGNAL wg_freq : NATURAL;
...@@ -155,6 +156,8 @@ BEGIN ...@@ -155,6 +156,8 @@ BEGIN
-- wg_ampl <= INTEGER(1.0/REAL(c_wg_full_scale) * c_ampl_unit); -- yields amplitude of 1 -- wg_ampl <= INTEGER(1.0/REAL(c_wg_full_scale) * c_ampl_unit); -- yields amplitude of 1
-- wg_ampl <= INTEGER(3.0/REAL(c_wg_full_scale) * c_ampl_unit); -- yields amplitude of 3 -- wg_ampl <= INTEGER(3.0/REAL(c_wg_full_scale) * c_ampl_unit); -- yields amplitude of 3
WAIT FOR c_clk_period*10;
WAIT UNTIL rising_edge(clk); -- align to rising edge WAIT UNTIL rising_edge(clk); -- align to rising edge
WAIT FOR c_clk_period*200; WAIT FOR c_clk_period*200;
...@@ -163,9 +166,19 @@ BEGIN ...@@ -163,9 +166,19 @@ BEGIN
-- CALC mode -- CALC mode
wg_mode <= c_diag_wg_mode_calc; wg_mode <= c_diag_wg_mode_calc;
-- Verify that wg_ctrl_act does not change without restart
WAIT FOR c_clk_period*3;
ASSERT TO_UINT(wg_ctrl_act.mode) = c_diag_wg_mode_off REPORT "Wrong wg_ctrl_act mode before restart" SEVERITY ERROR;
restart <= '1'; restart <= '1';
WAIT FOR c_clk_period*1; WAIT FOR c_clk_period*1;
restart <= '0'; restart <= '0';
-- Verify that wg_ctrl_act updated after restart
WAIT FOR c_clk_period*3;
ASSERT TO_UINT(wg_ctrl_act.mode) = c_diag_wg_mode_calc REPORT "Wrong wg_ctrl_act mode after restart" SEVERITY ERROR;
WAIT FOR c_clk_period*3000; WAIT FOR c_clk_period*3000;
restart <= '1'; restart <= '1';
WAIT FOR c_clk_period*1; WAIT FOR c_clk_period*1;
...@@ -175,6 +188,11 @@ BEGIN ...@@ -175,6 +188,11 @@ BEGIN
-- OFF mode -- OFF mode
wg_mode <= c_diag_wg_mode_off; wg_mode <= c_diag_wg_mode_off;
-- Verify that wg_ctrl_act updated after WG off
WAIT FOR c_clk_period*3;
ASSERT TO_UINT(wg_ctrl_act.mode) = c_diag_wg_mode_off REPORT "Wrong wg_ctrl_act mode after WG off" SEVERITY ERROR;
restart <= '1'; restart <= '1';
WAIT FOR c_clk_period*1; WAIT FOR c_clk_period*1;
restart <= '0'; restart <= '0';
...@@ -245,6 +263,7 @@ BEGIN ...@@ -245,6 +263,7 @@ BEGIN
st_restart => restart, st_restart => restart,
st_ctrl => wg_ctrl, st_ctrl => wg_ctrl,
st_ctrl_act => wg_ctrl_act,
out_ovr => out_ovr, out_ovr => out_ovr,
out_dat => out_dat, out_dat => out_dat,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment