Packages - 2022.1 English

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
UG901
Release Date
2022-06-06
Version
2022.1 English

Packages provide an additional way to share different constructs. They have similar behavior to VHDL packages. Packages can contain functions, tasks, types, and enums. The syntax for a package is:

package package_name;

   items

endpackage : package_name

The final package_name is not required, but it makes code easier to read. Packages are then referenced in other modules by the import command. Following is the syntax:

import package_name::item or *;

The import command must include items from the package to import or must specify the whole package.