What is the difference between a Verilog task and a Verilog function?

Submitted by: Administrator
The following rules distinguish tasks from functions:
A function shall execute in one simulation time unit;
a task can contain time-controlling statements.
A function cannot enable a task;
a task can enable other tasks or functions.
A function shall have at least one input type argument and shall not have an output or inout type argument;
a task can have zero or more arguments of any type.
A function shall return a single value; a task shall not return a value.
Submitted by: Administrator

Read Online Electrical Engineering Job Interview Questions And Answers