-
Notifications
You must be signed in to change notification settings - Fork 304
Description
import dsptools.tester.MemMasterModel
import freechips.rocketchip.amba.axi4
abstract class FIRBlockTester[D, U, EO, EI, B <: Data](c: FIRBlock[D, U, EO, EI, B]) extends PeekPokeTester(c.module) with MemMasterModel {
// check that address 0 is the number of filters
require(memReadWord(0) == c.nFilters)
// write 1 to all the taps
for (i <- 0 until c.nFilters * c.nTaps) {
memWriteWord(8 + i * 8, 1)
}
}
// specialize the generic tester for axi4
class AXI4FIRBlockTester(c: AXI4FIRBlock with AXI4StandaloneBlock) extends FIRBlockTester(c) with AXI4MasterModel {
def memAXI = c.ioMem.get
}
// invoking testers on lazymodules is a little strange.
// note that the firblocktester takes a lazymodule, not a module (it calls .module in "extends PeekPokeTester()").
val lm = LazyModule(new AXI4FIRBlock(1, 8)(Parameters.empty) with AXI4StandaloneBlock)
chisel3.iotesters.Driver(() => lm.module) { _ => new AXI4FIRBlockTester(lm) }
here is the error:
cmd8.sc:5: not found: type PeekPokeTester
abstract class FIRBlockTester[D, U, EO, EI, B <: Data](c: FIRBlock[D, U, EO, EI, B]) extends PeekPokeTester(c.module) with MemMasterModel {
^cmd8.sc:22: type mismatch;
found : Helper.this.AXI4FIRBlockTester
required: chisel3.iotesters.PeekPokeTester[freechips.rocketchip.diplomacy.LazyModuleImp{val in: freechips.rocketchip.amba.axi4stream.AXI4StreamBundle; val out: freechips.rocketchip.amba.axi4stream.AXI4StreamBundle; val taps: chisel3.Vec[chisel3.Vec[chisel3.UInt]]; val mmap: Seq[freechips.rocketchip.regmapper.RegField]; val outs: scala.collection.immutable.IndexedSeq[chisel3.UInt]; val output: chisel3.UInt}]
val res8_5 = chisel3.iotesters.Driver(() => lm.module) { _ => new AXI4FIRBlockTester(lm) }
^cmd8.sc:5: no arguments allowed for nullary constructor Object: ()Object
abstract class FIRBlockTester[D, U, EO, EI, B <: Data](c: FIRBlock[D, U, EO, EI, B]) extends PeekPokeTester(c.module) with MemMasterModel {
^cmd8.sc:15: illegal inheritance; superclass FIRBlockTester
is not a subclass of the superclass PeekPokeTester
of the mixin trait AXI4MasterModel
class AXI4FIRBlockTester(c: AXI4FIRBlock with AXI4StandaloneBlock) extends FIRBlockTester(c) with AXI4MasterModel {
^Compilation Failed
thanks for any support