Design Exploration Tutorial For HDL Designer Series: Release v2019.4
Design Exploration Tutorial For HDL Designer Series: Release v2019.4
Designer Series™
Release v2019.4
This document contains information that is proprietary to Mentor Graphics Corporation. The original recipient of this
document may duplicate this document in whole or in part for internal business purposes only, provided that this entire
notice appears in all copies. In duplicating any part of this document, the recipient agrees to make every reasonable
effort to prevent the unauthorized use and distribution of the proprietary information.
Note - Viewing PDF files within a web browser causes some links not to function (see MG595892).
Use HTML for full navigation.
This document is for information and instruction purposes. Mentor Graphics reserves the right to make
changes in specifications and other information contained in this publication without prior notice, and the
reader should, in all cases, consult Mentor Graphics to determine whether any changes have been
made.
The terms and conditions governing the sale and licensing of Mentor Graphics products are set forth in
written agreements between Mentor Graphics and its customers. No representation or other affirmation
of fact contained in this publication shall be deemed to be a warranty or give rise to any liability of Mentor
Graphics whatsoever.
MENTOR GRAPHICS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE.
MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR
CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS)
ARISING OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT,
EVEN IF MENTOR GRAPHICS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
U.S. GOVERNMENT LICENSE RIGHTS: The software and documentation were developed entirely at
private expense and are commercial computer software and commercial computer software
documentation within the meaning of the applicable acquisition regulations. Accordingly, pursuant to
FAR 48 CFR 12.212 and DFARS 48 CFR 227.7202, use, duplication and disclosure by or for the U.S.
Government or a U.S. Government subcontractor is subject solely to the terms and conditions set forth in
the license agreement provided with the software, except for provisions which are contrary to applicable
mandatory federal laws.
TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property of
Mentor Graphics Corporation or other parties. No one is permitted to use these Marks without the prior
written consent of Mentor Graphics or the owner of the Mark, as applicable. The use herein of a third-
party Mark is not an attempt to indicate Mentor Graphics as a source of a product, but is intended to
indicate a product from, or associated with, a particular third party. A current list of Mentor Graphics’
trademarks may be viewed at: mentor.com/trademarks.
The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of
Linus Torvalds, owner of the mark on a world-wide basis.
End-User License Agreement: You can print a copy of the End-User License Agreement from:
mentor.com/eula.
Chapter 1
Design Exploration Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Design Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Adding the Fibonacci Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Browsing the Fibonacci Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Block Diagram View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Creating a Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Printing a Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Adding Panels to the Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Linking and Embedding an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
IBD View Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Displaying the Symbol Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
State Diagram View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Creating a State Diagram View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Re-leveling the State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Creating a Flow Chart View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Visualizing HDL Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Exporting the Design Hierarchy or Library as HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
HDL Designer Web Export View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
End-User License Agreement
with EDA Software Supplemental Terms
Use HDL Designer Series to add a design described by VHDL or Verilog HDL text and to
visualize the design structure as a hierarchy of graphical design unit views. You can print the
graphical views or export them as HTML files for use in design documentation.
The procedures in this tutorial use the Fibonacci sequencer design source code in the examples
subdirectory of your installation. They also use the SCRATCH_LIB library defined in the
examples project, although you can use any other empty writable library.
You can perform the tasks in this tutorial whether you use HDL Designer Series or HDL
Designer. The tutorial incorporates all the features supported by HDL Designer Series.
Design Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Adding the Fibonacci Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Browsing the Fibonacci Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Block Diagram View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Creating a Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Printing a Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Adding Panels to the Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Linking and Embedding an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
IBD View Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Displaying the Symbol Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
State Diagram View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Creating a State Diagram View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Re-leveling the State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Creating a Flow Chart View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Visualizing HDL Designs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Exporting the Design Hierarchy or Library as HTML . . . . . . . . . . . . . . . . . . . . . . . . . . 32
HDL Designer Web Export View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Design Manager
Design Manager
You can use the Design Manager to add a design and examine how it is instantiated as a HDL
text view. The Design Manager opens when you invoke the HDL Designer Series tool for the
first time.
Note
If the examples project is not active, choose File > Open > Project to display the Open
Project dialog box.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Adding the Fibonacci Design
5. Click OK.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Adding the Fibonacci Design
The Target Libraries page of the Add Existing Design wizard displays.
Note
If no library is explicitly specified in the source HDL, select the library used for the
added design. Also, if needed, change the library used for views added from one or
more of the source files.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Adding the Fibonacci Design
The Target Directories page of the Add Existing Design wizard displays.
--------------------------------------------------------
Related Topics
Browsing the Fibonacci Design
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Browsing the Fibonacci Design
Procedure
1. In the Design Explorer’s Design Units pane, expand and view each design unit.
Each Verilog module or VHDL entity in the source HDL code is partitioned into a
separate design unit that also includes the corresponding VHDL architectures, if you are
using VHDL.
The icon is adjacent to the fibgen_tb design unit in the Design Units pane and
indicates that this test bench component is the top-level design unit.
2. If the Design Hierarchy pane is not visible, right-click the fibgen_tb design unit and
choose Show Hierarchy.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Browsing the Fibonacci Design
Note
You can toggle the hierarchy by right-clicking an object and choosing Hide
Hierarchy or Show Hierarchy.
You can also move objects between the Design Units and the Design Hierarchy panes by
dragging and dropping.
3. Examine the design in the Design Hierarchy pane by expanding each view.
The Design Hierarchy pane shows how each Verilog module or VHDL architecture is
instantiated as a HDL text view in the hierarchy.
The test bench (fibgen_tb) contains the fibgen design unit instantiated as the unit under
test (UUT) and also the fibgen_tester instantiated as the Checker.
The UUT hierarchy contains the control design unit (instantiated as FSM) and three
instantiations (acc_A, acc_B and acc_sum) of the accumulator.
Related Topics
Adding the Fibonacci Design
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Block Diagram View
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Creating a Block Diagram
--------------------------------------------------------
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Creating a Block Diagram
The icon used for the default fibgen view in the Design Explorer changes to
indicating that it has been converted to a block diagram view.
The block diagram shows the four components (acc_A, acc_B, acc_sum and FSM) with the
signals connected between them and an embedded block (eb1) containing concurrent
assignment statements. All signal nets are connected by default.
The block diagram is completed by a default title block.
Related Topics
Printing a Diagram
Adding Panels to the Block Diagram
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Printing a Diagram
Printing a Diagram
After you create a block diagram, you can print the entire diagram view or the extent of the
current window. You can also change the printer page boundaries for your default printer. These
boundaries are indicated by dotted lines on the diagram with the origin located at the top left
corner of the window.
Using HDL Designer Series you can make logical edits to change the HDL description for a
graphic editor view. However, you can make non-logical edits to prepare a diagram for printing
or export. If you have made any non-logical edits, you are prompted to save when you close the
graphic editor view. For example, you can move or resize objects, change the grid, port or signal
text visibility, and edit the comment text in the title block.
Procedure
Choose one of the following print setup options:
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Adding Panels to the Block Diagram
Related Topics
Creating a Block Diagram
Adding Panels to the Block Diagram
2. Click the Add Panel button to add a panel (Panel0) on the diagram.
3. Drag and drop the panel around the graphical objects on the diagram. To deselect the
panel tool, right-click in the diagram.
4. Right-click in an empty part of the diagram and choose Object Visibility.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Adding Panels to the Block Diagram
Note
To select text objects, click the down arrow on the select button and select
Select Text from the dropdown list.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Linking and Embedding an Object
You can print or export the panels separately by specifying the panel name. For
example, the Print dialog box contains an option to select a named panel for printing
Related Topics
Creating a Block Diagram
Printing a Diagram
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
IBD View Display
You are prompted to save the block diagram prior to opening the IBD view (if it is not already
saved).
Each of the four components and the embedded block are shown as separate columns in the IBD
view matrix.
A separate column (E in the following example) shows the external interface for the design unit.
The rows in the matrix contain the signal declarations. The letter I (Input) or O (Output) in the
interconnect cell for the external interface, embedded block, or component interface shows the
interconnections.
You can expand the interface column (using the plus (+) symbols) to display the connected
ports for a component.
Note
For information about how more complex port mapping is represented in an IBD view, refer
to “IBD View Notation” in the HDL Designer Series Graphical Editors User Manual .
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Displaying the Symbol Interface
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Displaying the Symbol Interface
3. Close the symbol/Interface and IBD view/Block diagram windows and save any non-
logical edits.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
State Diagram View
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Creating a State Diagram View
2. Select the State Diagram option for leaf-level descriptions and click Finish to convert
the HDL text view to a graphical state diagram.
The HDL Log window displays a summary report on completion:
--------------------------------------------------------
The icon used for the FSM instance changes to to indicate that it has been converted
to a state diagram view.
3. Double-click the FSM instance to open the state diagram.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Creating a State Diagram View
Results
The state diagram displays, for example:
This simple state machine contains a start state (clr_regs) and three simple states (inc_accb,
load_acc_sum and load_acc_A_B) connected by transitions.
Note
In this example, there is a deliberate signal assignment error in the actions specified for the
clr_regs and inc_accb states. To show the actions, right-click the diagram and choose Show
Text.
HDL Designer Series allows you to correct these errors by changing the logical definition and
the original source code to view the corrected state diagram.
Note
You can move or resize objects, add panels and edit the title block or make any other non-
logical edits which would not change the logical definition of the state machine.
Related Topics
Re-leveling the State Diagram
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Re-leveling the State Diagram
3. Double-click the hierarchical state (s0) to open the child hierarchical state view.
Right-click an individual hierarchical state and choose Re-level > Remove Hierarchy
to remove state machine hierarchy. This operation brings all states in the child diagram
up a level into the parent diagram.
Note
You can remove hierarchy from the main menu as well by choosing:
Diagram > Re-level > Remove Hierarchy.
Windows users can print or insert any hierarchical state diagram into a design document
using OLE in the same way. For details, see “Linking and Embedding an Object” on
page 18.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Creating a Flow Chart View
You can also add a title block and comment text, comment graphics, or panels to any
diagram in the hierarchy.
For example, a title block and a panel have been added to the following child state
diagram view:
4. Save any non-logical edits and close the child and parent state diagrams.
Related Topics
Creating a State Diagram View
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Creating a Flow Chart View
Windows users can print or insert a flow chart into a design document using OLE (See “Linking
and Embedding an Object” on page 18). You can also add a title block and comment text,
comment graphics, or panels.
Procedure
1. In the Design Explorer, select the accumulator design unit and click the Convert HDL
to Graphics button.
2. In the Leaf Level Descriptions pane of the Convert to Graphics Wizard, select the Flow
Chart check box and click Finish.
The new flow chart is added to the accumulator component in the Design Explorer and
is indicated by the icon.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Visualizing HDL Designs
Note
If you are using Verilog, the decision box for the clock event is not present.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Visualizing HDL Designs
5. Select the Block Diagram, Flow Chart, Hide Symbol Ports, and Open diagram after
visualization options and click OK.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Visualizing HDL Designs
Note
If a graphical view already exists for the design object you wish to visualize, you
cannot create a visualization view with the same name as that of the graphical view.
In this case, a message displays to inform you that graphical views with the same name
already exist and instructs you to replace these graphical views. You have to set the
option “Overwrite Existing Views” in the Documentation and Visualization dialog box.
If you do not wish to override the existing graphical views, you can rename them before
running the visualization process.
7. Click OK.
A window opens showing the top-level of the fibgen_tb design unit visualized as a block
diagram.
8. In the toolbar of the visualization window, click the Open HDL Source button to view
the source code of the visualization.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Visualizing HDL Designs
9. In the Files pane of the Design Manager window, expand the Visualization folder of the
Documentation and Visualization node to explore the rendered visualized views.
If you double-click any of the visualized child views, a graphical editor window opens
to display the HDL visualized.
Note
If you make changes in the source HDL view, the overlay displays on the
visualization view to indicate that it is out-of-date. You can easily update your
visualizations if you right clicked in the source HDL view and chose to update it.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Exporting the Design Hierarchy or Library as HTML
For more information about visualizing HDL text views, refer to the “Documentation
and Visualization” chapter in the HDL Designer Series User Manual.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Exporting the Design Hierarchy or Library as HTML
Leave all Include options selected, although these can be used to exclude specific view
types. (For example, you might unset all options except Block Diagram or IBD when
you only want to export structural views.)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
Exporting the Design Hierarchy or Library as HTML
Leave the default settings as is for all other options. The export operation is monitored in
the HDL Log window and ends with a summary report:
The design has been exported to the directory
D:\HDS\Temp\ExportHTML
To view the HTML load the following file into your Browser.
SCRATCH_LIBfibgen_tbindex.htm
Export HTML complete.
Related Topics
HDL Designer Web Export View
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
HDL Designer Web Export View
The exported HTML tree appears in the Files pane of your Design Explorer.
Note
Refer to the “Printing Views” and the “Documentation and Visualization” chapters in the
HDL Designer Series User Manual for more information about printing and exporting
graphical views.
Description
Figure 1-1. Exported Design Hierarchy as HTML
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
HDL Designer Web Export View
The following Firefox® browser shows the contents of the SCRATCH_LIB library with the
control state machine shown in the Design frame:
Objects
Object Description
Navigation frame The Navigation frame shows the design hierarchy and can be
expanded or collapsed.
Design frame The Design frame shows the graphical or HDL text view
corresponding to the object selected in the Navigation frame.
You can also use the tabs to display additional information
including side data and generated HDL.
For example, the following Firefox browser shows the
expanded fibgen_tb hierarchy and the Fibgen block diagram
displayed in the Design frame.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
HDL Designer Web Export View
Object Description
Hyperlinks on parent diagram When you have exported hierarchical views, hyperlinks are
created on the parent diagram (for example, blocks and
components on a block diagram or hierarchical states on a state
diagram).
Use these hotspots to display the corresponding HTML page.
Open Up You can use the Open Up button to move up through the
design hierarchy.
Note: The Open Up button moves up through the design
hierarchy displayed in the Navigation frame. For a
component, the parent view displays, unlike in a graphic editor
when the symbol displays.
Zoom In, Zoom Out, View You can zoom in, zoom out or view all.
Normal
Back, Forward You can navigate to the previous or next view.
Information You can use this tab to display text information such as
generation settings, local declarations, compiler directives or
package references. Additional tabs allow you to display side
data and generated HDL if these have been also exported.
Related Topics
Exporting the Design Hierarchy or Library as HTML
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Design Exploration Tutorial
HDL Designer Web Export View
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
End-User License Agreement
with EDA Software Supplemental Terms
Use of software (including any updates) and/or hardware is subject to the End-User License Agreement together with the
Mentor Graphics EDA Software Supplement Terms. You can view and print a copy of this agreement at:
mentor.com/eula