schoeberl / chisel-book

Digital Design with Chisel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run test in a terminal

Z-KN opened this issue · comments

commented

In the section 5.2.1, you introduce peekpoketester and write that "When you run the test, you will see the results printed to the terminal...".
And I am exactly wondering how do you run the test in a terminal? With which command? When I run "sbt run", it tells me
[error] java.lang.RuntimeException: No main class detected.
[error] at scala.sys.package$.error(package.scala:30)
[error] stack trace is suppressed; run last Compile / bgRun for the full output
[error] (Compile / bgRun) No main class detected.

Firstly, do you have the most recent edition of the book? If not, consider downloading that as it provides a larger, more in-depth guide to testing with Chisel.

Secondly, consider switching from iotesters to chiseltest. If you do so, running all test classes may be done by running sbt test, or single tests as sbt testOnly <classname>.