User guide
24-17
SystemVerilog Testbench Constructs
.
prog prog1 (clk,data,ctrl); // instance of the program
.
.
.
endmodule
In many ways a program definition resembles a module definition and
a program instance is similar to a leaf module instance but with special
execution semantics.
A program block can contain the following:
• data type declarations including initial values. Dynamic arrays,
associative arrays, and queues are implemented for program
blocks.
• user-defined tasks and functions
• initial blocks for procedural code (but not always blocks)
• final block (please refer Final Blocks for more details)
• class definitions
• semaphores
• mailboxes
• concurrent assertions
• coverage groups
When VCS executes all the statements in the initial blocks in a
program, simulation comes to and end.