FIRParser 'Probe' (original) (raw)
January 15, 2024, 12:47pm 1
Greetings!
I have a question concerning FIRRTL specification version 3.2.0. On page 13 there is a construct that FIRRTL Parser does not consider valid:output _a: Probe<UInt<1>, Bar>
.
When trying to parse the parser gives the following mistake:
error: expected '>' in reference type
Maybe there is some typo?
This was a bit forward looking spec change that wasn’t implemented fully in CIRCT.
firtool-1.63.0+
should support this. (There is an open PR to start parsing this here: https://github.com/llvm/circt/pull/6552 with a number of stacked changes to compile this.)
Ivan95 January 15, 2024, 3:48pm 3
Thank you for your reply.
Ok, I see. Then I have a question: what FIRRTL version is currently fully supported by CIRCT?
CIRCT tries to support almost everything from FIRRTL 0.2.0 through the unreleased 4.0.0. Some very old things may not work.
CIRCT’s FIRRTL parser uses the version string at the top of the file to feature-gate new features (or reject removed features). Usually this will allow older, removed things to be parsed (e.g., partial connect / <-
). Old features do not typically result in these older features being represented in FIRRTL Dialect. (That partial connect example will result in the partial connect being converted to a normal connect.) This also means that CIRCT cannot emit old FIRRTL.
Currently, if no version is specified, the parser assumes it is FIRRTL 1.0.0.
Ivan95 January 15, 2024, 4:28pm 5
Yes, I know that. I understand that CIRCT is continuously developing along with FIRRTL specification. My question was: is there some ‘milestones’ in CIRCT which fully support some version of FIRRTL specification? If so, what is the latest FIRRTL specification that is supported?
You bring up a good point. We usually don’t track it that way. This isn’t great, though!
A later version of CIRCT will support layer-associated probes fully. This is slightly complicated as the FIRRTL spec needs updates to have this feature make sense. Also, Chisel needs support for it to make it available for use.
What you’ve stumbled across is a point where this feature is not fully implemented across the Chisel/FIRRTL stack and the FIRRTL spec has run ahead of what is supported. I’m working on getting this working in CIRCT and fleshing out details in the FIRRTL spec. Once that is all sound, this will get exposed in Chisel.
I would expect this will be fully implemented in 1.64 or 1.65.
This development approach is reasonable, but having some targets on when things will be available for wide use would be good. Nice idea.
CIRCT supports all of 3.2.0 with the exception of layer-associated probes.
Ivan95 January 15, 2024, 4:45pm 7
Ok, I see.
Thank you very much!