util: dontTouchPortsExcept

This commit is contained in:
Henry Cook committed 2018-01-05 14:06:00 -08:00
1 parent 4853d1355f
commit b77b93b0b4
1 file changed
+5
+5
View File
@@ -35,6 +35,11 @@ trait DontTouch {
self.getModulePorts.foreach(dontTouch(_))
self
}
def dontTouchPortsExcept(f: Data => Boolean): this.type = {
self.getModulePorts.filterNot(f).foreach(dontTouch(_))
self
}
}
trait Clocked extends Bundle {