Gen Depends
Gen Depends
Gen Depends
(User View)
When creating reusable verification environments, developers need to capture the
architectural dependencies between fields (and data structures). Constraints are used both
to define the relationship between the fields, as well as capturing the design intent for the
‘directionality’ of these dependencies. Quite often, the design intent is for a unidirectional
behavior which can be described as 'cause and effect' or 'dependency'.
This document describes the issues surrounding the specification of design intent around
dependency between fields, using constraints.
Typically the architectural parts of verification code consist of a set of 'user interface' fields
and some 'internal' fields that should be controlled by the user interface. If bi-directional
constraints are used to specify such architectural relationships, the design intent must be
highlighted to make sure that the generator interprets it correctly.
To influence the generation order one can use either the 'keep gen before' construct or
'value()' calls. In addition, a new syntax will be provided in the future, to specify
unidirectional intent in bi-directional constraints. This syntax will be introduced gradually,
first as sn_pre_t() (a temporary simple implementation), and later as pre(). The intent of
pre() is to say, within the context of a constraint, that the fields inside the pre() should be
considered as pre-conditions for deducing the values for the other fields.
keep soft a == pre(b);
The sn_pre_t() provided at the first stage will translate in fact into a “gen before” in the
context of the constraint. Later, the pre() construct will be provided, to replace the
sn_pre_t() construct. It will be superior to sn_pre_t(), as it will also change the propagation
rules to be unidirectional.
We recommend to use the methodological workarounds suggested below until sn_pre_t()
is available. When sn_pre_t() is available, we recommend to convert the code to use this
new construct as a preparation for the final pre(), which we expect to solve all the issues
described below.
The patterns below show typical examples with the suggested solution and current
workarounds.