0% found this document useful (0 votes)
201 views40 pages

Design Exploration Tutorial For HDL Designer Series: Release v2019.4

Design Exploration Tutorial for HDL Designer Series™ Release v2019.4

Uploaded by

dupipi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
201 views40 pages

Design Exploration Tutorial For HDL Designer Series: Release v2019.4

Design Exploration Tutorial for HDL Designer Series™ Release v2019.4

Uploaded by

dupipi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Design Exploration Tutorial for HDL

Designer Series™

Release v2019.4

© 1996-2019 Mentor Graphics Corporation


All rights reserved.

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.

Mentor Graphics Corporation


8005 S.W. Boeckman Road, Wilsonville, Oregon 97070-7777
Telephone: 503.685.7000
Toll-Free Telephone: 800.592.2210
Website: mentor.com
Support Center: support.mentor.com

Send Feedback on Documentation: support.mentor.com/doc_feedback_form


Table of Contents

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

Design Exploration Tutorial for HDL Designer Series™, v2019.4 3


Table of Contents

4 Design Exploration Tutorial for HDL Designer Series™, v2019.4


Chapter 1
Design Exploration Tutorial

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

Design Exploration Tutorial for HDL Designer Series™, v2019.4 5

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.

Adding the Fibonacci Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6


Browsing the Fibonacci Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Adding the Fibonacci Design


Add your design using the Add Existing Design wizard.
Procedure
1. In the Design Manager window, choose File > Add > Existing Design.
The Add Existing Design wizard displays.
2. Select Copy Specified Files as the method to use to add your design.
3. In the Show Files of Type dropdown list, select VHDL Files (if you are using VHDL) or
Verilog Files (if you are using Verilog).
4. In the Folders pane in the examples sub-directory of your installation, locate and select
the Fibonacci sequencer design source code.

6 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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

For example, if HDS is installed in the directory D:\HDS\LatestBuild, the path is as


follows:
D:\HDS\LatestBuild\examples\tutorial_ref\Import\Sequencer

5. Click OK.

Design Exploration Tutorial for HDL Designer Series™, v2019.4 7

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.

6. Select the SCRATCH_LIB library and click Next.

8 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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.

7. Edit the target directory names if needed.


8. Click Finish to complete the HDL addition.
The SCRATCH_LIB library is automatically opened in a new Design Explorer window,
and the HDL Log window shows the progress of the add operation. The following
summary report displays on completion:
HDL Import complete
--------------------------------------------------------

3 files imported to 1 library

--------------------------------------------------------

Related Topics
Browsing the Fibonacci Design

Design Exploration Tutorial for HDL Designer Series™, v2019.4 9

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

Browsing the Fibonacci Design


Use the Design Manager to examine the Fibonacci design to understand how each Verilog
module or VHDL architecture is instantiated as a HDL text view in the hierarchy.
Both Verilog and VHDL designs are shown in the Design Explorer using the Design Units,
Files, and Design Hierarchy panes.

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.

10 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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

Design Exploration Tutorial for HDL Designer Series™, v2019.4 11

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

Block Diagram View


You can convert the HDL text view and configure a graphical block diagram to be able to obtain
an easier view of the design. You can edit the diagram and convert it back to HDL text.
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

Creating a Block Diagram


You can convert the HDL text view to a graphical block diagram.
Procedure
1. In the Design Units pane of the Design Explorer, right-click the module view (if you are
using Verilog) or the architecture view (if you are using VHDL) of the fibgen design
unit.
2. Choose Convert to Graphics > Single Level (or click the view and choose the Convert
HDL to Graphics button).

12 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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 View Styles page of the Convert To Graphics wizard displays.

3. Select the Block Diagram check box and click Finish.


The HDL Log window displays a summary report:

Convert To Graphics complete


--------------------------------------------------------

1 HDS design unit saved,


1 component
1 block diagram

--------------------------------------------------------

Design Exploration Tutorial for HDL Designer Series™, v2019.4 13

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.

4. Double-click the default view (for example, struct).


Results
The block diagram displays.

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

14 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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:

If you want to... Do the following:


Change the page layout and In the Design Manager, choose File > Page Setup. The Page
set options for page Setup dialog box displays.
boundaries For a full description of the Page Setup dialog box options,
see “Setting Page Display and Print Options” in the HDL
Designer Series User Manual.
Modify the page layout to 1. In the Design Manager, choose File > Page Setup.
print on a single page 2. In the Page Setup dialog box, click the Layout tab.
3. For example, set the Adjust to option to print at 75% of
normal size or set the Fit to option to a specified number
of pages.
For a full description of the Page Setup dialog box options,
see “Setting Page Display and Print Options” in the HDL
Designer Series User Manual.
Set options for how page 1. In the Design Manager, choose File > Page Setup.
boundaries are displayed 2. In the Page Setup dialog box, click the Boundaries tab.
and printed For a full description of the Page Setup dialog box options,
see “Setting Page Display and Print Options” in the HDL
Designer Series User Manual.
Update the boundaries after The page boundaries on the diagram are automatically
you change the diagram updated when you change the page setup. You can also
update them after you change the diagram.
To do this, in the Design Manager, choose File > Refresh
Page Boundaries.

Design Exploration Tutorial for HDL Designer Series™, v2019.4 15

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

If you want to... Do the following:


Open down into the HDL Double-click the instance on the diagram.
describing each component
or embedded block of a
block diagram
Show or hide text Right-click the object and choose Show Text or Hide Text.
associated with an object For more information about editing the diagram layout and
changing the visibility of text objects, refer to the HDL
Designer Series Graphical Editors User Manual.
Print a block diagram In the Design Manager, choose File > Print | Print
Window.
The Print dialog box displays. The dialog box includes an
option to print selected pages, or you can right-click the
diagram and choose Print Page to print the area within the
current page boundaries.

Related Topics
Creating a Block Diagram
Adding Panels to the Block Diagram

Adding Panels to the Block Diagram


You can add panels to a block diagram to display signal declarations in a separate panel from
the graphical diagram layout. You can also print or export the panels separately by specifying
the panel name.
Procedure
1. In the Design unit pane, double-click the block diagram to view it graphically.

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.

16 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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

The Object Visibility Settings dialog box displays.

5. Select the Declarations check box and click OK.


6. Drag the Declarations label to an empty part of the diagram. (You cannot move this
object by dragging the individual declaration statements.)

Note
To select text objects, click the down arrow on the select button and select
Select Text from the dropdown list.

7. Click the Add Panel button.


8. Drag and drop a new panel (Panel1) around the signal declarations.
The signal declarations are now displayed in a separate panel from the graphical
diagram layout.

Design Exploration Tutorial for HDL Designer Series™, v2019.4 17

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

Linking and Embedding an Object


On a Windows® workstation, you can use Object Linking and Embedding (OLE) to drag a
complete or partial graphic editor view directly onto a documentation tool such as Microsoft®
Word or Adobe® FrameMaker®.
Procedure
1. In the Design unit pane, double-click the block diagram to view it graphically.
2. On the left edge of a diagram, right-click the blue border and choose Set Drag All or Set
Drag Panel <panel name>.
3. Import the diagram or panel directly into the documentation tool by dragging and
dropping the blue border.
You can open the diagram from within the documentation tool by double-clicking the
graphic, which invokes the HDL Designer Series tool.

IBD View Display


To access:
• Block diagram window, Edit as IBD (button)
• Block diagram window, Diagram > Edit as IBD (menu)
You can display the interfaces and connections as a tabular Interface-Based Design (IBD) view.
Use the Diagram menu to open an alternative editor view that displays the interfaces and
connections as a tabular IBD view.

18 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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 .

Design Exploration Tutorial for HDL Designer Series™, v2019.4 19

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

Displaying the Symbol Interface


You can display the symbol interface as a tabular IO view in a new window. This facilitates
viewing all objects in your diagram with all the attributes assigned to each.
Prerequisites
• A block diagram window or IBD view window is open.
Procedure
1. Click the Open Up button.

20 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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

2. In the Structure Navigator pane, select Symbol.

3. Close the symbol/Interface and IBD view/Block diagram windows and save any non-
logical edits.

Design Exploration Tutorial for HDL Designer Series™, v2019.4 21

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

State Diagram View


You can convert the HDL text view to a graphical state diagram. You can fix errors, hence the
logical definition and the original source code are changed to view the corrected state diagram.
Creating a State Diagram View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Re-leveling the State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Creating a State Diagram View


You can convert the HDL text view to a graphical state diagram. You can move or resize
objects, add panels, and edit the title block or make any other non-logical edits to the state
diagram that do not change the logical definition of the state machine.
Procedure
1. In the Design Units pane of the Design Explorer, right-click the module view (if you are
using Verilog) or the architecture view (if you are using VHDL) of the control design
unit and choose Convert to Graphics > Single Level (or click the Convert HDL to
Graphics button)

22 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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

The View Styles page of the Convert To Graphics Wizard displays.

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:

Convert To Graphics complete


--------------------------------------------------------

1 HDS design unit saved,


1 component
1 state machine

--------------------------------------------------------

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.

Design Exploration Tutorial for HDL Designer Series™, v2019.4 23

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

24 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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

Re-leveling the State Diagram


State machines recovered from real designs may have many states. In these cases, it can be
useful to break the initial flat state diagram into one or more hierarchical diagrams.
Prerequisites
• The state diagram you created in “Creating a State Diagram View” on page 22 is open.
Procedure
1. Press the Shift key and select the inc_accb, load_acc_sum, and load_acc_A_B states.
2. Right-click the selected states and choose Re-level > Add hierarchy.
The selected states are replaced by a hierarchical state (s0).
The selected states move into a new child hierarchical state diagram. The child diagram
is saved as part of the same design unit view and is logically identical to the original flat
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.

Design Exploration Tutorial for HDL Designer Series™, v2019.4 25

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

Creating a Flow Chart View


Any HDL text view can be optionally recovered as a flow chart. The alternative flow chart
option is set by default when you set the state diagram HDL convert option (in the Add Existing
Design wizard). Any HDL text view, which is not recognized as a state machine, is
automatically converted to a flow chart.
The HDL code is represented by a number of separate action boxes with conditional statements
represented by decision boxes. A more complex design may also include case boxes, loops, and
wait boxes.

26 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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.

3. Double-click flow to open the chart.


The flow chart displays as shown in the following example:

Design Exploration Tutorial for HDL Designer Series™, v2019.4 27

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.

4. Save any non-logical edits and close the flow chart.

Visualizing HDL Designs


After you add HDL code to HDL Designer Series, convert it to a block diagram, IBD, state
diagram and flow chart views, you can visualize your HDL text views by transforming your
source code into graphical views known as visualization views. You can only perform non-
logical edits on the resulting graphical views. That is, you can make layout modifications and
save them, but you cannot perform logical edits. However, you can easily update any changes in
the source HDL view in the visualization view.
Procedure
1. In the Design Explorer, select the fibgen_tb design unit and choose File > Document
and Visualize.
2. Choose the Document and Visualize through Components option.
The Document and Visualize dialog box displays.

3. Click the Options button.


The Documentation and Visualization Options dialog box displays.
4. Select Visualization Options.

28 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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.

6. Click OK in the Document and Visualize dialog box.


A progress indicator displays showing the advancement of the visualization process, and
then a message displays to inform you of the visualization views location.

Design Exploration Tutorial for HDL Designer Series™, v2019.4 29

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.

30 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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

The DesignPad editor displays the current top-level design only.

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.

Design Exploration Tutorial for HDL Designer Series™, v2019.4 31

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.

Exporting the Design Hierarchy or Library as


HTML
You can print any of the Design Hierarchy views, or you can export any view (or hierarchy of
views) in HTML format as a fully functional website. You can also export HTML for an entire
library. This option allows you to export HTML for all design unit views in a library including
symbols, non-default views and any views of design units that have no explicit hierarchical
relationship.
Procedure
1. Select the fibgen_tb design unit or the SCRATCH_LIB library in the Design Explorer
and click the Document And Visualize Design button or choose
File > Document and Visualize.
The Document and Visualize dialog box displays.
2. Select the Create a Website (Export HTML) option.

3. Click the Options button.


The Documentation and Visualization Options dialog box displays.
4. In the Website Options category, set the depth of the Hierarchy Levels to Descend as
All.

32 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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.)

5. In the Graphics Settings sub-category, select JPEG as the Graphics Format.


6. Click OK.
7. In the Document and Visualize dialog box, enter (or use the Browse button to browse
for) the location of the export target directory (for example, D:\HDS\Temp\
ExportHTML), and click OK.

Design Exploration Tutorial for HDL Designer Series™, v2019.4 33

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

34 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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

HDL Designer Web Export View


To access:
• Files explorer, HTML (directory), SCRATCH_LIBindex.htm (file)
• Files explorer, HTML (directory), SCRATCH_LIBfibgen_tbindex.htm (file)
You can view the HTML hierarchy or library that you exported. Your default web browser is
automatically launched and displays the index file SCRATCH_LIBfibgen_tbindex.htm file.

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

Design Exploration Tutorial for HDL Designer Series™, v2019.4 35

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:

Figure 1-2. Exported Design Library as HTML

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.

36 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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

Design Exploration Tutorial for HDL Designer Series™, v2019.4 37

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

38 Design Exploration Tutorial for HDL Designer Series™, v2019.4

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

You might also like