Tasks and Functions - Tasks and Functions - 2022.2 English - UG901

Vivado Design Suite User Guide: Synthesis (UG901)

Document_ID
UG901
Release_Date
2022-11-16
Version
2022.2 English

• When the same code is used multiple times across a design, using tasks and functions:

° Reduces the amount of code.

° Facilitates maintenance.

• Tasks and functions must be declared and used in a module. The heading contains the following parameters:

° Input parameters (only) for functions.

° Input/output/inout parameters for tasks.

• The return value of a function is declared either signed or unsigned. The content is similar to the content of the combinatorial always block.