Expand description
The assertion control system tasks’ registry (LRM 1800-2023 §20.11:
$assertcontrol and the $asserton/$assertoff/$assertkill/
$assertpasson/… conveniences built on it).
Every assertion the run can control is a site: a concurrent assertion
statement, a simple/deferred immediate assertion, an expect, or one of
the unique/unique0/priority violation checkers. A site is described by
its Table 20-5 assertion_type bit, its Table 20-6 directive_type bit
(0: the directive type is not checked – it does not apply to expect and
violation reports), the hierarchical scope that holds it and its label (the
assertion’s full hierarchical name; empty when it has none).
The control tasks themselves are an append-only log. A site’s state is
the fold of the matching entries over SiteState::DEFAULT, applied lazily
the next time the site is asked about: the log order is the order the tasks
executed in, so a $assertlock makes every later entry that matches the
site a no-op until the matching unlock, exactly as §20.11 words it. A site
the control tasks never name costs one empty-log test.
Only $assertkill-class entries need an immediate effect (they flush
queued reports and procedural instances of the sites they kill):
control returns those sites. Everything else is polled: the
assertion’s executor reads its SiteState where it acts.
Structs§
- Op
- One executed control task.
- Site
Desc - What one site is, as the registry sees it.
- Site
State - A site’s control state.
Enums§
- Control
control_typevalues of Table 20-5.- Control
Event - A change a control task made to one site’s state, as the VPI assertion callbacks report it (IEEE 1800-2023 39.4.2).
Constants§
- ASSERT_
ALL assertion_typedefault of$assertcontrol(every type).- ASSERT_
CONCURRENT - Table 20-5
assertion_typebits. - ASSERT_
EXPECT - ASSERT_
FINAL_ DEFERRED - ASSERT_
OBSERVED_ DEFERRED - ASSERT_
PRIORITY - ASSERT_
SIMPLE_ IMMEDIATE - ASSERT_
UNIQUE - ASSERT_
UNIQU E0 - ASSERT_
VIOLATION - The violation report types (
unique/unique0/priority). - CTL_
OP_ CONTROL sv_rt_assert_ctl’sopfor an assertion control task.- CTL_
OP_ QUERY sv_rt_assert_ctl’sopfor the state query of one site.- DIR_ALL
directive_typedefault of$assertcontrol(every directive).- DIR_
ASSERT - Table 20-6
directive_typebits. - DIR_
ASSUME - DIR_
COVER - EXPECT_
NO_ ACTION_ TERM - The term an
expect’s blocked process is resumed with when its property was decided but the control tasks switched off the action that would run (0: the pass statement, 1: theelsestatement). - Q_ALL
- Every query bit set: no control task has touched the site.
- Q_
CHECKING SiteState::query_bits: reporting on, nonvacuous pass action on, vacuous pass action on, fail action on.- Q_FAIL
- Q_
PASS_ NONVACUOUS - Q_
PASS_ VACUOUS
Functions§
- anonymous_
target - The target text naming the unlabeled assertion at source
offsetin the instancescope(vpi_controlon an unnamed assertion, 39.5). - control
- Executes a control task. Returns the registered sites an
$assertkill(or an$assertcontrolKill) just reached: the caller flushes what they have queued. The control observer (set_control_observer) is told of every change. - execute
- Executes a control task and carries out its immediate effects: the queued
deferred reports, queued violation reports and pending procedural assertion
instances of every site an
$assertkillreached are discarded (20.11). Executing attempts are aborted by their runners, which notice the kill count (SiteState::kills) change the next time they run. - intern
- The id of the site
desc, registering it the first time. Two descriptors that are equal are one site. - intern_
text - The id of the site whose
SiteDesc::encodetext istext. - query_
text - The
Q_*bits of the sitetextnames:Q_ALLwithout touching the registry while no control task has run. - real_
sv_ ⚠rt_ assert_ ctl u64 sv_rt_assert_ctl(u32 op, i64 a0, i64 a1, i64 a2, i64 a3, ptr text), the one entry point compiled code reaches the registry through.- reset
- Forgets every site and control task (the start of a run).
- set_
control_ observer - Installs (or removes) the function told of every site state change a control task makes, after the registry is released.
- site_
desc - The descriptor the site
idwas registered with. - state
- The current state of the site
id.
Type Aliases§
- Control
Observer - The function told of every site state change a control task makes.
- SiteId
- A registry index of one site.