I have a testbench in chisel that uses the peekpoketester. I have a C++ library that I want to use in the testbench. Is there a way to do this in chisel/scala?
There are a series of flags that can be added in the Driver.execute
that let you control the command line used to compile the c++ simulator generation.
-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/
To see this list just add a temporary "--help", to the arguments passed to Driver.execute and these (and many other options will show up in your output)
These options or something similar also appear in ChiselTest the newer unit test framework for chisel