|
LCS-2016-050 |
|
6 |
|
24-Mar-2017 |
|
Voting |
|
Jim Lewis Patrick Lehmann Martin Zabel |
|
Main.JimLewis |
|
API for Assert |
|
history |
|
LCS2016-050-Assert-API |
|
API for Assert |
GetVhdlAssertFailed
to GetVhdlAssertCount
@MZ.2
Without a severity parameter, SetVhdlAssertEnable
applies the Enable
parameter to either enable or disable all severity flags. With
a severity parameter, SetVhdlAssertEnable
applies the Enable
parameter to either enable or disable the specified severity value.
This is fixed in version 3. I added the final sentence to the paragraph on SetVhdlAssertEnable
: Severity
parameter, SetVhdlAssertEnable
applies the enable to all SEVERITY_LEVEL
values
-- Jim Lewis - 2017-02-07
So, to be clear, GetVhdlAssertCount
GetVhdlAssertCount(WARNING) + GetVhdlAssertCount(ERROR) + GetVhdlAssertCount(FAILURE)=,
IsAssertFailed(sev)
(GetVhdlAssertCount(sev) /!= 0)=, and IsAssertFailed
(GetVhdlAssertCount /!= 0)=. Is that reading right?
Also, why the explicit rejection of NOTE level assertions? I understand the logic of the above of not including them into the math of the
argumentless calls, but according to that text I'm actively barred from requesting GetVhdlAssertCount(NOTE)
.
-- Rob Gaddi - 2017-02-08
Version 3 still does not define what happens when the "format" string in the call of SetVhdlAssertFormat has an invalid syntax.
See also Thomas' comment on 2017-01-04.
Possible solution: Add the following to the new paragraph before subsection "Syntax Rules".
If a string replacement has an invalid syntax, then it will not be replaced, that is, it will be copied literally to the produced output.
-- Martin Zabel - 2017-02-10
@RG.1 Correct on GetVhdlAssertCount and IsAssertFailed.
@RG.2 VHDL Asserts have two components: Error reporting and message filtering. Through the simulator GUI you can turn them on and off.
I interpreted NOTEto be an item that is only a message that can be filtered - turned on or off and not an item that is signaling any form
of an error, hence, I do not count it.
OTOH, if we had a GetVhdlAssertCount(NOTE), then the sum returned by GetVhdlAssertCount would likely need to include that value. I have
used vendor models that used NOTE extensively. Do you see these as something you want to count? Some of them were quite annoying.
-- Jim Lewis - 2017-02-14
Updated to version 4: Handling of invalid format strings.
-- Martin Zabel - 2017-02-28
TBP #1: The format_specification
appears to introduce a spurious closing brace.
TBP #2: Consider these clarifying substitutions:
FROM: The string supports format specifiers in string replacements. A string replacement is a string starting with a left curly bracket,
followed by the format variable and closed by a right curly bracket. The format variable can be followed by an optional colon and format
specification string.
TO: The format string may contain string replacements extending from a singular left curly bracket to the next right curly bracket. These
brackets delimit the name of a format variable with an optionally following colon and format specification string.
FROM: The curly bracket characters can be escaped by doubling the same.
TO: Doubled left curly brackets do not introduce string replacements but translate to single left curly brackets in the derived formatted
output.
TBP #3: Curly brackets are regularly referred to as braces. The current LRM is inconsistent in its use of these names. If we could decide
on one name, we should probably make the LRM fully consistent with another LCS in this respect.
-- Thomas Preusser - 2017-02-28
TPB #1: fixed