blocking_assignment ::= //
from Annex A.6.2
variable_lvalue = delay_or_event_control expression
| hierarchical_dynamic_array_variable_identifier = dynamic_array_new
| class_variable_identifier = class_new
| [ implicit_class_handle
. | class_scope | package_scope ]
hierarchical_variable_identifier select = class_new
| operator_assignment
cond_predicate ::=
expression_or_cond pattern expression_or_cond_pattern { &&
expression_or_cond_pattern }
bit
[2:0] a;
unique case(a) // values
3,5,6,7 cause a run-time error warning
0,1: $display("0 or 1");
2: $display("2");
4: $display("4");
endcase
priority casez(a) // values 4,5,6,7 cause
a run-time warning
23’b00?: $display("0 or 1");
23’b0??: $display("2 or 3");
default: $display("4 to 7");
endcase
The unique and priority keywords
shall determine the simulation behavior. It is recommended that synthesis follow
simulation behavior where possible. Attributes can also be used to determine
synthesis behavior.
typedef union tagged {
struct {
bit
[4:0] reg1, reg2, regd;
} Add;
union tagged {
bit
[9:0] JmpU;
struct {
bit
[1:0] cc,;
bit
[9:0] addr;
} JmpC;
} Jmp;
} Instr;
foreach( words [ j ] )
$display( j , words[j] ); // print each index and value
foreach( prod[ k, m ] )
prod[k][m] = k * m; // initialize
int A [2][3][4]; bit bit
[3:0][2:1] B [5:1][4];
After one of
the following conditions occur, all spawned processes are terminated, all
pending PLI callbacks are canceled, and then the final block executes.
— The event queue is empty
— Execution of $finish
— Termination of all program blocks, which
executes an implicit $finish
— PLI execution of tf_dofinish() or vpi_control(vpiFinish,...)
Final blocks
execute when simulation ends due to an explicit or implicit call to $finish.
A sequence instance can be used in event expressions to
control the execution of procedural statements based on the successful completion match of
the sequence. This allows the endpoint of a named sequence to trigger multiple
actions in other processes. Syntax 17-2 and 17-4 describes describe the
syntax for declaring sequence named sequences and
sequence expressions instances. A sequence instance can be
used directly in an event expression, as shown in Syntax 8-9.
When a sequence instance is specified in an event
expression, the process executing the event control shall block until the given specified
sequence reaches its end-point, that is, the sequence succeeds
non-vacuously. A sequence reaches its end point whenever there is a
match for the entire sequence expression. A
process resumes execution following the Observe region in which the end point
is detected.