- •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
Finite State Machine Structure and Optimization
Extracting the State Transition Table for the FSM
After you have read the design data into the BuildGates synthesis software, you can extract the state transition table for the FSM.
In ac_shell (or pks_shell if applicable), enter the following command:
do_build_generic -extract_fsm
Note: BuildGates synthesis software only invokes the FSM optimization flow when the do_build_generic command is used with the -extract_fsm option.
Viewing the State Transition Table for the FSM
After you extract the state transition table for the FSM, you can view it. The state transition table contains information about equivalent states, initial states, and state encodings.
In ac_shell (or pks_shell if applicable), enter the following command:
report_fsm -state
The following sections provide information you need to know when using the FSM flow in the BuildGates synthesis tool.
■FSM Optimization Features on page 92
■Verilog and VHDL FSM Directives on page 95
■Verification of Synthesized FSMs on page 104
FSM Optimization Features
This section provides high-level information about the FSM optimization flow that enables you to achieve better results from your optimizations. Below is a list of the FSM optimizations listed by the order of their importance and the impact they have on the quality of results
(QOR). You can invoke these FSM optimizations using Cadence synthesis pragmas.
■Unreachable State Removal on page 93
■State Assignment or Re-Encoding on page 93
■State Minimization on page 95
■Terminal State Check on page 95
September 2000 |
92 |
Product Version 4.0 |
Envisia HDL Modeling Reference
Finite State Machine Structure and Optimization
Unreachable State Removal
This optimization tells the BuildGates synthesis tool to treat all unreachable states, including the set of invalid states represented by the default case, as don’t cares. If you do not specify the actions indicated by the default case statement representing the FSM, they are honored by the software. The full_case pragma is ignored for the case statement that defines the
FSM. If the invalid states are to be treated as don’t cares, you must use the following Cadence pragma:
//ambit synthesis state_vector state_reg |
-reachable |
Note: This option reduces the run time because BuildGates synthesis software takes special care to handle the actions from invalid states (represented by the default case). For a sparsely encoded machine, the number of unreachable (invalid) states could be large, leading to longer runtimes. This option is also recommended for shorter runtimes.
State Assignment or Re-Encoding
Although you can provide a default state assignment using the enum directive, this optimization provides many encoding styles that often yield better quality results for area and timing. You can invoke the various encoding styles using the following Cadence pragma:
// ambit synthesis state-vector state_reg -encoding encoding_style
Table 4-1 shows the state_vector encoding options available with BuildGates synthesis software.
Table 4-1 state_vector Encoding Options
Option |
Description |
|
|
|
|
encoding |
Enables you to set one of several different encoding styles |
|
|
for the state vector. |
|
|
■ |
binary |
|
|
binary encoding of states |
|
■ |
gray |
|
|
gray encoding of states |
|
■ |
one_hot |
|
|
one hot encoding (exactly one bit is one for each state) |
|
|
of states |
|
■ |
random |
random assignment of states
September 2000 |
93 |
Product Version 4.0 |
Envisia HDL Modeling Reference
Finite State Machine Structure and Optimization
Table 4-1 state_vector |
Encoding Options, continued |
|
|
|
|
Option |
Description |
|
|
|
|
|
■ |
input |
|
|
Maximizes the number of adjacent states that are |
|
|
inputs of identical or similar outputs. |
|
■ |
output |
■
■
Maximizes the number of adjacent states that are outputs of identical or similar (adjacent) inputs. combined
A combination of input and output encodings. area
Computes encoding with the best area implementation. Using the area encoding option is highly recommended. The tool computes a set of good encodings and selects the one with the best implementation based on a suitable area cost function. The area cost function is based on the number of gates in the resulting netlist before technology mapping.
|
■ timing |
|
Computes encoding with the best timing |
|
implementation. Using the timing encoding option is |
|
highly recommended. The tool computes a set of good |
|
encodings and selects the one with the best |
|
implementation based on a suitable timing cost |
|
function. The timing cost function is based on the |
|
number of logic levels in the resulting netlist before |
|
technology mapping. |
minimize |
Minimizes the FSM by merging equivalent states. |
reachable |
Removes all unreachable and invalid states from the state |
|
machine. This allows the default case representing the |
|
invalid states of the FSM to be treated as don’t care. This |
|
option reduces the run time as the BuildGates synthesis |
|
software handles the actions from invalid states |
|
(represented by the default case). For a sparsely encoded |
|
machine the number of unreachable (invalid) states could be |
|
large leading to larger run-times. This option is |
|
recommended for shorter run-times and will improve |
|
optimization. |
September 2000 |
94 |
Product Version 4.0 |