Files
chipyard/tapeout/src/main/scala/transforms/.clkgen/ClkSrcTransform.scala
Adam Izraelevitz 96939c9ab6 Moved clkgen -> .clkgen and pads -> .pads
They no longer compile with the latest Chisel/FIRRTL, and
may not be supported. However, future work will need them, so
this keeps the files around but are ignored by sbt.
2017-09-06 14:44:09 -07:00

35 lines
1.0 KiB
Scala

// See LICENSE for license details.
package barstools.tapeout.transforms.clkgen
import firrtl._
import firrtl.passes._
import scala.collection.mutable
class ClkSrcTransform extends Transform with SeqTransformBased {
override def inputForm: CircuitForm = LowForm
override def outputForm: CircuitForm = LowForm
val transformList = new mutable.ArrayBuffer[Transform]
def transforms = transformList
override def execute(state: CircuitState): CircuitState = {
val collectedAnnos = HasClkAnnotation(getMyAnnotations(state))
collectedAnnos match {
// Transform not used
case None => CircuitState(state.circuit, LowForm)
case Some((clkModAnnos, clkPortAnnos)) =>
val targetDir = barstools.tapeout.transforms.GetTargetDir(state)
transformList ++= Seq(
// InferTypes,
new CreateClkConstraints(clkModAnnos, clkPortAnnos, targetDir)
)
val ret = runTransforms(state)
CircuitState(ret.circuit, outputForm, ret.annotations, ret.renames)
}
}
}