Skip to content

Commit

Permalink
Workaround Chisel 3.4 naming bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkoenig committed Oct 14, 2020
1 parent 5c0c935 commit f05f772
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/scala/devices/debug/Periphery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package freechips.rocketchip.devices.debug

import chisel3._
import chisel3.experimental.IntParam
import chisel3.experimental.{IntParam, noPrefix}
import chisel3.util._
import chisel3.util.HasBlackBoxResource
import freechips.rocketchip.config.{Field, Parameters}
Expand Down Expand Up @@ -109,7 +109,8 @@ trait HasPeripheryDebugModuleImp extends LazyModuleImp {
resetctrl
}

val debug = outer.debugOpt.map { outerdebug =>
// noPrefix is workaround https://github.com/freechipsproject/chisel3/issues/1603
val debug = noPrefix(outer.debugOpt.map { outerdebug =>
val debug = IO(new DebugIO)

require(!(debug.clockeddmi.isDefined && debug.systemjtag.isDefined),
Expand Down Expand Up @@ -145,7 +146,7 @@ trait HasPeripheryDebugModuleImp extends LazyModuleImp {
outerdebug.module.io.ctrl.debugUnavail.foreach { _ := false.B }

debug
}
})

val dtm = debug.flatMap(_.systemjtag.map(instantiateJtagDTM(_)))

Expand Down

0 comments on commit f05f772

Please sign in to comment.