Skip to content

Commit

Permalink
Merge pull request #1370 from freechipsproject/misc-fixes
Browse files Browse the repository at this point in the history
Fix regressions introduced by #1362
  • Loading branch information
solomatnikov committed Apr 23, 2018
2 parents 1a5559e + e84bddb commit 5d7a0e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/main/scala/rocket/CSR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ class CSRFile(perfEventSets: EventSets = new EventSets(Seq()))(implicit p: Param

when (insn_wfi && !io.singleStep && !reg_debug) { reg_wfi := true }
when (pending_interrupts.orR || exception || io.interrupts.debug) { reg_wfi := false }
assert(!RegNext(reg_wfi) || io.retire === UInt(0))

when (io.retire(0) || exception) { reg_singleStepped := true }
when (!io.singleStep) { reg_singleStepped := false }
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/rocket/PMP.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class PMPReg(implicit p: Parameters) extends CoreBundle()(p) {
val cfg = new PMPConfig
val addr = UInt(width = paddrBits - PMP.lgAlign)

def readAddr = {
val mask = 1 << (pmpGranularity.log2 - PMP.lgAlign)
def readAddr = if (pmpGranularity.log2 == PMP.lgAlign) addr else {
val mask = (BigInt(1) << (pmpGranularity.log2 - PMP.lgAlign - 1)).U
Mux(napot, addr | mask, ~(~addr | mask))
}
def napot = cfg.a(1)
Expand Down

0 comments on commit 5d7a0e7

Please sign in to comment.