As mentioned above, you can create an empty hierarchy and you can define the pin interface on that hierarchy before moving blocks of IP under the hierarchy.
Right-click the IP integrator canvas, with no IP blocks selected, and select Create Hierarchy. In the Create Hierarchy dialog box, you specify the name of the hierarchy. After the empty hierarchy is created, the BD should look like the following figure.
You can add pins to this hierarchy by typing the create_bd_pin command at the Tcl Console:
create_bd_pin -dir I -type rst /hier_0/rst
In the above command, an input pin named
rst of type rst was added to the hierarchy. You can add other pins using
similar commands. Likewise, you can add a clock pin to the hierarchy using the following
create_bd_pin -dir I -type clk /hier_0/clock
You can also add interfaces to a hierarchy by using the following Tcl commands. First set the BD instance to the appropriate hierarchy where the interface is to be added, using the current_bd_instance Tcl command:
Next, create the interface using the create_bd_intf_pin Tcl command as follows:
create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:gpio_rtl:1.0 gpio
It is assumed that the right type of interface has been created prior to using the above command. After executing the commands shown above the hierarchy should look as shown in the following figure.
After you have created the appropriate pin interfaces, different blocks can be dropped within this hierarchical block and pin connections from those IP to the external pin interface can be made.