1
0
Fork 0

util: dontTouchPortsExcept

This commit is contained in:
Henry Cook 2017-10-02 19:34:51 -07:00
parent 4853d1355f
commit b77b93b0b4
1 changed files with 5 additions and 0 deletions

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 {