diff options
| author | Jack Koenig | 2020-08-15 10:16:28 -0700 |
|---|---|---|
| committer | GitHub | 2020-08-15 10:16:28 -0700 |
| commit | f1c314e6c7e116df33ffc215ec907212037292dc (patch) | |
| tree | f06060e9fb52f4f5b30bc56db78acb6bd371642d /src/test/scala/firrtlTests/InferReadWriteSpec.scala | |
| parent | 2e5f942d25d7afab79ee1263c5d6833cad9d743d (diff) | |
| parent | 9adbe1ede59f9aeb25e71fd8318a4e7e46c4cc34 (diff) | |
Merge pull request #1852 from freechipsproject/format-src-4
Apply Scalafmt Rewriting
Diffstat (limited to 'src/test/scala/firrtlTests/InferReadWriteSpec.scala')
| -rw-r--r-- | src/test/scala/firrtlTests/InferReadWriteSpec.scala | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/test/scala/firrtlTests/InferReadWriteSpec.scala b/src/test/scala/firrtlTests/InferReadWriteSpec.scala index e8be70ad..81f2df33 100644 --- a/src/test/scala/firrtlTests/InferReadWriteSpec.scala +++ b/src/test/scala/firrtlTests/InferReadWriteSpec.scala @@ -10,8 +10,7 @@ import firrtl.testutils._ import firrtl.testutils.FirrtlCheckers._ class InferReadWriteSpec extends SimpleTransformSpec { - class InferReadWriteCheckException extends PassException( - "Readwrite ports are not found!") + class InferReadWriteCheckException extends PassException("Readwrite ports are not found!") object InferReadWriteCheck extends Pass { override def prerequisites = Forms.MidForm @@ -23,18 +22,18 @@ class InferReadWriteSpec extends SimpleTransformSpec { case s: DefMemory if s.readLatency > 0 && s.readwriters.size == 1 => s.name == "mem" && s.readwriters.head == "rw" case s: Block => - s.stmts exists findReadWrite + s.stmts.exists(findReadWrite) case _ => false } - def run (c: Circuit) = { + def run(c: Circuit) = { val errors = new Errors - val foundReadWrite = c.modules exists { - case m: Module => findReadWrite(m.body) + val foundReadWrite = c.modules.exists { + case m: Module => findReadWrite(m.body) case m: ExtModule => false } if (!foundReadWrite) { - errors append new InferReadWriteCheckException + errors.append(new InferReadWriteCheckException) errors.trigger } c @@ -176,6 +175,6 @@ circuit sram6t : val annos = Seq(memlib.InferReadWriteAnnotation) val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, annos)) // Check correctness of firrtl - res should containLine (s"mem.rw.wmode <= wen") + res should containLine(s"mem.rw.wmode <= wen") } } |
