Problems upgrading to v3.5.0-RC1

298 views
Skip to first unread message

Øyvind Harboe

unread,
Oct 17, 2021, 11:11:34 AM10/17/21
to chisel-users

These imports no longer work:

import chiseltest.experimental.TestOptionBuilder._
import chiseltest.internal.VerilatorBackendAnnotation
import chiseltest.legacy.backends.verilator.VerilatorFlags
import chiseltest.legacy.backends.verilator.VerilatorCFlags
import chiseltest.internal.WriteVcdAnnotation

Some of these imports have moved, easy enough:

import chiseltest.VerilatorBackendAnnotation
import chiseltest.WriteVcdAnnotation
import chiseltest.simulator.VerilatorFlags
import chiseltest.simulator.VerilatorCFlags


However, I can't find the new location of:

import chiseltest.experimental.TestOptionBuilder._



Øyvind Harboe

unread,
Oct 17, 2021, 12:46:07 PM10/17/21
to chisel-users
I was able to purge the usage of TestOptionBuilder from my code.

Then I have one warning:

type FlatSpec in package scalatest is deprecated (since 3.1.0): The org.scalatest.FlatSpec trait has been moved and renamed. Please use org.scalatest.flatspec.AnyFlatSpec instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x

Following the instructions in the link, all the warnings were removed automatically :-)

Hmmm... fails with this class not found when running chiseltest...


[error] (Test / testOnly) java.lang.NoClassDefFoundError: com/vladsch/flexmark/ast/Node

[error] java.lang.NoClassDefFoundError: com/vladsch/flexmark/ast/Node
[error]         at org.scalatest.tools.ReporterFactory.createHtmlReporter(ReporterFactory.scala:194)
[error]         at org.scalatest.tools.ReporterFactory.getReporterFromConfiguration(ReporterFactory.scala:245)
[error]         at org.scalatest.tools.ReporterFactory.$anonfun$createReportersFromConfigurations$1(ReporterFactory.scala:254)
[error]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:273)
[error]         at scala.collection.Iterator.foreach(Iterator.scala:943)
[error]         at scala.collection.Iterator.foreach$(Iterator.scala:943)
[error]         at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
[error]         at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error]         at scala.collection.IterableLike.foreach$(IterableLike.scala:73)


So, punt on that dependency, disable HTML reports to get tests to work...

//testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "reports/")

Got some funky errors when running tests in verilator, fixed by deleting "test_run_dir/".


So now I have something that compiles without warnings, runs basic tests.... Let's see how it fares on the build servers will full tests and P&R...

Kevin Laeufer

unread,
Oct 17, 2021, 3:51:39 PM10/17/21
to chisel...@googlegroups.com
I would recommend to always `import chiseltest._`. That way you have all
public APIs available to you. With the 0.5 release we made sure that all
stable mainstream APIs are available through that import.

`TestOptionBuilder` is gone. `withAnnotations` is now just available by
default.

The Verilator flags are part of the `chiseltest.simulator` package since
they are a somewhat more advanced API that isn't as well tested. Please
let us know if you encounter any problems with them.

Thanks for the updates!

Kevin
> --
> You received this message because you are subscribed to the Google
> Groups "chisel-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to chisel-users...@googlegroups.com
> <mailto:chisel-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/chisel-users/ed702287-da25-4b6e-b019-710774eeb2dfn%40googlegroups.com
> <https://groups.google.com/d/msgid/chisel-users/ed702287-da25-4b6e-b019-710774eeb2dfn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Øyvind Harboe

unread,
Oct 17, 2021, 9:14:40 PM10/17/21
to chisel-users
All tests are passing, including P&R and running on the FPGA.

The only other thing I had to do was to fix reset in Chisel tests in a few places as randomized verilator noise caused some false positives. Those were real bugs in my Chisel tests, they just hadn't materialized yet.

Reply all
Reply to author
Forward
0 new messages