11c7383866559e25eda49cd262ac4b4857067507
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,
Stefan Schuermans decoding MULT(U)/DIV(U) ->...

Stefan Schuermans authored 12 years ago

10)         op_alu,   -- ALU operation
11)         op_div,   -- divide
12)         op_divu,  -- divide unsigned
13)         op_j,     -- jump or branch
14)         op_l,     -- load
15)         op_mfhi,  -- move from HI
16)         op_mflo,  -- move from LO
17)         op_mthi,  -- move to HI
18)         op_mtlo,  -- move to LO
19)         op_mult,  -- multiply
20)         op_multu, -- multiply unsigned
21)         op_s      -- store
Stefan Schuermans start of MIPS core: begin o...

Stefan Schuermans authored 12 years ago

22)     );
23) 
24)     -- link (store return address in register)
25)     TYPE t_link IS (
26)         link_none,
27)         link_link  -- link
28)     );
29) 
30)     -- compare mode
31)     TYPE t_cmp IS (
32)         cmp_none,
33)         cmp_eq,   -- equal
Stefan Schuermans add missing branch instruct...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

38)         cmp_ne    -- not equal
39)     );
40) 
41)     -- ALU operation
42)     TYPE t_alu IS (
43)         alu_none,
44)         alu_add,  -- addition
45)         alu_and,  -- bitwise AND
46)         alu_nor,  -- bitwise NOR
47)         alu_or,   -- bitwise OR
48)         alu_sub,  -- subtraction
49)         alu_sll,  -- shift left logically
50)         alu_sra,  -- shift right arithmetically
51)         alu_srl,  -- shift right logically
52)         alu_slt,  -- set on less than
Stefan Schuermans separated shifter from ALU

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

55)         alu_xor   -- bitwise XOR
56)     );
57) 
58)     -- immediate usage
59)     TYPE t_imm IS (
60)         imm_none,
61)         imm_a,    -- "a" immediate
62)         imm_16se, -- 16 bit immediate, sign-extension
63)         imm_16ze, -- 16 bit immediate, zero-extension
64)         imm_26    -- 26 bit immediate
65)     );
66) 
Stefan Schuermans added decoding of simple lo...

Stefan Schuermans authored 12 years ago

67)     -- load/store type
68)     TYPE t_ldst IS (
69)         ldst_none,
Stefan Schuermans whitespace changes

Stefan Schuermans authored 12 years ago

70)         ldst_b,  -- byte (sign-extension)
71)         ldst_bu, -- byte unsigned (zero-extension)
72)         ldst_h,  -- half word (16 bit) (sign-extension)
73)         ldst_hu, -- half word unsigned (16 bit) (zero-extension)
Stefan Schuermans decoding of LWL, LWR, SWL, SWR

Stefan Schuermans authored 12 years ago

74)         ldst_w,  -- word (32 bit)
75)         ldst_wl, -- word left (8 to 32 bits)
76)         ldst_wr  -- word right (8 to 32 bits)
Stefan Schuermans added decoding of simple lo...

Stefan Schuermans authored 12 years ago

77)     );
78)