alu: bessere testbench
[hwmod.git] / src / gen_pkg.vhd
1 library ieee;
2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
4
5 package gen_pkg is
6         type alu_ops is (NOP, SUB, ADD, MUL, DIV, DONE);
7         constant CBITS : integer := 32;
8         subtype csigned is signed((CBITS-1) downto 0);
9         --TODO: bei CBITS-1 gibts einen overflow :/
10         subtype cinteger is integer range -(2**(CBITS-2)) to ((2**(CBITS-2))-1);
11 end package gen_pkg;
12