diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-04-12 10:25:57 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-04-12 10:25:57 +0200 |
commit | 948e23fcc54c0c0116c260fc86aae0ba583172dd (patch) | |
tree | aa8aeb02fbd571848cf8cbcf705efea3696b8cbd /testsuite/synth/issue1211/tb_delay_ul.vhdl | |
parent | e3a7d25b24cc8e883eff4fe0fd8df4b48269b89d (diff) | |
download | ghdl-948e23fcc54c0c0116c260fc86aae0ba583172dd.tar.gz ghdl-948e23fcc54c0c0116c260fc86aae0ba583172dd.tar.bz2 ghdl-948e23fcc54c0c0116c260fc86aae0ba583172dd.zip |
testsuite/synth: add test for #1211
Diffstat (limited to 'testsuite/synth/issue1211/tb_delay_ul.vhdl')
-rw-r--r-- | testsuite/synth/issue1211/tb_delay_ul.vhdl | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/testsuite/synth/issue1211/tb_delay_ul.vhdl b/testsuite/synth/issue1211/tb_delay_ul.vhdl new file mode 100644 index 000000000..d7df0152d --- /dev/null +++ b/testsuite/synth/issue1211/tb_delay_ul.vhdl @@ -0,0 +1,77 @@ +entity tb_delay_ul is +end tb_delay_ul; + +library ieee; +use ieee.std_logic_1164.all; + +architecture behav of tb_delay_ul is + signal clk : std_logic; + signal rst : std_logic; + signal din : std_logic; + signal dout : std_logic; + signal en : std_logic; +begin + dut: entity work.delay_ul + port map ( + sig_out => dout, + sig_in => din, + clock => clk, + reset => rst, + Enable => En); + + process + procedure pulse is + begin + clk <= '0'; + wait for 1 ns; + clk <= '1'; + wait for 1 ns; + end pulse; + begin + rst <= '1'; + en <= '1'; + wait for 1 ns; + assert dout = '0' severity failure; + rst <= '0'; + + din <= '1'; + pulse; + assert dout = '0' severity failure; + + din <= '1'; + pulse; + assert dout = '0' severity failure; + + din <= '0'; + pulse; + assert dout = '0' severity failure; + + din <= '1'; + pulse; + assert dout = '1' severity failure; + + din <= '1'; + pulse; + assert dout = '1' severity failure; + + din <= '1'; + pulse; + assert dout = '0' severity failure; + + din <= '1'; + pulse; + assert dout = '1' severity failure; + + din <= '1'; + rst <= '1'; + pulse; + assert dout = '0' severity failure; + + rst <= '0'; + din <= '1'; + pulse; + assert dout = '0' severity failure; + + wait; + end process; +end behav; |