Start Here Guide: Release v2019.4
Start Here Guide: Release v2019.4
Start Here Guide: Release v2019.4
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
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
HDL Designer Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Capabilities of HDL Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Capabilities of HDL Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
HDL Designer Series InfoHub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Release Information Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
HDL Designer Series Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
DesignChecker Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
SystemVerilog-VHDL Assistant Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Register Assistant Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Dialog Box Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 2
Invoking HDL Designer Tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Invoking on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Invoking on UNIX or Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Command Line Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Team Member Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
HDS Setup Assistant Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Starting the Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Using the HDS Setup Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Language Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Design Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Simulator Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Synthesis Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Other Flows Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Project Setup Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Design Library Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Version Management Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Default Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Example Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Shared Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Using the Example Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Appendix A
UART Example Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Design Description (uart_top) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
UART Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
UART Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Address Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Clock Divider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
CPU Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Serial Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Test Bench (uart_tb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
UART Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
UART Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
UART Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Reading From a UART Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Writing to a UART Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Transmitting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Receiving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Appendix B
Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
List of Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Using Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Setting Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
End-User License Agreement
with EDA Software Supplemental Terms
This chapter provides an overview of the HDL Designer Seriestm® (HDS), an HDL-based
environment for the creation and management of complex FPGA and ASIC designs.
HDL Designer Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Capabilities of HDL Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Capabilities of HDL Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
HDL Designer Series InfoHub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Release Information Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
HDL Designer Series Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
DesignChecker Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
SystemVerilog-VHDL Assistant Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Register Assistant Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Dialog Box Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
HDL Designer Series
For full information about the HDL Designer Series, including brochures and datasheets, visit
the website:
http://www.mentor.com/hdldesigner/
The project manager allows you to manage the library mappings that specify the location of
your design data. Projects can be created or modified and stored as individual user or shared
team resources.
You can open multiple design explorers to display your design data as design units, HDL files
or logical design objects. The full design hierarchy beneath any design object can be explored in
a separate hierarchy browser. Additional browsers can be used to explore additional information
associated with the source (side data) and data required or produced by downstream tools such
as for simulation or synthesis (downstream data).
The task manager supports customizable interfaces to downstream tools and design flows.
Default tasks are provided to support the generation of HDL from graphical source views plus
compilation, simulation and synthesis using a range of industry standard tools. Tasks are
defined using Tcl to run an external program or Tcl script. Individual tasks can be added into
flows to create a complete sequence of operations. The following simulators are supported:
ModelSim®, Questa®, Cadence® Incisive® and Synopsys® VCS®/VCSi. Default tasks are also
provided for the following synthesis tools: Precision® Synthesis, LeonardoSpectrum™,
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
Capabilities of HDL Designer
The template manager provides default templates for HDL text views which can be edited to
support your local design standards including multiple alternative templates for each view type.
The design manager supports tasks and templates maintained by each individual user and as
shared team resources maintained by a team administrator.
Design entry is also available using graphical and tabular editors. Component interfaces can be
described using tabular IO or the graphical symbol editors. Interconnect between design units in
a hierarchical design can be maintained using a graphical block diagram editor or in tabular/
spreadsheet format using the Interface-based design (IBD) view. Leaf-level views can be
specified using HDL text views or graphically using state diagrams, algorithmic state machines,
flow charts and truth table editors.
The HDL2Graphics™ capability can import any complete or partial text-based HDL design and
convert the textual description into a hierarchy of fully editable graphical or tabular views.
Similar to design entry, the converted design structure can be represented as graphical block
diagrams or tabular IBD views. Leaf-level views can be represented as state diagrams, flow
charts or HDL text views. The resulting descriptions can be printed or exported as HTML Web
pages for use in design documentation. On Windows, any text or graphical views can be directly
included in a documentation tool using the object linking and embedding (OLE) feature.
Existing HDL designs can be imported into the HDL Designer Series data model while
preserving the file structure and design data integrity. The imported code can be visualized as
graphical block diagrams, tabular IBD views, state diagrams or flow charts to aid
comprehension and for documentation purposes. Non-logical changes can be made to any
visualization.
Version management is available for your imported HDL text and rendered graphical views and
the design explorers can be used to traverse the relationship between design units.
HDL Designer includes DesignChecker, a full-featured static design checking and analysis tool
enabling each engineer to find and correct coding violations early in the design process prior to
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
Capabilities of HDL Text
simulation and synthesis. Configurable base rules allow project managers to create required
checks which complimented the supplied rulesets covering RTL synthesis rules, SystemVerilog
and OVM/UVM verification rules, complex design-wide rules and style rules for readability
and consistency. Policies and rulesets can be shared across multiple teams with a
comprehensive exclusion mechanism allowing rules to be waivered if required. Automated
design checking throughout the design process together with interactive violation analysis and
report generation assists design teams to comply with safety standards and compliance
mandates.
HDL Designer provides register management capabilities through its Register Assistant
technology. Register Assistant allows you to make changes to register specifications in a central
place and automatically generate/update a number of derived outputs. Register and memory
descriptions can be imported from a variety of sources including IP-XACT, XML and
spreadsheet (CSV) formats into a cohesive, extensible data model describing a hierarchy of
blocks, sub-blocks, maps, registers, fields and memories. Customizable DRC checks ensure
consistency of the data and a full API allows custom input converters and output generators to
be added. Outputs include OVM and UVM register packages for verification, synthesizable
VHDL and Verilog RTL code, C Header files for driver development plus HTML hyperlink
documentation for communication and record keeping.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
Documentation
Documentation
HDL Designer Series documentation can be provided from the following sources:
HDL Designer Series InfoHub and Dialog Box Help.
Note
A HTML browser must be installed on your Windows®/Linux®1machine to be able to view
the InfoHub.
1. Linux® is a registered trademark of Linus Torvalds in the U.S. and other countries.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
Release Information Scope
For a general overview on how to use the InfoHub and how to run searches, click on “InfoHub
Help” at the bottom of the window.
The HDS InfoHub contains several scopes. The most commonly used are:
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
Release Information Scope
o DesignChecker Release Notes which includes information about the new and
enhanced base rules in the release.
o Register Assistant Release Notes which includes information about configuration,
licensing, defects fixed in the release and so on.
• Install and Licensing
o License Administration Guide
o Mentor Standard Licensing Manual
o Release Notes for Mentor Standard Licensing
In the Training tab, you will find the following the following HDS resources:
• Tutorials
This section provides access to locally installed tutorials which include the following:
o The Start Here Guide (this document) which gives you introductory information on
the HDL Designer Series tools and describes procedures for invoking them.
o The Design Exploration Tutorial is an introduction to the HDL Designer tool. This
tutorial shows how this tool can be used to import an existing VHDL or Verilog text
design, visualize the design using graphical views and export these views in HTML
format.
o The DesignChecker Tutorial is an introduction to the DesignChecker tool. This
tutorial shows how to configure DesignChecker settings, analyze a design, and
investigate the analysis results.
o The Interface-Based Design Tutorial is an introduction to interface-based design
(IBD) for users of the HDL Designer tool which uses HDL import, tabular IO, an
IBD view and ModuleWare parts to capture a VHDL or Verilog text design.
Simulation and synthesis design flows are illustrated using the ModelSim and
LeonardoSpectrum tools.
o The HDL Designer SystemVerilog-VHDL Assistant UVM Tutorial is an introduction
to the SystemVerilog-VHDL Assistant tool. This tutorial shows how to launch
SystemVerilog-VHDL assistant, explore UVM, add components, connect to the
DUT and perform tests and simulation.
• Self-Running Demos
This section provides a number of Interface-Based Design (IBD) demos.
Note that the Training tab can also be accessed through the HDL Designer Series,
DesignChecker, SystemVerilog-VHDL Assistant and Register Assistant scopes.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
HDL Designer Series Scope
• What’s New
o What’s New in HDL Designer Series which includes a link to the “What’s New”
presentation covering the features that have been introduced in the current HDL
Designer Series release.
• HDL Designer Series Manuals
The manuals listed in this section are as follows:
o The DesignPad Text Editor User Manual describes procedures for using the
integrated DesignPad HDL text editor.
o The Graphical Editors User Manual describes procedures for using the graphical
symbol, tabular IO, block diagram, IBD view, flow chart and truth table editors.
o The HDL Designer Series Language Support Guide gives an overview on some of
the languages supported by HDL Designer Series.
o The HDL Designer Series Tcl Reference Manual describes procedures for using the
HDS library contents API and HDS Tcl API commands.
o The HDL Designer Series User Manual describes general user procedures for the
HDL Designer tools.
o The ModuleWare Reference Guide describes a library of HDL model generators
which can be instantiated in a design and used to implement a large range of
standard logic or arithmetic functions for VHDL or Verilog. Descriptions of each
generator in the library in a HTML version of this manual can be accessed directly
from each part in the library.
o The Start Here Guide (this document) gives you introductory information on HDL
Designer Series and describes procedures for invoking the tool.
o The State Machine Editors User Manual describes procedures for using the state
diagram and algorithmic state machine editors.
o The document Using DesignChecker with HDL Designer Series describes the
integration between DesignChecker and HDL Designer Series.
o The document Using Register Assistant with HDL Designer Series describes the
integration between Register Assistant and HDL Designer Series.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
DesignChecker Scope
DesignChecker Scope
The main tabs that provide information on the tool in this scope are the Documents tab, the
Support Center QuickLinks tab and the Training tab.
In the Documents tab, you will find the following DC resources:
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
SystemVerilog-VHDL Assistant Scope
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
Register Assistant Scope
In the Training tab, you will find some content explained in the Release Information Scope.
• What’s New
o What’s New in Register Assistant which includes a link to the “What’s New”
presentation covering Register Assistant new features that have been introduced in
the current HDL Designer Series release.
• Quick Reference Index
o This section provides a link to HDL Designer Register Assistant quick reference
document.
• Register Assistant Manuals
The manuals listed in this section are as follows:
o The Register Assistant User Manual describes procedures for using the integrated
Register Assistant tool.
o The document Using Register Assistant with HDL Designer Series describes the
integration between Register Assistant and HDL Designer Series.
• Other Documents
This section includes the following:
o First Time Setup for Register Assistant: CSV Mapping for Register Generation
In the Support Center QuickLinks tab, you will find the following HDS resources:
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Introduction
Customer Support
Customer Support
For information about customer support, choose How to obtain support from the Support
cascade of the Help menu.
If you have a problem with the HDL Designer Series software, you can use the Generate
Support Info from the Support cascade of the Help menu to create a text file containing
information which may help customer support diagnose the problem.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Chapter 2
Invoking HDL Designer Tool
This chapter shows how to invoke and use the HDL Designer Series tool.
Invoking on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Invoking on UNIX or Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Command Line Switches. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Team Member Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
HDS Setup Assistant Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Starting the Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Using the HDS Setup Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Default Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Example Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Shared Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Using the Example Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Invoking on Windows
On Windows, the HDL Designer Series tool is normally invoked from shortcuts in the Windows
Start menu or desktop (which are created during installation):
HDL Designer — This shortcut invokes the hdldesigner.exe executable with an appropriate
switch for the licensed configuration.
You can also double-click over the executable hdldesigner.exe file in the Windows Explorer,
explicitly enter hdldesigner.exe in the Run dialog box from the Start menu or double-click on
the icon for any HDL Designer Series design object. When invoked in this way, the application
attempts to find a valid license and invokes.
Note
You can also invoke on Windows by double-clicking on a recognized HDL Designer Series
file type in Windows Explorer, for example, by clicking on a block diagram or IBD view
file.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Command Line Switches
The script and corresponding shortcut link is located in the bin subdirectory of your installation.
For example, you can invoke HDL Designer using either of the commands:
<install_dir>/bin/hdl_designer
or
<install_dir>/bin/hds
Note
All required environment variables are automatically set within the invoke script and need
not be explicitly set if you use this script to invoke the tool.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Command Line Switches
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Team Member Mode
The -teamprefsfile (or -teamprefs) and -prefsfile (or -prefs) switches are supported to allow
migration of the preferences from a previous release.
If errors are encountered when you use a command line switch, messages are sent to standard
output on UNIX but are not reported on Windows unless you pipe the command output to a file.
Alternatively, you can invoke in team member mode by using the -team_home command line
switch or the HDS_TEAM_HOME environment variable to specify the location of a shared
hds_team resources directory.
You can also set team member mode and the location of hds_team as preferences in the
General tab of the Main Settings dialog box as described in the “User and Team Preferences”
section of the HDL Designer Series User Manual.
In team member mode, the shared team resources are read-only although users with write access
permissions can edit these resources by selecting Team Administrator mode.
The team resources include version management settings, generated HDL file naming rules,
generation properties, file registration, team tasks, team templates, remote simulation directory
location, project synthesis properties and custom code generation scripts.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
HDS Setup Assistant Wizard
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the HDS Setup Wizard
The left pane of the wizard displays a tree whose nodes represent the settings to be configured.
These include Language, Type of Design, Simulator, Synthesis, Other Flows, Project Setup,
Design Library and Version Management.
The first time the wizard is invoked you have to use the Next button to navigate through the left
pane tree nodes. On moving to a new node the previous one is enabled.
The right pane of the wizard displays a page where you can configure the settings of the selected
node.
Language Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Design Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Simulator Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Synthesis Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Other Flows Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Project Setup Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Design Library Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Version Management Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the HDS Setup Wizard
Language Page
The language page enables you to specify the most frequently used language in creating new
views. You can later change the default language used.
Refer to “Main settings” in the HDL Designer Series User Manual. You can also specify a
language for each new view created. Refer to “Design Content Creation Wizard” in the HDL
Designer Series User Manual.
Design Page
You can optionally specify the type of designs you want to create as ASIC or FPGA. If you
choose FPGA you can further specify the FPGA technology libraries as Altera, Xilinx,
MicroSemi, or Lattice.
The tasks pane is automatically updated according to the design type you specify.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the HDS Setup Wizard
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the HDS Setup Wizard
Simulator Page
HDS automatically detects the presence of any installed simulators. The simulator page displays
a list of the detected simulators and sets the default.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the HDS Setup Wizard
Synthesis Page
HDS automatically detects the presence of any installed synthesis tools. The synthesis page
displays a list of the detected synthesis tools and sets the default.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the HDS Setup Wizard
Alternatively you can specify a new synthesis tool by clicking New Synthesis Tool.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the HDS Setup Wizard
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the HDS Setup Wizard
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the HDS Setup Wizard
Procedure
1. Select Yes to display a dropdown list of the version management interfaces.
2. Select the version management tool.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the HDS Setup Wizard
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Default Project
Default Project
When you invoke for the first time, the default project is defined by the following two project
files:
My Project: $HDS_HOME\examples\examples.hdp Shared Project:$HDS_TEAM_HOME\
shared.hdp
Example Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Shared Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Using the Example Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Example Libraries
The following libraries are defined in the examples project:
• SCRATCH_LIB — An empty Regular library which is used as the default location for
imported designs.
• Ethernet — This Regular library contains a HDL text design example which is part of
the Ethernet IP core project and is reproduced under the terms of the GNU lesser general
public license as published by the Free Software Foundation. For more information
about the Ethernet IP project, see the web site:
http://www.opencores.org/projects/ethmac/
The Ethernet design is defined by a mixture of VHDL and Verilog views and includes a
test bench which can be used to simulate the design.
• Sequencer_vhd and Sequencer_vlg — These Regular libraries contain VHDL and
Verilog versions of the Fibonacci sequencer design which is shown in many of
illustrations used in this manual.
The Sequencer design is also used for the procedures described in the Design
Exploration Tutorial.
• TIMER_Vhdl and TIMER_Vlog — These Regular libraries contain completed VHDL
and Verilog versions of a design which implements a timer design using block diagrams,
a re-usable component defined by a HDL text view, a hierarchical state machine and
truth table. The examples include a test bench controlled by a flow chart.
• UART_TXT, UART, UART_V and UART_V2K— These Regular libraries contain
an example of a universal asynchronous receiver transmitter design with a test bench
which can be used to verify the design if a HDL simulator is available on your system.
The UART_TXT library contains a HDL text version of the design described by a
mixture of VHDL and Verilog views and can be edited using HDL Designer Series.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Shared Libraries
The UART library contains a graphical version of the design described by VHDL views
using block diagrams, IBD views, state machines, truth tables, flow charts and HDL text
views.
The UART_V library contains an alternative graphical version of the design described
by Verilog.
The UART_V2K library contains an alternative graphical version of the design
described by Verilog 2005.
The UART design is described in “UART Example Design” on page 37.
• tinycache_sv_lib — This library includes a SystemVerilog design.
Shared Libraries
The following libraries are defined in the default shared project:
• exemplar — A Regular library containing VHDL packages which support the
LeonardoSpectrum synthesis tool.
• hds_package_library — A Regular library containing VHDL packages which support
automatic type conversion within HDL Designer Series. This library also contains
packages which support the ModuleWare random value based waveform generator.
• renoir_package_library — This Regular library is provided for compatibility with
older designs which used the type conversion packages. New designs should use the
conversion functions in the hds_package_library.
• moduleware — This Protected library contains HDL function generators which can be
instantiated as components in block diagram, IBD or HDL text views. The ModuleWare
models are described in the ModuleWare Reference Guide.
• std — This Protected library contains STANDARD and TEXTIO standard VHDL
packages.
• ieee — This Protected library contains the IEEE standard VHDL packages which are
recognized by most downstream simulation tools.
• std_developerskit — This Protected library contains VHDL packages which support
the development of VHDL models using the ModelSim simulation tools.
• synopsys — This Protected library contains VHDL packages to support the Synopsys
Design Compiler synthesis tool.
• verilog — This Protected library contains definitions for the standard Verilog types.
The hds_package_library (or renoir_package_library) and exemplar package libraries must be
compiled to make them available for use.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the Example Designs
You should add downstream mapping for these libraries to a location where you have write
permission. After compiling these libraries, they should be changed to Protected libraries to
avoid accidental regeneration or recompilation.
The contents of the standard VHDL packages are described in the “VHDL Standard Libraries”
section of the HDL Designer Series User Manual.
If you want to use the GNU Concurrent Versions System (CVS), the source data must be in a
directory which exactly matches the name of the library. Refer to “Creating a Library Mapping”
in the HDL Designer Series User Manual for more information.
Procedure
1. Set library mapping (including HDL HDS source, and downstream directories to which
you have write permission) for a new empty library.
2. Select the new library and the library you want to copy in the project manager. Choose
Explore Library from the File or popup menu to open both libraries in a new design
explorer window.
3. Select the top level design unit in the example library and drag it over the new library
name with the right mouse button.
4. Choose Copy Special Here from the popup menu which is displayed when you release
the mouse button to display the Copy Special Options dialog box.
5. Select Copy Through Components, Copy to target library and All levels in the
dialog box.
6. Confirm the dialog box.
Results
A complete logical copy of the origin library is made in the target library. All references in the
new library to objects in the original library are updated to reference the new library.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the Example Designs
Note that, HDL filenames are derived from the logical names of the HDL text views. (For
example, if you copy the TIMER_Vlog library, the BCDCounter view is copied to a new file
named BCDCounter.v.)
You can also copy a library by selecting the library name in the design explorer and choosing
Copy Contents from the popup menu and then using the Paste command to make a physical
copy in the new library.
When you use these commands, all the files in the origin library are copied. (For example, if
you copy the TIMER_Vlog library, the BCDCounter view is copied to a new file named
Timer_BCDCounter.v, preserving the original file name used in the origin library.)
The new library can be browsed, edited, generated, compiled, simulated, animated or
synthesized without any impact on the original examples.
If you want to animate any flow charts and state diagrams in an example design, you should set
Instrument HDL for animation in the properties for the state machine and flow chart and then
regenerate the HDL through components.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Invoking HDL Designer Tool
Using the Example Designs
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Appendix A
UART Example Design
Overview
The design is a UART which provides serial communications between a CPU (such as an ARM
processor) and a Serial Device. The full specification for the device can be found at the end of
this document.
• Different baud rates can be set for the transmit/receive clock divider. This can be done
by writing the most significant and least significant divide values into the divmsb and
divlsb registers.
• Data is transmitted by writing the 8 bit value into the xmitdt register. The interrupt line
(int) goes high when the transmit cycle is completed. The data is placed on the serial out
line (sout) with the appropriate start and stop bits.
• Serial data is received into the recvdt register. The interrupt line (int) goes high when a
correctly constructed word has been received.
• Any internal register can also be read by the CPU.
• A Status Register contains flags to indicate when transmission or receiving is in progress
or completed.
• The status register and hence the interrupt can be cleared by reading register address 7.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
Overview
Two graphical versions of the design are provided in the libraries UART (VHDL) and UART_V
(Verilog). Both of these graphical designs are partitioned as follows:
UART
uart_tb (struct - block diagram)
tester (flow - flow chart)
uart_top (struct - block diagram)
clock_divider (flow - flow chart)
cpu_interface (intconx - IBD; struct - block diagram)
data_out_mux (embedded HDL text)
control_operation (fsm - hierarchical state diagram)
serial_interface (struct - block diagram)
convert (embedded flow chart)
zeros (ModuleWare)
status_registers (spec - hand-written HDL)
ser_out_mux (ModuleWare)
xmit_rcv_control (fsm - concurrent state diagram)
address_decode (tt - truth table)
Note
The CPU interface is described by an IBD view but an alternative block diagram view is
also provided.
A third UART_TXT library describes the UART using a mixture of VHDL and Verilog HDL
text views without any graphical views:
UART_TXT
uart_tb (rtl - Verilog text)
tester (rtl - Verilog text)
uart_top (rtl - VHDL text)
clock_divider (rtl - Verilog view)
cpu_interface (rtl - VHDL text)
control_operation (rtl - VHDL text)
serial_interface (rtl - VHDL text)
status_registers (rtl - VHDL text))
xmit_rcv_control (rtl - VHDL text)
address_decode (rtl - VHDL text)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
Design Description (uart_top)
UART Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
UART Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
UART Interface
The UART interface is designed for use with an ARM processor and consists of the following
signals:
• data_in[7:0] — This is the 8-bit input data bus which carries the data which the CPU
writes to the UART registers.
• data_out[7:0] — This is the output data bus which carries the data from the selected
UART register.
• addr[2:0] — This is the address bus which is connected to the CPU. This signal
indicates which register is being written or read by the CPU.
• sin — This is the serial input signal from the external serial device. When serial data is
being read, the register rcvdt is loaded with individual bits from this signal.
• sout — This is the serial output signal to the external serial device. The contents of
xmitdt register is output one bit at a time.
• int — This signal indicates that serial data has been transmitted or received successfully
and requests an interrupt from the CPU.
• cs — This Chip Select signal is asserted low to enable transmit and receive cycles.
• nrw — notRead/Write. ’0’ indicates a Read operation, ’1’ indicates Write.
• clk — The main system clock. 50% duty cycle. Typically 100ns clock period.
• rst — Active low asynchronous reset.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
UART Structure
UART Structure
The following are the four top-level blocks:
• address_decode — Uses the lowest 3 bits of the CPU address bus to determine which
register is being addressed.
• clock_divider — Provides a sampling clock for transmitting and receiving serial data.
The baud rate is determined by the two-byte divisor value (divlsb, divmsb) used to
divide down the main system clock.
• cpu_interface — This block controls whether the UART is transmitting, receiving or
clearing the status flags (and interrupt). It also provides CPU access to the internal
UART register information.
• serial_interface — Performs the actual transmission and receiving of serial data. It also
stores the status flags and generates the interrupt. This block also provides the transmit/
receive register information to the cpu_interface.
Address Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Clock Divider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
CPU Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Serial Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Address Decode
The address_decode block is defined as a truth table. It decodes the last 3 bits of the address bus
(addr) to provide a set of enable signals indicating which register is being addressed:
• clk_div_en — This is set if either divlsb(0) or divmsb(1) of the clock divider registers
is being addressed.
• xmitdt_en — Indicates transmit register (xmitdt) is being addressed.
• ser_if_select — Contains the last two bits of the address bus which are used to select the
register to output onto the ser_if_data bus.
• clr_int_en — A “pseudo register” which, when read, causes the status flags and
interrupt flag to be cleared.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
UART Structure
Clock Divider
The clock_divider is described as a flow chart. The divider can be asynchronously reset;
otherwise, the divider either loads in the 2-byte divider value or counts clock edges.
The resulting output signal ‘sample’ is a 50% duty cycle divided clock. This is used as the clock
for transmission and receiving operations.
CPU Interface
The cpu_interface is described by an IBD view which performs two operations:
• control_operation — determines which mode of operation the UART is in (transmit,
receive, clearing).
• data_out_mux — places the clock divider value (div_data) or serial interface register
information (ser_if_data) onto the CPU data_out bus depending on the value of
clk_div_en.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
UART Structure
Control Operation
The register operations of the UART are controlled by the signals nrw and the chip select flow,
cs. The control_operation component is described as a hierarchical state machine which
consists of a top-level state waiting (also the reset state) and two hierarchical states for transmit
(TX) and receive (RX).
• waiting — No register read or write operations have been requested by the CPU.
• TX/writing_to_reg — Output enable_write is set. Data is being taken from the
data_out bus and is being written to the register indicated by the address bus (addr).
• TX/xmitting — Output start_xmit is set. The UART is transmitting data to the serial
output flow (sout). This occurs after the xmitdt register (4) has been written.
• RX/reading_from_reg — Data is being taken from the register indicated by the address
bus (addr) and is being written to the data_out bus.
• RX/clearing_flags — Output clear_flags is set. The UART is clearing the status
register (status) and resetting the interrupt flag (int). This occurs after register 7 has
been read.
The outputs from the control_operation component are:
• enable_write — Indicates that a register should be written; data should be taken from
the input data bus (data_in).
• start_xmit — Indicates that serial data transmission should commence.
• clear_flags — Indicates that the internal flags (associated with transmitting and
receiving) should be cleared.
Serial Interface
The serial_interface block consists of four main functions:
• xmit_rcv_control — Controls the transmitting and receiving of serial data to/from the
external serial device.
• status_registers — Stores the transmit and receive status flags, composes the status
byte and produces the interrupt (int).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
UART Structure
• convert — Loads the transmit data from data_out into the xmitdt register and
composes the receive register (recvdt) from the incoming serial data stream (sin).
• ser_out_mux — places the contents of the transmit data register (xmitdt) or the receive
register (recvdt) or the status byte (status) onto the serial interface data bus
(ser_if_data) depending on the value of ser_if_select.
• xmitting — Indicates that data is being transmitted to the serial device and that the
appropriate status bit of the status register should be set.
• done_xmitting — Indicates that transmission to the serial device has just finished and
that the appropriate status bit of the status register should be set.
• rcving — Indicates that data is being received from the serial device and that the
appropriate status bit of the status register should be set.
• done_rcving — Indicates that data has been received from the serial device and that the
appropriate status bit of the status register should be set.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
UART Structure
• read_bit — Indicates that one bit of data should be loaded into part of the receiving
register (recvdt).
• rcv_bit_cnt — Indicates the bit position into which the serial data should be read.
• xmitdt — Contains the data which will be transmitted to the serial device.
Status Registers
The status_registers block is described directly in HDL. This block registers the transmit and
receive status flags (xmitting, done_xmitting, rcving, done_rcving) and to compose the 8-bit
status byte from these flags. Once the done flags are set, they remain at ’1’ until cleared. The
interrupt signal (int) is set if the done_xmitting or done_rcving flags are set. The status flag
registers (and hence the status byte and interrupt) are cleared by either the clear_flags signal
from control_operation or by the system reset (rst).
Convert
The convert embedded block is described as a flow chart. This block loads and stores the
xmitdt and recvdt registers. Both registers are cleared by the system reset (rst) asynchronously.
On the system clock edge (clk), if xmitdt_en and enable_write are both set, the transmit
register (xmitdt) is loaded with the value from the CPU on the data_in bus. Otherwise, if
read_bit is set, then the current serial input value (sin) is loaded into the appropriate bit of the
receive register (recvdt).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
UART Structure
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
Test Bench (uart_tb)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
Simulation Results
• Test status:
o Read status register (status)
o Check all bits are zero
The tester flow chart description also contains a clock generator in the concurrent statements
section and procedures in the process declaration section to perform the uart read and write
functions. The declarations include constants for the system clock period (100ns) and the test
transmit and receive data.
Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Simulation Results
The simulation results should be similar to those shown overleaf.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
Simulation Results
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
UART Specification
UART Specification
This section describes aspects of the UART specification.
UART Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
UART Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Reading From a UART Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Writing to a UART Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Transmitting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Receiving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
UART Registers
The UART contains 6 registers, each 8 bits wide:
0 DIVLSB Contains Least Significant bits of Clock Divider
1 DIVMSB Contains Most Significant bits of Clock Divider
2 Unused
3 Unused
4 XMITDT Contains data to be transmitted
5 RECVDT Contains received data
6 STATUS Contains UART Status
bit 0 Indicates transmitting in progress
bit 1 Indicates receiving is in progress
bit 2 Indicates transmission is done
bit 3 Indicates receiving is done
7 CLRINT When read from, clears the interrupt flag as well
as receive and transmit done flags
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
UART Application
UART Application
The UART application is shown in the following figure:
• If cs is low and nRW is low, put the content of the UART register addressed by addr
onto the data_out bus.
• If the address was 7 (CLRINT), then clear interrupt flag and transmit and receive done
bits in status register.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
Writing to a UART Register
• If cs is low and nRW is high, save data_in in the UART register addressed by addr.
• If the address was 4 (XMITDT) then start transmitting content of the xmitdt register to
the serial device.
Transmitting Data
If the last operation from the CPU was write to register number 4 (xmitdt) then start
transmitting content of xmitdt register, one bit at a time.
• Set transmitting bit in the status register to one (bit 0 of status register).
• Enable the transmit clock.
• Send start bit (a zero bit half of the duration of the transmit clock).
• Send content of register number 4 one bit at a time starting with least significant bit first.
• Send stop bit (a one bit).
• Clear transmitting bit in the status register.
• Set done transmitting bit in the status register to one (bit 2 of status register).
• Set interrupt flag to one.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
Receiving Data
Receiving Data
This section describes how to receive data.
• Wait for falling edge of sin.
• Wait for half of receive clock (sample) cycle.
• If sin is still low (start bit), start receiving data, otherwise abort operation and wait for
another falling edge of sin.
• Set receiving bit in the status register to one (bit 1 of status register).
• Enable the receive clock.
• Receive data, one bit at a time starting with least significant bit (including stop bit).
• Save received data in register number 5 (recvdt), strip off the stop bit.
• Clear receiving bit in the status register.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
Receiving Data
• Set done receiving bit in the status register to one (bit 3 of status register).
• Set interrupt flag to one.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
UART Example Design
Receiving Data
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Appendix B
Environment Variables
Variables
There are also a number of application environment variables that you can use to locate tasks
and project files or to enable specific features and a number of other general purpose variables
are recognized if they are set in your environment.
DesignChecker Variables:
HDS_POLICY_DIR HDS_RULESET_DIR
Debug Variables:
HDS_DEBUGFONTS HDS_KEEPFILE
Language Variables:
HDS_MIN_VHDL_DIALECT RENOIR_LIBRARY_PATH
HDS_VHDL_SEARCHPATH
Licensing Variables:
LD_LIBRARY_PATH MGLS_HOME
LM_LICENSE_FILE MGLS_LICENSE_FILE
MGLS_CONN_TIMEOUT MGLS_PKGINFO_FILE
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
Variables
Miscellaneous Variables:
HDS_GENRULES_SCRIPT HDS_LIB_MIGRATION
HDS_KANJI_DIALOGS HDS_MAX_ILOG_AREA
Parsing Variables:
HDS_CACHE_DIR HDS_SIGNAL_LIMIT
HDS_INSTANCE_LIMIT HDS_TRUST_CACHE
EDITOR HDS_TEAM_VER
HDS_HOME HDS_TEAMPREFS
HDS_KEYS HDS_TCL
HDS_LIBS HDS_USER_HOME
HDS_NEW_PROJECT_DIR HDS_USER_VER
HDS_PREFS MGC_HOME
HDS_PROJECT_DIR MGC_LOCATION_MAP
HDS_TEAM_HOME MGC_WD
Tasks Variables:
CVE_HOME HDS_PLUGINS
CDS_INST_DIR HDS_PORT
EXEMPLAR MODELSIM
HDS_LOG_TIMEOUT SPYGLASS_HOME
CVSROOT HDS_SVN_OBJECT
HDS_CLEARCASE_CONF HDS_SVN_UNLOCK_COMMIT_WHEN_
HDS_REPOSITORY NOT_RETAINED
HDS_SVN_COMMAND_FILE_LIMIT SSDIR
TZ
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
List of Variables
List of Variables
This section describes variables you can use to locate tasks and project files or to enable specific
features and a number of other general-purpose variables are recognized if they are set in your
environment.
CDS_INST_DIR
Specifies a pathname to the location of a Cadence software tree. This variable can be used to
specify the installation directory containing the Cadence NC-Sim simulator executable.
CVE_HOME
Specifies a pathname to the location of the Seamless CVE software. This location is required for
library mapping when you instantiate a CVE model as an external HDL model in a block
diagram.
CVSROOT
Specifies the pathname of a directory used as the repository for CVS source control objects. It is
set internally to the location specified in the version management options.
EDITOR
Specifies the default editor for text files on UNIX or Linux systems. It is usually set to the name
of the editor and located using the default search path. This editor can be used for editing or
viewing HDL text views files if you set XTerm with Editor as the text editor command in your
preferences.
EXEMPLAR
Specifies a pathname to the installation directory containing the LeonardoSpectrum synthesis
tools. This variable is not required when LeonardoSpectrum is invoked from a HDL Designer
Series tool and may cause problems if set to an out-of-date location.
HDS_CACHE_DIR
Specifies alternative location for the .cache file directory.
HDS_CLEARCASE_CONF
Controls how Rational ClearCase UCM activities are displayed.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
List of Variables
Prior to invoking HDL Designer Series, you can set this environment variable with one of the
following values:
• HDS_CLEARCASE_CONF = -me
Enables the user to show only his/her activities.
• HDS_CLEARCASE_CONF = -norebase
Hides the rebase activities on the stream.
• HDS_CLEARCASE_CONF = -nodeliver
Hides the delivery activities on the stream.
• HDS_CLEARCASE_CONF = -nolabel
Disables the option “Force adding labels with Check In”.
You can also define any combination of the above settings for HDS_CLEARCASE_CONF. For
example:
HDS_CLEARCASE_CONF = -me -nolabel -nodeliver -norebase
HDS_DEBUGFONTS
When set to any value, font mapping information is sent to standard error output.
HDS_GENRULES_SCRIPT
Specifies the pathname to a Tcl script used to expand view properties variables.
HDS_HOME
Specifies a pathname to the HDL Designer Series installation directory. This variable is used
internally to locate application resources in the installation directory.
HDS_INSTANCE_LIMIT
Specifies a default integer limit to the number of instance declarations found in a HDL file by
the HDL parser. The limit can be overidden by specifying a value in the Checks tab of the Main
Settings dialog box.
HDS_KANJI_DIALOGS
When set to a non integer value, such as ‘ON’, enables a font which allows the entry of Kanji
characters in the Comments dialog box.
Note
Setting the HDS_KANJI_DIALOGS to any non-integer value prevents the text from getting
cut-off.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
List of Variables
HDS_KEEPFILE
When set to any non zero value, the temporary list file created during HDL compilation is not
deleted when the compilation window is closed.
HDS_KEYS
Specifies a pathname to an alternative location for the hds.keys file. If not set, a keys file in the
working directory is used (if it exists) or a keys file in your user directory. If not found in these
locations, the default hds.keys file in the resources/misc installation subdirectory is used. This
variable is ignored if the -keysfile command line switch is used to specify a keys file.
HDS_LIB_MIGRATION
When set to any value, the library migration wizard is available from the background popup
menu in the project manager. This wizard can be used to migrate libraries created using pre-
2003.1 releases to the hierarchical data model (HDM).
HDS_LIBS
Specifies the full pathname to the current user project file (hds.hdp). This variable is overridden
if the location is specified using the -hdpfile command line switch.
HDS_LOG_TIMEOUT
Specifies a timeout period in seconds for the log displayer process. This variable is not usually
required but can be used (set to a low value such as 5) to overcome a problem on Windows
workstations which prevents the simulator from being re-invoked.
HDS_MAX_ILOG_AREA
Specifies the maximum image area in pixels which is used when exporting a diagram as HTML.
If not set, defaults to 5000000 pixels square.
HDS_MIN_VHDL_DIALECT
Overrides the minimum auto-detected VHDL dialect. e.g. “VHDL_87”, “VHDL_93”,
“VHDL_2002” and “VHDL_2008”. Other values would be ignored.
HDS_NEW_PROJECT_DIR
Specifies the pathname to the default location used to contain the folder for a new project.
HDS_PLUGINS
Specifies a list of pathnames to the location of directories containing “plug-in” drivers for
external tools. Multiple locations can be specified by separating the pathname strings by a colon
(on UNIX or Linux) or semi-colon (on a Windows PC). When set, a plug-in one of the specified
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
List of Variables
directories takes priority over a standard plug-in with the same name in the HDS_HOME\
resources\downstream\drivers directory.
HDS_POLICY_DIR
Sets higher priority locations for policies.
HDS_PORT
Specifies an integer number for the IPC (inter-process communication) port used to
communicate with an external tool. This variable should be set when you want to setup two-way
communication between the HDL Designer Series source objects and HDL code displayed
using a server application such the GNU Emacs editor. Typically, HDS_PORT should be set to
<localhost>:<portnumber> where localhost is the name of your workstation and portnumber
is an unused IPC port number or TCP service name allocated by your system administrator.
HDS_PREFS
Specifies the full pathname to a pre-2003.1 user preferences file (.hdsPrefsV where V is the
software version number) which you want to be migrated to the latest release. This variable is
overridden if the -prefsfile command line switch is used to specify the preferences file.
HDS_PROJECT_DIR
This variable is set internally to the location containing the folder for the active project. It can be
used in the library mapping wizard to specify a root directory relative to the active project
folder.
HDS_REPOSITORY
Specifies the pathname of a directory used as the repository for RCS source control objects. If
this variable is set and no location is already set in your preferences, it is used as the RCS
repository.
HDS_RULESET_DIR
Sets higher priority locations for DC rulesets.
HDS_SIGNAL_LIMIT
Specifies a default integer limit to the number of signal declarations found in a HDL file by the
HDL parser. The limit can be overidden by specifying a value in the Checks tab of the Main
Settings dialog box.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
List of Variables
HDS_SVN_COMMAND_FILE_LIMIT
Some of the svn.exe commands run by HDL Designer Series take a list of your files’ names as
an argument. If you have a large number of files, this list will be too long which may cause
svn.exe to crash. The list can be limited by the platform and machine capabilities; hence a
maximum length for the list of files cannot be determined. This issue is overcome by defining
the environment variable HDS_SVN_COMMAND_FILE_LIMIT and setting it to an integer
number so that HDL Designer Series will divide the long list into sub lists and run the command
each time for each sub list individually preventing svn.exe from crashing. For example, if the
number of files is “2000” and HDS_SVN_COMMAND_FILE_LIMIT is set to “500” then the
“SVN commit” command will run 4 times.
HDS_SVN_OBJECT
Specifies the location of the conventions file which contains the description of the external
objects that should be committed upon committing design files to the repository. This is
applicable when using Subversion as the version management interface.
HDS_SVN_UNLOCK_COMMIT_WHEN_NOT_RETAINED
If you set this environment variable to 1, the Commit operation removes the lock if the Retain
Lock option is not selected.
HDS_TCL
This variable applies to interactive sessions only. It specifies the pathname of a Tcl script that is
sourced immediately at startup. If a -do switch is used, the HDS_TCL script is sourced before
the one specified with the -do switch.
HDS_TEAM_HOME
Specifies a pathname to the location of the hds_team directory and sets team member mode.
The hds_team directory contains the default shared resources project file (shared.hdp) and
versioned files for team preferences, tasks and templates. The default location is in the user
directory or the location from which team preferences for a previous release have been read.
This variable is ignored if an existing location is specified using the -team_home command line
switch. This variable must be unset if switching to Single User Mode is needed.
HDS_TEAM_VER
This variable is automatically derived at run time to specify the versioned directory containing
team preference, task and template files for the current release. For example:
$HDS_TEAM_HOME/hds_team/v2003
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
List of Variables
HDS_TEAMPREFS
Specifies the full pathname to a pre-2003.1 team preferences file (.hdsTeamPrefsV where V is
the software version number) which you want to be migrated to the latest release. This variable
is overridden if the -teamprefsfile command line switch is used to specify an old team
preferences file.
HDS_TRUST_CACHE
Informs HDS whether to us the .cache or rebuild the datamodel when opening a library.
HDS_USER_HOME
Specifies the location of the hds_user directory containing the user resource files (including
versioned files for user preferences, tasks and templates). The default location is in the user
directory or in the location from which user preferences for a previous release have been read.
This variable is ignored if an existing location is specified using the -user_home command line
switch.
Note
If the user directory contains special characters, such as ü or ä, you should change the
hds_user directory to another directory that does not contain any special characters.
HDS_USER_VER
This variable is automatically derived at run time to specify the versioned directory containing
user preference, task and template files for the current release. For example:
$HDS_USER_HOME/hds_user/v2004.
HDS_VHDL_SEARCHPATH
Use the library path to locate the referenced component instance for VHDL; should be exposed
to GUI.
LD_LIBRARY_PATH
Specifies the location of directories containing some display libraries which are required on
UNIX or Linux systems.
LM_LICENSE_FILE
Specifies the location of the licensing file. Typically specified by a port number and host name
in the form: <portnumber>@hostname An evaluation license may be located by specifying the
pathname. Multiple locations can be separated by a : (colon) on UNIX or Linux or by a ; (semi-
colon) on Windows.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
List of Variables
MGC_HOME
Specifies a pathname to the location of a Mentor Graphics software tree. This variable is not
required but may be useful if you want to use other Mentor Graphics tools. (For example, if you
want to read a default location map file in the MGC_HOME tree.)
MGC_LOCATION_MAP
Specifies a pathname to a Mentor Graphics location map file which is a mechanism relying on
the mapping between hard paths and environment variables.
• Any valid location map entry can be used to set a library mapping pathname.
• Location maps can be useful for teams or team members exchanging designs, as they
can also share the same location map files and change the hard paths to their local paths.
• Location maps are propagated to downstream tools.
To use location mapping you have to do the following:
1. Create a location map file. A location map file is a text file which contains a list of
environment variables and their corresponding hard paths. See the following location
map file examples:
Windows:
MGC_LOCATION_MAP
$SRC
C:\vhdl\src
$IEEE
C:\hds\ieee
Linux:
MGC_LOCATION_MAP
$SRC
/home/vhdl/src
$IEEE
/usr/hds/ieee
As shown in the examples, the first line in the file should contain the string
MGC_LOCATION_MAP. You should also specify the mappings from the hard path to
logical path names. The logical pathname should begin with $ and the hard path should
begin with / in case of Linux or with the drive name in case of Windows (for example
C:\).
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
List of Variables
2. Set the environment variable MGC_LOCATION_MAP to the path of the location map
file.
As a result, HDL Designer Series will do the following:
1. Whenever the tool is invoked, it reads the location map file to which the
MGC_LOCATION_MAP environment variable points.
2. The following note will be issued in the log window.
Note: Reading location map <path of the location map file>
For example:
Note: Reading location map D:\LocationMapFile\loc_map.txt
3. For each “environment variable-hard path” pair in the file, the tool defines a new
environment variable and assigns the hard path to it as if they were defined in the shell
that invoked the tool.
If you are using the environment variable as a prefix within your design files as in the example
$SRC\test.vhd, HDL Designer Series will automatically substitute the path as follows C:\vhdl\
src\test.vhd.
MGC_WD
Specifies a pathname to the location of the working directory used by the tools installed in a
Mentor Graphics software tree. It is not used by HDL Designer Series. However, if you use the
ModelSim downstream tools, the vmap utility checks for an existing modelsim.ini file in this
directory and if it exists, references this file for library mapping.
MGLS_CONN_TIMEOUT
Specifies a delay (in seconds) to wait for the license server to respond. The default is 10 but it
can be increased to reduce the risk of timeout due to slow response from the server.
MGLS_HOME
Specifies a pathname to the location of the Mentor Graphics licensing system on a UNIX or
Linux system.
MGLS_LICENSE_FILE
Specifies the location of an alternative license file that is used in preference to the
LM_LICENSE_FILE variable for users who are already using other Mentor Graphics products.
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
Using Environment Variables
MGLS_PKGINFO_FILE
Specifies a pathname to a directory containing an alternative mgc.pkginfo file which may be
required in an existing UNIX MGC licensing environment. If this variable is not set, HDS uses
the mgc.pkginfo file in the bin subdirectory of the HDS installation.
MODELSIM
Specifies a pathname to the initialization file (modelsim.ini) used by the ModelSim compiler
and simulator on UNIX or Linux systems. HDL Designer Series creates this file in the compiled
library directory and the variable does not need to be set unless you invoke ModelSim
independently.
RENOIR_LIBRARY_PATH
Sets Verilog include file search path.
SPYGLASS_HOME
Specifies a pathname to the location of a SpyGlass software tree containing the SpyGlass RTL
rule checker.
SSDIR
Specifies a pathname to the srcsafe.ini file in a Visual SourceSafe version control system.
TZ
Specifies the time zone. Usually set to an alphabetic time zone name. For example: GB
which returns the path to your Xilinx installation directory. In Tcl you can do this using:
puts $env(Xilinx)
System variables are also supported in custom tasks on both the task command line and within
the Tcl script called by the task using the form $::env(variable_name). For example:
$::env(XILINX)
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Environment Variables
Setting Environment Variables
Tip
When dealing with downstream tools (such as ModelSim, Altera, Xilinx, and so on) with
HDL Designer Series on Windows, it is preferable to use an “expandable string” type
variable. An expandable string type variable is one that contains unexpanded references to other
environment variables.
User and system environment variables can be set on Windows systems using the Advanced tab
of the System dialog box which can be accessed from the Windows Control Panel. To enter a
new user variable, check that no existing variable is selected and enter the new variable name
and value. For example:
Variable: HDS_REPOSITORY
Value: C:\Designs\hds_repository_directory
Note
Take care that an existing system variable is not selected when using the dialog box. New
user variables are available when you apply the dialog box but accidental changes to a
system variable may cause problems later when rebooting your machine.
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