首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将Chisel测试移植到sbt时出错

将Chisel测试移植到sbt时出错
EN

Stack Overflow用户
提问于 2021-05-24 10:03:12
回答 1查看 183关注 0票数 1

我有一个可以工作的窥探式测试仪,在jupyter笔记本上测试过。我正在将它移植到sbt,我已经尝试了两本书和一本我的教授的语法,但到目前为止都没有成功。

项目目录结构基于模板- https://github.com/freechipsproject/chisel-template

我需要移植到sbt的工作基础测试器是-

代码语言:javascript
复制
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)

我已经试过的是-

代码语言:javascript
复制
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) 
    }
}

我也试过了-

代码语言:javascript
复制
//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)
    }
}

我也试过了-

代码语言:javascript
复制
import Chisel._

class test_sync_fifo (c: sync_fifo(64, 32))
extends Tester(c) {
    // Peeks and pokes
}

任何指针都会非常有帮助。谢谢

EN

回答 1

Stack Overflow用户

发布于 2021-05-26 00:22:20

查看完整的SBT文件会很有帮助,但我敢肯定您缺少对iotesters的依赖。假设您使用的是chisel3版本3.4.x或更高版本,您应该在build.sbt中添加以下内容

代码语言:javascript
复制
libraryDependencies += "edu.berkeley.cs" %% "chisel-iotesters" % "1.5.3"

有关不同项目的哪些版本协同工作的信息,请参阅此文档页面:https://www.chisel-lang.org/chisel3/docs/appendix/versioning.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67665902

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档