ldih/l
[calu.git] / cpu / src / decoder_b.vhd
index 41d02938f0b0529569ab0d2dbd63deeea6256ba8..d0a5070207a2c6004afad4717dd816e45fba0ba1 100644 (file)
@@ -227,15 +227,16 @@ begin
                end if;
 
                if (instr_s.opcode = "11010") then              --ldi
+                       instr_s.reg_src1_addr := instr_s.reg_dest_addr;
+                       instr_s.op_detail(LOW_HIGH_OPT) := instr_s.high_low;
+                       instr_s.op_detail(LDI_REPLACE_OPT) := instr_s.signext;
+                       
                        if (instr_s.high_low = '1') then
                                instr_s.immediate(31 downto 16) := instruction(18 downto 3);
                                instr_s.immediate(15 downto 0) := (others => '0');
                        else
                                instr_s.immediate(15 downto 0) := instruction(18 downto 3);
                                instr_s.immediate(31 downto 16) := (others => '0');
-
-                               --instr_s.immediate(11 downto 0) := instruction(14 downto 3);
-                               --instr_s.immediate(WORD_WIDTH-1 downto 12) := (others => '0');
                        end if;                 
 
                        if (instr_s.signext = '1' and instr_s.immediate(11) = '1') then