OpenCores
URL https://opencores.org/ocsvn/ion/ion/trunk

Subversion Repositories ion

[/] [ion/] [trunk/] [vhdl/] [mips_pkg.vhdl] - Blame information for rev 24

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ja_rd
library ieee;
2
use ieee.std_logic_1164.all;
3
use ieee.std_logic_arith.all;
4
use ieee.std_logic_unsigned.all;
5
 
6
package mips_pkg is
7
 
8
subtype t_addr is std_logic_vector(31 downto 0);
9
subtype t_word is std_logic_vector(31 downto 0);
10
subtype t_dword is std_logic_vector(63 downto 0);
11
subtype t_regnum is std_logic_vector(4 downto 0);
12
 
13
type t_rbank is array(0 to 31) of t_word;
14
 
15
subtype t_pc is std_logic_vector(31 downto 2);
16
 
17
constant ZERO : t_word := (others => '0');
18
 
19
type t_alu_control is record
20
    logic_sel :         std_logic_vector(1 downto 0);
21
    shift_sel :         std_logic_vector(1 downto 0);
22
    shift_amount :      std_logic_vector(4 downto 0);
23
    neg_sel :           std_logic_vector(1 downto 0);
24
    use_arith :         std_logic;
25
    use_logic :         std_logic_vector(1 downto 0);
26
    cy_in :             std_logic;
27
    use_slt :           std_logic;
28
    arith_unsigned :    std_logic;
29
end record t_alu_control;
30
 
31
type t_alu_flags is record
32
    inp1_lt_zero :      std_logic;
33
    inp1_eq_zero :      std_logic;
34
    inp1_lt_inp2 :      std_logic;
35
    inp1_eq_inp2 :      std_logic;
36
end record t_alu_flags;
37
 
38 12 ja_rd
-- 32-cycle mul/div module control. Bits 4-3 & 1-0 of IR.
39
subtype t_mult_function is std_logic_vector(3 downto 0);
40
constant MULT_NOTHING       : t_mult_function := "0000";
41
constant MULT_READ_LO       : t_mult_function := "1010"; -- 18
42
constant MULT_READ_HI       : t_mult_function := "1000"; -- 16
43
constant MULT_WRITE_LO      : t_mult_function := "1011"; -- 19
44
constant MULT_WRITE_HI      : t_mult_function := "1001"; -- 17
45
constant MULT_MULT          : t_mult_function := "1101"; -- 25
46
constant MULT_SIGNED_MULT   : t_mult_function := "1100"; -- 24
47
constant MULT_DIVIDE        : t_mult_function := "1111"; -- 26
48
constant MULT_SIGNED_DIVIDE : t_mult_function := "1110"; -- 27
49
 
50
 
51 2 ja_rd
end package;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.