From 6fc742bfaf5ee508a34189400a1a7dbffe3f1cac Mon Sep 17 00:00:00 2001 From: chick Date: Fri, 14 Aug 2020 19:47:53 -0700 Subject: All of src/ formatted with scalafmt --- .../firrtlTests/execution/ExecutionTestHelper.scala | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/test/scala/firrtlTests/execution/ExecutionTestHelper.scala') diff --git a/src/test/scala/firrtlTests/execution/ExecutionTestHelper.scala b/src/test/scala/firrtlTests/execution/ExecutionTestHelper.scala index 7d250664..0a50e53e 100644 --- a/src/test/scala/firrtlTests/execution/ExecutionTestHelper.scala +++ b/src/test/scala/firrtlTests/execution/ExecutionTestHelper.scala @@ -31,18 +31,18 @@ object ExecutionTestHelper { // Generate test step counter, create ExecutionTestHelper that represents initial test state val cnt = DefRegister(NoInfo, DUTRules.counter.name, counterType, DUTRules.clock, DUTRules.reset, Utils.zero) - val inc = Connect(NoInfo, DUTRules.counter, DoPrim(PrimOps.Add, Seq(DUTRules.counter, UIntLiteral(1)), Nil, UnknownType)) + val inc = + Connect(NoInfo, DUTRules.counter, DoPrim(PrimOps.Add, Seq(DUTRules.counter, UIntLiteral(1)), Nil, UnknownType)) ExecutionTestHelper(c, Seq(cnt, inc), Map.empty[Expression, Expression], Nil, Nil) } } case class ExecutionTestHelper( - dut: Circuit, - setup: Seq[Statement], - pokeRegs: Map[Expression, Expression], + dut: Circuit, + setup: Seq[Statement], + pokeRegs: Map[Expression, Expression], completedSteps: Seq[Conditionally], - activeStep: Seq[Statement] -) { + activeStep: Seq[Statement]) { def step(n: Int): ExecutionTestHelper = { require(n > 0, "Step length must be positive") @@ -52,9 +52,7 @@ case class ExecutionTestHelper( def poke(expString: String, value: Literal): ExecutionTestHelper = { val pokeExp = ParseExpression(expString) val pokeable = ensurePokeable(pokeExp) - pokeable.addStatements( - Connect(NoInfo, pokeExp, value), - Connect(NoInfo, pokeable.pokeRegs(pokeExp), value)) + pokeable.addStatements(Connect(NoInfo, pokeExp, value), Connect(NoInfo, pokeable.pokeRegs(pokeExp), value)) } def invalidate(expString: String): ExecutionTestHelper = { @@ -85,7 +83,7 @@ case class ExecutionTestHelper( } private def top: Module = { - dut.modules.collectFirst({ case m: Module if m.name == dut.main => m }).get + dut.modules.collectFirst({ case m: Module if m.name == dut.main => m }).get } private[execution] def emit: Circuit = { -- cgit v1.2.3