soft reset small bugfix, interrupt test file added
[calu.git] / cpu / src / fetch_stage_b.vhd
index c975af29702992b673c6c8fce467f19ba2ceeb20..f86ad833a154e049e2d32fa3d79c5b5ef8c69f87 100644 (file)
@@ -68,11 +68,6 @@ variable instr_pc  : instruction_addr_t;
 begin
        rom_ram_nxt <= rom_ram;
        
---     if (s_reset = RESET_VALUE) then
---             rom_ram_nxt <= RAM_USE;
---             instr_r_addr_nxt <= (others => '0');
---     end if;
-       
        case rom_ram is
                when ROM_USE =>
                        instruction <= instr_rd_data_rom;
@@ -115,6 +110,11 @@ begin
                when others => null;
        end case;
 
+       if (s_reset = RESET_VALUE) then
+               rom_ram_nxt <= RAM_USE;
+               instr_r_addr_nxt <= (others => '0');
+       end if; 
+
 end process;
 
 out_logic : process (instr_r_addr, alu_jump_bit, int_req, jump_result)