To resume a process the kernel executes the execute() function
of the corresponding process instance. In the head of this function
a switch statement dispatches execution based on the value of
jmp. Each time the function suspends its execution via a return
statement the number of the program label where the function should
resume next time is stored into the variable jmp.
Example:
proc: PROCESS BEGIN WAIT 0 ns; -- wait for one delta cycle ... -- some VHDL statements WAIT 0 ns; -- wait for one delta cycle ... -- some VHDL statements END PROCESS;This process is translated into the following
execute() method:
bool L3lib_E8myentity_A4arch_P4proc::execute() {
switch (jmp) {
case 1: goto lab1;
case 2: goto lab2;
case 3: goto lab3;
}
lab1:
jmp = 2;
return true;
lab2:
...
jmp = 3;
return true;
lab3:
...
goto lab1;
}
Note, the return value of execute() is of no significance
here. It is only used if the process is sensitive on a conditional
expression (see Section 10.1).