Firtool fails on chisel-circt-demo

Initial user. ‘sbt run’ within image Package images/circt · GitHub as well as a build from source fails with "Unknown command line argument ‘-infer-rw=0’ when run on this basic chisel example in chisel-circt-demo

firtool -h shows no such argument

Can you try bumping the dependency on chisel-CIRCT in that repo from 0.3.0 to 0.5.0? I haven’t bumped that demo project in a long time and I expect it’s just using an old version that has incorrect command line options for a newer firtool. The dependencies are specified here: chisel-circt-demo/Dependencies.scala at main · sifive/chisel-circt-demo · GitHub

I have very limited availability this week, but can fix this next week if you or somebody else doesn’t beat me to it.

Understood. I bumped the chisel-circt version to 0.5.0 and it still failed. But I randomly tried 0.6.0 and it succeeded.

Is this a good flow for compiling chisel examples to CIRCT?

I created and used the following Dockerfile:

FROM ghcr.io/circt/images/circt:nightly

# Java and SBT
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

RUN \
    apt-get update && apt install -yqq \
    default-jre apt-transport-https curl gnupg vim

RUN \
    echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list &&\
    echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list &&\
    curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import &&\
    chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg

RUN \
    apt-get update && apt-get install -y sbt

# docker build . -f Dockerfile.chisel-circt --tag chisel-circt
# docker run --rm -it -v `pwd`:/mnt chisel-circt

Hi @ganewto, I released 0.6.0 last night to work with the newest version of firtool, which meant fixing the command line options. I’m glad to hear that it fixed your problem. To avoid random breakages in the future, I think you will want to pin the version of CIRCT used, so I would consider not using the circt:nightly docker image. You could build CIRCT from a known commit in your image or try out the pre-release binaries. Also note that chisel-circt has moved its development into chisel3 repo and will stop receiving updates in the future.

I pushed updates to chisel-circt-demo to bump the dependencies on this so that it will work with newer CIRCT versions (at least the SiFive 1.15.0 release). This narrowly entailed just having it pointing at the newer chisel-circt 0.6.0 that @Pwyll released. Sorry for letting this get out of date!