Fix for firrtl issue 459, reworking annotation API
This commit is contained in:
@@ -31,6 +31,6 @@ class ConvertToExtMod(classify: (Module) => Boolean) extends Transform with Pass
|
||||
def passSeq = Seq(new ConvertToExtModPass(classify))
|
||||
|
||||
def execute(state: CircuitState): CircuitState = {
|
||||
CircuitState(runPasses(state.circuit), state.form)
|
||||
state.copy(circuit = runPasses(state.circuit))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,6 @@ class EnumerateModules(enumerate: (Module) => Unit) extends Transform with PassB
|
||||
def passSeq = Seq(new EnumerateModulesPass(enumerate))
|
||||
|
||||
def execute(state: CircuitState): CircuitState = {
|
||||
CircuitState(runPasses(state.circuit), state.form)
|
||||
state.copy(circuit = runPasses(state.circuit))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,6 @@ class ReParentCircuit(newTopName: String) extends Transform with PassBased {
|
||||
def passSeq = Seq(new ReParentCircuitPass(newTopName))
|
||||
|
||||
def execute(state: CircuitState): CircuitState = {
|
||||
CircuitState(runPasses(state.circuit), state.form)
|
||||
state.copy(circuit = runPasses(state.circuit))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,6 @@ class RemoveUnusedModules extends Transform with PassBased {
|
||||
def passSeq = Seq(new RemoveUnusedModulesPass)
|
||||
|
||||
def execute(state: CircuitState): CircuitState = {
|
||||
CircuitState(runPasses(state.circuit), state.form)
|
||||
state.copy(circuit = runPasses(state.circuit))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,6 @@ class RenameModulesAndInstances(rename: (String) => String) extends Transform wi
|
||||
def passSeq = Seq(new RenameModulesAndInstancesPass(rename))
|
||||
|
||||
def execute(state: CircuitState): CircuitState = {
|
||||
CircuitState(runPasses(state.circuit), state.form)
|
||||
state.copy(circuit = runPasses(state.circuit))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,9 +48,9 @@ class ResetInverterTransform extends Transform {
|
||||
|
||||
override def execute(state: CircuitState): CircuitState = {
|
||||
getMyAnnotations(state) match {
|
||||
case Nil => CircuitState(state.circuit, LowForm)
|
||||
case Nil => state
|
||||
case Seq(ResetInverterAnnotation(ModuleName(state.circuit.main, CircuitName(_)))) =>
|
||||
CircuitState(ResetN.run(state.circuit), LowForm)
|
||||
state.copy(circuit = ResetN.run(state.circuit))
|
||||
case annotations =>
|
||||
throw new Exception(s"There should be only one InvertReset annotation: got ${annotations.mkString(" -- ")}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user