Tutorial2 TCL Script
Tutorial2 TCL Script
FALL 2009
Introduction
This tutorial will get you familiarized with the design flow of synthesizing and place and routing a
Verilog module. All the files needed to synthesize this module will be given to you for the purposes of
this tutorial, but you will have to supply or modify the files in order to run your own modules in the
future.
First, you will need to synthesize a behavioral Verilog module to generate a synthesized Verilog netlist
using Design Compiler. Then you will have to auto place and route the synthesized Verilog into
layout and finally import the auto placed and routed layout into Cadence and run DRC and LVS. For
the purpose of this tutorial, you will be building a multiplier.
For documentation, run the command sold (Synopsys Online Documentation). You should, at the very
least, look up each command in the synthesis scripts.
To run dc_shell you must invoke the TCL mode of the tool. It is also very helpful to store the verbose
output of the program into a log file.
EECS427
FALL 2009
For this tutorials purposes, the TCL file is located at: synth_tutorial/syn/mult.tcl. You must run that
command while in the TCL folder for the pointers within the TCL file to work. Please examine the TCL
file and try and understand what is going on.
% cd synth_tutorial/syn
% dc_shell xg_mode tcl_mode f mult.tcl | tee mult.dc.log
It is a good practice to use a Makefile to execute complex unix commands, and there is one create
for you in this tutorial. Type the following command in the synth_tutorial/syn directory, which will do
the same thing as the previous command.
% make synth_mult
common.tcl: the common tcl script that sets up the standard cell library and search path
location.
timing.tcl:
the tcl script that set the clock period and input and output delay.
EECS427
FALL 2009
TCL Script
The TCL script sets different parameters for floorplanning, cell placement, power routing, clock
generation, and I/O pins. Change the parameters as you see fit especially for the floorplan and the
power stripes. For the purpose of this tutorial, the TCL file is provided at:
synth_tutorial/encounter/mult.tcl
Configuration File
The configuration file specifies the technology file locations. The files required by Encounter are the
*.lef, *.lib, and *.v. The LEF file contains metal information of the standard cells used for routing. The
LIB file has timing information for placement and clock distribution network generation. The gate-level
netlist with a .v file extension has the connectivity information (this will be a previously synthesized,
or custom structural netlist, e.g., the synth_tutorial/verilog/mult.nl.v created earlier). For the
purpose of this tutorial, the configuration file is provided at:
synth_tutorial/encounter/mult.conf
Pin Placement
In addition, you will need to create a pin-placement constraint file. By looking at the floorplan diagram,
you have to decide the pin placement such that the congestion is minimized during global routing.
There are two ways to create this file. One is to create them by hand and the other way is to create
them using the Pin Editor under Edit. One thing to note is that encounter is a grid-based router, so
any pins that are not on grid will not be routed. For the purpose of this tutorial, the pin I/O file is
provided at:
synth_tutorial/encounter/mult.save.io
Timing Constraint
The file, mult.sdc creates the clock for the encounter tool. Make sure that the clock period and
uncertainty match those in the synthesis script.
Running Encounter:
You can run Encounter in graphical mode until you become familiar with the tool and automate the
EECS427
FALL 2009
Do not run Encounter with a & to run it in background mode because the current terminal will be
used for entering the commands. If you accidentally run it in the background, you can bring the
process to the foreground with the fg command.
For future CADs, do not forget to edit the *.conf file to change the pathname to your own files. You
may also have to change the aspect ratio, the size of your floorplan, the number of power stripes, etc.
in order to get a compact layout. Most likely you have to hit ViewRedraw (hotkey ctrl+R) to see
updated results of the commands you run. For the purposes of this tutorial, we will simply execute the
files that have been provided with the following command while in synth_tutorial/encounter/ :
% cd /afs/umich.edu/class/eecs427/f09/<unique name>/cad6/synth_tutorial/encounter
% encounter init mult.tcl
Once everything is working, you should get several output files. The main files of interest are *.apr.sdf,
*.lef (which will be in: synth_tutorial/lef), and *.apr.v (which will be in: synth_tutorial/verilog). The
*.apr.sdf is an extracted timing file that lets you back annotate the parasitic for your Verilog simulations.
Most of you should have noticed that the SDF file generated by Design Compiler has no information
about wire delays and all the delay values corresponding to the wires is zero. Note that your placed
design could be different from the synthesized structural netlist because of the insertion of clock tree.
Hence it is important to verify the functionally of the Verilog file generated by Encounter with proper
back-annotation of the corresponding sdf file.
The above command should simply run Encounter with the given mult.tcl, which calls mult.conf and
mult.save.io. If all is successful, you should end with an encounter > prompt. Just enter win at the
prompt and the graphical interface should show up with the placed and routed layout of the multiply
module.
For reference, Encounter is a Cadence software so in order to get the manual, you need to run
% acroread /afs/umich.edu/class/eecs427/f09/resources/Encounter_Manual.pdf &
EECS427
FALL 2009
On the CIW (Command Window), click FileImportStream. The window shown below in Figure 1
will open up. Fill in the form as shown (also fill in the user-defined data and options sub-forms).
EECS427
FALL 2009
EECS427
FALL 2009
(Note: You might see a handful of warnings saying that the Verilog definition for module
was not found. It should follow by saying that the symbol from eecs427artisan is being used.
This is expected and acceptable. If you view the resulting schematic, the correct symbols from
the reference library, eecs427artisan, should be used.)
After you complete the import you can run the Verilog simulation based on your imported schematic.
Congratulations! Youve just synthesized & placed and routed your first Verilog module!
EECS427
FALL 2009
The steps are much the same as what you did in Tutorial 1, except that you need to turn on some
additional options, and add more lines in your testfixture.template.
1. Initialize Design (the same as Tutorial 1).
2. Go to SetupNetlist and click Support Escape Names, Netlist Explicitly, and Declare Global
Locally.
EECS427
FALL 2009