--
-- Component : mips_types
--
-- Generated by System Architect version v8.5_2.2 by ja-wells on Feb 10, 97
--
LIBRARY arithmetic ;
USE arithmetic.std_logic_arith.all;

LIBRARY ieee ;
USE ieee.std_logic_1164.all;

PACKAGE mips_types IS
-- Control signal widths
	SUBTYPE mips_mux_2 IS std_logic_vector(1 downto 0);
	SUBTYPE mips_mux_3 IS std_logic_vector(2 downto 0);
	SUBTYPE mips_mux_4 IS std_logic_vector(3 downto 0);

	SUBTYPE mips_word IS std_logic_vector(31 downto 0);
	SUBTYPE mips_offset IS std_logic_vector(25 downto 0);
	SUBTYPE mips_immed IS std_logic_vector(15 downto 0);
	SUBTYPE mips_opcode IS std_logic_vector(5 downto 0);
	SUBTYPE mips_func IS std_logic_vector(5 downto 0);
	SUBTYPE mips_register IS std_logic_vector(4 downto 0);
	SUBTYPE mips_shamt IS std_logic_vector(4 downto 0);
	SUBTYPE mips_alu IS std_logic_vector(2 downto 0);
	SUBTYPE mips_type IS std_logic_vector(1 downto 0);
	SUBTYPE mips_ctrl_x IS std_logic_vector(4 downto 0);
	SUBTYPE mips_ctrl_m IS std_logic_vector(2 downto 0);

	SUBTYPE Tag IS std_logic_vector(25 downto 0);
	SUBTYPE SetIndex IS std_logic_vector(1 downto 0);
	SUBTYPE WordIndex IS std_logic_vector(1 downto 0);
	SUBTYPE CacheLine IS std_logic_vector(127 downto 0);

-- Constants
	constant oADDI : mips_opcode := "001000";
	constant oANDI : mips_opcode := "001100";
	constant oBEQ  : mips_opcode := "000100";
	constant oBNE  : mips_opcode := "000101";
	constant oJ    : mips_opcode := "000010";
	constant oJAL  : mips_opcode := "000011";
	constant oLUI  : mips_opcode := "001111";
	constant oLW   : mips_opcode := "100011";
	constant oORI  : mips_opcode := "001101";
	constant oSLTI : mips_opcode := "001010";
	constant oSW   : mips_opcode := "101011";

	constant rType : mips_opcode := "000000";

	constant cADD  : mips_func := "100000";
	constant cAND  : mips_func := "100100";
	constant cJR	: mips_func := "001000"; 
	constant cOR   : mips_func := "100101";
	constant cSLL  : mips_func := "000000";
	constant cSLT  : mips_func := "101010";
	constant cSRL  : mips_func := "000010";
	constant cSUB  : mips_func := "100010";

	constant alu_ADD  : mips_alu := "000";
	constant alu_SUB  : mips_alu := "001";
	constant alu_AND  : mips_alu := "010";
	constant alu_OR   : mips_alu := "011";
	constant alu_SLL  : mips_alu := "100";
	constant alu_SRL  : mips_alu := "101";
	constant alu_SLT  : mips_alu := "110";
	constant alu_LUI  : mips_alu := "111";

END mips_types ;