diff options
Diffstat (limited to 'testsuite/gna/issue1233/adder.vhdl')
-rw-r--r-- | testsuite/gna/issue1233/adder.vhdl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/gna/issue1233/adder.vhdl b/testsuite/gna/issue1233/adder.vhdl new file mode 100644 index 000000000..b2eeb3e39 --- /dev/null +++ b/testsuite/gna/issue1233/adder.vhdl @@ -0,0 +1,21 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity adder is + port + ( + nibble1, nibble2 : in unsigned(3 downto 0); + sum : out unsigned(3 downto 0); + carry_out : out std_logic + ); +end entity adder; + +architecture behavioral of adder is + signal temp : unsigned(4 downto 0); +begin + temp <= ("0" & nibble1) + nibble2; + sum <= temp(3 downto 0); + carry_out <= temp(4); +end architecture behavioral; + |