aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/sns01/add03.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/synth/sns01/add03.vhdl')
-rw-r--r--testsuite/synth/sns01/add03.vhdl19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/synth/sns01/add03.vhdl b/testsuite/synth/sns01/add03.vhdl
new file mode 100644
index 000000000..16546bd0d
--- /dev/null
+++ b/testsuite/synth/sns01/add03.vhdl
@@ -0,0 +1,19 @@
+LIBRARY ieee;
+USE ieee.std_logic_1164.all;
+
+entity add03 is
+ port (
+ a, b : std_logic_vector(8 DOWNTO 0);
+ borrow : std_logic;
+ res : out std_logic_vector(8 DOWNTO 0));
+end add03;
+
+LIBRARY ieee;
+USE ieee.std_logic_arith.all;
+
+architecture behav of add03 is
+ signal t : signed(8 DOWNTO 0);
+begin
+ t <= signed(a) - signed(b) - borrow;
+ res <= std_logic_vector(t);
+end behav;