From 13981379c4457ec754ff04d58cecbc4a313e5ed5 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Thu, 26 Oct 2017 23:39:56 -0700 Subject: [PATCH] CoreplexClockCrossing: add a helper method to decide if a clock is useul (#1074) --- src/main/scala/coreplex/CrossingWrapper.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/scala/coreplex/CrossingWrapper.scala b/src/main/scala/coreplex/CrossingWrapper.scala index 1b6f1a4d..ec638ebb 100644 --- a/src/main/scala/coreplex/CrossingWrapper.scala +++ b/src/main/scala/coreplex/CrossingWrapper.scala @@ -12,6 +12,12 @@ import freechips.rocketchip.util._ /** Enumerates the three types of clock crossing between tiles and system bus */ sealed trait CoreplexClockCrossing +{ + def sameClock = this match { + case _: SynchronousCrossing => true + case _ => false + } +} case class SynchronousCrossing(params: BufferParams = BufferParams.default) extends CoreplexClockCrossing case class RationalCrossing(direction: RationalDirection = FastToSlow) extends CoreplexClockCrossing case class AsynchronousCrossing(depth: Int, sync: Int = 3) extends CoreplexClockCrossing