You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following one file test case (put in src/test/scala and run sbt test fails with a verilator compile error.
package mult.imp {
import chisel3._
import chisel3.util._
class MultXfc (val N: Int) extends Module {
val io = IO(new Bundle {
val X = Input (UInt(N.W))
})
}
}
package mult.test {
import chisel3._
import chisel3.iotesters._
import org.scalatest.{Matchers,FlatSpec}
import mult.imp._
class MultTester[T <: MultXfc] (c : T ) extends PeekPokeTester(c)
class MultXfcWrapper( factory: (Int) => MultXfc,
N: Int) extends MultXfc (N) {
val m = Module (factory (N))
m.io.X := io.X
}
class MultTest (factory: (Int) => MultXfc, N:Int, backend : String = "firrtl")
extends FlatSpec with Matchers {
val optionsManager = new TesterOptionsManager {
testerOptions = testerOptions.copy(
backendName = backend
)
}
behavior of "multiplier"
it should "multiply correctly" in {
val dutFactory = () => new MultXfcWrapper(factory, N)
chisel3.iotesters.Driver.execute ( dutFactory, optionsManager) {
c => new MultTester(c)
} should be (true)
}
}
}
package mult.test {
import chisel3._
import mult.imp._
object M8Factory {
def multFactory = ((N: Int) => new MultXfc(8))
}
class M8Test extends MultTest (M8Factory.multFactory, 8, "verilator")
}
package db32mult.test {
import chisel3._
import mult.imp._
import mult.test._
object M32Factory {
def multFactory = ((N: Int) => new MultXfc(32))
}
class M32Test extends MultTest (M32Factory.multFactory, 32, "verilator")
}
It will work if you change the name of the final package to db32mul.test (strange, but probably the tests are run in the opposite order.)
It seems that the parameterized test harnesses do not get fully regenerated and the 32 bit tests tries to run using an 8 bit harness.
The text was updated successfully, but these errors were encountered:
The following one file test case (put in
src/test/scala
and runsbt test
fails with a verilator compile error.It will work if you change the name of the final package to
db32mul.test
(strange, but probably the tests are run in the opposite order.)It seems that the parameterized test harnesses do not get fully regenerated and the 32 bit tests tries to run using an 8 bit harness.
The text was updated successfully, but these errors were encountered: