aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/synth129/tb_test.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-08-24 21:06:38 +0200
committerTristan Gingold <tgingold@free.fr>2020-08-25 18:13:53 +0200
commita8d4774582470c6c67f6520e9ae83f89dbd5c7d4 (patch)
tree46f16f801eb95bb74811aef45d410800338b725a /testsuite/synth/synth129/tb_test.vhdl
parente578d4a148909001bd63aa9dc6922d0c2b5fad97 (diff)
downloadghdl-a8d4774582470c6c67f6520e9ae83f89dbd5c7d4.tar.gz
ghdl-a8d4774582470c6c67f6520e9ae83f89dbd5c7d4.tar.bz2
ghdl-a8d4774582470c6c67f6520e9ae83f89dbd5c7d4.zip
testsuite/synth: add a test for ghdl/ghdl-yosys-plugin#129
Diffstat (limited to 'testsuite/synth/synth129/tb_test.vhdl')
-rw-r--r--testsuite/synth/synth129/tb_test.vhdl27
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/synth/synth129/tb_test.vhdl b/testsuite/synth/synth129/tb_test.vhdl
new file mode 100644
index 000000000..80b6146fc
--- /dev/null
+++ b/testsuite/synth/synth129/tb_test.vhdl
@@ -0,0 +1,27 @@
+entity tb_test is
+end tb_test;
+
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+architecture behav of tb_test is
+ signal s : std_logic := '0';
+ signal a : unsigned(7 downto 0);
+ signal r : integer range 0 to 255;
+begin
+ dut: entity work.test
+ port map (s, a, r);
+
+ process
+ begin
+ wait for 1 ns;
+ assert r = 0 severity failure;
+
+ s <= '1';
+ a <= x"a5";
+ wait for 1 ns;
+ assert r = 165 severity failure;
+ wait;
+ end process;
+end behav;