decode stage die erste
[calu.git] / cpu / src / common_pkg.vhd
1 library IEEE;
2
3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
5
6 package common_pkg is
7         
8         constant WORD_WIDTH   : INTEGER := 32;
9         constant HWORD_WIDTH  : INTEGER := 16;
10         constant BYTE_WIDTH   : INTEGER :=  8;
11         constant OPCODE_WIDTH : INTEGER :=  5;
12         constant DISPL_WIDTH  : INTEGER := 15;
13
14         constant INSTR_ADDR_WIDTH       : INTEGER := 32;
15         constant PHYS_INSTR_ADDR_WIDTH  : INTEGER := 11;
16         constant REG_ADDR_WIDTH         : INTEGER := 4;
17         constant DATA_ADDR_WIDTH        : INTEGER := 32;
18         constant PHYS_DATA_ADDR_WIDTH   : INTEGER := 32;
19
20         subtype instruction_word_t is std_logic_vector(WORD_WIDTH-1 downto 0);
21         subtype instruction_addr_t is std_logic_vector(INSTR_ADDR_WIDTH-1 downto 0);
22         
23         subtype gp_register_t is std_logic_vector(WORD_WIDTH-1 downto 0);
24
25         subtype data_ram_word_t is std_logic_vector(WORD_WIDTH-1 downto 0);
26         subtype data_ram_addr_t is std_logic_vector(DATA_ADDR_WIDTH-1 downto 0);
27
28         subtype opcode_t is std_logic_vector(OPCODE_WIDTH-1 downto 0);
29         
30 end package common_pkg;