From 38291789bf102fea39065605b6694e33be513d0b Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sat, 20 Sep 2008 22:16:55 +0000 Subject: [PATCH] Minor changes to satisfy timing git-svn-id: http://moon:8086/svn/vhdl/trunk@18 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/CPUs/MIPS/src/core/mips_pipeline.vhd | 28 +++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/CPUs/MIPS/src/core/mips_pipeline.vhd b/lib/CPUs/MIPS/src/core/mips_pipeline.vhd index 2021c44..8ccd526 100644 --- a/lib/CPUs/MIPS/src/core/mips_pipeline.vhd +++ b/lib/CPUs/MIPS/src/core/mips_pipeline.vhd @@ -309,20 +309,22 @@ proc_stage_pc_next: branch_ce <= '0'; cop_ctrl.exc_left <= '0'; if rst = '1' then - pc.nxt <= RESET_VECTOR; - pc.last <= RESET_VECTOR; - elsif cop_stat.exc_commit = '1' then - pc.nxt <= cop_stat.exc_vec; - elsif sdu.ID_stall = '0' then - cop_ctrl.exc_left <= cop_stat.exc_exit; - branch_ce <= '1'; + pc.nxt <= pc.curr; pc.last <= pc.curr; - if ID_stage.ctrl.jump = '1' then - pc.nxt <= ID_stage.jimm32; - elsif ID_stage.ctrl.jump_long = '1' then - pc.nxt <= ID_stage.reg_a; - else - pc.nxt <= pc.curr + 4; + else + if cop_stat.exc_commit = '1' then + pc.nxt <= cop_stat.exc_vec; + elsif sdu.ID_stall = '0' then + cop_ctrl.exc_left <= cop_stat.exc_exit; + branch_ce <= '1'; + pc.last <= pc.curr; + if ID_stage.ctrl.jump = '1' then + pc.nxt <= ID_stage.jimm32; + elsif ID_stage.ctrl.jump_long = '1' then + pc.nxt <= ID_stage.reg_a; + else + pc.nxt <= pc.curr + 4; + end if; end if; end if; end if;