Vivado Ip Subsystems
Vivado Ip Subsystems
Vivado Ip Subsystems
User Guide
Designing IP Subsystems
Using IP Integrator
Introduction
As FPGAs become larger and more complex, and as design schedules become shorter, use
of third-party IP and design reuse is becoming mandatory. Xilinx recognizes the challenges
designers face, and to aid designers with design and reuse issues, has created a powerful
feature within the Vivado® Design Suite called the Vivado IP Integrator.
The Vivado IP Integrator feature lets you create complex system designs by instantiating
and interconnecting IP from the Vivado IP catalog on a design canvas. You can create
designs interactively through the IP Integrator canvas GUI or programmatically through a
Tcl programming interface. Designs are typically constructed at the interface level (for
enhanced productivity) but may also be manipulated at the port level (for precision design
manipulation).
An interface is a grouping of signals that share a common function. An AXI4-Lite master, for
example, contains a large number of individual signals plus multiple buses, which are all
required to make a connection. If each signal or bus is visible individually on an IP symbol,
the symbol will be visually very complex. By grouping these signals and buses into an
interface, the following advantages can be realized. First, a single connection in IP
Integrator (or Tcl command) creates a master to slave connection. Next, the graphical
representation of this connection is a simple, single connection. Finally, Design Rule Checks
(DRCs) that are aware of the specific interface can be run to assure that all the required
signals are connected properly.
A key strength of IP Integrator is that it provides a Tcl extension mechanism for its
automation services so that system design tasks such as parameter propagation, can be
optimized per-IP or application domain. Additionally, IP Integrator implements dynamic,
runtime DRCs to ensure, for example, that connections between the IP in an IP Integrator
design are compatible and that the IP themselves are properly configured.
Introduction
This chapter describes the basic features and functionality of Vivado IP Integrator.
Creating a Project
While entire designs can be created using IP Integrator, the typical design will consist of
HDL, IP, and IP Integrator block designs. This section is an introduction to creating a new IP
Integrator-based design.
As shown in the figure below, you start by clicking on Create New Project in the Vivado ®
IDE graphical user interface (GUI) to create a new project. The Vivado Design Suite supports
many different types of design projects. Refer to this link in the Vivado Design Suite User
Guide: System-Level Design Entry (UG895) [Ref 3] for more information.
X-Ref Target - Figure 2-1
To add or create a block design in a project, you must create an RTL project, or open an
Example Project as shown in Figure 2-2. You can add VHDL or Verilog design files, IP from
the Vivado IP catalog, and other types of design source files to the project using the New
Project wizard.
X-Ref Target - Figure 2-2
After adding design sources, existing IP, and design constraints, you can also select the
default Xilinx device or platform board to target for the project, as shown in Figure 2-3,
page 9. For more information, see Chapter 10, Using the Platform Board Flow in IP
Integrator.
IMPORTANT: The Vivado tools support multiple versions of Xilinx target boards, so carefully select your
target hardware.
See the Vivado Design Suite Tcl Command Reference Guide (UG835) [Ref 1] for information
on specific Tcl commands.
You create a new block design in the Flow Navigator by clicking the Create Block Design under
the IP Integrator heading, as shown in the following figure.
X-Ref Target - Figure 2-4
2. In the Create Block Design dialog box, specify the Design name and the Directory.
X-Ref Target - Figure 2-5
The default value for the Directory field is <Local to Project>. You can override this
default value by clicking the Directory field and selecting Choose Location.
3. Choose the location in which to create the block design, and click OK.
The entire block design directory is created local to the current project, or at the
specified location with its own directory structure.
create_bd_design <your_design_name>
IMPORTANT: Create Block Design will create an empty block design on disk, that is not automatically
removed if the block design is closed without saving. The empty block design should be manually
deleted either from the Sources window of the Vivado IDE, with the Remove File from Project
command, or with the following Tcl commands:
remove_files <project_name>/<project_name>.srcs/sources_1/bd/<bd_name>/<bd_name>.bd
file delete -force <project_name>/<project_name>.srcs/sources_1/bd/<bd_name>
Changing Layers
To display the layers, click the top-left icon in the Diagram window, as shown by the red
circle in the following figure. You can select the Attributes, Nets and Interface connections
that you want to view or hide by checking or un-checking the boxes against these.
X-Ref Target - Figure 2-6
Attributes
Several attributes of the block design can be displayed or hidden by checking or
un-checking the options. The following attributes can be modified.
• Pin tie offs - Pins that have a tie-off value specified, for e.g. ‘0’ or ‘1’ can be displayed
by checking the Pin tie offs option.
• Pins without parameter propagation - Show or hide the pins that do not propagate
parameters.
• Mark Debug - Show or hide pins that have been marked for debug. Nets marked for
debug have a bug symbol placed on them.
X-Ref Target - Figure 2-8
• Display pins of hidden nets and interfaces - This option works in conjunction with the
Nets or Interface Connections option. If a net has been hidden by un-checking the
appropriate net, then the pins that are connected by the net also are hidden. This
option displays the pins in question, even though the nets may be hidden.
Nets
Several types of nets such as clock nets, reset nets, data nets or simply other unclassified
type of nets can be hidden or shown on the block design canvas by selecting the
appropriate check box.
Interface Connection
Interface connections can also be shown or hidden by selecting the options under this
category.
Notice that you can control the colors of almost every object displayed in an IP Integrator
diagram. For example, changing the Background color to 240,240,240 as shown above
makes the background light gray. To hide the Block Design Options, either click the close
button in the upper-right corner, or click the Block Design Options button again.
The toolbar menu on the left side of the design canvas allow the following commands to be
invoked:
Zoom In
Zoom Out
Zoom Fit
Select Area
Fit Selection
Auto Fit Selection
Search
Hide contents of all blocks
Expand and show contents of all blocks
Add IP
Make External
Customize Block
Validate Design
IP Settings
Regenerate Layout
Optimize Routing
Show interface connections only
X-Ref Target - Figure 2-10
TIP: To enable the IP Details window of the IP Catalog, type Ctrl-Q in the catalog window.
2. By typing in the first few letters of the IP name in the Search filter at the top of the
catalog, only IP modules matching the search string are displayed.
3. To add a single IP, you can either click on the IP name and press the Enter key on your
keyboard, or double click on the IP name.
4. To add multiple IP to the Block Design, you can highlight the additional desired IP
(Ctrl+Click) and press the Enter key.
X-Ref Target - Figure 2-12
You can also add IP to the block design by opening the IP Catalog from the Project Manager
menu in Flow Navigator. Use the Search field to find specific IP in the IP Catalog window as
well.
X-Ref Target - Figure 2-13
You can also float the IP Catalog by clicking on the Float icon at the upper right corner of
the catalog window. Then drag and drop the IP of your choice from the IP Catalog in the
block design canvas.
TIP:Different fields associated with an IP such as Name, Version, Status, License, Vendor VLNV etc.
can be enabled by right-clicking in the displayed Header column of the IP Catalog and enabling and
disabling the appropriate fields.
Multiple IP can be added to the block design canvas at once by selecting multiple IP in the
IP catalog and using one of the methods described above.
From within the block design select the Add Module… command from the right-click or
context menu of the design canvas. The Add Module dialog box displays a list of all valid
modules defined in the RTL source files that you have previously added to the project.
Select one from the list to instantiate it into the block design.
The selected module is added to the block design and you can make connections to it just
as you would with any other IP in the design. The IP is displayed in the block design with
special markings that identify it as an RTL referenced module, as shown in Figure 2-14 on
the next page. Refer to Chapter 12, Referencing RTL Modules for more information on this
feature.
Hierarchical IP in IP integrator
Some IP in the IP Catalog are hierarchical, and offer a child block design inside the top-level
block design to display the logical configuration of the IP. These hierarchical IP let you see
the contents of the block, but do not let you directly edit the hierarchy. Changes to the child
block design can only be made by changing the configuration of the IP in the Re-customize
IP dialog box.
For example, the 10G Ethernet Subsystem and AXI 1G/2.5G Ethernet Subsystem are
Hierarchical IP in the Vivado IP Catalog. You would instantiate these IP just as any other IP
by searching and selecting the IP.
X-Ref Target - Figure 2-15
When the IP has been instantiated into a block design, double-click the IP to open the
Re-customize IP dialog box where you can configure the IP parameters, as shown in
Figure 2-16, page 18.
You can run Block Automation for Hierarchical IP when available. This feature creates a
subsystem consisting of IP blocks needed to configure the IP.
X-Ref Target - Figure 2-17
Using the Run Block Automation dialog box you can select various parameters of the IP
subsystem to be created. This puts together an IP subsystem for the mode selected.
X-Ref Target - Figure 2-18
You can also run Connection Automation when available to complete connections to I/O
ports needed for the Hierarchical IP subsystem.
X-Ref Target - Figure 2-19
The Run Connection Automation dialog box lets you select different connectivity options
for the subsystem.
X-Ref Target - Figure 2-20
You can see the child block design inside the AXI Ethernet subsystem IP by right-clicking
and selecting View Block Design option, as shown in Figure 2-22, page 20. You can also
view the block design by clicking on the View Block Design icon at the top left corner of
the IP symbol. This opens a block design window showing the child-level block design, as
shown in Figure 2-23, page 21.
TIP: You cannot directly edit the subsystem block design of a hierarchical IP.
TIP: If you re-customize the IP while the child-level block design is open, it will be closed.
X-Ref Target - Figure 2-23
If the IP is configured as an inverter or “NOT”, then the C Size denotes the number of single
bit inverters. Refer to the Utility Vector Logic datasheet (PB046) for more information.
For example, setting the C Size to 8 as an “AND” function will create one 8 input AND gate,
with a single output.
X-Ref Target - Figure 2-25
Constant
Use the Constant IP to tie signals up or down, and specify a constant value. Refer to the
Constant datasheet (PB040) for more information.
Utility Buffer
There are occasions when you need to manually insert a clock or signal buffer into a block
design. You can use the Utility Buffer IP in these situations to configure and instantiate one
of several different buffer types into the design. Refer to the Utility Buffer datasheet (PB043)
for more information.
Concat
To combine or concatenate bus signals of varying widths, use the Concat IP. The Number of
Ports defines the number of source signals that need to be concatenated together. Each of
the sources can be of different width, as automatically determined by IP Integrator or
specified by you. The resulting output is a bus that combines the source signals together.
Refer to the Concat datasheet (PB041) for more information.
X-Ref Target - Figure 2-26
Slice
To rip bits out of a bus signal, use the Slice IP. The Din Width field specifies the width of the
input bus, and Din From and Din Down To fields specify the range of bits to rip out. The
output width, Dout Width, is automatically determined. Refer to the Slice datasheet
(PB042) for more information.
TIP: You can use multiple Slice IP to pull different widths of bits from the same bus net.
Making Connections
When you create a design in IP Integrator, you add blocks to the diagram, configure the
blocks as needed, make interface-level or simple-net connections, and add interface or
simple ports. Making connections in IP Integrator is simple. As you move the cursor near an
interface or pin connector on an IP block, the cursor changes into a pencil. You can then
click on an interface or pin connector on an IP block, hold down the left-mouse button, and
then draw the connection to the destination block.
When signals are grouped as an interface, you can quickly connect all of the signals and
buses of the interface with other compatible interface pins. The compatible interfaces are
also identified by a green check mark.
In Figure 2-29, you can see that the interface pin M_AXI_DP on the microblaze_0
instance is connected to the S00_AXI interface pin on the microblaze_0_axi_periph
instance. In addition, two individual signals of the interface (AWVALID and BREADY) are
connected to a third instance, util_vector_logic_0, to AND the signals.
The separately connected signals of an interface must include all of the pins needed to
complete the connection. In the example shown in Figure 2-29, both the master and slave
AXI interface pins are expanded to enable connection to the individual AWVALID and
BREADY signals, as well as connecting to the pins of the Utility Vector Logic cell.
IMPORTANT: Individually connected interface signals are no longer connected as part of the Interface
in the block design. The individual signal is essentially removed from the interface. The entire signal
must be manually connected.
This warning should be expected since the connection will no longer be included as a part
of the interface, and you must manually complete the connection.
After making connections to signals or buses inside of an interface pin, you can collapse the
interface to shrink the block and hide the details of the pin. Clicking on the ‘-’ symbol on an
expanded interface pin collapses it to hide its contents. However, as seen in Figure 2-30, the
separately connected signals or buses of the interface will continue to be shown as needed
to properly display the connections of the block design.
X-Ref Target - Figure 2-30
External Connections
You can connect signals and interfaces to external I/O ports as follows:
• Make External
• Create Port
• Create Interface Port
You can also use Ctrl+Click to select multiple pins and invoke the Make External
command for all pins at one time.
This command ties a pin on an IP to an I/O port on the block design. IP Integrator
connects the port on the IP to an external I/O.
Creating Ports
1. To use the create port option, right-click and select Create Port, as shown in the
following figure. This feature is used for connecting individual signals, such as a clock,
reset, and uart_txd.
Create Port gives you more control in specifying the input and output, the bit-width
and the type (such as clk, reset, and data).
When you specify a clock, you can also specify the input frequency.
2. Specify the port name, the direction such as input, output or bidirectional, and the type
(such as clock, reset, interrupt, data, clock enable or custom type).
You can also create a bit-vector by checking the Create Vector field and then selecting
the appropriate bit-width.
2. In the Create Interface Port dialog box, shown in the following figure, specify the
interface name, the vendor, library, name and version (VLNV) field, and the mode field
such as MASTER or SLAVE.
In the figure below, the port shown is a clock input source, so you can specify different
properties such as frequency, phase, clock domain, any bus interface, the associated
clock enable, associated reset and associated asynchronous reset (frequency).
X-Ref Target - Figure 2-36
Handling Interrupts
Interrupt handling in the Vivado Design Suite IP Integrator tool depends on the processor
being used. For a Zynq®-7000 processor, the Generic Interrupt Controller block within the
Zynq-7000 processor handles the interrupt.
The inputs of the Concat IP are driven by different interrupt sources. Accordingly, the
Concat IP must be configured to support the appropriate number of input ports. The
Number of Ports field must be set to the number of interrupt sources in the design as
shown in the following figure.
X-Ref Target - Figure 2-39
TIP: The width of the output (dout) is set automatically during parameter propagation.
You can configure several of the parameters for the AXI Interrupt Controller. The following
figure shows the parameters available from the Basic tab of the AXI Interrupt Controller, of
which several are configurable:
X-Ref Target - Figure 2-40
• The Number of Peripheral Interrupts cannot be set by the user. This is automatically
set during parameter propagation. This value is determined by the number of interrupt
sources that are driving the inputs of the Concat IP.
• The Fast Interrupt Mode can be set by the user if low latency interrupt is desired.
• The Peripheral Interrupts Type is set to Auto, which can be overridden by the user by
toggling the Auto setting to Manual. In manual mode, users can specify the custom
values in these fields.
For example, if the Interrupt Type is Edge Interrupt, the other choice is Edge Type.
If the Interrupt Type is Level Interrupt, the other choice is Level Type.
The following figure shows parameters on the Advanced tab of the AXI Interrupt
Controller. See the LogiCORE IP AXI Interrupt Controller (PG099) [Ref 11] for details
of these parameters.
X-Ref Target - Figure 2-41
One option to notice is the Asynchronous Clocks option. The AXI Interrupt Controller
determines whether the interrupt sources in a design are from the same clock domain or
different clock domains. In the case of interrupts being driven from different clock domains,
the Enable Asynchronous Clock operation is enabled automatically. In this case,
cascading synchronizing registers are added to the interrupt sources.
TIP: You can also override the automatic behavior by toggling the Auto button to Manual and
setting this option manually.
Click the Run Block Automation link in the banner of the design canvas, as shown in the
following figure, for assistance in putting together a simple MicroBlaze system.
X-Ref Target - Figure 2-42
The Run Block Automation dialog box opens, as shown in Figure 2-43, page 36, and lets
you provide input about basic features that the microprocessor system needs.
After you specify the necessary options, the Block Automation feature automatically creates
a basic system as shown in the following figure.
X-Ref Target - Figure 2-44
The MicroBlaze System shown in Figure 2-44, page 36 consists of a MicroBlaze Debug
Module, which is a hierarchical block called the microblaze_1_local_memory that has
the Local Memory Bus, the Local Memory Bus Controller and the Block Memory Generator,
a Clocking Wizard, an AXI Interconnect and an AXI Interrupt Controller.
Because the design is not connected to any external I/O at this point, IP Integrator offers
the Connection Automation feature as shown in the light green banner of the design
canvas in the preceding figure. When you click Run Connection Automation, IP Integrator
provides assistance in hooking interfaces and/or ports to external I/O ports.
The Run Connection Automation dialog box, as shown in the following figure, lists ports
and interfaces that the Connection Automation feature supports, along with a brief
description of the available automation, and available options for each automation.
X-Ref Target - Figure 2-45
Figure 2-45: Ports and Interfaces that can use Connection Automation
For Xilinx Target Reference Platforms or evaluation boards, IP Integrator has knowledge of
the FPGA pins that are used on the target boards. Based on that information, the IP
Integrator connection automation feature can assist you in tying the ports in the design to
external ports on the board. IP Integrator then creates the appropriate physical constraints
and other I/O constraints required for the I/O port in question.
In the MicroBlaze system design shown in Figure 2-44, page 36, the following connections
need to be made:
By selecting the appropriate options, as shown in the following figure, you can tie the clock
and the reset ports to the appropriate sources on the target board.
You can select the reset pin that already exists on the KC705 target board in this case, or you
can specify a custom reset pin for your design. After the reset is specified, the reset pin is
tied to the ext_reset_in pin of the Proc_Sys_Rst IP.
X-Ref Target - Figure 2-47
Figure 2-47: Connecting the Reset Pin to the Board Reset Pin
For example, assume that you instantiate the AXI_GPIO IP into the design. The Run
Connection Automation link reappears in the banner on top of the design canvas. You can
then click Run Connection Automation and the S_AXI port of the newly added AXI GPIO
can be connected to the MicroBlaze processor using the AXI Interconnect. Likewise the
GPIO interface can be tied to one of the several interfaces present on the target board.
The connection option are: GPIO interface port can be connected to either the Dip
Switches that are 4-bits, or to the LCD that are 7-bits, LEDs that are 8-bits, 5-bits of Push
Buttons, the Rotary Switch on the board, or can be connected to a Custom interface.
Selecting any one of the choices connects the GPIO port to the existing connections on the
board.
Selecting the S_AXI interface for automation, as shown in the following figure, informs you that
the slave AXI port of the GPIO can be connected to the MicroBlaze master. If there are multiple
masters in the design, then you have a choice to select between different masters. You can also
specify the clock connection for the slave interface such as S_AXI interface of the GPIO.
X-Ref Target - Figure 2-49
Figure 2-49: Connecting the Slave Interface S_AXI to the MicroBlaze Master
When you click the OK in the Run Connection Automation dialog box, the connections are
made and highlighted as shown in the following figure.
Enhanced Designer Assistance is available for advanced users who want to connect an
AXI4-Stream interface to a memory-mapped interface. In this case IP Integrator instantiates
the necessary sub-components and makes appropriate connections between them to
implement this functionality. See this link in the Vivado Design Suite User Guide: Embedded
Hardware Design (UG898) [Ref 5] for more information on this feature.
Selecting the appropriate tab shows all the clocks or resets in the design.
Clocks are listed in the Clocks tab based on the clock domain name. In the figure above, the
clock domain is design_1_clk_wiz_1_0_clk_out1 and the output clock is called clk_out1
with a frequency of 100 MHz, and is driving several clock inputs of different IP.
When you select a clock from the Unconnected Clocks folder, IP Integrator highlights the
respective clock port in the block design. Right-clicking the selected clock presents you
with several options.
In the case shown in Figure 2-42, page 35, the Designer Assistance is in the form of the Run
Connection Automation command which can be used to connect the CLK_IN1_D input
interface of the Clocking Wizard to the clock pins on the board.
You can also select the Make Connection option, and connect the input to an existing clock
source in the design. Finally, you can tie the pin to an external port by selecting the Make
External option.
Other options for switching the context to the diagram and running design validation are
also available.
When you select Make Connection, a dialog box opens, as shown in the following figure,
if a valid connection can be made.
X-Ref Target - Figure 2-53
Selecting the appropriate clock source makes the connection between the clock source and
the port or pin.
Connections can similarly be made from the Resets tab. Using the Clocks and Resets tab of
the Signals view provides you with a visual way to manage and connect clocks in the design.
If a valid connection to the selected pin exists, the Make Connection dialog box opens that
shows all the possible sources to which that the net can be connected. From this dialog box
you can select the appropriate source to drive the port/pin can be selected.
In this way connections from the same source pin can be made to multiple different
destinations at once.
Figure 2-56: Example Design with External AXI Master Interfacing with Block Design
When the AXI interface of the Interconnect is made external, the Address Editor tab
becomes available, and memory mapping all the slaves in the block design can be done in
the normal manner.
You can also move blocks manually by clicking on a block, holding the left-mouse button
down, and moving the block with the mouse, or with the arrow keys. The diagram only
allows specific column locations, indicated by the dark gray vertical bars that appear when
moving a block. A grid appears on the diagram when moving blocks, which assists you in
making better block and pin alignments.
It is also possible to manually place the blocks where desired and then click Optimize
Routing . This preserves the placement of the blocks (unlike the Regenerate Layout
function) and only modifies the routing to the various blocks. In other words, the optimize
routing function keeps the location of different blocks intact and only modifies the nets
connecting different blocks.
Clicking the Show interface connections only button again restores all the connections in
the block design.
Creating Hierarchies
As shown in the following figure, you can create a hierarchical block in a diagram by using
Ctrl+Click to select the desired IP blocks, right-click and select Create Hierarchy. IP
Integrator creates a new level of hierarchy containing the selected blocks.
Creating multiple levels of hierarchy is supported. You can also create an empty level of
hierarchy, and later drag existing IP blocks into that empty hierarchical block.
When you click the + sign in the upper-left corner of an expandable block you can expand
the hierarchy. You can traverse levels of hierarchy in a diagram using the Explorer type path
information displayed in the upper-left corner of the IP Integrator diagram.
Clicking Create Hierarchy opens the Create Hierarchy dialog box, as shown in the following
figure, where you can specify the name of the new hierarchy.
X-Ref Target - Figure 2-59
This action groups the selected IP blocks under one block, as shown below.
Right-click on 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. Once the empty
hierarchy has been created, the block design should look like the following figure.
X-Ref Target - Figure 2-61
In the above command, an input pin named reset of rst type 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 Tcl command:
You can also add interfaces to a hierarchy by using the following Tcl commands. First set the
block design instance to the appropriate hierarchy where the interface is to be added, using
the following command:
current_bd_instance /hier_0
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.
X-Ref Target - Figure 2-62
You can also click the Validate Design button in the toolbar on the IP Integrator canvas.
If the design is free of Warnings and/or Errors, a confirmation dialog box displays, as shown
in the following figure.
X-Ref Target - Figure 2-65
As can be seen in Figure 2-66, page 50, the bram_addr_a pin of the AXI BRAM controller
which is 14-bits wide is connected to the addra pin of the Block Memory Generator which
is 32-bits wide. The port width mismatch is not flagged during design validation. However,
a warning is issued during the generation of the lock design output products:
The warning indicates that the tool has detected a port width mismatch while connecting
the ports or pins, and that only the lower order bits (the first 14 bits) will be connected. You
will need to evaluate the warning and take appropriate action as needed. Typically, it is okay
to ignore this warning message.
For more information on packaging a block design for use in the Vivado IP Catalog, see this
link in the Vivado Design Suite User Guide: Creating and Packaging Custom IP (UG1118)
[Ref 11].
Creating a Memory-Map
Introduction
Master interfaces reference an assigned memory range container called address spaces, or
bd_address_space objects. Slave interfaces reference a requested memory range
container, called a memory map.
By convention:
• Memory-maps are named after the slave interface pins that reference them, for
example the S_AXI interface references the S_AXI memory-map, though that is not
required.
• Address space names are related to its usage; for example, the MicroBlaze™ processor
has a Data address space and an Instruction address space.
The memory-map for each slave interface pin contains slave segments, or
bd_address_seg objects. These address segments correspond to the address decode
window for that slave.
A typical AXI4-Lite slave has only one address segment, representing a range of memory.
However, some slaves, like a bridge, have multiple address segments, or a range of
addresses for each address decode window.
When a slave segment is mapped to the master address space, a master bd_address_seg
object is created, mapping the address segments of the slave to the master. The Vivado® IP
Integrator can automatically assign addresses for all slaves in the design. However, you can
also manually assign the addresses using the Address Editor.
TIP:The Address Editor tab only appears if the diagram contains an IP block that functions as a bus
master (such as the MicroBlaze processor) or if an external bus master (outside of IP Integrator) is
present.
Click the Address Editor tab above the design canvas. In the Address Editor, you can see
the address segments of the slaves, and can map them to address spaces in the masters.
If you generate the RTL from an IP Integrator block design without first generating
addresses, the IP Integrator prompts you to automatically assign addresses at that point.
You can also set addresses manually by entering values in the Offset Address and Range
columns.
As the peripherals are instantiated and connected to the processor in the block design
canvas using connection automation, the IP Integrator automatically enters a
corresponding memory assignment that peripheral in the Address Editor, as shown in
Figure 3-2, page 53.
• Cell: Describes the master and the connected peripherals that can be addressed by that
master.
You can expand the tree by clicking the Expand All button, or by clicking the + sign
to expand the selection.
As shown in Figure 3-2, the instance name of the “master” is microblaze_0 which
addresses the Data and Instruction address spaces.
• Slave Interface: Lists the name of the slave interface pin of the peripheral instance.
By convention, the two names that IP Integrator creates “on-the-fly” are Mem (memory)
and Reg (register), as shown in Figure 3-5, which shows a design with multiple memory
instantiations.
X-Ref Target - Figure 3-4
These are given the base names in the address editor as shown in Figure 3-5, page 55.
• Offset Address: Describes the offset from the start of the address block.
As an example the addressable range for data and instruction address spaces are 4G
each in Figure 3-5. The address space starts at 0x00000000 and ends at 0xFFFFFFFF.
Within this address space the axi_uartlite_0 can be addressed to a range starting
at offset 0x40600000, axi_gpio_0 can be addressed starting at offset 0x40000000
and so forth. This field is automatically populated as the slaves are mapped in the
address space of the master. However, they can also be changed by the user.
The Offset Address and the Range fields are interdependent. The Offset Address field
must be aligned with the Range field. Alignment implies that for a range of 2 N the least
significant bits of the starting offset must have at least N 0’s. As an example, if the range
of a slave segment happens to be 64K or 216, the Offset Address must be in the form
0xXXXX0000. This means the lowest 16-bits need to be 0’s. If this field is not set
correctly, the error message, shown in Figure 3-6 displays.
In Figure 3-6, page 56, the user set an offset address with only 12 0’s in the least significant bits.
Only a range of 4K or 212 can be accommodated by the proposed offset address. Therefore, the
message pops up informing the user that the address is misaligned. The message also tells the
user where the next offset address can be set based on the current memory map.
• Range: Specifies the total range of the address block for a particular slave. This field is
typically populated based on a parameter in the component.xml file for an IP. This
can also be changed by clicking the drop-down menu and selecting the appropriate
value for this field.
The Range and the Offset Address fields are interdependent, and as described in the
Offset Address field previously, the 2N Range field must be aligned with the N number
of least significant bits of the Offset Address field. Setting the Range field such that it
exceeds this number can cause the message, shown in the following figure, to display.
In Figure 3-7, the user tried to set the range to 128K or 217, for an offset in the form
0xXXXX0000, which is an offset with only 16 least significant bits (LSBs). To
accommodate a range of 128K, the form of the address must be at least 0xXXX20000,
that is with at least 17-bits in the LSB of the starting offset.
• High Address: Adjusts itself based on the Offset Address and the Range value. This is
the last addressable address in a particular assigned segment.
This maps the slave segments as shown in Figure 3-9, page 58.
X-Ref Target - Figure 3-9
After the slave segments are mapped, several options are presented to the user for other
actions using a right-click on a mapped address segment, as shown in the following figure.
• Name: Shows the name of the master segment that was automatically assigned. This
name can be changed by the user if desired.
• Full Name: Is not editable, and shows the full name of the mapped slave segment.
• Slave Interface: Shows the slave interface of the peripheral that references the slave
segment.
Unmap Segment
A mapped address segment can be unmapped by selecting Unmap Segment from the
context menu. This address segment then shows up in the Unmapped Slaves folder as
shown in Figure 3-12, page 60. The user can also right-click and select Assign Address
(which maps only the selected address) or Auto Assign Address (which assigns all
unmapped address segments in the design).
X-Ref Target - Figure 3-12
Exclude Segment
Excluding a segment makes a mapped segment un-addressable to the master in question.
This is typically done when multiple masters are present in the design and the user wants to
control which masters should access which slaves. See Sparse Connectivity, page 61 for
more information.
For example, the MicroBlaze in the following block design has three different master
interfaces accessing various address segments: DLMB, ILMB, and M_AXI_DP within the Data
Address Space.
Selecting the Group by Master Interfaces re-arranges the different address segments in the
table under the master interfaces tree.
X-Ref Target - Figure 3-14
Figure 3-14: Address Editor with Grouped Address Segments under Master Interfaces
Sparse Connectivity
In a multiple master design users might want to specify slaves that could potentially be
accessed by all masters or by certain masters only. This feature of memory mapping in IP
Integrator is called sparse connectivity.
In the following figure, there are two masters, Master_1 and Master_2, accessing two
slaves, Slave_1 and Slave_2 using the same interconnect.
X-Ref Target - Figure 3-16
For an example, assume that Master_1 must access Slave_2 only, and Master_2 needs
to access both Slave_1 and Slave_2. To exclude Slave_1 from the memory-map of
Master_1, right-click M00_AXI and select Exclude Segment, as shown in Figure 3-17,
page 63.
This action excludes the segment by showing the segment under the Excluded Address
Segments folder as shown in the following figure.
X-Ref Target - Figure 3-18
IMPORTANT: An excluded master segment still occupies a range within the address space despite it
being inaccessible by the master.
If, after excluding a slave within a master address space, one attempts to manually place
another slave to address that overlaps with the excluded slave, an error occurs during
validation.
This message is typically thrown during validation. Each peripheral must be mapped into a
non-overlapping range of memory within an address space.
[BD 41-1356] Address block <name of slave segment> is not mapped into <name of
address space>. Please use Address Editor to either map or exclude it.
[BD 41-1353] <name of slave segment> is mapped at disjoint segments in master <name
of address space> at <memory range> and in master <name of address space> at <memory
range>. It is illegal to have the same peripheral mapped to different addresses
within the same network. Peripherals must either be mapped to the same offset in all
masters, or into addresses that are apertures of each other or to contiguous
addresses that can be combined into a single address with a range that is a power of
2.
This message is typically thrown during validation. Within a network defined as a set of
masters accessing the same set of slaves connected through a set of interconnects, each
slave must be mapped to the same address within every master address space, or apertures
or subsets of the largest address range.
Overview
At this point, you should know how to create a block design, populate it with IP, make
connections, assign memory address spaces, and validate the design. This chapter of the
guide describes how to work with block designs, creating the necessary output files for
synthesis and simulation, adding a block design to a top-level design, and exporting the
block design to the software development toolkit (SDK) for embedded processor designs.
To generate output products, in the Vivado sources pane, right-click the block design and
select Generate Output Products, as shown in the following figure.
X-Ref Target - Figure 4-1
Alternatively, from the Flow Navigator, click IP Integrator > Generate Block Design, as
shown in Figure 4-2.
X-Ref Target - Figure 4-2
Generating the output products generates the top-level netlist of the block design. The
netlist is generated in either VHDL or Verilog based upon the Target Language settings in
Project Settings.
• Global: Used for generating output products used in top down synthesis of the whole
design. This is essentially disable out-of-context synthesis for the block design, and
simply synthesizes it with the whole design.
• Out of context per IP: Generates the output product for each individual IP used in the
block design. A DCP is created for every IP used in the block design. This option can
significantly reduce synthesis run times because the IP cache can be used with this
option to prevent Vivado synthesis from regenerating output products for specific IP if
they have not been changed.
• Out of context per Block Design: This lets you synthesize the complete block design
separately from, or out of the context of the top-level design. This option is generally
selected when third party synthesis is used. A design checkpoint (DCP) is generated for
the block design when this option is selected.
You can enable the IP Cache in the Project Setting dialog box. Click IP and then select the
IP Cache tab, as seen in Figure 4-4. IP caching can be Disabled, or can be set as Local or
Remote. For more information on setting the IP Cache, refer to this link in the Vivado
Design Suite User Guide: Designing with IP (UG896) [Ref 4].
X-Ref Target - Figure 4-4
Global Synthesis
When this mode is chosen a synthesized design checkpoint (DCP) is created for the whole
top-level design, but not for the block design or for individual IP used in the block design.
The entire block design is generated in the top-down synthesis mode. You can see this in
the Design Runs window, where only one synthesis run is defined.
X-Ref Target - Figure 4-5
Out-of-Context per IP
This mode creates an out-of-context (OOC) synthesis run and DCP for every IP that is
instantiated in the design. Notice that each IP in the block design also is marked with a
filled square that indicates the IP is marked as OOC. Design Runs window lists synthesis
runs for each IP used in the block design, as shown in Figure 4-6.
TIP: The Design Runs window also groups the nested synthesis runs for the IP used in the child block
designs of Hierarchical IP as discussed in Hierarchical IP in IP Integrator, page 17.
Generation of output products in OOC per IP mode takes a little longer than a single global
synthesis run. However, runtime improvements are realized in subsequent runs as only the
updated blocks or IP are re-synthesized instead of the whole top-level design. In addition,
when the IP Cache is enabled, as shown in Figure 4-4, page 68, Vivado synthesis can
provide even greater runtime improvements. When the IP Cache is enabled only IP that
have been modified, either because of re-customization or because of an impact from
parameter propagation, are synthesized. Refer to this link in the Vivado Design Suite User
Guide: Designing with IP (UG896) [Ref 4] for more information on using the IP cache.
If the block design is added as a synthesized netlist to other projects through the Add
Sources wizard, the DCP file is added to the project. Refer to this link in the Vivado Design
Suite User Guide: System-level Design Entry (UG895) for more information on adding block
designs as design sources.
Inside the ./bd folder a separate directory for each block design can be found, the
<block_design_name> folder. In Figure 4-8, config_mb_design is the name of the
only block design.
Under the <block_design_name> folder, several sub-folders are located as shown in the
following figure.
X-Ref Target - Figure 4-9
• hdl - This folder contains the top level netlist of the block design as well as the Vivado
managed wrapper file for the block design.
• hw_handoff - This folder contains intermediate files needed for hardware handoff to
SDK.
• ip - The ip folder contains several sub-folders, one per IP inside the block design.
These IP folders may contain several sub-folders which may vary depending on the IP.
Typically all the source files and constraints files delivered for the IP can be found in
these sub-directories.
• ipshared - This folder contains files that are common between various IP. IP can have
several sub-cores within them. Files shared by these sub-cores can be found in the
ipshared folder.
• ui - This folder contains the *.ui file which has the graphical information such as
coordinates of different blocks on the canvas, comments, colors and layer information.
Additionally, when output products for the block design are generated, a folder called
<project_name>/<project_name>.ip_user_files is created. Inside of
The following is a brief description of the directories that may be present in the
<project_name>.ip_user_files folder:
• bd – Contains a sub-folder for each IP Integrator Block Design (BD) in the project.
These sub-folders will have support files for the various IP used in the block designs.
• ipstatic – Contains common IP static files from all IP/BDs in the project.
• mem_init_files – This directory will be present if any IP deliver data files.
• sim_scripts – By default scripts for all supported simulators for the OS selected are
created for each IP and for each Block Design present.
To manually export IP or block design files to the ip_user_files directory, you can use the
export_ip_user_files command at the Tcl Console. Whenever you reset and generate an IP
or block design, this command will be automatically run. For more information refer to this link in
the Vivado Design Suite User Guide: Designing with IP (UG896) [Ref 4].
You can perform a higher-level instantiation of the block design by selecting the block
design in the Vivado IDE Sources window and selecting Create HDL Wrapper (in the
following figure). This generates a top-level HDL file for the IP Integrator sub-system.
The Create HDL Wrapper dialog box opens, as shown in the following figure.
X-Ref Target - Figure 4-12
• Copy generated wrapper to allow user edits. When a block design is a subset of an
overall design hierarchy, you need to have the option to manually edit the wrapper file
so you can then instantiate other design components within the wrapper file.
IMPORTANT: Ensure that this file is updated any time an I/O interface of the block design changes.
• Let Vivado tools manage wrapper and auto-update. If the block design is the only
design component in the project or if edits to the wrapper file are not necessary, use
this option.
When the Vivado tools manage the wrapper file, that file is updated every time you
generate output products. The wrapper file is located in the directory
<project_name>.srcs/sources_1/bd/<bd_name>/hdl.
You are now ready to take the design through elaboration, synthesis, and implementation.
Other conditions in which I/O buffers are not inserted include the following:
• If any of the _I, _O, and _T ports are manually connected by the user, either by making
them external or by connecting it to another IP in the design.
• If the interface has the BUFFER_TYPE parameter set to NONE.
If you want to hand-instantiate I/O buffers in the block design, use the Utility Buffer IP that
is available in the Vivado IP Catalog. This IP can be configured as different kinds of I/O
buffers as shown in the following figure. Refer to the Utility Buffer datasheet (PB043) for
more information.
X-Ref Target - Figure 4-13
Assuming that a block design was created using a project-based flow, and all the directory
structure including and within the block design folder is available, the block design can be
added to a new Vivado project. The only limitation is that the target part or platform board
for the current project must be the same as the original project in which the block design
was created.
IMPORTANT: If the target devices of the projects are different, even within the same device family, the
IP used in the block design will be locked, and the design must be re-generated. In that case the
behavior of the new block design might not be the same as the original block design.
Alternatively, you can right-click in the Sources window and select Add Sources.
2. In the Add Sources dialog box, select Add Existing Block Design Sources, as shown in
the following figure, and click Next.
X-Ref Target - Figure 4-14
3. In the Add Existing Block Design Sources page, click Add Files.
4. In the Add Sources File window, navigate to the folder where the block design is located,
select the .bd file, and click OK.
X-Ref Target - Figure 4-15
5. In the Add Sources dialog box you can enable or disable the Copy sources into project
check box as needed for your current project.
X-Ref Target - Figure 4-16
You can reference the block design from its original location, or copy it into the local
project directory. Managing the block design remotely is the recommended practice
when working with revision control systems. See Revision Control for Block Designs,
page 78. However, if someone edits the remote block design, they may inadvertently
change your referenced copy. To avoid that, you can enable the Copy sources into
project check box, as seen in Figure 4-16, page 76, so that you can change the block
design when needed, but remote users won’t be able to affect your design.
You can also set the block design as read-only to prevent modification. See Adding
Read-Only Block Designs, page 77 for more information.
TIP: When adding a block design from a remote location, ensure that the design is locked for your
project by copying the remote block design locally into the project.
6. Click Finish to close the Add Sources dialog box and add the block design to your
project.
In the Sources window, you can see the block design added under Design Sources.
X-Ref Target - Figure 4-17
TIP: You might need to update the IP used in the block design, or validate the block design, generate a
\
wrapper, and synthesize and implement the design. These topics were previously described in this
document.
If you have generated output products for the block design, you can change the file
permissions on all files (i.e. chmod 555 bd -R). The block design, and all its output
products, will be read-only. Synthesis, simulation, and implementation can be run using
these files.
However, if you have not generated output products for the block design (BD), you can still
make the BD file read-only (i.e. chmod 555 bd/design_1/design_1.bd). From this
read-only block design you can generate the output products needed for the design,
although the block design itself cannot be changed.
TIP: On Windows you can select the files, and change file properties to read-only.
You can generate the output products for read-only block designs, if they have not been
previously generated, provided the block design has been validated and saved.
Refer to this link in the UltraFast Design Methodology Guide for the Vivado Design Suite
(UG949) [Ref 9] for more information on using the Vivado Design Suite with revision control
software.
After a bitstream is generated and the design is exported, then the device can be
downloaded and the software can run on the processor. The hardware can be exported at
two stages in the design flow: pre-synthesis and post bitstream generation. To export the
hardware prior to synthesis, follow the steps below:
1. Generate the block design. In the Flow Navigator, under IP Integrator, click Generate
Block Design. Alternatively, select the block design in the Sources window, right-click
and select Generate Output Products.
2. In the Generate Output Product dialog box, select the appropriate option and click
Generate.
X-Ref Target - Figure 4-19
3. Export the hardware by selecting File > Export > Export Hardware. In the Export
Hardware dialog box, do not select the Include Bitstream option (as the bitstream has
not been generated yet). Leave the Export to: field to its default value of specify a
custom location. Click OK.
For exporting the hardware after bitstream generation, follow the steps outlined below.
4. Select File > Export > Export Hardware from the menu. In the Export Hardware dialog
box, select Include Bitstream. Leave the Export to: field to its default value of specify
a custom location. Click OK.
X-Ref Target - Figure 4-21
For more information on exporting hardware, refer to Generating Basic Software Platforms
Reference Guide (UG1138) [Ref 12].
Alternatively, you can add design sources by selecting Flow Navigator > Add Sources.
Add or Create Design Sources is selected by default. This option adds the ELF file as a
design file as well as a simulation source.
TIP: If you are adding an ELF file for simulation purposes only, select Add or Create Simulation
Sources.
3. Click Next.
The Add or Create Design Sources dialog box opens as shown in Figure 4-22, page 82.
Figure 4-22: Add Sources: Add or Create Design Sources Dialog Box
4. In the Add or Create Design Sources dialog box, click the + icon to Add Files.
5. The Add Source Files dialog box opens.
6. Navigate to the ELF file, select it, and click OK.
X-Ref Target - Figure 4-23
In the Add or Create Sources dialog box, you see the ELF file added to the project.
7. Either copy the ELF file into the project by checking Copy sources into project or leave
the option unchecked if you want to work with the original ELF file. Then click Finish.
Under the Sources window, you see the ELF file added under the ELF folder, as shown in
the following figure.
X-Ref Target - Figure 4-24
You then associate the ELF file with the microprocessor design. To do so:
8. In the Sources window, select and right-click the block design and select Associate ELF
Files as shown in Figure 4-25, page 84.
You can associate an ELF for synthesis or simulation by clicking the appropriate browse
icon (Under Design Sources or Simulation Sources) and browse to the newly added ELF
file to the design.
10. Navigate to the file that has been added as Design Sources.
11. Highlight the file, as shown in the following figure, and click OK.
X-Ref Target - Figure 4-29
12. Make sure that the ELF file is populated in the Associated ELF File column and click OK.
1. In the Sources window, right-click the block design, and select Associate ELF files.
2. In the Associate ELF Files dialog box, click the browse button on either the processor
instance under Design Sources or Simulation Sources, as shown in the following figure.
X-Ref Target - Figure 4-31
3. In the Associate ELF File dialog box, click Add Files, as shown in Figure 4-32, page 88.
4. In the Add Source Files dialog box, shown in the following figure, navigate to the folder
where the ELF file is located. Select the file and click OK.
X-Ref Target - Figure 4-33
Figure 4-33: Navigate to the Directory where the ELF File is Located
5. In the Associate ELF file dialog box, select the newly-added ELF file and click OK.
X-Ref Target - Figure 4-34
6. In the Associate ELF Files dialog box, verify that the new ELF file is shown in the
processor instance field and click OK.
Figure 4-35: Verify that the Newly Added File is Associated to the Processor Instance
With the ELF file added to the project, the Vivado tools automatically merge the Block RAM
memory information (MMI file) and the ELF file contents with the device bitstream (BIT)
when generating the bitstream to program the device.
CAUTION! The ELF file is not copied as a part of the design sources when this method is used.
You can also do the association in command-line mode using the UpdateMEM utility. See
this link in the Vivado Design Suite User Guide: Embedded Processor Hardware Design
(UG898) for more information.
Introduction
Parameter propagation is one of the most powerful features available in IP Integrator. The
feature enables an IP to auto-update its parameterization based on how it is connected in
the design. IP can be packaged with specific propagation rules, and IP Integrator will run
these rules as the diagram is generated.
For example, in the following figure, IP0 has a 64-bit wide data bus. IP1 is then added and
connected, as is IP2.
X-Ref Target - Figure 5-1
When you run the parameter propagation rules, you are alerted to the fact that IP2 has a
different bus width. Assuming that the data bus width of IP2 can be changed through a
change of parameter, IP Integrator can automatically update IP2.
If the IP cannot be updated to match properties based on its connection, then an error
displays, alerting you of potential issues in the design. This simple example demonstrates
the power of parameter propagation. The types of errors that can be corrected or identified
by parameter propagation are often errors not found until simulation.
A list of signals can be grouped in IP - XACT using the concept of a bus Interface with its
constituent port map that maps the physical port (available on the IP’s RTL or netlist) to a
logical port as defined in the IP-XACT abstraction Definition file for that interface type.
Special Signals
Special signals include:
• Clock
• Reset
• Interrupt
• Clock Enable
• Data (for traditional arithmetic IP which do not have any AXI interface (for example
adders and subtractors, multipliers)
Clock
The clock interface can have the following parameters associated with them. These
parameters are used in the design generation process and are necessary when the IP is used
with other IP in the design.
• ASSOCIATED_BUSIF: The list contains the names of all bus interfaces which run at this
clock frequency. This parameter takes a colon-separated list (:) of strings as its value. If
there are no interface signals at the boundary that run at this clock rate, this field is left
blank.
X-Ref Target - Figure 5-2
In the figure above, the ASSOCIATED_BUSIF parameter of the selected clock interface
port lists the master interfaces (M00_AXI and M01_AXI) and slave interfaces (S00_AXI
and S01_AXI) separated by colons. However, if one of the interfaces, such as M00_AXI,
doesn't run at this clock frequency you will leave the interface out of the
ASSOCIATED_BUSIF parameter for the clock.
• ASSOCIATED_RESET: The list contains names of reset ports (not names of reset
container interfaces) as its value. This parameter takes a colon-separated (:) list of
strings as its value. If there are no resets in the design, this field is left blank.
• ASSOCIATED_CLKEN: The list contains names of clock enable ports (not names of
container interfaces) as its value. This parameter takes a colon-separated (:) list of
strings as its value. If there are no clock enable signals in the design, this field is left
blank.
• FREQ_HZ: This parameter captures the frequency in hertz at which the clock is running
in positive integer format. This parameter needs to be specified for all output clocks
only.
• PHASE: This parameter captures the phase at which the clock is running. The default
value is 0. Valid values are 0 to 360. If you cannot specify the PHASE in a fixed manner,
then you must update it in bd.tcl, similar to updating FREQ_HZ.
• CLK_DOMAIN: This parameter is a string ID. By default, IP Integrator assumes that all
output clocks are independent and assigns a unique ID to all clock outputs across the
block design. This is automatically assigned by IP Integrator, or managed by IP if there
are multiple output clocks of the same domain.
To see the properties on the clock net, select the source clock port or pin and analyze the
properties on the object. The following figure shows the Clocking Wizard.
X-Ref Target - Figure 5-3
You can also double-click a port or pin to see the customization dialog box for the selected
object.
Reset
This container bus interface includes the POLARITY parameter. Valid values for this
parameter are ACTIVE_HIGH or ACTIVE_LOW. The default is ACTIVE_LOW.
To see the properties on the clock net, select the reset port or pin and analyze the
properties on the object, as shown in the following figure.
X-Ref Target - Figure 5-6
Interrupt
This bus interface includes the parameter, SENSITIVITY: Valid values for this parameter
are LEVEL_HIGH, LEVEL_LOW, EDGE_RISING, and EDGE_FALLING. The default is
LEVEL_HIGH.
To see the properties on the interrupt pin, highlight the pin as shown in the following
figure, and look at the properties window.
X-Ref Target - Figure 5-9
These properties can also be reported by using the following Tcl command:
Clock Enable
There are two parameters associated with Clock Enable: FREQ_HZ and PHASE.
There are situations when the auto-computed values might not be optimal. In those
circumstances, you may override these propagated values.
• User configurable parameters: User configurable only. The following figure shows
such parameters outlined in red.
X-Ref Target - Figure 5-13
Figure 5-14: FREQ_HZ property mismatch between a port and an interface pin
• The S01_AXI port has a frequency of 500 MHz as can be seen in the properties
window.
• The S01_AXI interface of the AXI Interconnect is set to a frequency of 50 MHz.
You can fix this error by changing the frequency in the property, or by double-clicking the
S01_AXI port and correcting the frequency in the Frequency field of the customization
dialog box.
After you change the frequency, re-validate the design to ensure there are no errors.
Overview
In-system debugging lets you debug your design in real-time on your target hardware. This
is an essential step in design completion. Invariably, one comes across a situation which is
extremely hard to replicate in a simulator. Therefore, there is a need to debug the problem
in the FPGA. In this step, you place an instrument into your design with special debugging
hardware to provide you with the ability to observe and control the design. After the
debugging process is complete, you can remove the instrumentation or special hardware to
increase performance and reduce logic.
The Vivado® IP Integrator provides ways to instrument your design for debugging which is
explained in the following sections. There are two flows explained:
Choosing the flow depends on your preference and types of nets and signals that you are
interested in debugging.
As an example:
In most of the cases, you will be using a combination of both flows to debug your design.
1. Right-click on the block design canvas and select Add IP, as shown in the following
figure.
X-Ref Target - Figure 6-1
2. In the IP catalog, type ILA in the search field, select and double-click the ILA core to
instantiate it on the IP Integrator canvas.
The following figure shows the ILA core instantiated on the IP Integrator canvas.
X-Ref Target - Figure 6-2
The Re-Customize IP dialog box opens, as shown in Figure 6-3, page 104.
The default option under the General Options tab shows AXI as the Monitor Type.
° If you are monitoring an entire AXI interface, keep the Monitor Type as AXI.
° If you are monitoring non-AXI interface signals, change the Monitor Type to Native.
You can change the Sample Data Depth and other fields as desired. For more
information, see this link in the Vivado Design Suite User Guide: Programming and
Debugging (UG908) [Ref 7].
CAUTION! You can only monitor one AXI interface using an ILA. Do not change the value of the C Num
Monitor Slots. If more than one AXI interface is desired to be debugged, then instantiate more ILA cores
as needed.
When you set the Monitor Type to Native, you can set the Number of Probes value, as
shown in Figure 6-4, page 105. Set this value to the number of signals you want to be
monitored.
In Figure 6-4, the Number of Probes is set to 2 in the General Options tab. You can see
under the Probe_Ports tab that two ports are displayed. The width of these ports can be
set to the desired value.
4. Assuming that you want to monitor a 32-bit bus, set the Probe Width for Probe0 to 32.
After you configure the ILA, the changes are reflected on the IP Integrator canvas as
shown in the following figure.
X-Ref Target - Figure 6-5
Figure 6-5: ILA Core after Changes in the Re-customize IP Dialog Box
5. After configuring the ILA, make the required connections to the pins of the ILA on the
IP Integrator canvas, as shown in the following figure.
CAUTION! If a pin connected to an I/O port is to be debugged, use MARK_DEBUG to mark the nets for
debug. The following section describes this action.
As an example, consider the MicroBlaze processor design for the KC705 board, shown in
Figure 6-7, page 107. This design has a GPIO which is configured to use both the 8-bit LED
interface and the 4-bit dip switches on the KC705 board.
1. Expand the GPIO interface pins so that you can see the individual signals that make up
the interface pin.
As you can see in Figure 6-8, the GPIO interface consists of an 8-bit output pin
(gpio_io_o[7:0), and the GPIO2 interface consists of a 4-bit input pin
(gpio2_io_i[3:0]).
To monitor these pins using debug probes you need to make them external to the block
design. In other words, you must tie the pins inside the interface pin to an external port.
Figure 6-8: Using Make External Option to Connect I/O Pin to an I/O Port
You can see in the following figure that the pins that make up the GPIO and GPIO2
interface pins have been tied to external ports in the block design. Next you must
connect these pins to an ILA debug core.
X-Ref Target - Figure 6-9
CAUTION! When you make the I/O pins of an interface external, by connecting the input or output pins
to external ports, do not delete the connection between the top-level interface pin and the I/O port. As
shown in Figure 6-10, page 109, leave the existing top-level interface pin connected externally to the
appropriate interface.
When connecting to individual signals or buses of an interface, you will see a warning as
shown below:
You must manually connect all of the pins of this individual signal or bus, as they will no
longer be connected as part of the bundled interface.
IMPORTANT: This is an especially important concept when adding an ILA or VIO core to probe a signal.
Often you will simply connect the ILA or VIO core to one pin of an interface, without realizing you have
removed that signal from the bundled interface. The signal connection is broken unless you connect to
other expanded interface pins as needed.
3. Use the Add IP command to instantiate an ILA core into the design, and configure it to
support either Native or AXI mode.
Note: In this case you must configure the ILA to support Native mode because you are not
monitoring an AXI interface.
Figure 6-10: ILA Probes Connected to the Input/Output Pins for Monitoring
With the debug cores inserted into the block design, the generated output products will
include the necessary logic and signal probes to debug the design in the Vivado hardware
manager. For more information on working with the Vivado hardware manager, and
programming and debugging devices, see this link in the Vivado Design Suite User Guide:
Programming and Debugging (UG908) [Ref 7].
The nets that are marked for debug show a small bug icon placed on top of the net in
the block design.
Also, a bug icon is placed on the nets to be debugged in the Design Hierarchy window,
as shown in the following figure.
X-Ref Target - Figure 6-12
TIP: You can mark multiple nets for debug at the same time by highlighting them together,
right-clicking and selecting Mark Debug.
Alternatively, you can highlight the block design in the sources window, right-click and
select Generate Output Products, as shown in the following figure.
X-Ref Target - Figure 6-13
When you mark the nets for debug, the MARK_DEBUG attribute is placed on the net,
which can be seen in the generated top-level HDL file.
This prevents the Vivado tools from optimizing and renaming the nets.
X-Ref Target - Figure 6-15
1. From the Flow Navigator > Synthesis > click Run Synthesis.
2. Select Open Synthesized Design to open the netlist design, and click OK.
The Schematic and the Debug window opens. If the Debug window at the bottom of the
GUI is not open, you can always open that window by choosing Windows > Debug
from the menu. The following figure shows the Debug window.
X-Ref Target - Figure 6-16
Figure 6-16: Schematic and Debug Window View in the Vivado IDE
You can see all the nets that were marked for debug in the Debug window under the
folder Unassigned Debug Nets. These nets need to be connected to the probes of an
Integrated Logic Analyzer (ILA). This is the step where you insert an ILA core and
connect these unassigned nets to the probes of the ILA.
4. Click Next. The Set Up Debug dialog box opens, as shown in the following figure.
X-Ref Target - Figure 6-18
The Specify Nets to Debug page opens, as shown in the following figure.
X-Ref Target - Figure 6-19
5. Select a subset (or all) of the nets to debug. Every signal must be associated with the
same clock in an ILA. If the clock domain association cannot be found by the tool,
manually associate those nets to a clock domain by selecting all the nets that have the
Clock Domain column specified as undefined or partially defined.
CAUTION! You need to mark the entire interfaces that you are interested in debugging; however, if you
are concerned with device resource usage, then the nets you do not need for debugging can be deleted
while setting up the debug core.
6. To associate a clock domain to the signals that have the Clock Domain column
specified as undefined, select the nets, right-click, and choose Select Clock Domain.
TIP: One ILA is inferred per clock domain by the Set up Debug dialog box.
7. In the Select Clock Domain dialog box, select the clock for the nets, and click OK.
X-Ref Target - Figure 6-21
9. In the ILA (Integrated Logic Analyzer) General Options dialog box, shown in the
following figure, select the appropriate options for triggering and capturing data, and
click Next.
X-Ref Target - Figure 6-23
Figure 6-23: Setup the Trigger and Capture Modes in the ILA
The advanced triggering capabilities provide additional control over the triggering
mechanism. Enabling advanced trigger mode enables a complete trigger state machine
language that is configurable at runtime.
There is a three-way branching per state and there are 16 states available as part of the
state machine. Four counters and four programmable counters are available and
viewable in the Analyzer as part of the advanced triggering.
In addition to the basic capture of data, capture control capabilities let you capture the
data at the conditions where it matters. This ensures that unnecessary block RAM space
is not wasted and provides a highly efficient solution.
10. In the Summary page, verify that all the information looks correct, and click Finish.
X-Ref Target - Figure 6-24
The Debug window looks like the following figure after the ILA core has been inserted.
Note: All the buses (and single-bit nets) have been assigned to different probes.
The probe information also shows how many signals are assigned to that particular
probe.
For example, in the following figure, probe0 has 32 signals (the 32 bits of the
microblaze_1_axi_periph_m02_axi_WDATA) assigned.
You are now ready to implement your design and generate a bitstream.
11. In the Flow Navigator > Program and Debug, click Generate Bitstream.
Because you made changes to the netlist (by inserting an ILA core), a dialog box, as
shown in the following figure, displays asking if the design should be saved prior to
generating bitstream.
X-Ref Target - Figure 6-26
You can choose to save the design at this point, which writes the appropriate constraints
in an active constraints file (if one exists), or create a new constraints file.
The constraints file contains all the commands to insert the ILA core in the synthesized
netlist as shown in Figure 6-27, page 119.
The benefit of saving the project is that if the signals marked for debug remain the same in
the original block design, then there is no need to insert the ILA core after synthesis
manually as these constraints will take care of it. Therefore, subsequent iteration of design
changes will not require a manual core insertion.
If you add more nets for debug (or unmark some nets from debug) then you must open the
synthesized netlist and make appropriate changes using the Set up Debug wizard.
If you do not chose to save the project after core insertion, none of the constraints show up
in the constraints file and you must insert the ILA core manually in the synthesized netlist
in subsequent iterations of the design.
With the debug cores and signal probes inserted into the top-level design, you are ready to
debug the design in the Vivado hardware manager. For more information on working with
the Vivado hardware manager, and programming and debugging devices, see this link in
the Vivado Design Suite User Guide: Programming and Debugging (UG908) [Ref 7].
Overview
Typically, you create a new design in a project-based flow in the Vivado® Integrated Design
Environment (IDE). After you assemble the initial design, you might want to re-create the design
using a scripted flow in the GUI or in batch mode. This chapter guides you through creating a
scripted flow for block designs.
With the block design open, from the menu select File > Export > Export Block Design.
Specify the name and location of the TCL file in the Export Block Design dialog box.
X-Ref Target - Figure 7-3
Alternatively you can also type the following command in the Tcl Console:
This creates a Tcl file that can be sourced to re-create the block design.
This Tcl file has embedded information about the version of the Vivado tools in which it was
created, and, consequently this design cannot be used across different releases of the
Vivado Design Suite. The Tcl file also contains information about the IP present in the block
design, their configuration, and the connectivity.
CAUTION! Use the script produced by write_bd_tcl in the release in which it was created only.
The script is not intended for use in other versions of the Vivado Design Suite.
In the Write Project to TCL dialog box specify the name and location of the TCL file and
select any other options desired.
X-Ref Target - Figure 7-5
The same can be done by using the write_project_tcl command in the TCL console, as
follows:
For a Vivado project that consists of a block diagram, the Tcl file generated from
write_project_tcl command could look like the following:
X-Ref Target - Figure 7-6
Figure 7-6: Code Snippet from the Tcl File Generated by using the write_project_tcl Command
In the preceding Tcl file, the block design file (.bd) is read explicitly as shown by the
highlighted code.
There are cases in which you may want to re-create the block design, rather than simply
read the block design file. In this case, you will need to modify the Tcl file generated by the
write_project_tcl command as shown in Figure 7-7, page 124:
TIP: If you choose to simply read the existing block design file, and not re-create the block design, then
the Tcl file does not need to be modified.
Figure 7-7: Code Snippet from the Tcl File to Recreate the Block Design using the Output File
As can be seen in the figure above, the Tcl file from the write_project_tcl file has been
modified to source another Tcl script that was created using the write_bd_tcl command.
The sourced block design Tcl script re-creates the block design every time the project Tcl
script is run, rather than reading a block design file.
Overview
Non-Project Mode is for users who want to manage their own design data or track the
design state. In this mode, Vivado® tools read the various source files and implement the
design in-memory throughout the entire design flow. At any stage of the implementation
process, you can generate a variety of reports to examine the state of your design. When
running in Non-Project Mode, it is also important to note that this mode does not enable
project-based features such as source file and run management, out-of-context synthesis,
cross-probing back to source files, and design state reporting. Essentially, each time a
source file is updated on the disk, you must know about it and reload the design. There are
no default reports or intermediate files created within the Non-Project Mode. You need to
have your script control the creation of reports with Tcl commands. For details of working in
Non-Project Mode see this link in Vivado Design Suite User Guide: Design Flows Overview
(UG892) [Ref 2].
set_part xc7k325tffg900-2
set_property TARGET_LANGUAGE VHDL [current_project]
set_property BOARD_PART xilinx.com:kc705:part0:0.9 [current_project]
set_property DEFAULT_LIB work [current_project]
In non-project mode, there is no project file saved to disk. Instead, an in-memory Vivado
project is created. The device/part/target-language of a block design is not stored as a part
of the block design sources. The set_part command creates an in-memory project for a
non-project based design, or assigns the part to the existing in-memory project.
After the project has been created the source file for the block design can be added to the
project.
This can be done in two different ways. First, assuming that there is an existing block design
with the entire directory structure of the block design intact, you can add the block design
using the read_bd tcl command as follows:
CAUTION! The project settings (board, part, and user repository) of the new design must match
the project settings of the original block design, or the IP in the block design will be locked.
After the block design is added successfully, you need to add your top-level RTL files and
any top-level XDC constraints.
read_verilog <top-level>.v
read_xdc <top-level>.xdc
You can also create top-level HDL wrapper file using the command below because a BD
source cannot be synthesized directly.
This creates a top-level HDL file and adds it to the source list.
For a MicroBlaze™-based processor design you need to add an ELF and associate it with the
MicroBlaze instance in the block design. This will populate the BRAM initialization strings
with the data from the ELF file. You can do this with the following commands:
add_files <file_name>.elf
set_property SCOPED_TO_CELLS {microblaze_0} [get_files <file_name>.elf]
set_property SCOPED_TO_REF {<bd_instance_name>} [get_files <file_name>.elf]
With the ELF file added to the project, the Vivado tools automatically merges the Block
RAM memory information (MMI file) and the ELF file contents with the device bitstream
(BIT) when generating the bitstream to program the device.
TIP: You can also merge the MMI, ELF, and BIT files after the bitstream has been generated by using the
UpdateMEM utility. See this link in the Vivado Design Suite User Guide: Embedded Processor Hardware
Design (UG898) [Ref 5] for more information.
If the design has multiple levels of hierarchy, you need to ensure that the correct hierarchy
is provided. After this, go through the usual synthesis, place, and route steps to implement
the design.
To export the implemented hardware system to SDK, use the following command:
See the Vivado Design Suite Tcl Command Reference (UG835) [Ref 1] for more on the
write_sysdef or write_hwdef commands.
Non-Project Script
The following is a sample script for creating a block design in Non-Project Mode.
set_part xc7k325tffg900-2
set_property target_language VHDL [current_project]
set_property board_part xilinx.com:kc705:part0:0.9 [current_project]
set_property default_lib work [current_project]
read_bd ./bd/mb_ex_1/mb_ex_1.bd
open_bd_design ./bd/mb_ex_1/mb_ex_1.bd
read_vhdl ./bd/mb_ex_1/hdl/mb_ex_1_wrapper.vhd
write_hwdef -file mb_ex_1_wrapper.hwdef
set_property source_mgmt_mode All [current_project]
update_compile_order -fileset sources_1
update_compile_order -fileset sources_1
update_compile_order -fileset sim_1
synth_design -top mb_ex_1_wrapper
opt_design
place_design
route_design
write_bitstream top
write_mem_info ./top.mmi
file mkdir c:/temp/export_hw_np_mode/sdk
write_sysdef -hwdef mb_ex_1_wrapper.hwdef -bitfile top.bit -file mb_ex_1_wrapper.hdf
Overview
As you upgrade your Vivado® Design Suite to the latest release, you must upgrade the
block designs created in the Vivado IP Integrator as well.
If the intention is to keep older version of the block design (and the IP contained within it),
then you do not need to do any operations such as modifying the block design on the
canvas, validating it and/or resetting output products, and re-generating output products.
In this case, the expectation is that you have all the design data from the previous release
intact. You can use the block design from the previous release “as is” by synthesizing and
implementing the design.
The recommended practice is to upgrade the block design with the latest IP versions, make
any necessary design changes, validate design and generate target.
The Older Project Version pop-up opens. Automatically upgrade for the current
version is selected by default.
Although you can upgrade the design from a previous version by selecting the
Automatically upgrade for the current version, it is highly recommended that you
save your project with a different name before upgrading. To do so:
3. Select Open project in read-only mode, as shown in the following figure, and click OK.
X-Ref Target - Figure 9-1
5. When the Save Project As dialog box opens, as shown in the following figure, type the
name of the project, and click OK.
X-Ref Target - Figure 9-3
The Project Upgraded dialog box opens, as shown in the following figure, informing you
that the IP used in the design may have changed and therefore need to be updated.
X-Ref Target - Figure 9-4
Alternatively, from the menu select Tools > Report > Report IP Status.
7. If any of the IP in the design has gone through a major version change, then the
following message opens. Click OK.
X-Ref Target - Figure 9-5
8. In the IP Status window, look at the different columns and familiarize yourself with the
IP Status report. Expand the block design by clicking on the + sign and look at the
changes that the IP cores in the block design.
X-Ref Target - Figure 9-6
The top of the IP Status window shows the summary of the design. It reports how many
changes are needed to upgrade the design to the current version. The changes reported
are Major Changes, Minor Changes, Revision Changes and Other Changes. These
changes are reported in the IP Status column as well.
° Major Changes: The IP has gone through a major version change; for example,
from Version 2.0 to 3.0. This type of change is not automatically selected for
upgrade. To select this for upgrade, uncheck the Upgrade column for the block
design and then re-check it.
° Minor Changes: The IP has undergone a minor version change; for example, from
version 3.0 to 3.1.
° Revision Changes: A revision change has been made to the IP; for example, the
current version of the IP is 5.0, and the upgraded version is 5.0 (Rev. 1)
9. Click the More info… link in the Change Log column to see a description of the change.
X-Ref Target - Figure 9-7
The Recommendation column also suggests that you need to understand what the
changes are before selecting the IP for upgrade.
10. When you understand the changes and the potential impact on your design, you can
click Upgrade Selected.
The Upgrade IP dialog box opens to confirm that you want to proceed with upgrade.
TIP: You cannot select individual IP of a block design to upgrade, and let the others remain in their
current versions. You must upgrade all IP in the block design at the same time.
When the upgrade process is complete, a Critical Messages dialog box opens, such as
the one in the following figure, informing you about any critical issues to which you
need to pay attention.
X-Ref Target - Figure 9-8
12. Review any critical warnings and other messages that may be flagged as a part of the
upgrade. Click Ok.
If there are multiple diagrams in the design, the IP Status window shows the status of IP
in all the diagrams as shown in Figure 9-9, page 133.
X-Ref Target - Figure 9-9
You can also do this by clicking the Validate Design button in the block design toolbar.
Alternately, in the Flow Navigator > IP Integrator, click the Generate Block Design.
X-Ref Target - Figure 9-12
1. In the Sources window, shown in the following figure, right-click the block diagram, and
select Create HDL Wrapper.
X-Ref Target - Figure 9-13
The Create HDL Wrapper dialog box opens. You have two choices to make at this point.
You can create a wrapper file that can be edited, or you can let the Vivado tools manage
the wrapper file for you.
2. Make your selection from the dialog box shown in the following figure, and click OK.
X-Ref Target - Figure 9-14
You can now synthesize, implement, and generate the bitstream for the design.
Overview
The Vivado Design Suite is board aware. The tools know the various interfaces present on
the target boards and can customize and configure an IP to be connected to a particular
board component. Several 7 series and an UltraScale board is currently supported.
The IP Integrator shows all the interfaces to the board in a separate tab called the Board tab.
When you use this tab to select the desired components and the Designer Assistance
offered by IP Integrator, you can easily connect your design to the board component of your
choosing. All the I/O constraints are automatically generated as a part of using this flow.
You can filter the list of available boards based on Vendor, Display Name, and Board
Revision, as shown in the following figure.
X-Ref Target - Figure 10-2
° Setting the Board Rev to All shows revisions of all the boards that are supported in
Vivado.
° Setting Board Rev to Latest shows only the latest revision of a target board.
Various information such as resources available and operating conditions are also
listed in the table.
When you select a board, the project is configured using the pre-defined interface for that
board.
From Flow Navigator > IP Integrator, start a new block design by clicking Create Block
Design.
As the design canvas opens, you see a Board window, as shown in the following figure.
X-Ref Target - Figure 10-3
This Board window lists all the possible components for an evaluation board (in the
preceding figure the KC705 board is displayed). By selecting one of these components, an
IP can be quickly instantiated on the block design canvas.
The first way of using the Board window, is to select a component from the Board window
and drag it on the block design canvas. This instantiates an IP that can connect to that
component and configures it appropriately for the interface in question. It then also
connects the interface pin of the IP to an I/O port. As an example, when you drag an drop
the Linear Flash component under the External Memory folder, on the IPI canvas, the AXI
EMC IP is instantiated and the interface called EMC_INTF is connected. See Figure 10-4,
page 140.
Figure 10-4: Dragging and Dropping an Interface on the Block Design Canvas
The second way to use an interface on the target board, is to double-click the unconnected
component in question from the Board tab. As an example, when you double click the DDR3
SDRAM component in the Board tab, the Connect Board Component dialog box opens, as
shown in the following figure.
X-Ref Target - Figure 10-5
mig_ddr_interface is selected by default. If there are multiple interfaces listed under the IP
then select the interface desired.
Select the mig_ddr_interface as shown in the following figure, and click OK.
Notice that the IP is placed on the Diagram canvas and connections are made to the
interface using the I/O ports. As shown in the following figure, the IP is all configured
accordingly to connect to that interface.
X-Ref Target - Figure 10-6
Figure 10-6: IP instantiated, Configured, and Connected to Interfaces on the Diagram Canvas
As an interface is connected, that particular interface now shows up as a shaded circle in the
Board window.
X-Ref Target - Figure 10-7
To do this, select and right-click the component and from the menu, select Auto Connect.
You will notice that the GPIO IP has been instantiated and the GPIO interface is connected to an
I/O port, as shown in Figure 10-9, page 142.
X-Ref Target - Figure 10-9
If another component such as DIP switches is selected, the board flow is aware enough
to know that a GPIO already is instantiated in the design and it re-uses the second channel
of the GPIO.
The already instantiated GPIO is re-configured to use the second channel of the GPIO as
shown in the following figure.
X-Ref Target - Figure 10-11
If an external memory component such as the Linear Flash or the SPI Flash is chosen, then
as one of them is used the other component becomes unusable as only one of these
interfaces can be used on the target board. In this case, the following message will pop-up
when the user tries to drag the other interface such as the SPI Flash on the bd canvas.
X-Ref Target - Figure 10-12
To do this, right-click on the canvas and select add IP. From the IP catalog choose the processor,
such as MicroBlaze™ processor, as shown in the following example.
X-Ref Target - Figure 10-13
Click Run Block Automation to configure a basic processor sub-system. The processor
sub-system is created which includes commonly used IP in a sub-system such as block
memory controllers, block memory generator and a debug module.
Then you can use the Connection Automation feature to connect the rest of the IP in your
design to the MicroBlaze processor by selecting Run Connection Automation.
The rest of the process is the same as needed for designing in IP Integrator as described in
of this document.
Overview
Sometimes it is necessary to use a third-party synthesis tool as a part of the design flow. In
this case, you will need to incorporate the IP Integrator block design as a black-box in the
top-level design. You can synthesize the top-level of the design in a third-party synthesis
tool, write out an HDL or EDIF netlist, and implement the post-synthesis project in the
Vivado environment.
This chapter describes the steps that are required to synthesize the black-box of a block
design in a third-party synthesis tool. Although the flow is applicable to any third-party
synthesis tool, this chapter describes the Synplify® Pro synthesis tool.
1. Select the block design in the Sources window, right-click to open the menu, and select
the Generate Output Products command.
X-Ref Target - Figure 11-1
2. In the Generate Output Products dialog box, enable the Out-of-Context per Block
Design option., as shown below. See Generating Output Products, page 66 for more
information.
X-Ref Target - Figure 11-2
A square is placed next to the block design in the Sources window to indicate that the
block design has been defined as an out-of-context module. The Design Runs window
also shows an Out-of-Context Module Run for the block design.
X-Ref Target - Figure 11-3
3. When out-of-context synthesis run for the block design is complete, a design
checkpoint file (DCP) is created for the block design. The DCP file also shows up in the
Sources window, under the block design tree in the IP Sources tab. The DCP file is
written to the following directory:
<project_name>/<project_name>.srcs/<sources_1>/<bd>/<block_design_name>
DCPs let you take a snapshot of your design in its current state. The current netlist,
constraints, and implementation results are stored in the DCP. Using DCPs, you can:
° Define constraints
When the out-of-context run for the block design is created, two stub files are also
created; one each for Verilog and VHDL. The stub file includes the instantiation template
which can be copied into the top-level design to instantiate the black box of the block
design. An example stub file is shown in the following figure.
X-Ref Target - Figure 11-4
After the project is synthesized, an HDL or EDIF netlist for the project can be written out for
use in a post-synthesis project.
Note: If the Do not specify sources at this time option is enabled, you can add design sources
after project creation.
2. Click Next.
3. In the Add Netlist Sources Page click on the ‘+’ sign to Add Files, as seen in Figure 11-6,
page 150.
4. In the Add Source Files dialog box, change the Files of type: field to All Files.
X-Ref Target - Figure 11-7
Figure 11-7: Changing File Type in Add Sources File dialog box
Select the EDIF netlist for the top-level design and Click OK.
5. Likewise navigate to the block design (.bd file) and add that file to the project. As the
block design is added all the relevant constraints and the DCP file for the block design
will be picked up by Vivado. The block design will not be re-synthesized. The
constraints, however, will be reprocessed.
6. Click Next.
X-Ref Target - Figure 11-8
7. On the Add Constraints page, add any constraints files (XDC) that are needed for the
project, and click Next.
8. Specify the target part or target platform board as required by the project, and click
Next.
9. Verify all the information for the project as presented on the New Project Summary
page, and click Finish.
If you did not add the EDIF netlist file, DCP, or design constraints at the time you created
the project, you can add those design source files in an open project by right-clicking in
the Design Sources window and selecting Add Sources to add files as needed.
X-Ref Target - Figure 11-9
Figure 11-9: Add EDIF Netlist from Synplify and the DCP File to the Project
A constraints file can be added to the project at the time it is created, as discussed
previously, or by right-clicking in the Sources window and choosing Add Sources.
1. In the Add Sources dialog box, select Add design sources, as shown in Figure 11-10,
page 152.
2. Click Next.
X-Ref Target - Figure 11-10
3. In the Add Design Sources page click on the ’+’ sign to Add Files.
When the Add Source Files dialog box opens make sure that Files of type: is set to All
Files.
4. Browse to the folder containing the ELF file, select the ELF file and click OK.
X-Ref Target - Figure 11-11
The added ELF file can be seen in the Sources window, as shown in the following figure.
After the ELF file has been added to the project, you must associate the ELF file with the
embedded processor design object by setting the SCOPED_TO_REF and
SCOPED_TO_CELL properties.
In the Source File Properties window click in the text field of the SCOPED_TO_CELLS and
SCOPED_TO_REF properties to edit them.
You can also set these properties using the following Tcl commands:
After the bitstream is generated you can open the implemented design to ensure that all
timing constraints were met.
Verify timing by looking at the Timing Summary report. You can also ensure that BRAM
INIT_STRINGS were populated with the ELF data.
5. In the Find Results window, select an instance of the BRAM and verify that the INIT properties
have been populated in the Cell Properties window.
Overview
The Module Reference feature of the Vivado IP Integrator lets you quickly add a module or
entity definition from a Verilog or VHDL source file directly into your block design. While
this feature does have limitations, it provides a means of quickly adding RTL modules
without having to go through the process of packaging the RTL as an IP to be added
through the Vivado IP catalog.
Both flows have their benefits and costs. The Package IP flow is rigorous and time
consuming, but it offers a well-defined IP that can managed through the IP Catalog, used in
multiple designs, and upgraded as new revisions become available. The Module Reference
flow is quick, but does not offer the benefits of the working through the IP catalog.
The following sections explain the usage of the module reference technology. Differences
between the two flows are also pointed in various sections of this chapter.
Referencing a Module
In order to add HDL to the block design, first you must add the RTL source file to the Vivado
project. See this link in the Vivado Design Suite User Guide: System-level Design Entry
(UG895) for more information on adding design sources. Added source files show up under
the Design Sources folder in the Sources window.
An RTL source file can define one or more modules or entities within the file. The Vivado IP
Integrator feature can access any of the modules defined within an added source file.
In the block design, you can add a reference to an RTL module using the Add Module…
command from the right-click menu of the design canvas.
X-Ref Target - Figure 12-2
The Add Module dialog box displays a list of all valid modules defined in the RTL source
files that you have added to the project. Select a module to add from the list, and click OK
to add it to the block design.
TIP: You can only select one module from the list.
The Add Module dialog box also provides a Hide incompatible module check box that is
enabled by default. This hides module definitions in the loaded source files that do not
meet the requirements of the Module Reference feature, and so cannot be added to the
block design.
You can unselect this checkbox to display all RTL modules defined in the loaded source
files, but you will not be able to add all modules to the block design. Examples of modules
that you may see when deselecting this option includes files that have syntactical errors,
modules with missing sources, module definitions that contain or refer to an EDIF netlist, a
DCP file, another block design, or an IP definition (XCI).
The instance names of RTL modules are inferred from the top-level source of the RTL block
as defined in the entity/module definition. As shown in Figure 12-3, my_dff8_inst is the
top-level entity as shown in the following code sample.
X-Ref Target - Figure 12-4
IMPORTANT: If the entity/module name changes in the source RTL file, the referenced module instance
must be deleted from the block design and a new module added.
You can also add modules to an open block design by selecting the module in the Sources
window and using the Add Module to Block Design command from the context menu.
X-Ref Target - Figure 12-5
Figure 12-5: Alternate way of adding a module from the Sources window
The selected module is added to the block design and you can make connections to it just
as you would with any other IP in the design. The IP is displayed in the block design with
special markings that identify it as an RTL referenced module, as shown in Figure 12-6 on
the next page.
If a new block design is created after you have added design sources to the project, the
block design is not set as the top level of the design in the Sources window. The Vivado
Design Suite automatically assigns a top-level module for the design as the sources are
added to the project. To set the block design as the top level of the design, right-click on the
block design in the Sources window and use Create HDL Wrapper from the context menu.
Refer to Integrating the Block Design into a Top-Level Design, page 72 for more
information.
X-Ref Target - Figure 12-7
TIP: The block design cannot be directly set as the top level module.
After creating the wrapper, right-click to select it in the Sources window and use the Set as
Top command from the context menu. Any RTL modules that are referenced by the block
design are moved into the hierarchy of the design under the HDL wrapper, as shown in
Figure 12-8, page 164.
If you delete a referenced module from the block design, then the module is moved outside
the block design hierarchy in the Sources window.
Figure 12-8: Referenced RTL Module under the Block Design tree
You can also see some differences between packaged IP and referenced modules when
viewing the source files in the Sources window. As an example when you reset the output
products of a block design, all the source file, constraint files and other meta data
associated with IP blocks are deleted. However, a module reference block just contains the
source HDL, so there is nothing to delete. Also, note that a module reference block shows
up as “Module Reference Wrapper” and not as an XCI file.
After resetting the output products of a block design, the Sources window will appear as
shown in the following figure:
Out-of-date IP are shown in the Report IP Status window, or reported by the appearance of
a link in the block design canvas window as shown in Figure 12-25, page 174. IP can be
upgraded by clicking on the Upgrade Selected button in the Report IP Status window.
Out-of-date reference modules are also reported by a link in the design canvas window, as
shown in Figure 12-23, page 174. In addition you can force the refresh of a module using
the Refresh Module command from the design canvas right-click menu.
While you cannot edit the RTL source files for a packaged IP, you can edit the RTL source for
a module reference. Refer to Editing the RTL Module after Instantiation, page 173 for more
information.
Since a referenced module is also not a packaged IP, you do not have control over the
version of the module instance. The version of a referenced module as displayed in the IP
tab of the Block Properties window is controlled internally by the Vivado IP Integrator. If you
want to have control over the vendor, library, name, and version (VLNV) for a block then you
must package the IP as described in the Vivado Design Suite User Guide: Creating and
Packaging IP (UG1118) [Ref 11].
For the Module Reference feature there is also no parameter propagation across
boundaries. You must use the attributes mentioned in Inferring Control Signals in a RTL
Module, page 168 in order to support design rule checks run by IP Integrator when
validating the design. For example IP Integrator provides design rule checks for validating
the clock frequency between the source clock and the destination. By specifying the correct
frequency in the RTL code, you can ensure that your design connectivity will be correct.
The following is a code sample for an n-bit full adder, where n is the generic that controls
the width of the adder.
X-Ref Target - Figure 12-11
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 n. In this case the port width would be
2-bits.
You can double click on the module to open the Re-customize Module Reference dialog
box. You can also right-click on 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.
X-Ref Target - Figure 12-12
You can expand the appropriate HDL language Verilog/VHDL > IP Integrator HDL and
select the appropriate Signal Interface to see the attributes in the Preview pane. As an
example, the VHDL language template for the clock interface shows the following attributes
that need to be inserted in the module definition.
Insert these attributes in the HDL code for the module as shown in Figure 12-16, which
shows the declaration of the attributes and the definition of attribute values for both the
clock and reset signals.
X-Ref Target - Figure 12-16
In the code sample shown above, a clock port called clk_in is present in the RTL code. To
infer the clk_in port as a clock pin you need to insert the following attributes:
Notice that the clk_in clock signal is associated with the reset_in reset signal in the
attributes shown above. Attributes to infer reset signals are also inserted in the HDL code.
You can click on a pin of a module symbol to see the various properties associated with it.
X-Ref Target - Figure 12-17
You can also see what IP Integrator has inferred for a referenced module by right-clicking
on an instance, and selecting Refresh Module from the context menu. This reloads the RTL
module and the Tcl Console displays messages indicating what was inferred:
update_module_reference design_1_my_dff8_inst_1_0
INFO: [IP_Flow 19-2228] Inferred bus interface 'clk_in' of definition
'xilinx.com:signal:clock:1.0'.
INFO: [IP_Flow 19-4728] Bus Interface 'clk_in': Added interface parameter
'ASSOCIATED_RESET' with value 'reset_in'.
INFO: [IP_Flow 19-4728] Bus Interface 'clk_in': Added interface parameter 'FREQ_HZ'
with value '100000000'.
INFO: [IP_Flow 19-2228] Inferred bus interface 'reset_in' of definition
'xilinx.com:signal:reset:1.0'.
INFO: [IP_Flow 19-4728] Bus Interface 'reset_in': Added interface parameter
'POLARITY' with value 'ACTIVE_HIGH'.
This command can also be used to force the RTL module to be updated from the source file.
If the source code already contains these attributes prior to instantiating the module in the
block design, you will see what is being inferred on the TCL console.
Figure 12-18: Inferring AXI Interface when standard naming convention is used
When this RTL module is added to the block design the AXI interface is automatically
inferred as shown below.
X-Ref Target - Figure 12-19
After an AXI interface is inferred for a module, the Connection Automation feature of IP
Integrator becomes available for the module. This feature offers connectivity options to
connect a slave interface to a master interface, or the master to the slave.
If the names of your ports do not match with standard AXI interface names, you can force the
creation of an interface and map the physical ports to the logical ports by using the
X_INTERFACE_INFO attribute as found in the Language Templates.
Expand the appropriate HDL language Verilog/VHDL > IP Integrator HDL and select the
appropriate AXI Interface to see the attributes in the Preview pane. As an example, the
following figure shows the VHDL language template for the AXI Memory Mapped interface
listing the attributes that need to be inserted into the module definition.
X-Ref Target - Figure 12-20
If you modify the source and save it, you will notice that the Refresh Changed Modules
link becomes active in the banner of the block design canvas.
Click on the Refresh Changed Modules link to reread the module from the source file.
Depending on the changes made to the module definition, for example adding a new port
to the module, you may see a message as follows.
X-Ref Target - Figure 12-24
Figure 12-24: Critical Warning dialog box after updating a RTL module
On the TCL console you will see the changes that were made to the module.
When some of the IP in the block design and the referenced modules are out-of-date, you
will see the following in the banner of the block design canvas:
X-Ref Target - Figure 12-25
IMPORTANT: The RTL source files for the referenced modules must be read prior to opening the block
design.
# Specify part, language, board part (if using the board flow)
set_part xc7k325tffg900-2
set_property target_language VHDL [current_project]
set_property board_part xilinx.com:kc705:part0:0.9 [current_project]
set_property default_lib work [current_project]
# The following line is required for module reference and also for
# third-party synthesis flow
set_property source_mgmt_mode All [current_project]
# Read the RTL source files for referenced modules prior to reading
# and opening the Block Design
read_verilog *.v
read_vhdl *.vhdl
# Implement
synth_design -top mb_ex_1_wrapper
opt_design
place_design
route_design
write_bitstream top
This lets IP Integrator bind the cell instances present in the block design to the referenced
RTL modules.
Additional Resources
Xilinx Resources
For support resources such as Answers, Documentation, Downloads, and Forums, see Xilinx
Support.
See the Xilinx Solution Centers for support on devices, software tools, and intellectual
property at all stages of the design cycle. Topics include design assistance, advisories, and
troubleshooting tips.
References
1. Vivado Design Suite Tcl Command Reference Guide (UG835)
2. Vivado Design Suite User Guide: Design Flows Overview (UG892)
3. Vivado Design Suite User Guide: System-Level Design Entry (UG895)
4. Vivado Design Suite User Guide: Designing with IP (UG896)
5. Vivado Design Suite User Guide: Embedded Hardware Design (UG898)
6. Vivado Design Suite User Guide: Using Constraints (UG903)
7. Vivado Design Suite User Guide: Programming and Debugging (UG908)
8. ISE to Vivado Design Suite Migration Guide (UG911)
9. UltraFast Design Methodology Guide for the Vivado Design Suite (UG949)
10. Vivado Design Suite Tutorial: Designing IP Subsystems Using IP Integrator (UG995)
11. Vivado Design Suite User Guide: Creating and Packaging Custom IP (UG1118)
12. Generating Basic Software Platforms Reference Guide (UG1138)
13. 7 Series FPGAs Memory Interface Solutions User Guide (UG586)
14. LogiCORE IP AXI Interrupt Controller (PG099)
15. UltraScale Architecture-Based FPGAs Memory Interface Solutions (PG150)
Training Resources
Xilinx provides a variety of training courses and QuickTake videos to help you learn more
about the concepts presented in this document. Use these links to explore related training
resources: