X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=calu.git;a=blobdiff_plain;f=cpu%2Fsrc%2Ffetch_stage_b.vhd;h=f01bad8f68c4b3b9f3fc2b1700f6e56c0c7812d4;hp=fb0e7fdb1bb24e235fbc4539b2c42323b524af36;hb=5a4ac62bf9b6861c8098e4fb9d28e19016766d04;hpb=aa7a28ef7bdf519275eb9fac26016c9a814b772a diff --git a/cpu/src/fetch_stage_b.vhd b/cpu/src/fetch_stage_b.vhd index fb0e7fd..f01bad8 100644 --- a/cpu/src/fetch_stage_b.vhd +++ b/cpu/src/fetch_stage_b.vhd @@ -52,22 +52,27 @@ begin if (reset = RESET_VALUE) then instr_r_addr <= (others => '0'); - rom_ram <= ROM_USE; + rom_ram <= ROM_USE; led2 <= '0'; elsif rising_edge(clk) then instr_r_addr <= instr_r_addr_nxt; rom_ram <= rom_ram_nxt; - led2 <= rom_ram_nxt; + led2 <= rom_ram; --rom_ram_nxt; end if; end process; -asyn: process(reset, instr_r_addr, jump_result, prediction_result, branch_prediction_bit, alu_jump_bit, instr_rd_data, rom_ram, instr_rd_data_rom, int_req) +asyn: process(reset, s_reset, instr_r_addr, jump_result, prediction_result, branch_prediction_bit, alu_jump_bit, instr_rd_data, rom_ram, instr_rd_data_rom, int_req) 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;