aboutsummaryrefslogtreecommitdiffstats
path: root/picorv32.v
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-09-06 19:58:03 +0200
committerClifford Wolf <clifford@clifford.at>2016-09-06 19:58:03 +0200
commitda3749819197875c10eeec54551401ac19090902 (patch)
treef30bd5ac6ea12c9aff10211743506a11a5025c09 /picorv32.v
parent7f946d0f843f03fc1a0384465245b6164f27f18c (diff)
downloadpicorv32-da3749819197875c10eeec54551401ac19090902.tar.gz
picorv32-da3749819197875c10eeec54551401ac19090902.zip
Two minor bugfixes
Diffstat (limited to 'picorv32.v')
-rw-r--r--picorv32.v4
1 files changed, 2 insertions, 2 deletions
diff --git a/picorv32.v b/picorv32.v
index cb7b84f..a980e38 100644
--- a/picorv32.v
+++ b/picorv32.v
@@ -1494,7 +1494,7 @@ module picorv32 #(
timer <= cpuregs_rs1;
cpu_state <= cpu_state_fetch;
end
- is_lb_lh_lw_lbu_lhu: begin
+ is_lb_lh_lw_lbu_lhu && !instr_trap: begin
`debug($display("LD_RS1: %2d 0x%08x", decoded_rs1, cpuregs_rs1);)
reg_op1 <= cpuregs_rs1;
cpu_state <= cpu_state_ldmem;
@@ -1525,7 +1525,7 @@ module picorv32 #(
reg_op2 <= cpuregs_rs2;
(* parallel_case *)
case (1'b1)
- is_sb_sh_sw: begin
+ is_sb_sh_sw && !instr_trap: begin
cpu_state <= cpu_state_stmem;
mem_do_rinst <= 1;
end