Tasks and functions

Common used statements can be grouped into a task or function. The difference between the two is that a function returns a value. A task does not return a value. The tasks and functions can be executed from several different places in the description. Verilog has also a number of built-in system tasks and functions.