diff options
| author | Jack Koenig | 2021-01-19 16:47:26 -0800 |
|---|---|---|
| committer | GitHub | 2021-01-19 16:47:26 -0800 |
| commit | 6d8e9041e000f9ea5fb3d069d1f9ec06d2158575 (patch) | |
| tree | ce90469dbd95ba9f833aba93baa98752a16c0711 /src | |
| parent | 0748d0458c30a5d58198080aca36b43c09184841 (diff) | |
Restore scalafmt CI check (#2047)
Fix scalafmtCheckAll failures that snuck through
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/firrtl/backends/experimental/smt/FirrtlToTransitionSystem.scala | 12 | ||||
| -rw-r--r-- | src/test/scala/firrtl/backends/experimental/smt/FirrtlToTransitionSystemPassSpec.scala | 23 |
2 files changed, 23 insertions, 12 deletions
diff --git a/src/main/scala/firrtl/backends/experimental/smt/FirrtlToTransitionSystem.scala b/src/main/scala/firrtl/backends/experimental/smt/FirrtlToTransitionSystem.scala index 9c309917..c1857667 100644 --- a/src/main/scala/firrtl/backends/experimental/smt/FirrtlToTransitionSystem.scala +++ b/src/main/scala/firrtl/backends/experimental/smt/FirrtlToTransitionSystem.scala @@ -11,7 +11,17 @@ import firrtl.passes.PassException import firrtl.stage.Forms import firrtl.stage.TransformManager.TransformDependency import firrtl.transforms.{DeadCodeElimination, PropagatePresetAnnotations} -import firrtl.{CircuitState, DependencyAPIMigration, MemoryArrayInit, MemoryInitValue, MemoryScalarInit, Namespace, Transform, Utils, ir} +import firrtl.{ + ir, + CircuitState, + DependencyAPIMigration, + MemoryArrayInit, + MemoryInitValue, + MemoryScalarInit, + Namespace, + Transform, + Utils +} import logger.LazyLogging import scala.collection.mutable diff --git a/src/test/scala/firrtl/backends/experimental/smt/FirrtlToTransitionSystemPassSpec.scala b/src/test/scala/firrtl/backends/experimental/smt/FirrtlToTransitionSystemPassSpec.scala index 7dc5298c..e9254d7f 100644 --- a/src/test/scala/firrtl/backends/experimental/smt/FirrtlToTransitionSystemPassSpec.scala +++ b/src/test/scala/firrtl/backends/experimental/smt/FirrtlToTransitionSystemPassSpec.scala @@ -6,8 +6,9 @@ import firrtl.annotations.{CircuitTarget, PresetAnnotation} import firrtl.options.Dependency import firrtl.testutils.LeanTransformSpec -class FirrtlToTransitionSystemPassSpec extends LeanTransformSpec(Seq(Dependency(firrtl.backends.experimental.smt.FirrtlToTransitionSystem))) { - behavior of "FirrtlToTransitionSystem" +class FirrtlToTransitionSystemPassSpec + extends LeanTransformSpec(Seq(Dependency(firrtl.backends.experimental.smt.FirrtlToTransitionSystem))) { + behavior.of("FirrtlToTransitionSystem") it should "support preset wires" in { // In order to give registers an initial wire, we use preset annotated resets. @@ -16,18 +17,18 @@ class FirrtlToTransitionSystemPassSpec extends LeanTransformSpec(Seq(Dependency( // In Chisel this generates a node which needs to be removed. val src = """circuit ModuleAB : - | module ModuleAB : - | input clock : Clock - | node _T = asAsyncReset(UInt<1>("h0")) - | node preset = _T - | reg REG : UInt<1>, clock with : - | reset => (preset, UInt<1>("h0")) - | assert(clock, UInt(1), not(REG), "REG == 0") - |""".stripMargin + | module ModuleAB : + | input clock : Clock + | node _T = asAsyncReset(UInt<1>("h0")) + | node preset = _T + | reg REG : UInt<1>, clock with : + | reset => (preset, UInt<1>("h0")) + | assert(clock, UInt(1), not(REG), "REG == 0") + |""".stripMargin val anno = PresetAnnotation(CircuitTarget("ModuleAB").module("ModuleAB").ref("preset")) val result = compile(src, List(anno)) - val sys = result.annotations.collectFirst{ case TransitionSystemAnnotation(sys) => sys }.get + val sys = result.annotations.collectFirst { case TransitionSystemAnnotation(sys) => sys }.get assert(sys.states.head.init.isDefined) } } |
