]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/tumbl.git/blobdiff - hw/decode.vhd
Correct unfinished/broken CMPU and CMP instructions and IT(TE) conditions.
[fpga/lx-cpu1/tumbl.git] / hw / decode.vhd
index b9cb950899e0fe013fee49e8718d1c009e22d8ea..bb9810dc0e1812a3c9610fe41e9d0b57f8abd524 100644 (file)
@@ -20,7 +20,7 @@
 LIBRARY IEEE;
 
 USE IEEE.std_logic_1164.all;
-USE WORK.mbl_Pkg.all;
+USE WORK.mbl_pkg.all;
 
 --------------------------------------------------------------------------------
 ENTITY decode IS
@@ -181,6 +181,8 @@ p_decode:
                                                                ELSE
                                                                        alu_Action_v := A_CMP;
                                                                END IF;
+                                                               alu_Op1_v := ALU_IN_NOT_REGA;
+                                                               alu_Cin_v := CIN_ONE;
                                                        END IF;
 
                                                WHEN "100" | "101" =>                             -- IT(U) / ITT(U) / ITE(U)
@@ -200,6 +202,8 @@ p_decode:
                                                                condition_raw_v := rD_v(2 downto 0);
                                                                -- IT instruction isn't writing to anything
                                                                wrb_Action_v := NO_WRB;
+                                                               alu_Op1_v := ALU_IN_NOT_REGA;
+                                                               alu_Cin_v := CIN_ONE;
                                                        END IF;
 
                                                WHEN OTHERS =>
@@ -210,6 +214,8 @@ p_decode:
                                        IF (opcIx_v (3 DOWNTO 0) = "0100") THEN
                                                CASE code_x26_v IS
 
+                                                       WHEN "000" =>                                     -- CLZ
+                                                               alu_Action_v := A_CLZ;
                                                        WHEN "001" | "011" | "101" =>
                                                                CASE code_x26_v(2 DOWNTO 1) IS
                                                                        WHEN "00" =>                                -- SRA