-- MIPS I system -- Copyright 2011-2012 Stefan Schuermans -- Copyleft GNU public license V2 or later -- http://www.gnu.org/copyleft/gpl.html LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.numeric_std.all; PACKAGE mips_types IS -- operation TYPE t_op IS ( op_none, op_alu, -- ALU operation op_div, -- divide op_divu, -- divide unsigned op_j, -- jump or branch op_l, -- load op_mfhi, -- move from HI op_mflo, -- move from LO op_mthi, -- move to HI op_mtlo, -- move to LO op_mult, -- multiply op_multu, -- multiply unsigned op_s -- store ); -- link (store return address in register) TYPE t_link IS ( link_none, link_link -- link ); -- compare mode TYPE t_cmp IS ( cmp_none, cmp_eq, -- equal cmp_gez, -- greater or equal zero cmp_gtz, -- greater than zero cmp_lez, -- less or equal zero cmp_ltz, -- less than zero cmp_ne -- not equal ); -- ALU operation TYPE t_alu IS ( alu_none, alu_add, -- addition alu_and, -- bitwise AND alu_nor, -- bitwise NOR alu_or, -- bitwise OR alu_sub, -- subtraction alu_sll, -- shift left logically alu_sra, -- shift right arithmetically alu_srl, -- shift right logically alu_slt, -- set on less than alu_sltu, -- set on less than unsigned alu_up, -- move to upper half alu_xor -- bitwise XOR ); -- immediate usage TYPE t_imm IS ( imm_none, imm_a, -- "a" immediate imm_16se, -- 16 bit immediate, sign-extension imm_16ze, -- 16 bit immediate, zero-extension imm_26 -- 26 bit immediate ); -- load/store type TYPE t_ldst IS ( ldst_none, ldst_b, -- byte (sign-extension) ldst_bu, -- byte unsigned (zero-extension) ldst_h, -- half word (16 bit) (sign-extension) ldst_hu, -- half word unsigned (16 bit) (zero-extension) ldst_w, -- word (32 bit) ldst_wl, -- word left (8 to 32 bits) ldst_wr -- word right (8 to 32 bits) ); END PACKAGE;