Change Section 16.5, page 196
16.5 Blocking tasks in cycle/event mode
Calling program tasks or functions from within design modules is illegal and shall result in an error. This is because the design must not be aware of the testbench. Programs are allowed to call tasks or functions in other programs or within design modules. Functions within design modules can be called from a program, and require no special handling. However, blocking tasks (a task that does not execute in 0 simulation time) within design modules that are called from a program do require explicit synchronization upon return from the task. That is, when blocking tasks return to the program code, the program block execution is automatically postponed until the Reactive region. The copy out of the parameters happens when the task returns.
Calling blocking tasks in design modules from within programs
requires careful consideration. Expressions evaluated by the task before
blocking on the first timing control shall use the values after they have been updated
by nonblocking assignments in the
design module. In contrast, if the task is called from a module
at the start of the time step (before nonblocking assignments are processed)
then those same expressions shall use the values before they have been updated
by nonblocking assignments.