Skip to content

Module 2.5 - DspBlock - not found: type PeekPokeTester #163

@StephenTaylor1998

Description

@StephenTaylor1998

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions