2 port (ok : out boolean);
6 use ieee.std_logic_1164.all;
7 use ieee.numeric_std.all;
9 architecture behav of snum02 is
11 constant a1 : signed (7 downto 0) := x"1d";
12 constant b1 : integer := 3;
13 constant r1 : signed (7 downto 0) := a1 + b1;
15 constant a2 : signed (7 downto 0) := x"24";
16 constant b2 : integer := -4;
17 constant r2 : signed (7 downto 0) := a2 + b2;
19 signal er1 : signed (7 downto 0) := x"20";
22 ok <= r1 = er1 and r2 = er1;