Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
dsd1-10 / dsd-07=Verilog / synhdlmod.pdf
Скачиваний:
92
Добавлен:
05.06.2015
Размер:
797.93 Кб
Скачать

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

Соседние файлы в папке dsd-07=Verilog