top of page
15.2. Tasks
​
A task is a more powerful procedural block that can have zero, one, or multiple outputs. Tasks can consume simulation time, contain timing controls, and call other tasks or functions. They are ideal for testbench operations and complex procedures.
​
Task Syntax and Structure
Verilog
Key Characteristics
​
-
Can have ZERO, ONE, or MULTIPLE outputs
​
-
Can have input, output, and inout arguments
​
-
CAN contain timing controls (#, @, wait)
​
-
Can consume simulation time
​
-
Can call other tasks and functions
​
-
Can have local variables
​
-
Called as a statement (not an expression)
​
Basic Task Examples
Verilog
Tasks with Timing Controls
Verilog
Tasks Calling Other Tasks and Functions
Verilog
bottom of page
