Move the `LowerLayers` pass after the `LowerXMR` pass. To do this, all
passes at the end of the CHIRRTL to Low FIRRTL pipeline are moved after
`LowerXMR`. This is necessary because the `LowerLayers` pass cannot, at
present, be moved after the passes at the end of the pipeline.
This is done to enable forcing out of layers. By lowering probes to XMRs,
the layers can be lowered trivially to modules/instances and their XMRs
will now (seemingly) magically just work. By doing the loweirng in this
way, it avoids ever having to represent an input probe in the FIRRTL
dialect.
A consequence of this is that there are now simplifying
assumptions (preconditions) that can be made about the `LowerLayers` pass:
1. It will never see a number of probe ops because the `LowerXMR` pass has
a postcondition that all of these are removed.
2. Input and output ports can never be created on modules created from
layer blocks.
While I am generally always in favor of passes being relocatable anywhere
in the pipeline, this is one pass that really does _not_ make sense to be
relocatable. In effect, this pass is part of the lowering from FIRRTL to
HW. There is no point in being able to use it earlier in the pipeline.
That said, it still is tested to work with things which we may one-day
preserve, like `WhenOp`s.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
The layer sink pass is showing some performance problems, and we want
the ability to turn it off to work around the issue, until we can
properly fix it.
Add an override that, instead of emitting an error, selects the default target
to specialize an instance choice when the option is unspecified. By default a
partially specified instance choice is not allowed. But we can override the
error and select the default target, by using
`--select-default-for-unspecified-instance-choice` with `firtool`.
This enables a user to specialize the instance choice for a particular build
flow, and fall-back to the default for all others.
This PR adds the option to run CSE only on `firrtl.module`, and ignore
other operations. There are some tools, that are not able to handle CSE of
`firrtl.object` in `firrtl.class`. Specifically, the reuse of `firrtl.object`
is not modeled properly.
This is a temporary workaround to disable the CSE of operations inside
`firrtl.class`, which can be removed once the actual issue is fixed.
This legacy system for representing an object model has been replaced
by FIRRTL classes, objects, and properties. This removes the old
system completely.
The main change is removing the EmitOMIR pass completely, but there
are several other things related to OMIR JSON to clean up. This
includes command line options and annotations for specifying input and
output OMIR JSON, as well as support for parsing the JSON and
scattering OMIR tracker annotations. Any tests related to the above
were also removed.
The only remaining legacy OMIR feature is the OMIRTracker annotation,
which is currently used in some canBeDeleted logic on annotations in
folders, IMDCE, etc. This is being separated, and removed in this PR:
https://github.com/llvm/circt/pull/7908.
This has only been used for probes, but without input probes
this is no longer useful or necessary.
The HW-signal hoisting works well (if limited) and has no
known issues[1] but has yet to be used in practice due
primarily to passthroughs being intentional occasionally
and lacking a mechanism to capture or distill this intent
properly (it must be ""optimized"" yet not).
Since this is unused, and lacking traction on the above,
remove from pipeline and delete this for now instead of
having it bitrot and be a maintenance burden while
adding/completing new features.
Lives on in version control history!
[1] FWIW, see https://github.com/llvm/circt/pull/6115 for
both small example and before/after on chipyard, as well
as testing internally back when this was introduced.
Add a `circt-capi` target that depends on all C API libraries. Introduce
a new `add_circt_public_c_api_library` CMake function that wraps around
the MLIR equivalent, but also adds a dependency from `circt-capi`. Make
at least the short integration tests CI job build the `circt-capi`
target to ensure it has a bit of CI coverage.
Add option to allow this for compatibility.
Add statistic to count ports added to public modules,
as an interesting bit of information but particularly
to track how many are still being added when updating
a code base to avoid this.
This commits replaces `--emit-chisel-asserts-as-sva` with an option with more fine grained control.
Specifically an option `--verification-flavor={none, if-else-fatal, immediate, sva}` is added. `none` is the option for the current behaviour that uses per-op configuration (which must be deprecated once after `has_been_reset` is properly used for assertions that are expected to be disabled while pre-resets).
Close https://github.com/llvm/circt/issues/6543
Move firtool pipeline configuration over to the same mechanism the rest of llvm and mlir use. Export this via the CAPI. Add a couple examples of methods to change options to the CAPI. Interested parties are encouraged to finish out the set of functions.
Since the CAPI has no tests, this breaks nothing.
As an aside, the configuration space of the firrtl pipeline is WAY too big.