如何将我的测试平台与 C++ 库集成到 chisel 中?

CV_*_*dha 2 scala chisel

我有一个使用 peekpoketester 的凿子测试台。我有一个要在测试平台中使用的 C++ 库。有没有办法在 chisel/scala 中做到这一点?

Chi*_*ley 5

可以在 中添加一系列标志,Driver.execute让您控制用于编译 C++ 模拟器生成的命令行。

  -ttc, --test-command <value>
                           Change the command run as the backend. Quote this if it contains spaces
  -tmvf, --more-vcs-flags <value>
                           Add specified commands to the VCS/Verilator command line
  -tmvf, --more-vcs-c-flags <value>
                           Add specified commands to the CFLAGS on the VCS/Verilator command line
  -tvce, --vcs-command-edits <value>
                           a file containing regex substitutions, one per line s/pattern/replacement/
  -tmif, --more-ivl-flags <value>
                           Add specified commands to the ivl command line
  -tmicf, --more-ivl-c-flags <value>
                           Add specified commands to the CFLAGS on the ivl command line
  -tice, --ivl-command-edits <value>
                           a file containing regex substitutions, one per line s/pattern/replacement/
  -tmvlf, --more-vlog-flags <value>
                           Add specified commands to the vlog command line
  -tmvsf, --more-vsim-flags <value>
                           Add specified commands to the vsim command line startup
  -tmvsd, --more-vsim-do-cmds <value>
                           Execute specified commands within vsim interpreter before simulation run
  -tmvscf, --more-vsim-c-flags <value>
                           Add specified commands to the g++ vpi compilation command line for use with vsim backend
  -tvsce, --vsim-command-edits <value>
                           a file containing regex substitutions, one per line s/pattern/replacement/
Run Code Online (Sandbox Code Playgroud)

要查看此列表,只需将临时“--help”添加到传递给 Driver.execute 的参数和这些(以及许多其他选项将显示在您的输出中)

这些选项或类似的东西也出现在ChiselTest较新的 chisel 单元测试框架中