aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/output01/tb_output07.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-07 10:44:51 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-07 10:44:51 +0100
commitec0b123c0341074f815ea8087da2dbf4b4575e49 (patch)
tree0960ac0107eb234c137650d8ae863b340d13de7e /testsuite/synth/output01/tb_output07.vhdl
parent87907d6da96eb4bab35e8eb7aabc481e9b32e04c (diff)
downloadghdl-ec0b123c0341074f815ea8087da2dbf4b4575e49.tar.gz
ghdl-ec0b123c0341074f815ea8087da2dbf4b4575e49.tar.bz2
ghdl-ec0b123c0341074f815ea8087da2dbf4b4575e49.zip
testsuite/synth: add a test for previous commit.
Diffstat (limited to 'testsuite/synth/output01/tb_output07.vhdl')
-rw-r--r--testsuite/synth/output01/tb_output07.vhdl39
1 files changed, 39 insertions, 0 deletions
diff --git a/testsuite/synth/output01/tb_output07.vhdl b/testsuite/synth/output01/tb_output07.vhdl
new file mode 100644
index 000000000..af2f7f037
--- /dev/null
+++ b/testsuite/synth/output01/tb_output07.vhdl
@@ -0,0 +1,39 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity tb_output07 is
+end tb_output07;
+
+architecture behav of tb_output07 is
+ signal i : std_logic;
+ signal clk : std_logic;
+ signal o : std_logic_vector (1 downto 0);
+begin
+ inst: entity work.output07
+ port map (clk => clk, i => i, o => o);
+
+ process
+ procedure pulse is
+ begin
+ wait for 1 ns;
+ clk <= '1';
+ wait for 1 ns;
+ clk <= '0';
+ end pulse;
+ begin
+ clk <= '0';
+ wait for 1 ns;
+ assert o = "10" severity failure;
+
+ i <= '1';
+ pulse;
+ assert o = "01" severity failure;
+
+ i <= '0';
+ pulse;
+ assert o = "10" severity failure;
+
+ wait;
+ end process;
+end behav;
+