References:
a[0:3] & b[0:3]
and a(0 to 3) and b(0 to 3)
represent the bitwise and
of the four most significant bits of vectors a
and b
in the Verilog and VHDL flavors, respectively.always !(ena & enb)
states that the signals ena
and enb
will never be true
simultaneously in any clock cycle.
always
operator, which states that a Boolean expression holds in every clock cycle, is one of the most basic.always(req -> next ack)
states that in every cycle that the req
signal is true, the ack
signal is true in the next cycle.
next
operator, one of the operators that specify delays.req -> next[2] ack
means that ack
must be true two cycles after each cycle in which req
is true.
->
symbol denotes implication, that is, if the expression to the left is true, that on the right must also be true.always {req; ack; !cancel}
is a syntactic sugar for always (req -> next (ack -> next !cancel))
, means that ack
must be true after any cycle in which req
is true, and cancel
must be false in the cycle after that.weak
and strong
property:
weak
property can be checked in simulation; i.e., for safety properties;strong
property: can only be checked formally; express liveness properties;!
.always (req -> eventually! ack)
states that after req
is asserted, ack
will always be asserted eventually.eventually!
operator illustrates the meaning of strong operators.req
but did not see ack
, it would be incorrect to report that this property failed because running that particular simulation longer might have produced ack
.always ((a && next[3] (b)) -> c)
, states that when a
is true and b
is true three clock cycles later, c
is true in the first cycle when a
is true.The following example declares a “verification unit” called ex1a
, binds it to the instance named top_block_i1_i2
in the design under test, and declares (the assertion named A1
) that the signals ena
and enb
in that instance are never true simultaneously.
vunit ex1a(top_block.i1.i2){
A1: assert never (ena && enb);
}
use directives
assert
,assume
, assume a given property;assume_guarantee
, both assumes and tests a particular property;restrict
, constraints the tool to only consider inputs that have a given property;cover
, asks the tool to check whether a certain property was ever observed;fairness
, which instructs the tool to only consider paths in which the given property occurs infinitely often, for example, only when the system does not wait indefinitely.Modeling layer (fourth layer): allows Verilog, SystemVerilog, VHDL, or other code to be included inline in a PSL specification.
The intention here is to allow addition details about the system under test to be included in the PSL source file.
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?