Subject: Re: severity levels, synthesis
From: Paul J. Menchini (mench@mench.com)
Date: Tue Oct 08 2002 - 07:25:12 PDT
Rob,
> Is there anything in the LRM that covers assertions for static values
> used in functions? If there is an assertion, does it have any effect
> on analysis or elaboration?
The LRM classifies expressions as locally static, (globally) static, and
no attribute with regard to evaluation time. However, these times are
the latest times by which the expression must be evaluated, not the
specific times. That is, a globally static expression is an expression
whose value must be known and fixed by the time of static elaboration of
the declaration containing the expression. However, it does not say
that the expression must be evaluated during the elaboration of the
containing declaration. It could be evaluated during compilation.
The expressions in assertions have no staticness requirement. And, as
assertions are executed, the have only run-time evaluation requirements
on their expressions. Again, implementations are free to *but not
required to* evaluate the containing expressions during compilation or
static elaboration. Additionally, as functions are dynamically
elaborated at the time of their invocation, the expressions within any
assertions within the function body can be pre-evaluated at that time.
However, the assertions within a function body are executed only during
the execution of the containing function.
Does this answer your question?
> -----------------------
> The other operations:
> y8<=a8+b9;
> y8<=a8+500;
> Are compile time errors.
> I don't see a separate way to control the break level during
> compilation, I assume severity "error" would stop compilation for
> either case here.
> ------------------------
No, as the assertions are executed, compilation of, e.g.,
assert FALSE severity error;
has no effect on either compilation or elaboration (static or dynamic).
Paul
This archive was generated by hypermail 2b28 : Tue Oct 08 2002 - 07:25:36 PDT