55e2e5964690ce8638e2918f238672f4b7d25a38
Stefan Schuermans start of MIPS core: begin o...

Stefan Schuermans authored 12 years ago

1) LIBRARY ieee;
2) USE ieee.std_logic_1164.all;
3) USE ieee.numeric_std.all;
4) 
5) PACKAGE mips_types IS
6) 
7)     -- operation
8)     TYPE t_op IS (
9)         op_none,
10)         op_alu, -- ALU operation
Stefan Schuermans added decoding of simple lo...

Stefan Schuermans authored 12 years ago

11)         op_j,   -- jump or branch
12)         op_l,   -- load
13)         op_s    -- store
Stefan Schuermans start of MIPS core: begin o...

Stefan Schuermans authored 12 years ago

14)     );
15) 
16)     -- link (store return address in register)
17)     TYPE t_link IS (
18)         link_none,
19)         link_link  -- link
20)     );
21) 
22)     -- compare mode
23)     TYPE t_cmp IS (
24)         cmp_none,
25)         cmp_eq,   -- equal
Stefan Schuermans add missing branch instruct...

Stefan Schuermans authored 12 years ago

26)         cmp_gez,  -- greater or equal zero
27)         cmp_gtz,  -- greater than zero
Stefan Schuermans start of MIPS core: begin o...

Stefan Schuermans authored 12 years ago

28)         cmp_lez,  -- less or equal zero
Stefan Schuermans add missing branch instruct...

Stefan Schuermans authored 12 years ago

29)         cmp_ltz,  -- less than zero
Stefan Schuermans start of MIPS core: begin o...

Stefan Schuermans authored 12 years ago

30)         cmp_ne    -- not equal
31)     );
32) 
33)     -- ALU operation
34)     TYPE t_alu IS (
35)         alu_none,
36)         alu_add,  -- addition
37)         alu_and,  -- bitwise AND
38)         alu_nor,  -- bitwise NOR
39)         alu_or,   -- bitwise OR
40)         alu_sub,  -- subtraction
41)         alu_sll,  -- shift left logically
42)         alu_sra,  -- shift right arithmetically
43)         alu_srl,  -- shift right logically
44)         alu_slt,  -- set on less than
Stefan Schuermans separated shifter from ALU

Stefan Schuermans authored 12 years ago

45)         alu_sltu, -- set on less than unsigned
Stefan Schuermans added decoding of simple lo...

Stefan Schuermans authored 12 years ago

46)         alu_up,   -- move to upper half
Stefan Schuermans start of MIPS core: begin o...

Stefan Schuermans authored 12 years ago

47)         alu_xor   -- bitwise XOR
48)     );
49) 
50)     -- immediate usage
51)     TYPE t_imm IS (
52)         imm_none,
53)         imm_a,    -- "a" immediate
54)         imm_16se, -- 16 bit immediate, sign-extension
55)         imm_16ze, -- 16 bit immediate, zero-extension
56)         imm_26    -- 26 bit immediate
57)     );
58) 
Stefan Schuermans added decoding of simple lo...

Stefan Schuermans authored 12 years ago

59)     -- load/store type
60)     TYPE t_ldst IS (
61)         ldst_none,
Stefan Schuermans whitespace changes

Stefan Schuermans authored 12 years ago

62)         ldst_b,  -- byte (sign-extension)
63)         ldst_bu, -- byte unsigned (zero-extension)
64)         ldst_h,  -- half word (16 bit) (sign-extension)
65)         ldst_hu, -- half word unsigned (16 bit) (zero-extension)
Stefan Schuermans decoding of LWL, LWR, SWL, SWR

Stefan Schuermans authored 12 years ago

66)         ldst_w,  -- word (32 bit)
67)         ldst_wl, -- word left (8 to 32 bits)
68)         ldst_wr  -- word right (8 to 32 bits)
Stefan Schuermans added decoding of simple lo...

Stefan Schuermans authored 12 years ago

69)     );
70)