v3.6.0-M2 and BoringUtils and LLVM CIRCT

34 views
Skip to first unread message

Øyvind Harboe

unread,
Jan 19, 2023, 6:24:22 AM1/19/23
to chisel-users
Is BoringUtils supported yet?

Do I need to do anything to use LLVM CIRCT to generate verilog, or is it default?

Schuyler Eldridge

unread,
Jan 19, 2023, 1:00:16 PM1/19/23
to chisel...@googlegroups.com
PR is almost merged to CIRCT. It will be on by default.

PR link: https://github.com/llvm/circt/pull/4496

> On Jan 19, 2023, at 06:24, Øyvind Harboe <oyvind...@gmail.com> wrote:
>
> Is BoringUtils supported yet?
>
> Do I need to do anything to use LLVM CIRCT to generate verilog, or is it default?
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/27ee2667-abb2-409a-a591-77b0a74fe3d5n%40googlegroups.com.

Øyvind Harboe

unread,
Jan 19, 2023, 1:20:14 PM1/19/23
to chisel-users
Nice!

Will I still have to download LLVM CIRCT binaries and put them in the path?

I don't expect Chisel to be compatible with all future version of the rapidly developing LLVM CIRCT, so the version of LLVM CIRCT has to be locked by the Chisel version, no?

Does sbt (Maven?) support distributing binaries such as LLVM CIRCT?

Schuyler Eldridge

unread,
Jan 19, 2023, 1:24:24 PM1/19/23
to chisel...@googlegroups.com
Initially, yes, you will need to download a binary version of CIRCT and have it in your path. We need to add checking that the CIRCT version is compatible and tell you to update if it's not.

Java publishing does let you package up native binaries. We haven't investigate this. This is intended to be the eventual solution, though.

There are complications here as we don't want to Chisel itself to a version of CIRCT (which moves much faster). Hence, we are expected to introduce a Chisel--CIRCT compiler bridge package that is the thing that includes the native CIRCT binary.
> To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/062b14d2-292d-49ab-b798-852f982b5ce4n%40googlegroups.com.

Øyvind Harboe

unread,
Jan 19, 2023, 1:33:24 PM1/19/23
to chisel...@googlegroups.com
ETA, purely for planning purposes for this?

You received this message because you are subscribed to a topic in the Google Groups "chisel-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/chisel-users/pINdi8oroFA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chisel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/1F5C143C-F271-4341-9FA6-B6387E357067%40gmail.com.

Schuyler Eldridge

unread,
Jan 19, 2023, 1:35:07 PM1/19/23
to chisel...@googlegroups.com
Boring Util support should be in CIRCT this week or next. Chisel will then support it.

The packaging and publishing is not scheduled right now.
> To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/CACELUGeW%2BaOSHztuuDiSq-Qfb7ZZvcaY-arNwh3g0Dm2x9gPuA%40mail.gmail.com.

Øyvind Harboe

unread,
Jan 19, 2023, 1:39:21 PM1/19/23
to chisel...@googlegroups.com
Thanks!

When is the next prerelease (M3?) scheduled?

Jack Koenig

unread,
Jan 25, 2023, 2:52:03 PM1/25/23
to chisel...@googlegroups.com
There is no M3 scheduled, rather, I expect the next release will be Chisel 3.6.0-RC1. My intent would be by the end of next week, hopefully earlier.

Note that this Chisel release is decoupled from the firtool release so once the version of firtool that supports BoringUitls is released (probably 1.29.0), then Chisel 3.6.0-M2 + that version of firtool will support BoringUtils.

Øyvind Harboe

unread,
Feb 13, 2023, 8:39:11 AM2/13/23
to chisel-users
So, near as I can tell support for BoringUtils is now in: https://github.com/llvm/circt/releases/tag/firtool-1.30.0

Øyvind Harboe

unread,
Feb 13, 2023, 9:17:36 AM2/13/23
to chisel-users
Some errors with CIRCT 1.30.0:

[error] <stdin>:2:1: error: Unable to apply annotation: {class = "chisel3.util.experimental.ForceNameAnnotation", name = "foo", target = "~bar"}

I'm still getting some of these errors:

[error] <stdin>:2:1: error: Unable to apply annotation: {class = "firrtl.passes.wiring.SourceAnnotation", pin = "foo", target = "bar"}
val foo = WireInit(chiselTypeOf(bui.io.bar), DontCare)
BoringUtils.bore(xxx, Seq(yyy))

Schuyler Eldridge

unread,
Feb 13, 2023, 11:38:48 AM2/13/23
to chisel...@googlegroups.com
> On Feb 13, 2023, at 09:17, Øyvind Harboe <oyvind...@gmail.com> wrote:
>
> Some errors with CIRCT 1.30.0:
>
> [error] <stdin>:2:1: error: Unable to apply annotation: {class = "chisel3.util.experimental.ForceNameAnnotation", name = "foo", target = "~bar"}
>
> I'm still getting some of these errors:
>
> [error] <stdin>:2:1: error: Unable to apply annotation: {class = "firrtl.passes.wiring.SourceAnnotation", pin = "foo", target = "bar"}
> val foo = WireInit(chiselTypeOf(bui.io.bar), DontCare)
> BoringUtils.bore(xxx, Seq(yyy))

Yes, support is on for BoringUtils in CIRCT 1.30.0 and is now being tested as part of Chisel CI since: https://github.com/chipsalliance/chisel3/commit/f1ac9c8019f3e83c663d35426cea47a8194dd894

The forceName API is not supported on components (ports, wires, etc.). This is only supported on the narrow use case of instances. E.g., this is an escape hatch to prevent an instance name from being prefixed during inlining. Is the first error coming from a usage of the forceName API on components? Can you provide more details on what you're doing here?

For the second, that seems weird, though there are a number of situations that are rejected for wiring (invalid annotation target, etc.). Are there any more errors being printed that are not shown in the message?

Øyvind Harboe

unread,
Feb 13, 2023, 11:41:09 AM2/13/23
to chisel...@googlegroups.com
There are more of the same two error messages, not a third type.

--
You received this message because you are subscribed to a topic in the Google Groups "chisel-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/chisel-users/pINdi8oroFA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chisel-users...@googlegroups.com.

Schuyler Eldridge

unread,
Feb 13, 2023, 11:57:21 AM2/13/23
to chisel...@googlegroups.com
That's odd. I would expect to see one of the following other errors:

1. "Cannot resolve a unique instance path from the external module target"
2. "Annotation has invalid target"
3. "Annotation targets non-wipeable operation"
4. "Annotation does not have an associated pin name"
5. "More than one <class> defined for pin"

Do you see any of this? It should directly precede the "Unable to apply" error.
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/CACELUGfa%2B%3D5G7aBpa5hZMt3cAjzUzhootxiwXTgpdv5zqs%3Dc1g%40mail.gmail.com.

Øyvind Harboe

unread,
Feb 13, 2023, 1:26:13 PM2/13/23
to chisel-users
Yes: you're quite right. I was a bit fast and loose there, answering from my phone.

Here is the complete list of errors I get. I have disabled forceName in Chisel for now:

[error] <stdin>:2:1: error: Annotation targets non-wireable operation: {class = "firrtl.passes.wiring.SourceAnnotation", pin = "foo", target = "bar"}
[error] circuit AptosNode :
[error] ^
[error] <stdin>:2:1: error: Unable to apply annotation: {class = "firrtl.passes.wiring.SourceAnnotation", pin = "foo", target = "bar"}
[error] circuit AptosNode :
[error] ^
[error] <stdin>:2:1: error: Annotation targets non-wireable operation: {class = "firrtl.passes.wiring.SourceAnnotation", pin = "foo", target = "bar"}
[error] circuit AptosNode :
[error] ^
[error] <stdin>:2:1: error: Unable to apply annotation: {class = "firrtl.passes.wiring.SourceAnnotation", pin = "foo", target = "bar"}
[error] circuit AptosNode :
[error] ^
[error] <stdin>:2:1: error: Annotation targets non-wireable operation: {class = "firrtl.passes.wiring.SourceAnnotation", pin = "foo", target = "bar"}
[error] circuit AptosNode :
[error] ^
[error] <stdin>:2:1: error: Unable to apply annotation: {class = "firrtl.passes.wiring.SourceAnnotation", pin = "foo", target = "bar"}
[error] circuit AptosNode :
[error] ^
[error] <stdin>:2:1: error: Annotation targets non-wireable operation: {class = "firrtl.passes.wiring.SourceAnnotation", pin = "foo", target = "bar"}
[error] circuit AptosNode :
[error] ^
[error] <stdin>:2:1: error: Unable to apply annotation: {class = "firrtl.passes.wiring.SourceAnnotation", pin = "foo", target = "bar"}
[error] circuit AptosNode :
[error] ^
[error] <stdin>:2:1: error: Unable to resolve source for pin: "foo"
[error] circuit AptosNode :
[error] ^
[error] Foo.scala:561:30: error: Wiring Problem source type '!firrtl.uint' does not match sink type '!firrtl.uint<64>'
[error] val xxx = WireInit(io.xxx.yyy)
[error] ^
[error] src/main/scala/ascenium/avalon/AptosSimulationTop.scala:113:30: note: The sink is here.
[error] val xxx = WireInit(UInt(64.W), DontCare)

Øyvind Harboe

unread,
Feb 13, 2023, 1:59:51 PM2/13/23
to chisel-users
So I think the problem has to do with width inference, but not exclusively.

Defining wires with uninferred width doesn't seem fix all the problems.

Not sure what's going exactly.

Reply all
Reply to author
Forward
0 new messages