Inferring Generics/Parameters in an RTL Module - 2021.2 English

Vivado Design Suite User Guide: Designing IP Subsystems Using IP Integrator

Document ID
Release Date
2021.2 English

If the source RTL contains generics or parameters, those are inferred at the time the module is added to the block design, and can also be configured in the Re-customize Module Reference dialog box for a selected module.

The following is a code sample for an n-bit full adder, where adder_width is the generic that controls the width of the adder.

Figure 1. Code Snippet for an N-bit Full Adder

When the adder module is instantiated into the block design, the module is added with port widths defined by the default value for the generic adder_width. In this case the port width would be 2-bits.

You can double-click the module to open the Re-customize Module Reference dialog box. You can also right-click the module and select Customize Block from the context menu.

Any generics or parameters defined in the RTL source are available to edit and configure as needed for an instance of the module. As the parameter is changed, the module symbol and ports defined by the parameter are changed appropriately.

Click OK to close the Re-customize Module Reference dialog box and update the module instance in the block design.

Figure 2. Re-Customize Module Reference Dialog Box

The symbol in the block design is changed accordingly, as shown below:

Figure 3. RTL Module Post-Customization