2 port (ok : out boolean);
6 use ieee.std_logic_1164.all;
7 use ieee.numeric_std.all;
9 architecture behav of snum05 is
11 constant a1 : signed (7 downto 0) := x"1d";
12 constant b1 : signed (3 downto 0) := x"5";
13 constant r1 : signed (11 downto 0) := a1 * b1;
15 signal er1 : signed (11 downto 0) := x"091";
17 constant a2 : signed (7 downto 0) := x"fe";
18 constant b2 : signed (3 downto 0) := x"f";
19 constant r2 : signed (11 downto 0) := a2 * b2;
20 signal er2 : signed (11 downto 0) := x"002";
24 ok <= r1 = er1 and r2 = er2;