diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-03 06:33:03 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-03 21:15:06 +0100 |
commit | 9d8c3f48d303ebdd9585a183ba46b736194bf0ab (patch) | |
tree | e0c54aef473d9844ffc7ae0617dd2d43e7f1bd43 /testsuite/synth/memmux01/memmux04.vhdl | |
parent | 00e384d9d1ce5896198c3e817d6162a4eccfd693 (diff) | |
download | ghdl-9d8c3f48d303ebdd9585a183ba46b736194bf0ab.tar.gz ghdl-9d8c3f48d303ebdd9585a183ba46b736194bf0ab.tar.bz2 ghdl-9d8c3f48d303ebdd9585a183ba46b736194bf0ab.zip |
testsuite/synth: add memmux04 test.
Diffstat (limited to 'testsuite/synth/memmux01/memmux04.vhdl')
-rw-r--r-- | testsuite/synth/memmux01/memmux04.vhdl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/synth/memmux01/memmux04.vhdl b/testsuite/synth/memmux01/memmux04.vhdl new file mode 100644 index 000000000..04fed7d62 --- /dev/null +++ b/testsuite/synth/memmux01/memmux04.vhdl @@ -0,0 +1,23 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity memmux04 is + port (ad : std_logic_vector (1 downto 0); + val : std_logic; + dat : std_logic_vector (3 downto 0); + res : out std_logic_vector (3 downto 0)); +end memmux04; + +architecture behav of memmux04 is +begin + process (ad, val) + variable hi, lo : natural; + variable t : std_logic_vector(3 downto 0); + begin + lo := to_integer(unsigned(ad)); + t := dat; + t (lo) := val; + res <= t; + end process; +end behav; |