Using development versions of Chisel and CIRCT

25 views
Skip to first unread message

Raffaele Meloni

unread,
Jul 22, 2024, 4:52:38 AM (5 days ago) Jul 22
to Chipyard
Hello everyone, I've forks of Chisel and CIRCT repositories where I implemented something to generated extra debug information to support Chisel in an open-source waveform viewer.
Now, I'd like to test my functionality on a big project such as chipyard. I wonder if it is possible to use local versions of Chisel and CIRCT in chipyard.
Then, I'd also need to generate a circuit by using an updated ChiselStage and call firtool using some custom CLI arguments.

Jerry Zhao

unread,
Jul 22, 2024, 12:48:38 PM (5 days ago) Jul 22
to chip...@googlegroups.com
For using a local Chisel, it should be sufficient to do a `publishLocal` of a SNAPSHOT version, then adjust the top-level `build.sbt` in Chipyard to request the SNAPSHOT version.

For using a local CIRCT, it may be sufficient to replace top-level `common.mk`'s `firtool` command with a path to wherever your custom local CIRCT is built.

-Jerry

--
You received this message because you are subscribed to the Google Groups "Chipyard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chipyard+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chipyard/731d2d1b-29c6-41e6-ab81-70cbfbdd44d6n%40googlegroups.com.

Raffaele Meloni

unread,
Jul 22, 2024, 4:21:01 PM (5 days ago) Jul 22
to Chipyard
I tried to replace the Chisel version in SBT https://github.com/ucb-bar/chipyard/blob/e017405fafd0d0b39faea7e120dd183b446a378a/build.sbt#L97 but it says
/home/raffaele/.m2/repository/org/chipsalliance/chisel_2.13/6.4.3-tywaves-SNAPSHOT/chisel_2.13-6.4.3-tywaves-SNAPSHOT.pom

However, it is in /home/raffaele/.ivy2/local/org.chipsalliance/chisel_2.13/6.4.3-tywaves-SNAPSHOT/

Do I need to change the resolver in build.sbt?

Raffaele Meloni

unread,
Jul 23, 2024, 4:12:50 AM (5 days ago) Jul 23
to Chipyard
Also, running with Chisel 6.2.0, 6.3.0, 6.4.0 and 6.5.0 (official releases) I encounter this error:

mkdir -p /home/raffaele/Documents/master-delft/thesis/_tywaves/results/chipyard/sims/verilator/generated-src/chipyard.harness.TestHarness.RocketConfig
(set -o pipefail &&     cd /home/raffaele/Documents/master-delft/thesis/_tywaves/results/chipyard && java -cp /home/raffaele/Documents/master-delft/thesis/_tywaves/results/chipyard/.classpath_cache/chipyard.jar chipyard.Generator  --target-dir /home/raffaele/Documents/master-delft/thesis/_tywaves/results/chipyard/sims/verilator/generated-src/chipyard.harness.TestHarness.RocketConfig --name chipyard.harness.TestHarness.RocketConfig --top-module chipyard.harness.TestHarness --legacy-configs chipyard:RocketConfig   | tee /home/raffaele/Documents/master-delft/thesis/_tywaves/results/chipyard/sims/verilator/generated-src/chipyard.harness.TestHarness.RocketConfig/chipyard.harness.TestHarness.RocketConfig.chisel.log)
Picked up JAVA_TOOL_OPTIONS: -Xmx8G -Xss8M -Djava.io.tmpdir=/home/raffaele/Documents/master-delft/thesis/_tywaves/results/chipyard/.java_tmp
------------------------------------------------------------------------------
Error: Duplicate long option "--log-class-names,--log-level,--class-log-level" (did your custom Transform or OptionsManager add this?)
Try --help for more information.
------------------------------------------------------------------------------
make: *** [/home/raffaele/Documents/master-delft/thesis/_tywaves/results/chipyard/common.mk:128: /home/raffaele/Documents/master-delft/thesis/_tywaves/results/chipyard/sims/verilator/generated-src/chipyard.harness.TestHarness.RocketConfig/chipyard.harness.TestHarness.RocketConfig.fir] Error 1

Jerry Zhao

unread,
Jul 23, 2024, 2:42:31 PM (4 days ago) Jul 23
to chip...@googlegroups.com
This needed a minor fix, see the fix here: 
https://github.com/ucb-bar/chipyard/pull/1927

-Jerry

Raffaele Meloni

unread,
Jul 23, 2024, 3:00:10 PM (4 days ago) Jul 23
to Chipyard
Thank you Jerry, now it works with chisel 6.x versions. I haven't seen that.
Unfortunately, it still doesn't work with my local version. It's forked from the development branch of Chisel.
I tried two cases:
1. Using the published locally chisel-plugin by I get an error [error]   not found: /home/raffaele/Documents/master-delft/thesis/_tywaves/results/chipyard/.ivy2/localorg.chipsalliance/chisel-plugin_2.13.10/6.4.3-tywaves-SNAPSHOT/ivys/ivy.xml
but it is published against 2.13.14
2. Using the official 6.4.0 chisel plugin: [error] (fixedpoint / Compile / compileIncremental) Compilation failed

I wanted to try Chisel 7.0.0-M2 but it doesn't work since there's a dependency with chiseltest 6.

Jerry Zhao

unread,
Jul 23, 2024, 3:58:29 PM (4 days ago) Jul 23
to chip...@googlegroups.com
I am less familiar with how publish/versioning of the chisel-plugin works. Perhaps the `scalaVersionFromChisel` in CY's build.sbt must match what your local Chisel and Chisel-plugin are published in? 

For the first case, it looks like something is trying to pull in a Scala 2.13.10 chisel-plugin? That seems odd to me, since CY uses Scala 2.13.12 for Chisel6 builds.

For the second case, I'd be curious what the exact compilation error is. I'm not aware of whether or not a local chisel can be used with the official plugin, but if it can, this error should be resolvable.

-Jerry

Reply all
Reply to author
Forward
0 new messages