VHDL Grundkonstrukt
[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 BYTE_WIDTH  : INTEGER :=  8;
10
11         constant INSTR_ADDR_WIDTH       : INTEGER := 32;
12         constant PHYS_INSTR_ADDR_WIDTH  : INTEGER := 11;
13         constant REG_ADDR_WIDTH         : INTEGER := 4;
14         constant DATA_ADDR_WIDTH        : INTEGER := 32;
15         constant PHYS_DATA_ADDR_WIDTH   : INTEGER := 32;
16
17         subtype instruction_word_t is std_logic_vector(WORD_WIDTH-1 downto 0);
18         subtype instruction_addr_t is std_logic_vector(INSTR_ADDR_WIDTH-1 downto 0);
19         
20         subtype gp_register_t is std_logic_vector(WORD_WIDTH-1 downto 0);
21
22         subtype data_ram_word_t is std_logic_vector(WORD_WIDTH-1 downto 0);
23         subtype data_ram_addr_t is std_logic_vecotr(DATA_ADDR_WIDTH-1 downto 0);
24         
25 end package common_pkg;