Change
Section 9.9.1 as indicated crossed out and in blue:
9.9.1 wait fork
The wait fork
statement is used to ensure that all child processes (processes
created by the calling process) have completed their execution.
The syntax for wait
fork is:
wait fork;
Specifying wait
fork causes
the calling process to block until all its sub-processes have completed.
By
default, SystemVerilog terminates a
simulation run when there is no
further activity of any kind.
SystemVerilog adds the ability to automatically terminate the simulation
when all its program blocks finish
executing (i.e, they reach the end of their execute
block), regardless of the status of any child processes (see Section 15.9.1). The wait fork statement allows a program block to wait for the
completion of all its
concurrent threads before exiting.
In the following example, in the task do_test, the first two
processes are spawned and the task blocks until one of the
two processes completes (either exec1, or exec2).
Next, two more processes are spawned in the background. The wait fork statement
will ensure that the task do_test waits for
all four spawned processes to complete before returning to its caller.
task
do_test;
fork
exec1();
exec2();
join_any
fork
exec3();
exec4();
join_none
wait fork; // block until exec1 ...
exec4 complete
endtask
Change Section 9.9.2 as indicated in blue:
9.9.2 disable fork
The disable fork
statement terminates all active
descendants (sub-processes) of the calling process.
The syntax for disable fork
is:
disable fork;
The disable fork statement terminates all descendants of the calling process, as well as the
descendants of the process’ descendants, that is, if any of the child processes
have descendants of their own, the disable fork statement will terminate them as well.
In the example below the function get_first spawns
three versions of a function that will wait for a particular device (1, 7, or
13). The function wait_device function waits for a particular device to become ready
and then returns the device’s address. When the first device becomes available,
the get_first function will resume execution and proceed to kill the
outstanding wait_device processes.
function
integer get_first();
fork
get_first = wait_device(
1 );
get_first = wait_device(
7 );
get_first = wait_device(
13 );
join_any
disable fork;
endfunction
Verilog supports the disable construct, which will end a process when applied to
the named block being executed by the process. $terminate
differs from disable in that $terminate
considers the dynamic parentchild relationship of the processes, whereas disable
uses the static syntactical
information of the disabled block. Thus, disable will end all processes executing a particular block,
whether the processes were forked by the calling thread or not, while $terminate
will end only those processes that
were spawned by the calling thread.
Change Section 9.9.3 the third paragraph as indicated in blue:
The $suspend_thread
system task temporarily suspends the current
process allowing other ready processes to execute. Calling $suspend_thread is
conceptually similar to a zero delay statement (#0), however, $suspend_thread conveys
the intent more clearly when called during the
verification phase.