1
0

CoreplexClockCrossing: add a helper method to decide if a clock is useul (#1074)

This commit is contained in:
Wesley W. Terpstra 2017-10-26 23:39:56 -07:00 committed by GitHub
parent 91d8a97f1a
commit 13981379c4

View File

@ -12,6 +12,12 @@ import freechips.rocketchip.util._
/** Enumerates the three types of clock crossing between tiles and system bus */ /** Enumerates the three types of clock crossing between tiles and system bus */
sealed trait CoreplexClockCrossing sealed trait CoreplexClockCrossing
{
def sameClock = this match {
case _: SynchronousCrossing => true
case _ => false
}
}
case class SynchronousCrossing(params: BufferParams = BufferParams.default) extends CoreplexClockCrossing case class SynchronousCrossing(params: BufferParams = BufferParams.default) extends CoreplexClockCrossing
case class RationalCrossing(direction: RationalDirection = FastToSlow) extends CoreplexClockCrossing case class RationalCrossing(direction: RationalDirection = FastToSlow) extends CoreplexClockCrossing
case class AsynchronousCrossing(depth: Int, sync: Int = 3) extends CoreplexClockCrossing case class AsynchronousCrossing(depth: Int, sync: Int = 3) extends CoreplexClockCrossing