Skip to content

Commit

Permalink
Merge pull request #486 from riscv-boom/fix-debug-mode
Browse files Browse the repository at this point in the history
[exu] Flush the ICache on a debug-mode JALR, to work around caching the uncacheable debug ram
  • Loading branch information
jerryz123 committed Aug 27, 2020
2 parents c04a406 + c1ba5e3 commit f69eac8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/exu/core.scala
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ class BoomCore(usingTrace: Boolean)(implicit p: Parameters) extends BoomModule
io.ifu.bp := csr.io.bp

io.ifu.flush_icache := (0 until coreWidth).map { i =>
rob.io.commit.arch_valids(i) && rob.io.commit.uops(i).is_fencei }.reduce(_||_)
(rob.io.commit.arch_valids(i) && rob.io.commit.uops(i).is_fencei) ||
(dec_uops(i).is_jalr && csr.io.status.debug)
}.reduce(_||_)

// TODO FIX THIS HACK
// The below code works because of two quirks with the flush mechanism
Expand Down

0 comments on commit f69eac8

Please sign in to comment.