Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


Compiling with -fast

The "-fast" compiler option allows the compiler to propagate parameters and perform global optimizations. A requirement of using the "-fast" option is that you must compile the source code for your entire design in a single invocation of the compiler. The following is an example invocation of the compiler and its resulting messages:

% vlog -fast cpu_rtl.v 
-- Compiling module fp_unit 
-- Compiling module mult_56 
-- Compiling module testbench 
-- Compiling module cpu 
-- Compiling module i_unit 
-- Compiling module mem_mux 
-- Compiling module memory32 
-- Compiling module op_unit 
 
Top level modules: 
	testbench 
 
Analyzing design... 
Optimizing 8 modules of which 6 are inlined: 
-- Inlining module i_unit(fast) 
-- Inlining module mem_mux(fast) 
-- Inlining module op_unit(fast) 
-- Inlining module memory32(fast) 
-- Inlining module mult_56(fast) 
-- Inlining module fp_unit(fast) 
-- Optimizing module cpu(fast) 
-- Optimizing module testbench(fast) 

The "Analyzing design..." message indicates that the compiler is building the design hierarchy, propagating parameters, and analyzing design object usage. This information is then used in the final step of generating module code optimized for the specific design. Note that some modules are inlined into their parent modules.

Once the design is compiled, it can be simulated in the usual way:

% vsim -c testbench 
# Loading work.testbench(fast) 
# Loading work.cpu(fast) 
VSIM 1> run -all 
VSIM 2> quit 

As the simulator loads the design, it issues messages indicating that the optimized modules are being loaded. There are no messages for loading the inlined modules because their code is inlined into their parent modules.


Note: If you want to optimize a very large netlist, you should optimize only the cell libraries using the -fast option. (The -forcecode option should also be specified.) The netlist itself should be compiled with the default settings. Optimizing in this manner reduces compilation time and compiler memory usage significantly.


Model Technology Inc.
Model Technology Incorporated
Voice: (503) 641-1340
Fax: (503)526-5410
www.model.com
sales@model.com
Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase