diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-12-03 21:04:15 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-12-03 21:04:15 +0100 |
commit | de1a576d22c27df2e6e66335fce81e35b56f3d67 (patch) | |
tree | ea90385a1e2e5945827fc0308597d6c1147722ca | |
parent | 2801563dc0bb7ccd4105ca68da1aa983434b0820 (diff) | |
download | ghdl-yosys-plugin-de1a576d22c27df2e6e66335fce81e35b56f3d67.tar.gz ghdl-yosys-plugin-de1a576d22c27df2e6e66335fce81e35b56f3d67.tar.bz2 ghdl-yosys-plugin-de1a576d22c27df2e6e66335fce81e35b56f3d67.zip |
Add test for #75
-rwxr-xr-x | testsuite/issues/issue75/testsuite.sh | 9 | ||||
-rw-r--r-- | testsuite/issues/issue75/top.vhdl | 46 |
2 files changed, 55 insertions, 0 deletions
diff --git a/testsuite/issues/issue75/testsuite.sh b/testsuite/issues/issue75/testsuite.sh new file mode 100755 index 0000000..408584f --- /dev/null +++ b/testsuite/issues/issue75/testsuite.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +topdir=../.. +. $topdir/testenv.sh + +run_yosys -q -p "ghdl top.vhdl -e top; hierarchy -check -top top" + +clean +echo OK diff --git a/testsuite/issues/issue75/top.vhdl b/testsuite/issues/issue75/top.vhdl new file mode 100644 index 0000000..0e0b602 --- /dev/null +++ b/testsuite/issues/issue75/top.vhdl @@ -0,0 +1,46 @@ +library ieee; +use ieee.std_logic_1164.ALL; + +entity child is + port ( + CLK: in std_logic; + I: in std_logic; + O: out std_logic + ); +end entity child; + +architecture rtl of child is + signal Ialias: std_logic; +begin + process (CLK) + begin + if rising_edge(CLK) then + O <= Ialias; + end if; + end process; + Ialias <= I; +end architecture rtl; + + +library ieee; +use ieee.std_logic_1164.ALL; + +entity top is + port ( + CLK: in std_logic; + I: in std_logic; + O: out std_logic + ); +end entity top; + +architecture rtl of top is + component child is + port ( + CLK: in std_logic; + I: in std_logic; + O: out std_logic + ); + end component child; +begin + inst : child port map(CLK, I, O); +end architecture rtl; |