ucb-bar / dsptools

A Library of Chisel3 Tools for Digital Signal Processing
Apache License 2.0
226 stars 38 forks source link

Ignore tests that put literals in Bundle types #236

Closed jackkoenig closed 3 years ago

jackkoenig commented 3 years ago

This was never intended to be supported in Chisel3 and is more explicitly banned in Chisel v3.5.0-RC1. These tests can become compliant with the stricter API by using Bundle literals rather than Bundles with literals for fields.

The check these are failing was introduced in https://github.com/chipsalliance/chisel3/pull/2046.

I think these tests should be fixed but I don't want to block the release candidate on them.

Annoyingly, these are really hard to debug because the stack trace trimming is hiding everything which is a separate issue that we should address, here's a useful diff to apply to help when debugging this:

diff --git a/src/main/scala/dsptools/Driver.scala b/src/main/scala/dsptools/Driver.scala
index e776362..4ae6da2 100644
--- a/src/main/scala/dsptools/Driver.scala
+++ b/src/main/scala/dsptools/Driver.scala
@@ -31,6 +31,9 @@ object Driver {
       optionsManager.treadleOptions = optionsManager.treadleOptions.copy(
         blackBoxFactories = optionsManager.treadleOptions.blackBoxFactories :+ new TreadleDspRealFactory
       )
+      optionsManager.chiselOptions = optionsManager.chiselOptions.copy(
+        printFullStackTrace = true
+      )
       iotesters.Driver.execute(dutGenerator, optionsManager)(testerGen)
     }
jackkoenig commented 3 years ago

I believe the error stems from Bundles like this one https://github.com/ucb-bar/dsptools/blob/b727fcdf6f8b204cb5bbbb8c005e97a0f71d54f0/src/test/scala/dsptools/VerboseDspTesterSpec/SimpleTBwGenTypeOption.scala#L158 that need to be turned into Bundle lits