我有一个可以工作的窥探式测试仪,在jupyter笔记本上测试过。我正在将它移植到sbt,我已经尝试了两本书和一本我的教授的语法,但到目前为止都没有成功。
项目目录结构基于模板- https://github.com/freechipsproject/chisel-template
我需要移植到sbt的工作基础测试器是-
def test_sync_fifo: Boolean = {
test(new sync_fifo(64, 32)) { c =>
// .... Pokes and peeks
}
println(getVerilog(new sync_fifo(64, 32)))
true
}
assert(test_sync_fifo)我已经试过的是-
import chisel3 ._
import chisel3 . iotesters ._ // Gives error - iotesters not found
class TesterSimple (dut: sync_fifo(64, 32) ) extends
PeekPokeTester (dut) { // Gives error = PeekPokeTester not found
// .. Peeks and pokes
}
object TesterSimple extends App {
chisel3 . iotesters . Driver (() => new sync_fifo(64, 32)) { c =>
new TesterSimple (c)
}
}我也试过了-
//In build.sbt - I expect this to be wrong
lazy val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
libraryDependencies ++= scalatest
import org. scalatest ._
class SimpleSpec extends FlatSpec with Matchers {
" Test " should "pass" in {
chisel3 . iotesters . Driver (() => new sync_fifo(64, 32)) { c =>
new Tester (c)
} should be (true)
}
}我也试过了-
import Chisel._
class test_sync_fifo (c: sync_fifo(64, 32))
extends Tester(c) {
// Peeks and pokes
}任何指针都会非常有帮助。谢谢
发布于 2021-05-26 00:22:20
查看完整的SBT文件会很有帮助,但我敢肯定您缺少对iotesters的依赖。假设您使用的是chisel3版本3.4.x或更高版本,您应该在build.sbt中添加以下内容
libraryDependencies += "edu.berkeley.cs" %% "chisel-iotesters" % "1.5.3"有关不同项目的哪些版本协同工作的信息,请参阅此文档页面:https://www.chisel-lang.org/chisel3/docs/appendix/versioning.html
https://stackoverflow.com/questions/67665902
复制相似问题