aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/snsuns01/uunaries.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/synth/snsuns01/uunaries.vhdl')
-rw-r--r--testsuite/synth/snsuns01/uunaries.vhdl22
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/synth/snsuns01/uunaries.vhdl b/testsuite/synth/snsuns01/uunaries.vhdl
new file mode 100644
index 000000000..568dec09d
--- /dev/null
+++ b/testsuite/synth/snsuns01/uunaries.vhdl
@@ -0,0 +1,22 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity unaries is
+ port (
+ l4 : std_logic_vector (3 downto 0);
+
+ plus_v : out std_logic_vector (3 downto 0);
+ minus_v : out std_logic_vector (3 downto 0);
+ abs_v : out std_logic_vector (3 downto 0));
+end unaries;
+
+library ieee;
+use ieee.std_logic_unsigned.all;
+
+architecture behav of unaries is
+begin
+ plus_v <= +l4;
+ -- Dummy for compatibility with signed operations.
+ minus_v <= not l4;
+ abs_v <= +l4;
+end behav;