Question: what is the difference between a verilog task and verilog function?
Answer: What is the difference between a Verilog task and a Verilog function? ... b) A task can contain timing control constructs like delays and all and therefore can execute in non zero simulation time while function should not contain any delay or event and therefore always execute in zero simulation time.