result_v := shift_result;
when LDST_OP =>
if op_detail(IMM_OPT) = '1' then
- result_v := right_operand;
+ result_v.result := right_operand;
end if;\r
end case;\r
\r
if (instr_s.signext = '1' and instr_s.immediate(11) = '1') then
instr_s.immediate(31 downto 16) := (others => '1');
end if;
- instr_s.immediate(14 downto 0) := instruction(14 downto 0);
- instr_s.immediate(WORD_WIDTH-1 downto 15) := (others => '0');
+ instr_s.immediate(11 downto 0) := instruction(14 downto 3);
+ instr_s.immediate(WORD_WIDTH-1 downto 12) := (others => '0');
instr_s.op_detail(IMM_OPT) := '1';
end if;
end if;
-- r0 = 0, r1 = 1, r2 = 3, r3 = A
- signal ram : RAM_TYPE := ( 0 => "11100001000010001000000000111000", -- r1 = 7
- 1 => "11100001000100010000000000101000", -- r2 = 5
- 2 => "11100001000110011000000000100000", -- r3 = 4
+ signal ram : RAM_TYPE := ( 0 => "11101101000010000000000000111000", -- r1 = 7
+ 1 => "11101101000100000000000000101000", -- r2 = 5
+ 2 => "11101101000110000000000000100000", -- r3 = 4
3 => "11100000001000010001100000000000", -- r4 = r2 + r3
4 => "11100010001010100000100000000000", -- r5 = r4 and r1
others => x"F0000000");