Conversation
Closed
unlsycn
reviewed
Jul 6, 2025
zaozi/tests/src/SVASpec.scala
Outdated
Comment on lines
+48
to
+54
| // macro bug: | ||
| // [285] [info] compiling 1 Scala source to ./out/zaozi/tests/compile.dest/classes ... | ||
| // [285] [error] -- Error: ./zaozi/tests/src/SVASpec.scala:48:12 --- | ||
| // [285] [error] 48 | a.S | ||
| // [285] [error] | ^^^ | ||
| // [285] [error] |Type parameter T must be a subtype of DynamicSubfield, but got me.jiuyang.zaozi.valuetpe.Bool. | ||
| // [285] [error] one error found |
Collaborator
|
I will take this PR. This PR is related to llvm/circt#8673, but they are independent implecation of each other. After I finish the work for issue 8673, I will open a new PR to introduce and integrate the new explicit clocking design. |
f7c28c3 to
08a8a05
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Core Problem:
The fundamental issue with standard SVA is that all sequence and property constructs carry implicit clocking semantics. This creates ambiguity, particularly for immediate assertions which, despite being combinational, are formally verified using a conceptual, tool-provided clock.
Proposed Design Philosophy:
To create a clearer and more explicit system, this design moves away from SVA's implicit clocking. The core principle is to make all clocking relationships explicit within the API, thereby improving type and semantic clarity:
SequenceandProperty: Unlike SystemVerilog, this design introduces two distinct API kinds to represent the different concepts:ref_to_bool.S: Represents aSequence. It is a temporal construct that is always explicitly bound to a clock.sequence.P: Represents aPropertywithout any clock semantic.Explicitly Clocked Sequences: Under this model, there are no "un-clocked" or implicitly clocked sequences. Every sequence (
ref_to_bool.S) must be associated with an explicit clock, eliminating ambiguity.Handling Immediate Assertions: The main challenge in an explicitly clocked system is how to handle immediate
SVAassertions, such as those used for verifying combinational logic (always_comb). These assertions rely on a "virtual" clock provided by formal verification tools for their decision points.To solve this, a new, dedicated API is introduced:
ref_to_bool.I: Represents a non-temporal, Immediate boolean expression derived from LTL. This construct is used only for clock-less, immediate assertions.The capabilities of
ref_to_bool.Iare intentionally restricted to maintain semantic integrity:Iexpression or be converted directly into aProperty.##), as it exists outside the clocked temporal domain.