diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-01-05 08:05:13 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-01-05 08:05:13 +0100 |
commit | 9f4ea778e623b465fd29160d55a6e1b599ca12af (patch) | |
tree | 8c076926a9fe72be2c0202bbb2dd521dac75f925 /testsuite/gna/issue731/adder.vhdl | |
parent | e74b072d8411fca577f00a4f6754238760cce649 (diff) | |
download | ghdl-9f4ea778e623b465fd29160d55a6e1b599ca12af.tar.gz ghdl-9f4ea778e623b465fd29160d55a6e1b599ca12af.tar.bz2 ghdl-9f4ea778e623b465fd29160d55a6e1b599ca12af.zip |
Add testcase from #731
Diffstat (limited to 'testsuite/gna/issue731/adder.vhdl')
-rw-r--r-- | testsuite/gna/issue731/adder.vhdl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/gna/issue731/adder.vhdl b/testsuite/gna/issue731/adder.vhdl new file mode 100644 index 000000000..1a214b91a --- /dev/null +++ b/testsuite/gna/issue731/adder.vhdl @@ -0,0 +1,19 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity Adder is + generic (gWidth : natural); + port( + iA : in std_ulogic_vector(gWidth-1 downto 0); + iB : in std_ulogic_vector(gWidth-1 downto 0); + + oCarry: out std_ulogic; + oRes : out std_ulogic_vector(gWidth-1 downto 0) + ); +end entity Adder; + +architecture RTL of Adder is +begin + (oCarry, oRes) <= std_ulogic_vector(unsigned('0' & iA) + unsigned('0' & iB)); +end architecture RTL; |