util: use chisel3.core.dontTouch
This commit is contained in:
parent
1b93b27da4
commit
0e0963d360
@ -4,21 +4,18 @@
|
|||||||
package freechips.rocketchip.util
|
package freechips.rocketchip.util
|
||||||
|
|
||||||
import Chisel._
|
import Chisel._
|
||||||
import chisel3.experimental.{ChiselAnnotation, RawModule}
|
import chisel3.experimental.RawModule
|
||||||
import freechips.rocketchip.config.Parameters
|
import freechips.rocketchip.config.Parameters
|
||||||
import scala.math._
|
import scala.math._
|
||||||
|
|
||||||
class ParameterizedBundle(implicit p: Parameters) extends Bundle
|
class ParameterizedBundle(implicit p: Parameters) extends Bundle
|
||||||
|
|
||||||
// TODO: replace this with an implicit class when @chisel unprotects dontTouchPorts
|
// TODO: replace this with an implicit class when @chisel unprotects dontTouchPorts
|
||||||
trait DontTouch {
|
trait DontTouch { self: RawModule =>
|
||||||
self: RawModule =>
|
|
||||||
|
|
||||||
def dontTouch(data: Data): Unit = data match {
|
def dontTouch(data: Data): Unit = data match {
|
||||||
case agg: Aggregate =>
|
case agg: Aggregate => agg.getElements.foreach(dontTouch)
|
||||||
agg.getElements.foreach(dontTouch)
|
case elt: Element => chisel3.core.dontTouch(elt)
|
||||||
case elt: Element =>
|
|
||||||
annotate(ChiselAnnotation(elt, classOf[firrtl.Transform], "DONTtouch!"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Marks every port as don't touch
|
/** Marks every port as don't touch
|
||||||
|
Loading…
Reference in New Issue
Block a user