aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/asgn01/tb_asgn01.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-08-27 13:40:48 +0200
committerTristan Gingold <tgingold@free.fr>2019-08-27 13:40:57 +0200
commit26c13e748d27454a43ea1c341570b48a40cd2067 (patch)
tree0e04e88f170011443255aa97bd476afce9a73fca /testsuite/synth/asgn01/tb_asgn01.vhdl
parentef26f6ae06c01187403be345f5997930cbd44a10 (diff)
downloadghdl-26c13e748d27454a43ea1c341570b48a40cd2067.tar.gz
ghdl-26c13e748d27454a43ea1c341570b48a40cd2067.tar.bz2
ghdl-26c13e748d27454a43ea1c341570b48a40cd2067.zip
testsuite/synth: add cases for assign.
Diffstat (limited to 'testsuite/synth/asgn01/tb_asgn01.vhdl')
-rw-r--r--testsuite/synth/asgn01/tb_asgn01.vhdl33
1 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/synth/asgn01/tb_asgn01.vhdl b/testsuite/synth/asgn01/tb_asgn01.vhdl
new file mode 100644
index 000000000..3c2ec076c
--- /dev/null
+++ b/testsuite/synth/asgn01/tb_asgn01.vhdl
@@ -0,0 +1,33 @@
+entity tb_asgn01 is
+end tb_asgn01;
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+architecture behav of tb_asgn01 is
+ signal a : std_logic_vector (2 downto 0);
+ signal s0 : std_logic;
+ signal r : std_logic_vector (2 downto 0);
+begin
+ dut: entity work.asgn01
+ port map (a => a, s0 => s0, r => r);
+
+ process
+ begin
+ s0 <= '1';
+ wait for 1 ns;
+ assert r = "000" severity failure;
+
+ a <= "101";
+ s0 <= '0';
+ wait for 1 ns;
+ assert r = "101" severity failure;
+
+ a <= "110";
+ s0 <= '0';
+ wait for 1 ns;
+ assert r = "110" severity failure;
+
+ wait;
+ end process;
+end behav;