We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 65277

Vivado IP Flows - How to use the IP Packager to create IP with dynamic ports


This Tutorial will demonstrate how to use the IP Packager in Vivado to create an IP with dynamic ports, based on user configuration in the GUI.


To demo this, a simple "logic.vhd" file is used that instantiates an AND, OR, or an Inverter, based on user input in the IP config GUI. 

Depending on the configuration here, the IP ports are updated respectively.

This is to be used as a reference. 

There are four source files attached to this answer record. 

Please follow the steps below:

Note: This Answer Record should be used in conjunction with (UG1118) chapter 3.


Step 1: Add the HDL files from the zip as Design Sources in Vivado (Make sure that logic is set as Top):




The top level ports, and the entity for the logic HDL are shown below:

entity logic is
  Generic (
    Logical_AND : boolean := true;
    Logical_OR : boolean := false;
    Logical_INV : boolean := false;
    DATA_WIDTH    : integer    := 2
  Port (
    In1 : in std_logic_vector(DATA_WIDTH-1 downto 0);
    In2 : in std_logic_vector(DATA_WIDTH-1 downto 0);
    Out1 : out std_logic_vector(DATA_WIDTH-1 downto 0)
end logic;

There are also generate statements in the HDL, which will be created based on what logical feature is set.

In the IP Packager, we can use this to control how to configure the IP.


Step 2: Create the IP.

In Vivado, select Tools -> Create and Package IP -> Next.

Select Package your current project




Select where you want to save the IP to, and Include .xci files. Next, and Finish.




Step 3: Set Port dependencies.

In the HDL files in this tutorial, there is an AND, OR, and an Inverter. The AND and OR have two inputs, and one output.

However, the inverter has one input, and one output.

Here, we can use the port dependencies that will remove the second input if the inverter is selected.

To achieve this, go to Ports and Interfaces, and right click on the port you want.

to add the dependency, right click, and select Edit Port:


In the pop-up GUI, select Port Presence = Optional.


In the Driver value, set this to 0 (This is the value that will be set on the port if not used):


Next, we can set the parameter dependencies.


We only want to choose one logical feature at a time. 

To achieve this, select the Customization Parameters, then select the parameter that you want to add the dependency on, and select Edit Parameter:




Under Editable, select Dependent.

This will enable you to add a Tcl expression.

See below for an example. This will gray out the Logical_AND checkbox if both the Logical_OR and Logical_INV are set to false.

Also, set the Dependency to Yes, and use the same Tcl expression.

This will deselect the Logical_AND tick box if either the Logical_OR or Logical_INV is selected:




Select the Logical_OR and make the parameter dependent, and set the Dependency to Yes.

Use the expression below:




To test any changes, you can use the Customization GUI:




To create the IP, you can then select Review and Package -> Re-Package IP


Associated Attachments

Name File Size File Type
AR65277.zip 3 KB ZIP
AR# 65277
Date 01/25/2018
Status Active
Type General Article
  • Vivado Design Suite - 2015.3
  • Vivado Design Suite - 2015.2
Page Bookmarked