Subject: [sv-cc] Assertion API (section 27) corrections
From: Joao Geada (Joao.Geada@synopsys.com)
Date: Mon Apr 21 2003 - 17:39:21 PDT
David,
attached are the corrections to Section 27: SystemVerilog Assertion API
These corrections harmonize this section with Section 17: Assertions and
correct some minor grammar issues.
Section 27.1.2, page 255
========================================
Delete entire section: it is unnecessary, as terminology used
in this section is the same as used in section 17.
Section 27.2.1, page 255
========================================
at end of first paragraph,
replace: The VPI reserved range for these call is 700-729
with: The VPI reserved range for these calls is 700-729
Section 27.2.2, page 256
========================================
replace entire contents of section with following text:
This section lists the object property VPI calls. The VPI
reserved range for these calls is 700 - 729.
#define vpiAssertionType 700
/* Assertion types */
#define vpiSequenceType 701
#define vpiAssertType 702
#define vpiCoverType 703
#define vpiPropertyType 704
#define vpiImmediateAssertType 705
Section 27.2.3 Callbacks, page 256
========================================
at end of first paragraph,
replace: The VPI reserved range for these call is 700 - 719.
with: The VPI reserved range for these calls is 700 - 719.
Section 27.2.4 Control constants, page 256
========================================
at end of first paragraph,
replace: The VPI reserved range for these call is 730 - 759.
with: The VPI reserved range for these calls is 730 - 759.
Section 27.3.1, page 257
========================================
In figure 27-1, replace word "property" with "assertion"
Below figure, add the following text:
Note: Iteration on assertions from interfaces is not shown in this
diagram since the interface object type is not currently defined in VPI. However the assertion API
permits iteration on assertions from interface instance handles and obtaining static information
on assertions used in interfaces (see Section 27.3.2.1).
Section 27.3.1, page 257
========================================
replace text of item 4) with the following text:
4) To obtain an assertion of a specific type, e.g. cover
assertions, you should use an approach as follows:
vpiHandle assertion;
itr = vpi_iterate(vpiAssertionType, NULL);
while (assertion = vpi_scan(itr)) {
if (vpi_get(vpiAssertionType, assertion) == vpiCoverType) {
/* process cover type assertion */
}
}
Section 27.3.1, page 258
========================================
Remove note 2
Section 27.3.2, page 258
========================================
Replace elements reading:
-- Assertion directive
1) assert
2) check
3) assume
4) cover
5) sequence
with:
-- Assertion type
1) Sequence
2) Assert
3) Cover
4) Property
5) ImmediateAssert
Section 27.3.2.1, page 258
========================================
Change text reading:
typedef struct t_vpi_assertion_info {
PLI_BYTE8 *name; /* name of assertion */
vpiHandle instance; /* instance containing assertion */
PLI_BYTE8 modname; /* name of module/interface containing
assertion */
vpiHandle clock; /* clocking expression */
PLI_INT32 directive; /* vpiAssume, ... */
s_vpi_source_info sourceInfo;
s_vpi_assertion_info, *p_vpi_assertion_info;
int vpi_get_assertion_info (assert_handle, p_vpi_assertion_info);
with:
typedef struct t_vpi_assertion_info {
PLI_BYTE8 *name; /* name of assertion */
vpiHandle instance; /* instance containing assertion */
PLI_BYTE8 defname; /* name of module/interface containing
assertion */
vpiHandle clock; /* clocking expression */
PLI_INT32 assertionType; /* vpiSequenceType, ... */
s_vpi_source_info sourceInfo;
} s_vpi_assertion_info, *p_vpi_assertion_info;
int vpi_get_assertion_info (assert_handle, p_vpi_assertion_info);
Section 27.3.2.1, page 259
========================================
(Last paragraphs in section) change text reading:
Assertions can occur in modules and interfaces: assertions
defined in modules (by using VPI) shall have instance
information; assertions in interfaces shall have a NULL
instance handle. In either case, modname is the definition name.
NOTES:
1- The assertion clock is an event expression supplied as the
clocking expression to the assertion declaration, i.e., this
is a handle to an arbitrary Verilog event expression.
2- A single call returns all the information for efficiency reasons.
To:
Assertions can occur in modules and interfaces: for assertions
defined in modules the instance field in the s_vpi_assertion_info
structure shall contain the handle to the appropriate module or interface instance.
Note that VPI does not currently define the information model for interfaces
and therefore the interface instance handle will be implementation dependent.
The clock field of that structure contains a handle to the event expression
representing the clock for the assertion, as determined by Section 17.13
NOTE: a single call returns all the information for efficiency reasons.
Section 27.3.2.2, page 259
========================================
Change text reading:
vpi_get() can be used to query the following VPI properties
from a handle to an assertion:
vpiAssertionDirective
returns one of vpiAssertProperty or vpiCheckProperty.
to:
vpi_get() can be used to query the following VPI property
from a handle to an assertion:
vpiAssertionType
returns one of vpiSequenceType, vpiAssertType, vpiCoverType,
vpiPropertyType, vpiImmediateAssertType
Section 27.4.2, page 260
========================================
(first function prototype) change text reading:
vpiHandle vpi_register_assertion_cb(
vpiHandle, /* handle to assertion */
PLI_INT32 event,/* event for which callbacks needed */
PLI_INT32 (*cb_rtn)( /* callback function */
PLI_INT32 event,
vpiHandle assertion,
p_vpi_attempt_info info,
PLI_BYTE8 *userData),
PLI_BYTE8 *user_data/* user data to be supplied to cb */
);
to:
vpiHandle vpi_register_assertion_cb(
vpiHandle, /* handle to assertion */
PLI_INT32 reason, /* reason for which callbacks needed */
PLI_INT32 (*cb_rtn)( /* callback function */
PLI_INT32 reason,
vpiHandle assertion,
p_vpi_attempt_info info,
PLI_BYTE8 *userData),
PLI_BYTE8 *user_data/* user data to be supplied to cb */
);
Section 27.4.2, page 260
========================================
(immediately after end of datastructures) change text reading:
where event is any of the following.
to:
where reason is any of the following:
Section 27.4.2, end of page 260, start of 261
========================================
change text reading:
cbAssertionStepSucess
the progress of one thread along an attempt. By default, step
callbacks are not enabled on any assertions; they are enabled
on a per-assertion/per-attempt basis, rather than on a
per-assertion basis.
cbAssertionStepFailure
failure to progress along one thread along an attempt. By
default, step callbacks are not enabled on any assertions;
they are enabled on a per-assertion/per-attempt basis, rather
than on a per-assertion basis.
to:
cbAssertionStepSucess
the progress of one step along an attempt. By default, step
callbacks are not enabled on any assertions; they are enabled
on a per-assertion/per-attempt basis (see Section 27.5.2), rather
than on a per-assertion basis.
cbAssertionStepFailure
failure to progress by one step along an attempt. By
default, step callbacks are not enabled on any assertions;
they are enabled on a per-assertion/per-attempt basis (see
Section 27.5.2), rather than on a per-assertion basis.
Section 27.4.2, page 261
========================================
(middle of page) change text reading:
The callback function shall be supplied the following arguments:
1) the event that caused the callback
to:
The callback function shall be supplied the following arguments:
1) the reason for the callback
Section 27.5.1, page 262
========================================
(all text after 1st paragraph) change text reading:
Usage example: vpi_control(vpiAssertionSysReset)
vpiAssertionSysReset discards all attempts in progress for
all assertions and restore the entire assertion system to its
initial state.
Usage example: vpi_control(vpiAssertionSysStop)
vpiAssertionSysStop considers all attempts in progress as
unterminated and disable any further assertions from being started.
Usage example: vpi_control(vpiAssertionSysStart)
vpiAssertionSysStart restarts the assertion system after it
was stopped (e.g., due to vpiAssertionSysStop). Once started,
attempts shall resume on all assertions.
Usage example: vpi_control(vpiAssertionSysEnd)
vpiAssertionSysEnd discard all attempts in progress and
disable any further assertions from starting.
to:
Usage example: vpi_control(vpiAssertionSysReset)
vpiAssertionSysReset discards all attempts in progress for
all assertions and restores the entire assertion system to its
initial state. Any pre-existing vpiAssertionStepSuccess and
vpiAssertionStepFailure callbacks will be removed, all other
assertion callbacks will remain.
Usage example: vpi_control(vpiAssertionSysStop)
vpiAssertionSysStop considers all attempts in progress as
unterminated and disables any further assertions from being
started. This control has no effect on pre-existing assertion
callbacks.
Usage example: vpi_control(vpiAssertionSysStart)
vpiAssertionSysStart restarts the assertion system after it
was stopped (e.g., due to vpiAssertionSysStop). Once started,
attempts shall resume on all assertions. This control has no
effect on prior assertion callbacks.
Usage example: vpi_control(vpiAssertionSysEnd)
vpiAssertionSysEnd discards all attempts in progress and
disables any further assertions from starting. All assertion
callbacks currently installed will be removed. Note that once
this control is issued, no further assertion related actions
are permitted.
==============================================================================
Joao Geada, PhD Principal Engineer Verif Tech Group
Synopsys, Inc TEL: (508) 263-8083
377 Simarano Drive, Suite 300, FAX: (508) 263-8069
Marlboro, MA 01752, USA
==============================================================================
This archive was generated by hypermail 2b28 : Mon Apr 21 2003 - 17:42:15 PDT