- •Preface
- •About This Manual
- •Other Information Sources
- •Syntax Conventions
- •Text Command Syntax
- •About the Graphical User Interface
- •Using Menus
- •Using Forms
- •HDL Synthesis Overview
- •HDL Synthesis Flow
- •Read Technology Libraries
- •Read Design Data
- •Build Generic Design
- •Save Generic Netlist
- •Synthesizing Mixed VHDL/Verilog Designs
- •Querying the HDL Design Pool
- •Using get_hdl_top_level Command
- •Using get_hdl_hierarchy Command
- •Using get_hdl_type Command
- •Building Generic Netlists from HDL
- •Multiple Top-Level Designs
- •Building Parameterized Designs
- •Verilog Modeling Styles
- •Modeling Combinational Logic
- •Register Inferencing
- •Latch Inference
- •Flip-Flop Inference
- •case Statements
- •Incomplete case Statement
- •Complete case Statement
- •Use of casex and casez Statements
- •for Statement
- •Synthesis Directives
- •Code Selection Directives
- •Architecture Selection Directive
- •case Statement Directives
- •Module Template Directive
- •Function and Task Mapping Directives
- •Set and Reset Synthesis Directives
- •Verilog Preprocessor Directives
- •Compiler Directives
- •The ‘for Compiler Directive
- •The ‘if Compiler Directive
- •The ‘eval Compiler Directive
- •The ‘{} Compiler Directive
- •Command Line Options
- •VPP Flag Attribute
- •Verilog-Related Commands and Globals
- •VHDL Modeling Style
- •Modeling Combinational Logic
- •Register Inferencing
- •Latch Inference
- •Flip-Flop Inferencing
- •Specifying Clock Edges
- •case Statement
- •Incomplete case Statement
- •Complete case Statement
- •for loop
- •Synthesis Directives
- •Code Selection Directives
- •Architecture Selection Directive
- •case Statement Directive
- •Enumeration Encoding Directive
- •Entity Template Directive
- •Function and Procedure Mapping Directives
- •Signed Type Directive
- •Resolution Function Directives
- •Type Conversion Directives
- •Set and Reset Synthesis Directives
- •Reading VHDL Designs
- •Using Arithmetic Packages From Other Vendors
- •Switching between VHDL’87 / VHDL’93
- •Reusing Previously Analyzed Entities
- •Modifying Case of VHDL Names
- •Writing VHDL Netlists
- •Selecting Bit-Level Representation
- •Selecting Between VHDL’87 and VHDL’93
- •Referring to VHDL Packages in Netlists
- •Writing Component Declarations
- •Hierarchical VHDL Designs
- •Component Instantiations and Bindings
- •Restrictions on Entities with Multiple Architectures
- •Precedence Rules for Architecture Selection
- •VHDL-Related Commands and Globals
- •Finite State Machine Overview
- •BuildGates Synthesis and Finite State Machines
- •Extracting the State Transition Table for the FSM
- •Viewing the State Transition Table for the FSM
- •FSM Optimization Features
- •Unreachable State Removal
- •State Assignment or Re-Encoding
- •State Minimization
- •Terminal State Check
- •Verilog and VHDL FSM Directives
- •Verilog FSM Directives
- •VHDL FSM Directives
- •FSM Coding Styles
- •Using the -reachable Option
- •Avoiding a Simulation Mismatch
- •EDIF Interface
- •Reading EDIF Designs
- •Writing EDIF Designs
- •Representing Power and Ground in EDIF
- •Net Representation for Power and Ground
- •Port Representation for Power and Ground
- •Instance Representation for Power and Ground
- •Verilog Constructs
- •Fully Supported Constructs
- •Declarations
- •Operators and Expressions
- •Partially Supported Constructs
- •Ignored Constructs
- •Unsupported Constructs
- •Summary of Verilog Constructs
- •VHDL Constructs
- •Notes on Supported Constructs
Envisia HDL Modeling Reference
VHDL Modeling Style
Table 3-4 Predefined VHDL Libraries for the common Environment, continued
AMBIT |
attributes |
|
|
STD |
standard |
|
textio |
|
|
SYNOPSIS |
attributes |
|
bv_arithmetic |
|
|
IEEE |
numeric_bit |
|
numeric_std |
|
std_logic_1164 |
|
std_logic_arith |
|
std_logic_misc |
|
std_logic_signed |
|
std_logic_textio |
|
std_logic_unsigned |
|
vital_primitives |
|
vital_timing |
|
|
The VHDL source for these packages can be found in the following directory:
ac_shell[1]> ls $env(AMBIT_VHDL_LIBS)/version/library
where version is either 1987 or 1993, and library is one of the following: ambit, std, ieee_ambit (for hdl_vhdl_environment set to standard), ieee_synergy (for hdl_vhdl_environment set to synergy), ieee_synopsys (for hdl_vhdl_environment set to synopsys), ieee (for hdl_vhdl_environment set to common) synergy, or synopsys.
Note: All other VHDL packages referred to in the design must be explicitly analyzed by the user.
Using Arithmetic Packages From Other Vendors
It is strongly recommended that you use the global hdl_vhdl_environment to setup your
VHDL environment. This is especially important since the arithmetic packages associated with the standard, synergy, common, and synopsys enviroments have been tagged with special directives that enable the tool to implement them efficiently.
September 2000 |
77 |
Product Version 4.0 |
Envisia HDL Modeling Reference
VHDL Modeling Style
However, it may be possible that some of the VHDL designs may have references to arithmetic packages from other synthesis vendors that must be compiled into a library named
IEEE.
To make use of these additional packages, do the following:
■Redefine the library IEEE to a new directory:
ac_shell[1]> set_vhdl_library IEEE dir_name
■Analyze the std_logic_1164 package before analyzing any vendor-specific packages. The source for this package is available in the following installation directory:
ac_shell[2]> read_vhdl -library IEEE \
$env (AMBIT_VHDL_LIBS)/1993/ieee_ambit/std_logic_1164.vhdl
This results in a local version of the IEEE library with the basic package std_logic_1164 analyzed and stored in it. Note that in this example it’s assumed that you are using the VHDL‘93 version of the std_logic_1164 package. It must be pointed out that the std_logic_1164 package (shipped with the tool) must be used in this step since it is tagged with the appropriate synthesis directives.
To read in the other vendor-specific packages that are required in the IEEE library, do the following:
ac_shell[5]> read_vhdl -library IEEE package
After this step, read any VHDL entities that use these packages.
Because the local copy of the IEEE library was created using the set_vhdl_library command, the corresponding directory is preserved after exiting from ac_shell. When reentering the ac_shell environment, reuse the IEEE library created above by redefining the IEEE library (first step). The other steps are not required.
Switching between VHDL’87 / VHDL’93
BuildGates synthesis supports both 1987 and 1993 versions of VHDL. It is possible to read in VHDL designs that are modeled using different versions. It is also possible to read in VHDL designs in one version and write out the synthesized netlist in another version.
The global hdl_vhdl_read_version can be used to specify the VHDL version of files that will be analyzed using the read_vhdl command. For example:
ac_shell[1]> set_global hdl_vhdl_read_version 1987
This ensures that only VHDL files that conform to the VHDL’87 standard are parsed successfully. The default value for this global is 1993.
September 2000 |
78 |
Product Version 4.0 |
Envisia HDL Modeling Reference
VHDL Modeling Style
For all the packages that are part of the predefined VHDL environment, both the VHDL’87 and
VHDL’93 versions are precompiled and shipped with the tool.
It should be pointed out that when the value of the global hdl_vhdl_read_version is changed, the tool resets the libraries STD, IEEE, and AMBIT to the default values for the language setting. Therefore, you will need to redefine the library IEEE to utilize other vendorspecific IEEE packages analyzed into the correct VHDL version. See Using Arithmetic Packages From Other Vendors on page 77 for more information on incorporating vendorspecific IEEE packages into the library IEEE.
It is recommended you use the same version of VHDL for reading in a given design. If your project requires a mix of VHDL versions to be read in, in most cases you should be able to analyze both sets of VHDL files with the global hdl_vhdl_read_version set to 1993. If it is absolutely essential that the different sets of files be read in with the appropriate versionspecific syntax checking, then read in the VHDL code for the 1987 version and elaborate it with do_build_generic and save out the generic ADB file. Repeat these steps for the code using the 1993 version. In a new ac_shell session, read in the generic ADB files and run do_build_generic to link the designs together. Then proceed with constraining and optimizing the design.
Reusing Previously Analyzed Entities
For large designs, it is usually desirable to analyze all the VHDL files into a library once and then reuse the analyzed entities in subsequent synthesis sessions. The global hdl_vhdl_reuse_units can be used to import VHDL entities that were analyzed previously into a library. When set to true, do_build_generic automatically synthesizes all entities that reside in any VHDL library specified using the set_vhdl_library command. The default value of hdl_vhdl_reuse_units is false.
In the example below, assume the library MYSRC has entities TOP and BOTTOM analyzed into it. If the value of hdl_vhdl_reuse_units is set to true, then do_build_generic automatically picks up these entities for synthesis.
ac_shell[1]> set_vhdl_library MYSRC ./lib ac_shell[2]> report_vhdl_library -verbose MYSRC
The report output is as follows:
+ |
------------------------------------ |
|
+ |
| |
Library |
| MYSRC |
| |
| |
|
| |
| |
| |
Directory |
| ./lib |
| |
| |
|
| |
| |
| |
Entities |
| TOP (TOP_A) |
| |
September 2000 |
79 |
Product Version 4.0 |
|
Envisia HDL Modeling Reference |
|
VHDL Modeling Style |
|
|
| (Architectures) | BOTTOM (BOTTOM_A)| |
|
+ |
------------------------------------+ |
ac_shell[3]> do_build_generic
INFO: Processing design ‘TOP’ <CDFG-303>.S
INFO: Processing design ‘BOTTOM’ <CDFG-303>.
However, if hdl_vhdl_reuse_units is false, then only entities that are explicitly read in using read_vhdl in the current session will be synthesized by by the tool. In the example below, even though the library MYSRC has entities analyzed into it from a previous synthesis session, they are not synthesized because the variable hdl_vhdl_reuse_units is set to false.
ac_shell[1]> set_vhdl_library MYSRC ./lib ac_shell[2]> set_global hdl_vhdl_reuse_units false ac_shell[3]> do_build_generic
The output is as follows:
Info: No designs to process. <CDFG-301>.
Modifying Case of VHDL Names
The global variable hdl_vhdl_case can be used to control the case in which VHDL names will be stored in the tool. For example:
ac_shell[1]> set_global hdl_vhdl_case lower
Possible values for the global hdl_vhdl_case are as follows:
■lower—converts all names to lower-case (Xpg is stored as xpg)
■upper—converts all names to upper-case (Xpg is stored as XPG)
■original—preserves the case used in the declaration of the object (Xpg is stored as
Xpg)
The case of VHDL names is only relevant for references to foreign modules. Examples of foreign references are Verilog modules and library cells.
If the global hdl_vhdl_case is set to original, it is recommended that you use the same case you used when defining the object when referring to foreign objects. Therefore, VHDL component and port names should be identical in case to the Verilog module definition.
September 2000 |
80 |
Product Version 4.0 |