You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1956,9 +1956,11 @@ Format strings support the following escape characters:
1956
1956
## Verification
1957
1957
1958
1958
To facilitate simulation, model checking and formal methods, there are three non-synthesizable verification statements available: assert, assume and cover.
1959
-
Each type of verification statement requires a clock signal, a predicate signal, an enable signal and a string literal.
1959
+
Assert and assume statements require a clock signal, a predicate signal, an enable signal, a format string and a variable list of argument signals.
1960
+
Cover statement requires a clock signal, a predicate signal, an enable signal, a format string and a string literal.
1960
1961
The predicate and enable signals must have single bit unsigned integer type.
1961
-
Assert and assume use the string as an explanatory message.
1962
+
Assert and assume statement may print the format string as an explanatory message where its argument placeholders are substituted.
1963
+
See [@sec:format-strings] for information about format strings.
1962
1964
For cover statements the string indicates a suggested comment.
1963
1965
When an assert or assume is violated the explanatory message may be issued as guidance.
1964
1966
The explanatory message may be phrased as if prefixed by the words "Verifies that\...".
@@ -1977,7 +1979,7 @@ However it can never be used in a reference since it is not of any valid type.
1977
1979
1978
1980
The assert statement verifies that the predicate is true on the rising edge of any clock cycle when the enable is true.
1979
1981
In other words, it verifies that enable implies predicate.
1980
-
When the predicate is false, the assert statement prints out the format string where its argument placeholders are substituted.
1982
+
When the predicate is false, the assert statement may print out the format string where its argument placeholders are substituted.
1981
1983
1982
1984
```firrtl
1983
1985
wire clk: Clock
@@ -1994,7 +1996,7 @@ The assume statement directs the model checker to disregard any states where the
1994
1996
In other words, it reduces the states to be checked to only those where enable implies predicate is true by definition.
1995
1997
In simulation, assume is treated
1996
1998
as an assert.
1997
-
When the predicate is false in simulation, the assume statement prints out the format string where its argument placeholders are substituted.
1999
+
When the predicate is false in simulation, the assume statement may print out the format string where its argument placeholders are substituted.
0 commit comments