aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/int01/int_operators.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/synth/int01/int_operators.vhdl')
-rw-r--r--testsuite/synth/int01/int_operators.vhdl20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/synth/int01/int_operators.vhdl b/testsuite/synth/int01/int_operators.vhdl
new file mode 100644
index 000000000..6a09c0621
--- /dev/null
+++ b/testsuite/synth/int01/int_operators.vhdl
@@ -0,0 +1,20 @@
+library ieee;
+ use ieee.std_logic_1164.all;
+
+entity int_operators is
+ generic (
+ gen_a : integer := 5;
+ gen_b : integer := 3
+ );
+ port (
+ sig_a : in integer range 0 to 7;
+ sig_b : out std_logic;
+ sig_c : out integer
+ );
+end int_operators;
+
+architecture rtl of int_operators is
+begin
+ sig_b <= '0' when sig_a /= gen_a else '1';
+ sig_c <= gen_a rem gen_b;
+end rtl;