Printf-encoded verification deprecation #6970
Labels
FIRRTL
Involving the `firrtl` dialect
Tracking Issue
A tracking issue for a set of features or large code changes
Summary
Using printf strings to encode verification operations is deprecated. This is a transparent change to Chisel users, as Chisel no longer uses this for assert/assume/cover.
For the deprecation period, a warning will be emitted for these, and eventually this will be treated just like any other printf.
If you're seeing the warning, you should migrate to using intrinsics instead, and eventually FIRRTL will support what's needed without intrinsics. Post on this thread if you have any questions or concerns.
Details
Historically, special printf strings nested within when statements were used to encode various verification intent.
While normal assert/assume/cover statements are emitted by Chisel they're always placeholders with the printf containing a payload indicating what really is requested. For example:
Which generates:
Examples include variations of assert, assume, and cover -- with more control over their lowering, inserted preprocessor guards, and other features.
These have been deprecated in favor of using intrinsics, see: https://circt.llvm.org/docs/Dialects/FIRRTL/FIRRTLIntrinsics/ .
The end-goal is to extend FIRRTL so that the standard assert/assume/cover and other language features are enough for our needs. Until then, intrinsics have been added and should be used instead.
The example above is captured using the
assume
intrinsic:The text was updated successfully, but these errors were encountered: