decoding MULT(U)/DIV(U) -> MIPSel1 decoder complete
Stefan Schuermans

Stefan Schuermans commited on 2012-02-05 17:32:53
Showing 2 changed files, with 8 additions and 1 deletions.

... ...
@@ -119,7 +119,10 @@ BEGIN
119 119
                     WHEN "010001" => o_op <= op_mtlo;
120 120
                     WHEN "010010" => o_op <= op_mfhi;
121 121
                     WHEN "010011" => o_op <= op_mtlo;
122
-                    -- TODO: 011xxx missing
122
+                    WHEN "011000" => o_op <= op_mult;
123
+                    WHEN "011001" => o_op <= op_multu;
124
+                    WHEN "011010" => o_op <= op_div;
125
+                    WHEN "011011" => o_op <= op_divu;
123 126
                     WHEN "100000" => o_op <= op_alu; o_alu <= alu_add;
124 127
                     WHEN "100001" => o_op <= op_alu; o_alu <= alu_add;
125 128
                     WHEN "100010" => o_op <= op_alu; o_alu <= alu_sub;
... ...
@@ -8,12 +8,16 @@ PACKAGE mips_types IS
8 8
     TYPE t_op IS (
9 9
         op_none,
10 10
         op_alu,   -- ALU operation
11
+        op_div,   -- divide
12
+        op_divu,  -- divide unsigned
11 13
         op_j,     -- jump or branch
12 14
         op_l,     -- load
13 15
         op_mfhi,  -- move from HI
14 16
         op_mflo,  -- move from LO
15 17
         op_mthi,  -- move to HI
16 18
         op_mtlo,  -- move to LO
19
+        op_mult,  -- multiply
20
+        op_multu, -- multiply unsigned
17 21
         op_s      -- store
18 22
     );
19 23
 
20 24