提交 ca8e0a6d 编写于 作者: L linjiawei

Add SimMMIO test

上级 0ccdef88
package device
import chipsalliance.rocketchip.config._
import chisel3._
import chiseltest._
import freechips.rocketchip.amba.axi4.{AXI4Deinterleaver, AXI4UserYanker, AXI4Xbar}
import org.scalatest.{FlatSpec, Matchers}
import freechips.rocketchip.tilelink._
import freechips.rocketchip.diplomacy._
import top.SimMMIO
import utils.DebugIdentityNode
class SimMMIOTestTop()(implicit p: Parameters) extends LazyModule {
val addressSet = AddressSet(0x40600000L, 0xf)
val fuzz = LazyModule(new TLFuzzer(nOperations = 10, inFlight = 1, overrideAddress = Some(addressSet)))
val simMMIO = LazyModule(new SimMMIO())
simMMIO.axiBus :=
AXI4UserYanker() :=
TLToAXI4() :=
DebugIdentityNode() :=
fuzz.node
lazy val module = new LazyModuleImp(this){
val finished = IO(Output(Bool()))
finished := fuzz.module.io.finished
}
}
class SimMMIOTest extends FlatSpec with ChiselScalatestTester with Matchers {
it should "run" in {
implicit val p = Parameters.empty
test(LazyModule(new SimMMIOTestTop()).module){c =>
while (!c.finished.peek().litToBoolean){
c.clock.step(1)
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册