diff options
| author | Henry Cook | 2015-11-04 09:21:07 -0800 |
|---|---|---|
| committer | Henry Cook | 2015-11-04 09:21:07 -0800 |
| commit | a3c9680d1e2b84693759747a4779341ba80c4a50 (patch) | |
| tree | e97ab1d8394b0463ec7f600fce7ba278bd68d93a /src/test/scala/chiselTests/ChiselSpec.scala | |
| parent | 23d15d166d2ed32f8bd9a153a806c09982659011 (diff) | |
Remove Parameters library and refactor Driver.
In addition to removing all the extraneous Driver invocations that created various top-level Parameters instances,
this commit also lays the groundwork for stanza-firrtl/verilator based testing of Modules that extend BasicTester.
The execution-based tests have been updated accordingly. They will only succeed if firrtl and verilator binaries have been installed.
Further work is needed on individual tests to use assertions instead of .io.error.
Diffstat (limited to 'src/test/scala/chiselTests/ChiselSpec.scala')
| -rw-r--r-- | src/test/scala/chiselTests/ChiselSpec.scala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/scala/chiselTests/ChiselSpec.scala b/src/test/scala/chiselTests/ChiselSpec.scala index 1fe77a0e..88aaf06c 100644 --- a/src/test/scala/chiselTests/ChiselSpec.scala +++ b/src/test/scala/chiselTests/ChiselSpec.scala @@ -10,8 +10,8 @@ import Chisel.testers._ /** Common utility functions for Chisel unit tests. */ trait ChiselRunners { - def execute(t: => BasicTester): Boolean = TesterDriver.execute(t) - def elaborate(t: => Module): Circuit = TesterDriver.elaborate(t) + def execute(t: => BasicTester): Boolean = TesterDriver.execute(() => t) + def elaborate(t: => Module): Circuit = Driver.elaborate(() => t) } /** Spec base class for BDD-style testers. */ @@ -19,11 +19,9 @@ class ChiselFlatSpec extends FlatSpec with ChiselRunners with Matchers /** Spec base class for property-based testers. */ class ChiselPropSpec extends PropSpec with ChiselRunners with PropertyChecks { - /** Returns the number of 1s in the binary representation of the input. */ - def popCount(n: Long): Int = n.toBinaryString.count(_ == '1') // Generator for small positive integers. - val smallPosInts = Gen.choose(1, 7) + val smallPosInts = Gen.choose(1, 4) // Generator for widths considered "safe". val safeUIntWidth = Gen.choose(1, 30) |
