RC 10 1.lect
RC 10 1.lect
RTL Compiler
Version 10.1
Lecture Manual April 25, 2011
4/25/2011 Cadence Design Systems, Inc. ii
1990-2011 Cadence Design Systems, Inc. All rights reserved.
Printed in the United States of America.
Cadence Design Systems, Inc., 2655 Seely Avenue, San J ose, CA 95134, USA
Cadence Trademarks
Trademarks and service marks of Cadence Design Systems, Inc. (Cadence) contained in this document are attributed to Cadence with the appropriate
symbol. For queries regarding Cadences trademarks, contact the corporate legal department at the address above or call 800.862.4522.
Allegro
Accelerating Mixed Signal Design
Assura
BuildGates
Cadence
CeltIC
Conformal
Connections
Diva
Dracula
ElectronStorm
Encounter
EU CAD
Fire & Ice
First Encounter
HDL-ICE
Incisive
InstallScape
IP Gallery
NanoRoute
NC-Verilog
NeoCell
NeoCircuit
OpenBook
Palladium
Pearl
PowerSuite
PSpice
SignalStorm
Silicon Design Chain
Silicon Ensemble
Silicon Express
SKILL
SoC Encounter
SourceLink
Spectre
Speed Bridge
UltraSim
Verifault-XL
Verification Advisor
Verilog
Virtuoso
VoltageStorm
Xtreme
Other Trademarks
Open SystemC, Open SystemC Initiative, OSCI, SystemC, and SystemC Initiative are trademarks or registered trademarks of Open SystemC Initiative,
Inc. in the United States and other countries and are used with permission.
All other trademarks are the property of their respective holders.
Confidentiality Notice
No part of this publication may be reproduced in whole or in part by any means (including photocopying or storage in an information storage/retrieval
system) or transmitted in any formor by any means without prior written permission fromCadence Design Systems, Inc. (Cadence).
Information in this document is subject to change without notice and does not represent a commitment on the part of Cadence. The information
contained herein is the proprietary and confidential information of Cadenceor its licensors, and is supplied subject to, and may be used only by
Cadences customer in accordance with, a written agreement between Cadence and its customer. Except as may be explicitly set forth in such
agreement, Cadence does not make, and expressly disclaims, any representations or warranties as to the completeness, accuracy or usefulness of the
information contained in this document. Cadence does not warrant that use of such information will not infringe any third party rights, nor does
Cadence assume any liability for damages or costs of any kind that may result fromuse of such information.
RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of
the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013.
UNPUBLISHED This document contains unpublished confidential information and is not to be disclosed or used except as authorized by written
contract with Cadence. Rights reserved under the copyright laws of the United States.
4/25/2011 Cadence Design Systems, Inc. iii
Table of Contents
Encounter RTL Compiler
Module 1 About this Course ........................................................................................ 3
Module 2 Introduction to Encounter RTL Compiler .................................................. 19
Module 3 HDL Modeling ............................................................................................... 33
Module 4 Synthesis Flow ............................................................................................. 43
Lab 4-1 Running the Basic Synthesis Flow
Lab 4-2 Navigating the Design Hierarchy
Lab 4-3 Reading SDC Constraints
Lab 4-4 Using the Graphical Interface
Module 5 Datapath Synthesis...................................................................................... 85
Lab 5-1 Running Datapath Synthesis
Module 6 Optimization Strategies ............................................................................. 109
Lab 6-1 Exploring Optimization Strategies
Module 7 Low-Power Synthesis ............................................................................... 143
Lab 7-1 Running Low-Power Synthesis
Module 8 Interface to Other Tools ............................................................................ 191
Lab 8-1 Interfacing with Other Tools
Module 9 Test Synthesis ........................................................................................... 207
Lab 9-1 Running Scan Synthesis
4/25/2011 Cadence Design Systems, Inc. iv
Appendix A Physical Synthesis.................................................................................. 263
Appendix B Advanced Synthesis Features ............................................................... 277
Appendix C Encounter RTL Compiler Constraints ................................................... 285
Lab C-1 Applying RTL Compiler Constraints (Optional)
Encounter RTL Compiler, 10.1 1
April 25, 2011
Encounter
RTL Compiler
Version 10.1
Encounter RTL Compiler, 10.1 2
04/25/11 Encounter RTL Compiler 2
Encounter RTL Compiler, 10.1 3
April 25, 2011
About This Course
Module 1
Encounter RTL Compiler, 10.1 4
ASIC: Application specific integrated chip
04/25/11 Encounter RTL Compiler 4
Course Prerequisites
Before taking this course, you must have experience with or already have
knowledge of the following:
4 Any HDL such as Verilog
(recommended) or VHDL
4 Synthesis and ASIC design flow basics
4 Static timing analysis basics
As an alternative, you can complete the following courses:
4 Basic Static Timing Analysis
4 Verilog Language and Application
Encounter RTL Compiler, 10.1 5
04/25/11 Encounter RTL Compiler
Course Objectives
In this course, you
4 Apply the recommended synthesis flow using Encounter RTL Compiler
4 Navigate the design database and manipulate design objects
4 Constrain designs for synthesis and perform static timing analysis
4 Optimize RTL designs for timing and area using several strategies
4 Diagnose and analyze synthesis results
4 Use the extended datapath features
4 Analyze and synthesize the design for low-power structures
4 Interface with other tools and place-and-route flows
4 Constrain the design for testability (DFT)
5
Encounter RTL Compiler, 10.1 6
04/25/11 Encounter RTL Compiler
Session 1
O Introduction to Encounter RTL
Compiler
O HDL Modeling
O Synthesis Flow
Session 2
O Datapath Synthesis
O Optimization Strategies
Course Modules
6
Session 3
O Low-Power Synthesis
Session 4
O Test Synthesis
O Interface to Other Tools
O Appendix A: Advanced Features
O Appendix B: RTL Compiler
Constraints
Each session typically
runs about 3-4 hours
Encounter RTL Compiler, 10.1 7
For more information about Cadence
courses:
Go to www.cadence.com.
Click Support & Training.
Choose one of the catalogs to explore.
Training Course Catalogs
Courses are available in your region at local training centers.
Browse the course catalogs:
EMEA
India
North America
China
Japan
Korea
Taiwan
04/25/11 Encounter RTL Compiler
Learning Map of Digital Implementation Courses
7
Also available as an Internet Learning Series course. L, XL, GXL denote tiers of Cadence products.
Course titles may vary. Please refer to your regional catalog for exact titles and course datasheets.
C
o
r
e
Signoff Timing Analysis
with Encounter Timing
System
Cadence QRC User
Cell-Level Extraction
Encounter
Conformal
Constraint Designer
XL
Encounter Conformal
Low-Power Verification
XL
Custom Equivalence
Checking with
Encounter Conformal
EC
GXL
Advanced Signoff
Power Rail Analysis
with Encounter Power
System
Signoff Power Rail
Analysis with
Encounter Power
System
Encounter Conformal
ECO
Signoff and Analysis Logic Design Place-and-Route
Advanced Logic
Equivalence Checking
with Encounter
Conformal EC
E
x
p
e
r
i
e
n
c
e
d
E
x
p
e
r
t
XL
Floorplanning,
Physical Synthesis,
Place and Route
(Hierarchical)
XL
Floorplanning,
Physical Synthesis,
Place and Route (Flat)
XL
Low-Power
Implementation
XL
Advanced Synthesis
with Encounter RTL
Compiler
XL
Test Synthesis
Using Encounter RTL
Compiler
XL
Low-Power
Synthesis with
Encounter RTL
Compiler
XL
Basic Static Timing
Analysis
Extended Checking
with Encounter
Conformal EC
Logic Equivalence
Checking with
Encounter Conformal
EC
XL
Design Verification
Encounter RTL
Compiler
XL
Encounter RTL Compiler, 10.1 8
04/25/11 Encounter RTL Compiler 8
Getting Help
There are three ways to get help:
4 Cadence Help: Accessing tool-specific help
O cdnshelp
4 Cadence Online Support: Accessing documents and support
O http://support.cadence.com
4 Cadence Community: Staying current with tips and tricks
O http://www.cadence.com/community/forums
O http://www.cadence.com/community/blogs
O http://www.cadence.com/cdnlive
Encounter RTL Compiler, 10.1 9
To access Cadence Help from a Cadence software application, from the menu, choose
HelpCadence Documentation. The browser displays the document page. After the
document page opens, click the Library button to open the Library window.
To access Cadence Help from a command line, enter cdnshelp & in a terminal window.
When the Library window appears, navigate to the manual you want by selecting the
specific product, then double-click to open the manual in your browser.
04/25/11 Encounter RTL Compiler
Cadence Help
Cadence Help gives you access to the
Cadence online product documentation
system.
Documentation for each product is included
automatically when you install the product.
Documents are available in both HTML and
PDF format.
The Library window lets you access
documents by product family, product name,
or type of document.
You can access Cadence Help from
4 The graphical user interface
O The Help menu in windows
O The Help button on forms
4 The command line: cdnshelp
4 The Cadence Online Support system
(if you have a license agreement)
9
Searching the Knowledgebase:
You can personalize the document types and products by editing your Preferences.
To search the knowledge base for different document types:
1. Point your web browser to support.cadence.com.
2. Log in to the online support site.
3. Enter search criteria.
4. Specify document type for current search
5. Select Products for this search only
6. Click Resources menu to access:
Application Notes,
Computing Platforms,
Installation Information,
Product & Release Lifecycle
Product Manuals
SKILL Information
Tech Info and White Papers
Links to Other Resources
Troubleshooting Information
Video Library
Once search results are displayed, you can use the within option to refine your search. You can also filter your
results based on the year created, Date Filter.
10 Encounter RTL Compiler, 10.1
04/25/11 Encounter RTL Compiler
Cadence Online Support (COS)
Cadence Online Support
(http://support.cadence.com) is a website that
gives you access to support resources, including
4 An extensive knowledge base with
O User guides
O Reference manuals
O Design topics
O Frequently asked questions
O Known problems and solutions
O White papers
O Application notes
4 Software updates for Cadence products
4 Access to Cadence customer support
engineers
Register now and take advantage of the many
benefits of Cadence online support.
10
Encounter RTL Compiler, 10.1 11
You can use the Cadence Online Support site for service requests. Fill out the Service
Request Creation form and submit it. The request goes first to Customer Support, and if
necessary is escalated to Cadence R&D for a solution.
Submitting a Service Request:
1. Point your web browser to support.cadence.com.
2. Log in to the online support site.
3. Click on Create Service Request to interact directly with Cadence Customer Support
4. Select the product from the list of products
5. Describe the problem
6. Click Continue
7. View documents that may solve your stated problem
8. Set additional request attributes
9. Click Submit SR
04/25/11 Encounter RTL Compiler
Using Cadence Online Support
11
Access Cadence Online
Support
support.cadence.com
If you dont find a solution at the online support site...
Submit Service
Request
From the online support site, fill out the
Service Request Creation form to...
Receive Customer
Support
If your problem requires more than
customer support, then it is escalated to
R&D for a solution.
This section outlines how to register for COS.
Registering for Cadence Online Support
1. Go to http://support.cadence.com
2. Click the Register Now link
3. You will need:
Email address you use at work
You may also be asked for your license server Host Id or Reference Key
4. After registering, check your email.
5. Use your email ID and the one time password provided in the email, to login
6. You will then change your password, security question, and personal data
Encounter RTL Compiler, 10.1 12
04/25/11 Encounter RTL Compiler
Demo: Cadence Online Support
The demo at right shows
you how to:
4 Register for Cadence
Online Support
4 Search the
knowledge base
4 Submit a service
request
4 View your service
request
12
http://support.cadence.com
13 Encounter RTL Compiler, 10.1
04/25/11 Encounter RTL Compiler
Cadence Online Communities
Stay connected by
visiting resources, such
as blogs and forums,
1. Go to:
http://www.cadence.
com/community
2. Select your area of
interest.
13
Encounter RTL Compiler, 10.1 14
04/25/11 Encounter RTL Compiler 14
Lab Exercises
Lab 1-1 Locating Cadence Online Support Solutions
4 Log in and run a search.
Lab 1-2 Customizing Notification and Search Preferences
4 Set preferences to improve search and receive email notification.
15
Note: You can filter the search results by selecting specific document types or
products which are listed to the left of the results.
Encounter RTL Compiler, 10.1
04/25/11 Encounter RTL Compiler
Lab Instructions
Lab 1: Log in to Cadence Online Support (COS)
and search for information about a specific issue.
1. In a web browser enter
http://support.cadence.com
2. Log in to Cadence Online Support with your
email and password
3. In the Support Home page, make sure the
following options are selected:
4 All Document Types
4 All Products
4. In the Search field enter
<search term to be provided by instructor>
and click the SEARCH button.
5. In the Troubleshooting Info section, click the
match called:
<item to select provided by instructor>
6. Close the solution window.
Lab 2: Set preferences so you can improve
search results and receive email notification.
1. Click on the My Account link.
2. Click on the Notification Preferences tab.
3. On the Set Email Notification Preferences
page:
a. Check Send me email notifications
about new product releases.
b. Click on the products, email format
and document types you prefer.
c. Click Save.
4. Click on the Search Preferences tab.
5. On the Set Search Preferences page:
a. Click on Use same product and
document type preferences as my
Notification Preferences.
b. Click Save.
You can only complete these labs if you have access to the internet and a Cadence Online Support account. If
you do not, your instructor may be able to perform a demo of these labs for the class.
15
Encounter RTL Compiler, 10.1 16
04/25/11 Encounter RTL Compiler 16
Certificate of Course Completion (Optional)
4 Benefits:
O Test your knowledge and understanding.
O An acknowledgement of course mastery.
O Update your resume with new skills and make yourself more marketable.
O Peer recognition.
4 To receive a Certificate of Completion, you must complete an online
exam with a score of 75% or more.
4 Detailed instructions for obtaining a certificate of completion are
provided at the end of this course.
You can obtain a proof of attendance after attending a Cadence Instructor -led Course (Public,
Standard onsite, or Virtual Class). Please contact your local regional customer training office*
to request a Certificate of Attendance. Be sure to include your name and course title.
* For local customer training contact information, refer to:
http://www.cadence.com/Training/Pages/training_contacts.aspx
Encounter RTL Compiler, 10.1 17
04/25/11 Encounter RTL Compiler 17
Pre and Post Assessments
Pre and Post Assessments are a way to help you determine what new
knowledge you have gained by completing this course.
4 You will take a Pre-class Assessment at the start of the class.
4 You will take a Post-class Assessment at the end of the class.
4 These will have the same set of questions and take about
15 minutes to complete.
4 After the Post-Assessment we will go over the questions and answers
in detail.
The expectation is that you will not successfully answer most of the
questions in the pre class assessment, which is expected as you have not
yet completed the class.
Conversely, at the end of the class you should be able to answer correctly
most of the post assessment questions.
Encounter RTL Compiler, 10.1 18
04/25/11 Encounter RTL Compiler 18
Completing the Pre-Class Assessment
1. In a web browser enter: http://exam.cadence.com
2. Login to the exam server:
a) Name: your complete email address (example: [email protected])
b) Group: your companys email suffix (example: cadence.com)
3. Select the Pre-class assessment for this class:
ES <your course title>PRE
4. Complete the assessment. You do not need to answer all questions.
5. Click Submit at the bottom of the exam. Note: You will be given a score
but will not be provided with the answers until you take the post
assessment at the end of class.
Encounter RTL Compiler, 10.1 19
April 25, 2011
Introduction to Encounter RTL Compiler
Module 2
Encounter RTL Compiler, 10.1 20
04/25/11 Encounter RTL Compiler
Module Objectives
In this module, you
4 Identify the features of Encounter
RTL Compiler
4 Identify where Encounter RTL Compiler (RC) fits in the Cadence flow
20
Encounter RTL Compiler, 10.1 21
04/25/11 Encounter RTL Compiler
What Is Logic Synthesis?
Definition:
The process of parsing,
translating, optimizing,
and mapping RTL code
into a specified
standard cell library.
To determine the
feasibility of the design,
we need to synthesize
the RTL code into
gates and measure
timing, power, and
area, before moving on
to placement.
RTL Code
NAND4X1MTH g395 (.A (n_5), .B (n_7),
.C (n_10), .D (n_12), .Y (arnz) );
Mapping
RTL to
Library
Timing, Power, Area
Ok?
Placed and
Routed
Design
yes
Encounter RTL Compiler, 10.1 22
04/25/11 Encounter RTL Compiler
Examples of Logic Synthesis
22
RTL Generic Netlist Synthesized Netlist
assign #1 gez = gz
| z;
or g1 (gez, gz, z); assign gez = 1'b0;
// Zeroed because
of optimization
assign #1 arnz =
(ar != 0) ;
nor g45 (n_63,
n_61, n_62);
not g46 (arnz,
n_63);
// Not targeted to
a library
NAND4X1MTH g395(.A
(n_5), .B (n_7), .C
(n_10), .D (n_12),
.Y (arnz));
// Notice that the
gate is mapped to a
library component.
Encounter RTL Compiler, 10.1 23
04/25/11 Encounter RTL Compiler 23
Logic Synthesis: Input and Output Formats
4 Input
O RTL in the Verilog
TLATNTSCAX2M
RC_CGIC_INST(.E(enable),
.CK(ck_in), .SE (test),
.ECK(rc_clk));
DFFQX2M \dout_reg[1] (.CK
(rcc_clk), .D (din[1]), .Q
(dout[1]));
endmodule
Encounter RTL Compiler, 10.1 37
04/25/11 Encounter RTL Compiler
Modeling Adders
37
RTL Synthesized Netlist
module signed_add (Y, A, B);
parameter w = 16;
input [w-1:0] A, B;
output [w-1:0] Y;
input signed A, B;
output signed Y;
assign Y = A + B;
endmodule
module signed_add(Y, A, B);
input [15:0] A, B;
output [15:0] Y;
wire [15:0] A, B;
wire [15:0] Y;
endmodule
Encounter RTL Compiler, 10.1 38
04/25/11 Encounter RTL Compiler
Modeling Division
38
RTL Synthesized Netlist
module unsigned_divide (Y, A,
B);
parameter wA = 16, wB = 6;
input [wA-1:0] A;
input [wB-1:0] B;
output [wA-1:0] Y;
assign y = A / B;
endmodule
module unsigned_divide(A, B,
Y);
input [15:0] A;
input [5:0] B;
output [15:0] Y;
input files
45
Optimized
netlist
.lib
.lbr
RTL
Netlist
.g
.SDC
Physical
Design
.SDC .g
Encounter
RTL
Compiler
Logic
Verification
Encounter RTL Compiler, 10.1 46
Options
[-no_custom]: Only read master .synth_init file
[-E]: Exits on script error (When processing the -files option.)
[-files <string>]: Executes command file or files
[-execute <string>]: Command string to execute before processing the -files option
[-cmdfile <string>]: Specifies command logfile
[-logfile <string> | -nologfile]: Specifies a logfile, or not create one
[-gui]: Starts the graphical interface
[-lsf_cpus <integer>]: Number of LSF CPUs to use for superthreading
[-lsf_queue <string>]: Name of LSF queue
[-use_license <string>]: Specifies a license. When multiple licenses are specified, only the last
one will be used.
[-queue]: Waits in a queue until a license is available
[-32 | -64]: Launches the 32 bit version or the 64 bit version
[-version]: Returns program version information
04/25/11 Encounter RTL Compiler
Starting and Exiting Encounter RTL Compiler
You can start Encounter
installation of Encounter
read_sdc top.sdc
read_hdl v2001 {low.v mid.v top.v}
Encounter RTL Compiler, 10.1 57
04/25/11 Encounter RTL Compiler
More run.tcl: No Further Editing Required!
57
###################################################################################
## Define cost groups (clock-clock, clock-output, input-clock, input-output)
###################################################################################
## Uncomment to remove already existing costgroupsbefore creating new ones.
## rm [find /designs/* -cost_group*]
if {[llength[all::all_seqs]] > 0} {
define_cost_group-name I2C -design $DESIGN
define_cost_group-name C2O -design $DESIGN
define_cost_group-name C2C -design $DESIGN
path_group-from [all::all_seqs] -to [all::all_seqs] -group C2C -name C2C
path_group-from [all::all_seqs] -to [all::all_outs] -group C2O -name C2O
path_group-from [all::all_inps] -to [all::all_seqs] -group I2C -name I2C
}
define_cost_group-name I2O -design $DESIGN
path_group-from [all::all_inps] -to [all::all_outs] -group I2O -name I2O
foreachcg [find / -cost_group*] {
report timing -cost_group[list $cg] >> $_REPORTS_PATH/${DESIGN}_pretim.rpt
}
#### To turn off sequential merging on the design
#### uncomment & use the following attributes.
##set_attribute optimize_merge_flopsfalse /
##set_attribute optimize_merge_latchesfalse /
#### For a particular instance use attribute ' optimize_merge_seqs' to turn off sequential merging.
##################################################################################
## Synthesizing to generic
##################################################################################
synthesize -to_generic-eff $SYN_EFF
puts "Runtime & Memory after 'synthesize -to_generic'"
timestat GENERIC
report datapath > $_REPORTS_PATH/${DESIGN}_datapath_generic.rpt
##################################################################################
## Synthesizing to gates
##################################################################################
synthesize -to_mapped-eff $MAP_EFF -no_incr
puts "Runtime & Memory after 'synthesize -to_map-no_incr'"
timestat MAPPED
report datapath > $_REPORTS_PATH/${DESIGN}_datapath_map.rpt
foreachcg [find / -cost_group*] {
report timing -cost_group[list $cg] > $_REPORTS_PATH/${DESIGN}_[ basename$cg]_post_map.rpt
}
Encounter RTL Compiler, 10.1 58
04/25/11 Encounter RTL Compiler
The Rest of run.tcl
58
##Intermediate netlist for LEC verification..
write_hdl -lec > ${_OUTPUTS_PATH}/${DESIGN}_intermediate.v
write_do_lec-revised_design${_OUTPUTS_PATH}/${DESIGN}_intermediate.v-logfile ${_LOG_PATH}/rtl2intermediate.lec.log > \
${_OUTPUTS_PATH}/rtl2intermediate.lec.do
## ungroup -threshold <value>
#######################################################################################################
## Incremental Synthesis
#######################################################################################################
## Uncomment to remove assigns & insert tiehilocells during Incremental synthesis
##set_attribute remove_assignstrue /
##set_remove_assign_options-buffer_or_inverter<libcell> -design <design|subdesign>
##set_attribute use_tiehilo_for_const<none|duplicate|unique> /
synthesize -to_mapped-eff $MAP_EFF -incr
puts "Runtime & Memory after incremental synthesis"
timestat INCREMENTAL
foreachcg [find / -cost_group-null_ok*] {
report timing -cost_group[list $cg] > $_REPORTS_PATH/${DESIGN}_[ basename$cg]_post_incr.rpt
}
###################################################
## Spatial mode optimization
###################################################
## Uncomment to enable spatial mode optimization
##synthesize -to_mapped-spatial
######################################################################################################
## write Encounter file set ( verilog, SDC, config, etc.)
######################################################################################################
##write_encounterdesign -basename<path & base filename> -lef <lef_file(s)>
report area > $_REPORTS_PATH/${DESIGN}_area.rpt
report datapath > $_REPORTS_PATH/${DESIGN}_datapath_incr.rpt
report messages > $_REPORTS_PATH/${DESIGN}_messages.rpt
report gates > $_REPORTS_PATH/${DESIGN}_gates.rpt
write_design-basename${_OUTPUTS_PATH}/${DESIGN}_m
## write_hdl > ${_OUTPUTS_PATH}/${DESIGN}_ m.v
## write_script> ${_OUTPUTS_PATH}/${DESIGN}_m.script
write_sdc> ${_OUTPUTS_PATH}/${DESIGN}_m.sdc
#################################
### write_do_lec
#################################
write_do_lec-golden_design${_OUTPUTS_PATH}/${DESIGN}_intermediate.v-revised_design${_OUTPUTS_PATH}/${DESIGN}_m.v\
-logfile ${_LOG_PATH}/intermediate2final.lec.log > ${_OUTPUTS_PATH}/intermediate2final.lec.do
##Uncomment if the RTL is to be compared with the final netlist..
##write_do_lec-revised_design${_OUTPUTS_PATH}/${DESIGN}_m.v-logfile ${_LOG_PATH}/rtl2final.lec.log > ${_OUTPUTS_PATH}/rtl2final.lec.do
puts "Final Runtime & Memory."
timestat FINAL
Encounter RTL Compiler, 10.1 59
04/25/11 Encounter RTL Compiler
Running Scripts
After RC starts, you can run a script by using one of the following methods.
4 Use the source command:
source <path>/<script_file_name>
4 Set the search paths so that the software can locate the files that RC
uses.
O To set the script search path, enter:
set_attribute script_search_path <{ path1 path2 }> /
O Then, use:
include script_file_name
Or
source script_file_name
59
Encounter RTL Compiler, 10.1 60
In the example shown above, the .synth_init file does the following:
Load some Tcl procedures
Suppress unwanted warning or information messages
Set globally applicable attributes
The compiler automatically loads these files unless you start it with the -no_custom option, in
which case the compiler reads only the configuration file from the installation directory.
04/25/11 Encounter RTL Compiler
The Configuration File
The .synth_init file contains commands that are executed upon starting the
software.
The compiler searches for the .synth_init file in the following order:
4 In the installation directory for the master.synth_init file
4 In the home directory for the .cadence/.synth_init file
4 In the current directory for the .synth_init file
In case of conflict, the most recently read command is used.
60
source ~/my_file.tcl
set_attr script_search_path ../tcl . /
set_attr hdl_search_path ../rtl /
set_attr lib_search_path ../library /
Sample .synth_init file
You can set search paths or
aliases or source any Tcl
procedures you want loaded from
within this file.
Encounter RTL Compiler, 10.1 61
The source code for technology libraries is in the .lib format or in the .lbr binary format.
A library includes control attributes, environment description, standard cell description, delay
calculations, and delay models.
04/25/11 Encounter RTL Compiler
Setting the Technology Library
The library attribute specifies the target technology for synthesis.
4 To load a single library, enter
set_attr library lsi500k.lib /
The library attribute is a root attribute.
4 To load multiple libraries, enter
set lib_list 01_wc3.lib mylib1.lib x1.lib # Variable
set_attr library $lib_list
Setting the library attribute loads the specified libraries into the synthesis environment
(and populates the /libraries virtual directory).
4 To append to the main library database, enter
set_attr library {{a.lib b.lib} c.lib {x.lib y.lib}} /
In this example, RC loads a.lib and appends b.lib to a.lib. Next, it loads c.lib. Then, it
loads x.lib and appends y.lib to x.lib.
4 To set the library search path, enter:
set_attribute lib_search_path <path> /
61
Encounter RTL Compiler, 10.1 62
When a library is read, the information is stored into the compiler memory as shown in this
illustration.
There will be some changes in the library and design hierarchy when using multimode
multisupply synthesis flow.
04/25/11 Encounter RTL Compiler
Library Information Hierarchy
62
/ = root
/hdl_libraries
operating_conditions
AND2XL OR2XL slow
/libraries /messages /designs
libcells wireload_models
myliba mylibx mylibc
MUX2X1
/
_nominal_
A B Y
Encounter RTL Compiler, 10.1 63
Preventing Optimization of Instances, Libcells
The set_dont_touch Tcl command in Design Compiler (DC) is supported in Encounter
RTL
Compiler (RC), provided that this command appears inside your SDC file.
As with many DC Tcl commands, there is an RC equivalent attribute that you can include in
your Tcl run script.
Syntax
set_attr preserve <true(1)/false(0)> <object name(s)>
Example
set_attr preserve 1 [find /lib*/lib1 -libcell *nsdel]
set dt_list [find /des* -subd acs4_*]
set_attr preserve true $dt_list
04/25/11 Encounter RTL Compiler
Preventing the Use of Specific Library Cells
Use the avoid (DC equivalent: dont_use) attribute to prevent the technology
mapper from using the particular cells.
Syntax
set_attr avoid <true(1)/false(0)> <cell name(s)>
Example
set_attr avoid 1 { mylib/snl_mux21_prx*}
set_attr avoid 1 { /mylib/*nsdel}
set_attr avoid 1 [find /lib* -libcell *nsdel]
The set_dont_use Tcl command in Design Compiler (DC) is supported in
Encounter RTL Compiler (RC), provided that this command appears inside
your SDC file.
63
Encounter RTL Compiler, 10.1 64
PLE is a physical modeling technique that bypasses wire loads for RTL synthesis
optimization. In place of wire loads, the compiler generates an equation to model the wire
delay.
PLE removes the reliance on user-supplied WLMs.
PLE is neither too optimistic or too pessimistic.
By default, the compiler selects the wire-load mode, and models automatically from the
library.
04/25/11 Encounter RTL Compiler
Wire Delay Estimation
Physical Layout Estimation (PLE)
4 PLE uses actual design and
physical library information.
4 Dynamically calculates wire
delays for different logic
structures in the design.
4 Correlates better with place and
route.
set_attr lef_library <lef header>
set_attr cap_table_file <cap table>
// set_attr interconnect_mode ple /
Wire-load Models
4 Wire load models are statistical.
4 Wire loads are calculated based on the
nearest calibrated area.
4 Selection of appropriate wire-load models
for a design is tedious.
4 Correlation is difficult even with custom
wire-load models.
set_attr interconnect_mode wireload /
set_attr wireload_mode top /
set_attr force_wireload
[find /mylib -wireload S160K] /top
64
Fanout Load
1 0.0011
2 0.0092
3 0.0143
4 0.0199
5 0.0215
6 0.0278
7 0.0315
8 0.0390
9 0.0456
10 0.0577
Fanout Load
1 0.0013
2 0.0099
3 0.0158
4 0.0212
5 0.0267
6 0.0312
7 0.0386
8 0.0467
9 0.0578
10 0.0699
Fanout Load
1 0.0014
2 0.0107
3 0.0186
4 0.0284
5 0.0331
6 0.0401
7 0.0488
8 0.0592
9 0.0685
10 0.0811
Fanout Load
1 0.0016
2 0.0111
3 0.0207
4 0.0303
5 0.0399
6 0.0495
7 0.0590
8 0.0687
9 0.0782
10 0.0879
Block A
Block B
?
Top
Block E
Encounter RTL Compiler, 10.1 65
-sv Specifies that the HDL files conform to SystemVerilog 3.1.a.
If you do not specify either the -v1995, -v2001, -sv or the -vhdl option, the default language
format is that specified by the hdl_language attribute. The default value for the hdl_language
attribute is -v1995.
-vhdl Specifies that the HDL files are VHDL files. The hdl_vhdl_read_version root attribute
value specifies the standard to which the VHDL files conform.
04/25/11 Encounter RTL Compiler
Reading Designs
Use the read_hdl or read_netlist commands to parse the HDL source.
Syntax
read_hdl [-h][-vhdl [-library <libname>] \
| -v1995 | -v2001 | -sv] [-netlist] \
[-define macro=name] file(s)<.gz>
O -vhdl By default, RC reads VHDL-1993.
O -sv Read System Verilog
files
O -v1995 (Boolean) force Verilog 1995 mode.
O -v2001 (Boolean) force Verilog 2001 mode.
O -define Define Verilog macros
Examples
To read the RTL or mixed source (RTL/gate) design (parses only):
read_hdl {design1.v subdes1.v subdes2.v}
65
Encounter RTL Compiler, 10.1 66
04/25/11 Encounter RTL Compiler
Reading Designs (continued)
To set the HDL search path, enter the following:
set_attribute hdl_search_path path /
Alternatively, to read a VHDL design, you can enter the following:
set_attr hdl_language vhdl /
set_attr hdl_vhdl_read_version [1987|1993] /
read_hdl vhdl design.v library library_name
You must load all submodules and the top-level module into the compiler.
Alternatively, to read the gate-level (structural) netlist, use:
read_netlist design_struc1.v
This command not only parses the netlist but also elaborates the design.
66
Encounter RTL Compiler, 10.1 67
-h: Help with the elaborate command
-parameters: Integer list of design parameters (Or use name association)
[-libpath path]: Specifies the search path for unresolved Verilog module instances
[-libext extension]: Specifies the extension of the Verilog library
(string): Top-level module name
Before elaborating a design
Read in all the designs.
Set the general compiler environment.
After elaboration finishes, the software reports
Unresolved references, that is, instances found with no corresponding module or library cell
Semantic problems, including:
Read before write
Unused ports, inconsistent resets
04/25/11 Encounter RTL Compiler
Elaboration of Designs
The elaborate Command
4 Builds data structures and infers registers in the design
4 Performs high level HDL optimization, such as dead code removal
4 Identifies clock gating and operand isolation candidates
Elaboration is required only for the top-level design and it automatically
elaborates all its references.
elaborate [-h] [-parameters {} ] [<top_module_name>]
Example
67
module TOP ( data_in , data_out , averg_per_sel ) ;
input [data_width1-1:0] data_in ;
+
Carrysave
a bc d e f
z
+
+ +
+
+
Carry-propagate
a b c d e f
z
Encounter RTL Compiler, 10.1 92
A resource is any computational element, such as an add, shift, or multiplier operation.
Each type of operator in the RTL description requires a unique resource type.
For instance,
+ operator requires an adder;
> requires a comparator
Maximum number of resources required for each operator type is the number of times
an operator is used in the RTL description.
However, resources can be reduced through sharing, thus saving area.
Some operators can be mapped to a common resource type. For instance, + and -
operators can be mapped to an add-subtract unit.
Operators in different clock cycles can share the same resource. This is determined by
analyzing if there are any data flow or control flow conflicts.
04/25/11 Encounter RTL Compiler 92
Resource Sharing and Speculation
The sharing and un-sharing (speculation) of resources trades off area versus timing
during logic synthesis.
Q
A C B D
Sum
+
A B C D
X Y
+
MUX
Q
Resource
Sharing
Speculation
MUX MUX
+
if (Q =0)
Sum = a + b;
else
Sum = c + d;
Sum
Encounter RTL Compiler, 10.1 93
04/25/11 Encounter RTL Compiler 93
Implementation Selection: Architecture Tradeoff
4 Different implementations of the design components have different area and
timing characteristics.
4 Design constraints determine the appropriate design component.
Brent-Kung
Carry Look Forward
Z<=A*B+C
+
Carry Look Forward
Ripple Carry
HDL Operator
fastest
smallest
Encounter RTL Compiler, 10.1 94
04/25/11 Encounter RTL Compiler 94
Optimized for Speed
Input A is late arriving.
Optimized for Speed
All inputs have equal delay.
Initial Order
Arithmetic Optimization
+
+
+
+
+
+
+
+
+
Sum<=A+B+C+D
Sum
Sum
Sum
A
A
A
B
B
B
C
D
D
D
C
C
Note: Operators cannot be rearranged if the
initial order is overridden by parentheses in HDL.
Encounter RTL Compiler, 10.1 95
04/25/11 Encounter RTL Compiler 95
Common Subexpression Sharing
Consider the assignments:
SUM1 <= A + B + C
SUM2 <= A + B + D
SUM3 <= B + A + E
The A+B subexpression can be shared, thus saving two adders in the process.
The order within the subexpression is not important, but the position must be the
same.
SUM1
C
E D E
Sharing of
subexpressions
SUM2 SUM3
SUM2 SUM3
+
+
A B
+
+
A B D
+
+
A B
SUM1
C
+
A B
+ + +
Encounter RTL Compiler, 10.1 96
04/25/11 Encounter RTL Compiler 96
Implementation Selection: ChipWare
4 Some advanced synthesis tools come
with a library of reusable designs.
O Cadence Encounter RTL Compiler (RC)
has such a library, known as ChipWare.
4 ChipWare (CW) library includes
O Common combinational and sequential
components
O Arithmetic components (adders,
subtractors, multipliers)
O Memory components (flip flops, FIFOs)
4 Logic synthesis searches for operators
in RTL files it reads and automatically
maps those operators to CW
components, if available.
4 CW components often have multiple
architectural implementations that allow
logic synthesis to pick one according to
design need.
Z <= X + Y
RTL File
HDL Operator Definition
add_op
ADD_SUB ADD ALU
ChipWare
Library
ripple CLA proprietary
Implementations
Encounter RTL Compiler, 10.1 97
The synthesize -to_generic command does RTL optimization. This is automatically done
within synthesize to_mapped using an effort medium, if your design comes from RTL. When
loading a Verilog netlist, do not use this command unless absolutely necessary, because it will
unmap the design.
The medium effort is the default choice. You can use the high effort level for datapath
intensive designs, or designs that are hard to meet timing.
04/25/11 Encounter RTL Compiler 97
Commands for Technology-Independent Mapping
4 In this stage, logic synthesis performs technology-independent
optimizations, including
O Constant propagation
O Resource sharing
O Logic speculation
O Multiplexor optimization
O Carry-save arithmetic optimization
4 You can run this stage separately by using the following command:
synthesize to_generic -effort <effort_level>
Encounter RTL Compiler, 10.1 98
The compiler optimizes sequential instances that transitively do not fan out to primary output.
This information is reported in the log file. If you see unmapped points in formal verification,
check for deleted sequential instances in the log file.
04/25/11 Encounter RTL Compiler 98
Log Entries for Technology Independent Mapping
rc:/> synthesize -to_generic
Deleting 2 sequential instances. They do not transitively
drive any primary outputs:
vpb/vpo/luma_sel_a1_reg[0], vpb/vpo/luma_sel_reg[0] (floating root)
Info : An implementation was inferred. [CWD-19]
: The implementation
'/hdl_libraries/GB/components/increment/implementations/very_fast' was
inferred through the binding 'b1' for the call to synthetic operator
'INCREMENT_CI_OP'.
Optimizing muxes in design my_design'
Synthesis succeeded.
Starts technology-
independent
optimization
process
Logic pruning
End of technology-
independent
optimization
Implementation
selection
Mux
optimization
Encounter RTL Compiler, 10.1 99
You can only set the speed_grade attribute on the datapath subdesign created by RTL
Compiler during elaboration and not the subdesign from your RTL.
04/25/11 Encounter RTL Compiler
Controlling Architecture Selection
By default, RTL Compiler automatically selects the best
implementation for each individual datapath component.
4 To manually control this datapath architecture
selection process, use:
set_attr speed_grade speed
[find /designs* -subdesign name]
The value of speed can be very_fast, fast, medium,
slow, or very_slow. Use this attribute only for
debugging or as a workaround.
4 To find the speed grade of a data path component,
use:
get_attribute speed_grade
[find / -subdesign <name>]
99
Speed Grading
Library
*
Faster/
Larger
Library
*
Smaller/
Slower
Encounter RTL Compiler, 10.1 100
04/25/11 Encounter RTL Compiler
Sharing and Speculation
Sharing and speculation take place automatically during synthesis when
you use the synthesize -to_generic -effort high command (timing driven
mode). The compiler automatically shares and unshares (speculates) the
datapath instances based on the optimization criteria.
4 To globally control sharing and speculation when applying other effort
levels of generic optimization, use these commands:
set_attr dp_sharing advanced|basic|none /
set_attr dp_speculation basic|none /
100
if (Q =0)
y = a + b;
else
y = c + d;
Q
A C B D
Y
+
A B C D
+
MUX
Q
Resource
Sharing
Speculation
MUX MUX
+
Y
Encounter RTL Compiler, 10.1 101
Datapath operators are merged in scenarios such as the following :
Any combination of Vector Sum, Sum-of-Product, and Product-of-Sum, including
intermediary inverted signals.
assign cs = a + b + c + d; assign y = cs * p + q;
Comparator
assign p = a + b; assign q = c + d; assign is_greater =
(p > q);
Multiple Fanout
cs = a * b; x = cs + c; y = cs + d;
Multiplexers
assign tmp = s ? a*b + c*d : a*c + b*d; assign z = tmp +
e;
Truncated CSA
assign p = a + b; assign q = c + d; assign r = p + q;
assign y = r[17:8];
04/25/11 Encounter RTL Compiler
Carrysave Arithmetic Operations
Timing-driven carrysave arithmetic (CSA) transformations are automatically
performed on a parallel tree of adders. The CSA tree provides optimization
in terms of speed, but it might increase the area.
4 To turn off CSA globally, enter:
set_attr dp_csa none / ## Default is basic
101
+
Carrysave
a bc d e f
z
+
+ +
+
+
Carry-propagate
a b c d e f
z
Encounter RTL Compiler, 10.1 102
04/25/11 Encounter RTL Compiler
Fine-tuning Datapath Operations
To control speculation on subdesigns, enter:
set_attr dp_speculation {inherited|basic|none}
[find / -subdesign name]
To control CSA on subdesigns, enter:
set_attr dp_csa {inherited|basic|none}
[find / -subdesign name]
102
Encounter RTL Compiler, 10.1 103
By default, resource sharing is performed after CSA transformation. If you set the
dp_area_mode attribute to true, sharing is performed before the CSA tree operation.
04/25/11 Encounter RTL Compiler
Optimizing Datapath for Area
To improve area during datapath optimization, use the dp_area_mode
attribute.
set_attribute dp_area_mode true /
Setting this attribute to true achieves area gain by performing the following:
4 Full adder cell mapping
4 Conservative carrysave adder (CSA) transformations
4 Sharing before CSA transformations
Perform architecture downsizing after mapping by setting the
dp_postmap_downsize attribute to true.
set_attribute dp_postmap_downsize true /
This attribute is effective only during incremental optimization. However,
there is a potential increase in run time.
103
Encounter RTL Compiler, 10.1 104
04/25/11 Encounter RTL Compiler
Datapath Rewriting
Datapath rewriting performs QOR-driven transformations from one group of
datapath operators to another, as if the RTL code were rewritten. This is
turned on by default during synthesize -to_generic -effort high.
If you want to control datapath rewriting manually, use the commands
shown here.
4 To turn on, use:
Oset_attr dp_rewriting basic /
4 To turn off, use:
Oset_attr dp_rewriting none /
LEC Impact
4 No problem
104
Encounter RTL Compiler, 10.1 105
04/25/11 Encounter RTL Compiler
Example: Datapath Rewriting
105
Sample RTL Code
module tst (y, a, b, s);
input s;
input [15:0] a, b;
wire [15:0] p, q;
output [15:0] y;
assign p = a - b;
assign q = a + b;
assign y = s ? p : q;
endmodule
module tst (y, a, b, s);
input s;
input [15:0] a, b;
wire [15:0] t;
output [15:0] y;
assign t = {16{s}} ^ b;
assign y = a + t + s;
endmodule
Datapath Rewritten
QOR Improvement*
OPT OFF: period = 7500, slack = 12.0, area = 482.0
OPT ON : period = 7500, slack = 52.9, area = 267.0
==> 44.6% smaller
Encounter RTL Compiler, 10.1 106
Use the report datapath command to:
Identify datapath operators.
Examine how carrysave arithmetic transformations are applied.
Examine the selected architectures.
Examine the datapath area.
To report the line numbers of the datapath components in the RTL code, set the
hdl_track_filename_row_col root attribute to true.
04/25/11 Encounter RTL Compiler
Generating Datapath Reports
Syntax
report datapath
Using this command:
4 After elaboration, you can check the datapath components in your design.
4 After synthesize to_generic, you can examine any changes to the datapath
components in your design.
106
============================================================
Module Instance Operator Signedness Architecture Inputs Outputs CellArea Line Col Filename
--------------------------------------------------------------------------------------------
G2C_DP_sub_un */sub_84_22 - unsigned slow 32x32 32 626.57 84 22 alu_32.v
--------------------------------------------------------------------------------------------
G2C_DP_mult_un */mul_8_14 * unsigned slow/booth 16x16 32 4824.89 8 14 m16x16.v
--------------------------------------------------------------------------------------------
G2C_DP_inc */inc_add_63_52 x unsigned slow 32x1 33 285.77 8
+ unsigned 32x1 32 63 52 mult_32_dp.v
--------------------------------------------------------------------------------------------
Type CellArea Percentage
--------------------------------------
datapath modules 7245.81 1.24
mux modules 0.00 0.00
others 578557.63 98.76
--------------------------------------
total 585803.43 100.00
Encounter RTL Compiler, 10.1 107
04/25/11 Encounter RTL Compiler
Lab Exercises
Lab 5-1 Running Datapath Synthesis
107
Encounter RTL Compiler, 10.1 108
04/25/11 Encounter RTL Compiler 108
Encounter RTL Compiler, 10.1 109
April 25, 2011
Optimization Strategies
Module 6
Encounter RTL Compiler, 10.1 110
04/25/11 Encounter RTL Compiler
Module Objectives
In this module, you
4 Identify the individual synthesis stages
4 Analyze your design
4 Dynamically tighten or relax timing constraints
4 Create path groups and cost groups
4 Apply other optimization strategies
4 Derive environment to do bottom-up synthesis
110
Encounter RTL Compiler, 10.1 111
This module primarily deals with technology mapping related optimizations.
111
04/25/11 Encounter RTL Compiler 111
Technology Transformation (Mapping)
4 Technology transformation or technology mapping is the phase of
logic synthesis when gates are selected from a technology library to
implement the circuit.
4 Why run technology mapping and related optimizations?
O Gates in the library are pre-designed and are usually optimized for various
combinations of area, delay, and power.
OUse fastest gates along the critical path, and
OUse area-efficient gates (or a combination) off the critical path
4 Technology mapping is normally done after technology-independent
optimization (unless you have a gate-level netlist, in which case you
would skip technology-independent optimization).
Encounter RTL Compiler, 10.1 112
Target setting
Target timing goals (clock period) for each class and group of timing paths are
derived from the fastest arrival time.
Global mapping
Optimizes for area, timing, power, and maps the design while aiming for the target
clock frequency
Global incremental
Evaluates every cell in the design and resizes as needed to improve area and power
consumption
Incremental optimization
Runs design rule checks (DRCs), timing and area cleanup, and critical region
resynthesis (CRR) for timing optimization
04/25/11 Encounter RTL Compiler
Synthesis Stages
112
Generic optimizations such as MUX and
datapath are done in this stage.
Optimizes for area, timing, power and
maps the design, while aiming for the
target.
Evaluates every cell in the design and
resizes as needed.
Generic structuring
Global incremental
Incremental
Runs DRC, timing/area clean up, and
critical region resynthesis for timing.
synthesize
-to_mapped
-no_incremental
Global mapping
synthesize
-incremental
synthesize
-to_generic
Targets for each class/group are derived
from the fastest arrival time.
Target setting
Encounter RTL Compiler, 10.1 113
The synthesize -to_generic command does RTL optimization.
The medium effort is the default choice. You can use high effort for datapath intensive
designs, or designs for which it is hard to meet timing.
The compiler optimizes sequential instances that transitively do not fan out to primary output.
This information is reported in the log file. If you see unmapped points in formal verification,
check for deleted sequential instances in the log file.
When loading a Verilog
EXECUTE_INST/mpy_result[31]
cb_seqi/mpy_result[31]
g22038/data1
g22038/z (u) unmapped_bmux3 1 6.3
p_reg[31]/d <<< unmapped_d_flop
p_reg[31]/clk setup
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(clock m_clk) capture 8000 R
-------------------------------------------------------------------
Cost Group : 'm_clk' (path_group 'm_clk')
Start-point : TDSP_CORE_INST/DECODE_INST/cb_seqi/ir_reg[8]/clk
End-point : TDSP_CORE_INST/EXECUTE_INST/cb_seqi/p_reg[31]/d
(u) : Net has unmapped pin(s).
The global mapper estimates a slack for this path of 589ps.
115
Encounter RTL Compiler, 10.1 116
You can generate the area reports in different stages during synthesis. However, you need to
focus on the area report after all the synthesis phases finish. The final area numbers will be
similar to what is generated during the incremental mapping stage under final optimization
status.
04/25/11 Encounter RTL Compiler
Synthesis Stages: Post-target Global Mapping
In this second phase of global mapping, RC restructures paths and
computes delays based on the targets and the effort level that you set. The
goal of this phase is to meet the target timing.
synthesize to_mapped
116
Optimizing component cb_seq...
Restructuring (delay-based) cb_part_4...
Done restructuring (delay-based) cb_part_4
Optimizing component cb_part_4...
Restructuring (delay-based) cb_oseq_3...
Done restructuring (delay-based) cb_oseq_3
Optimizing component cb_oseq_3...
Restructuring (delay-based) cb_part...
Done restructuring (delay-based) cb_part
Optimizing component cb_part...
Encounter RTL Compiler, 10.1 117
The worst case slack report with a target slack is written during the global mapping stage by
entering:
set_attribute map_timing true /
When you use the above attribute in conjunction with the following variable, the compiler
gives the targets and fancy naming styles that can help debug your design.
set map_fancy_names 1
The compiler uses slack and optimization status to name the cells in the critical path of
each cost group.
04/25/11 Encounter RTL Compiler
Synthesis Stages: Global Mapping Report
Global mapping timing result
============================
Pin Type Fanout Load Slew Delay Arrival
(fF) (ps) (ps) (ps)
-------------------------------------------------------------------------
(clock m_clk) launch 0 R
TDSP_CORE_INST
DECODE_INST
cb_seqi
ir_reg[8]/CK 0 0 R
ir_reg[8]/Q SDFFSHQX4M 5 64.8 337 +384 384 R
cb_seqi/ir[8]
DECODE_INST/ir[8]
EXECUTE_INST/alu_result[14]
cb_seqi/alu_result[14]
acc_reg[14]/SI <<< SDFFQX2MTH +0 6381
acc_reg[14]/CK setup 0 +897 7278 R
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(clock m_clk) capture 8000 R
-------------------------------------------------------------------------
Cost Group : 'm_clk' (path_group 'm_clk')
Timing slack : 722ps
Start-point : TDSP_CORE_INST/DECODE_INST/cb_seqi/ir_reg[8]/CK
End-point : TDSP_CORE_INST/EXECUTE_INST/cb_seqi/acc_reg[14]/SI
117
Encounter RTL Compiler, 10.1 118
04/25/11 Encounter RTL Compiler
Synthesis Stages: Global Incremental
In this stage RC refines the timing and area of all critical paths by
remapping the cells according to the new surroundings of the cell.
118
Global incremental optimization status
======================================
Group
Total
Total Worst
Operation Area Slacks Worst Path
------------------------------------------------------------------------
global_inc 252520 -89
TDSP_CORE_INST/EXECUTE_INST/sel_op_a_reg[1]/CK-->
TDSP_CORE_INST/EXECUTE_INST/p_reg[31]/D
Encounter RTL Compiler, 10.1 119
04/25/11 Encounter RTL Compiler
Stages: Global Incremental Target Report
Global incremental target info
==============================
Cost Group 'm_clk' target slack: 142 ps
Pin Type Fanout Load Arrival
(fF) (ps)
--------------------------------------------------------------
(clock m_clk) <<< launch 0 R
TDSP_CORE_INST
DECODE_INST
cb_seqi
ir_reg[8]/CK
ir_reg[8]/Q SDFFSHQX4M 5 64.8
cb_seqi/ir[8]
DECODE_INST/ir[8]
EXECUTE_INST/alu_result[14]
cb_seqi/alu_result[14]
acc_reg[14]/SI <<< SDFFQX2MTH
acc_reg[14]/CK setup
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(clock m_clk) capture 8000 R
--------------------------------------------------------------
Cost Group : 'm_clk' (path_group 'm_clk')
Start-point : TDSP_CORE_INST/DECODE_INST/cb_seqi/ir_reg[8]/CK
End-point : TDSP_CORE_INST/EXECUTE_INST/cb_seqi/acc_reg[14]/SI
The global mapper estimates a slack for this path of 626ps.
119
Encounter RTL Compiler, 10.1 120
DRC: Design Rule Checks
The drc_first attribute specifies whether to give all the design rule constraints higher priority
than the timing constraints.
Incremental Synthesis:
Works with an already mapped design.
Incrementally optimizes the mapped design.
Allows the mapper to preserve the current implementation of the design and perform
incremental optimizations if and only if the procedure guarantees an improvement in
the overall cost of the design.
Can be run as many times as needed.
04/25/11 Encounter RTL Compiler
Synthesis Stages: Incremental Synthesis
Run synthesize -incremental to fix any timing issues and clean up DRC
violations.
120
Incremental optimization status
===============================
Group
Total - - - - DRC Totals - - - -
Total Worst Max Max Max
Operation Area Slacks Trans Cap Fanout
------------------------------------------------------------------------
init_iopt 252520 -89 0 0 16
Path: TDSP_CORE_INST/EXECUTE_INST/sel_op_a_reg[1]/CK -->
TDSP_CORE_INST/EXECUTE_INST/p_reg[31]/D
simp_cc_in 252271 -78 0 0 16
Path: TDSP_CORE_INST/EXECUTE_INST/sel_op_b_reg[0]/CK -->
TDSP_CORE_INST/EXECUTE_INST/p_reg[31]/D
------------------------------------------------------------------------
Group
Total - - - - DRC Totals - - - -
Total Worst Max Max Max
Operation Area Slacks Trans Cap Fanout
------------------------------------------------------------------------
init_delay 252271 -78 0 0 16
Path: TDSP_CORE_INST/EXECUTE_INST/sel_op_b_reg[0]/CK -->
TDSP_CORE_INST/EXECUTE_INST/p_reg[31]/D
incr_delay 252393 0 0 0 16
init_drc 252393 0 0 0 16
incr_drc 252432 0 0 0 3
incr_drc 252443 0 0 0 0
Encounter RTL Compiler, 10.1 121
CRR: Critical region resynthesis
04/25/11 Encounter RTL Compiler
Synthesis Stages: Incremental Synthesis (continued)
Run synthesize -to_mapped incremental to achieve power goals.
121
Group
Total - - - - DRC Totals - - - -
Total Worst Max Max Max Leakage Switching
Operation Area Slacks Trans Cap Fanout Power Power
-------------------------------------------------------------------------------
init_power 252443 0 0 0 0 42674 14210023
p_rem_buf 252160 0 0 0 0 42309 14190812
p_rem_inv 252078 0 0 0 0 42277 14186008
p_merge_bi 252002 0 0 0 0 42207 14182209
io_phase 251987 0 0 0 0 42196 14179410
gate_comp 251338 0 0 0 0 41717 14104759
glob_power 250828 0 0 0 0 39950 14027472
power_down 250189 0 0 0 0 36940 13937300
p_rem_buf 250181 0 0 0 0 36911 13936989
p_merge_bi 250170 0 0 0 0 36910 13936446
Encounter RTL Compiler, 10.1 122
04/25/11 Encounter RTL Compiler
Setting Effort Levels
You can specify an effort level by using the -effort {low | medium | high}
option with the synthesize command. The possible values for the -effort
option are:
4 Low: The design is mapped to gates, but RC does very little RTL
optimization, incremental clean up, or redundancy identification and
removal. The low setting is generally not recommended.
4 Medium(default setting): RC performs better timing-driven structuring,
incremental synthesis, and redundancy identification and removal on
the design.
4 High: RC does the timing-driven structuring on larger sections of logic
and spends more time and makes more attempts on incremental clean
up. This effort level involves very aggressive redundancy identification
and removal.
122
Encounter RTL Compiler, 10.1 123
QoR: Quality of results
04/25/11 Encounter RTL Compiler
Analyzing Your Design: Elaborate
4 After elaboration, check for the message 'Done elaborating'.
4 Check the logfile for any unresolved instances (The unresolved
attribute will be set to true for an unresolved instance). Or use:
check_design unresolved
4 Set the attribute information_level to 9 to get all the info messages.
4 Make sure that there is only one top-level design.
4 Review the log file for warnings and fix the issues. Synthesizing the
design with elaboration issues can easily result in a bad netlist and
poor QoR.
Common messages to pay attention to:
4 Inconsistent nominal operating conditions (LBR-38)
4 You cannot load a library that has no inverter or simple gate.
4 Warning: Variable has multiple drivers. [ELAB-VLOG-14]
123
Encounter RTL Compiler, 10.1 124
04/25/11 Encounter RTL Compiler
Analyzing Your Design: Constraints
4 Make sure there are no mixed constraints with ps and ns,
or pF and fF.
4 Check that the design is properly constrained using the
report timing -lint command.
4 SDC warnings can be easily traced in the log file by searching for the keyword
SDC.
4 Re-enter all the commands that had errors by using the dc:: prefix.
O This prefix allows interactive debugging of SDC constraints.
4 Refer to the table generated at the end of read_sdc, but always review the log
file for warnings and errors that are listed prior to the table.
4 You can validate your timing constraints, with the Encounter
Conformal
Constraint Designer (CCD) tool, before you apply them to your design. Use the
write_do_ccd command to write out a CCD dofile.
write_do_ccd validate -sdc list_of_SDC_files > Dofile
The generated dofile can be then used to run CCD to perform checks on the constraints.
124
Encounter RTL Compiler, 10.1 125
PLE: Physical Layout Estimation
04/25/11 Encounter RTL Compiler
Analyzing Your Design: Area Optimization
To achieve better area, look for the following:
4 Remove any preserve attributes (dont_touch) that are not needed.
4 Examine the design hierarchy.
O Hierarchical blocks with fewer instances are often good candidates for
ungrouping, especially if critical paths traverse these hierarchies.
O Ungrouping the smaller blocks can improve both timing and area.
4 Check if there any datapath elements in the critical paths with preserve
attributes.
4 Set the dp_area_mode and dp_postmap_downsize attributes to true if
you have datapath in your design.
4 Avoid using the segmented wire-load mode if possible. Set the
interconnect_mode attribute to PLE to obtain better timing correlation
with the back-end tools.
125
Encounter RTL Compiler, 10.1 126
To get the best performance goals from synthesis, you might need to apply optimization
strategies, such as creating custom cost groups for paths in the design to change the synthesis
cost function.
The following are the typical path groups:
Input-to-Output paths (I2O)
Input-to-Register paths (I2C)
Register-to-Register (C2C)
Register-to-Output paths (C2O)
04/25/11 Encounter RTL Compiler
Path Grouping
You can group different paths together in one cost group.
4 RC optimizes on a per cost group basis. Therefore, using an appropriate cost
group strategy is an important step to achieve the best results.
4 The mapper calculates a target slack for each cost group and works on all the
cost groups simultaneously.
4 Each of the real clocks in the SDC become a separate cost group. If you
decide to create your own cost groups, remove the auto-created ones.
126
rm [find /des* -cost_group *]
define_cost_group -name C2C
path_group -from [all des seqs] -to [all des seqs] -group C2C -name C2C
define_cost_group name I2C
path_group -from [all des inps] -to [all des seqs] -group I2C -name I2C
define_cost_group name I2O
path_group -from [all des inps] -to [all des outs] -group I2O -name I2O
define_cost_group name C2O
path_group -from [all des seqs] -to [all des outs] -group C2O -name C2O
Encounter RTL Compiler, 10.1 127
04/25/11 Encounter RTL Compiler
Example of Path Grouping
Example
define_cost_group -name sysclk -design dtmf_chip
path_group -from [find / -clock CKG_VIT_CLK] \
-group sysclk -n sysclk
Report
127
Pin Type Fanout Load Slew Delay Arrival
(fF) (ps) (ps) (ps)
-------------------------------------------------------------------------------
(clock CKG_VIT_CLK) <<< launch 0 R
VIT_ACS0
RTL Complier will even declone gating logic with common enable signals
across the hierarchy.
04/25/11 Encounter RTL Compiler 152
Enabling Clock Gating
Clock gating is the disabling of a group of flops that are
enabled by the same control signal.
Clock-gating logic can be any one of the following:
4 Clock-Gating integrated cell (CGIC)
4 User-defined clock-gating module
4 Logic cells to create gating logic
To enable clock gating before running elaboration, use:
set_attr lp_insert_clock_gating true /
To specify the maximum number of registers that can
be driven by each clock-gating element, set the
following root-level attribute:
4 set_attr lp_clock_gating_max_flops
integer /
4 Default: Infinite
To specify the minimum number of registers:
4 set_attr lp_clock_gating_min_flops
integer /
4 Default: 3
en
rst
clk
en
rst (synch.)
clk
153 Encounter RTL Compiler, 10.1
04/25/11 Encounter RTL Compiler
Hierarchical Clock Gating
Hierarchical clock gating capability can handle various RTL code styles.
To turn on hierarchical clock gating, use:
set_attribute lp_clock_gating_hierarchical true /
153
Block FF
Block MUX
clk
muxout
muxin1
en
muxin
RTL
module mux()
always @(muxin0 or
muxin1 or en)
if(en)
muxout = muxin1;
else
muxout = muxin0;
module FF();
always@(posedge clk)
muxin <= muxout;
Control
signal
This example shows that the if/case logic and the
registers can be defined in different modules.
Encounter RTL Compiler, 10.1 154
CGIC: Clock gating integrated cell.
To specify the type of clock-gating logic the tool must create, use the following attributes:
set_attr lp_clock_gating_style {none | latch | ff}
set_attr lp_clock_gating_add_obs_port {true | false}
set_attr lp_clock_gating_add_reset {true | false}
set_attr lp_clock_gating_control_point {none| precontrol| postcontrol}
To prevent adding clock-gating throughout a design, a subdesign, or a unique hierarchical
instance, set the following attribute:
set_attr lp_clock_gating_exclude true <object_path>
04/25/11 Encounter RTL Compiler 154
Clock Gating: Specifying CGIC Logic
4 After elaboration, to define your own customized clock-gating logic,
enter this command:
set_attr lp_clock_gating_module myCG_name /des*/design
O By default, if the attribute lp_clock_gating_module is specified, RC uses that first. Otherwise, RC
chooses an integrated clock-gating cell from the library.
4 To select a clock gating cell from the library, use this command:
set_attr lp_clock_gating_cell [find / -libcell CGIC_NAME]
/des*/design
O The library cell contains data, such as the following:
clock_gating_integrated_cell : "latch negedge precontrol obs;
4 If no clock gating cell is available from the library, RC uses regular
library cells to instantiate the clock gating module that corresponds to
the clock-gating directives, or automatically creates discrete
clock-gating logic.
Encounter RTL Compiler, 10.1 155
For accurate RTL power analysis correlation with the final netlist, provide switching activity
before building power models.
04/25/11 Encounter RTL Compiler 155
RTL Power Analysis
Build power models after elaboration to get a better estimate of RTL power
consumption.
4 Make sure you have read all the constraints and then use:
build_rtl_power_models
report power
4 RC reports the estimated power of your design, including:
O Multiple supply voltage domain power
O Clock-gating logic power
Library Leakage Dynamic Total
Instance Domain Cells Power (uW) Power (uW) Power (uW)
dtmf_recvr_core 0 11488 5.959 12195.367 12201.326
Estimated Power of Clock-gating Logic
Leakage Power (uW): 0.336
Dynamic Power (uW): 264.481
Total Power (uW): 264.817
Encounter RTL Compiler, 10.1 156
Leakage power is the power dissipated by current leakage in the transistors.
The leakage power is usually modeled in the library as a constant.
The cell leakage power is sometimes specified as a function of the input state to model
leakage power more accurately. In this case, the leakage power is a function of the pin
switching activities.
When multiple threshold voltage (VT) libraries are provided, the low-power engine can
further optimize leakage power by using high VT cells along the noncritical timing paths, and
low VT cells only as needed on timing-critical paths.
04/25/11 Encounter RTL Compiler 156
Leakage Power Optimization
To enable leakage power optimization, after elaboration set the following
power attribute:
set_attribute max_leakage_power <leakage_target> /des*/*
To specify the power optimization effort, set the following power attribute:
set_attribute power_optimization_effort <low/med/high> /
4 low : Reduces power without area impact.
4 medium (default): Balances the area / power tradeoff.
4 high: Further reduces power with area tradeoff.
High VT cell (Low Leakage) Normal VT cell Low VT cell (High Speed)
Multi-VT
Optimization
Encounter RTL Compiler, 10.1 157
To let the low-power engine optimize the leakage and dynamic power simultaneously, set the
following design attribute:
set_attr lp_power_optimization_weight weight /des*/design
To reduce the dynamic power before optimizing the leakage power, set the following design
attribute:
set_attr lp_optimize_dynamic_power_first true /des*/design
04/25/11 Encounter RTL Compiler 157
Dynamic Power Optimization
Dynamic power dissipation is defined as power lost while a circuit is
actively switching at a given frequency.
4 Dynamic power dissipation includes switching power and short-circuit
power.
4 To enable dynamic power optimization, after elaboration set the
following power constraint:
set_attr max_dynamic_power <dynamic_target> /des*/*
V
out
C
L
I
sc
V
in
instance
power
C
net
C
pin
SR
net power
Switching Short-Circuit
Encounter RTL Compiler, 10.1 158
The value change dump (VCD) file contains detailed switching activity from a simulation.
The toggle count format (TCF) file contains switching activity in the form of the toggle count
information and the probability of the net or pin to be in the logic 1 state.
The switching activity interchange format (SAIF) file provides detailed information about the
switching behavior of nets and ports. This information leads to more accurate power
estimation.
To find the source of the probability information, use the following command:
get_att lp_probability_type /designs/design/*/nets/net
To find the source of the toggle rate information, use this command:
get_att lp_toggle_rate_type /designs/design/*/nets/net
To skip simulation, you can set the net switching activities using the following commands:
set_attribute lp_asserted_probability /designs/design/*/nets/net value
set_attribute lp_asserted_toggle_rate /designs/design/*/nets/net value
Nets with no switching activity use a default signal probability of 0.5 and a default transition
density of 0.02 per nanosecond. You can change these defaults using the following
commands:
set_attribute lp_default_probability /designs/design value
set_attribute lp_default_toggle_rate /designs/design value
Add instances to the scope of activity profiling by setting the lp_dynamic_analysis_scope
attribute on the instance to true.
04/25/11 Encounter RTL Compiler 158
Annotate Switching Activity
Switching activity information is needed for power optimization, power
estimation, and for power analysis.
You can annotate switching activity into RC by loading a VCD, TCF, or
SAIF file.
read_tcf [-weight <>] [-update] [-scale <>] tcf_file
O -update: Updates the toggle count information.
O -scale: Scales the simulation clock to actual clock.
read_saif saif_file
read_vcd {[-static | -activity_profile <>]
[-simvision]} module <> -vcd_module <> vcd_file
O -static: Annotates the switching activities to the design.
O -simvision: Starts the waveform viewer to view the simulation activity.
O -activity_profile: Builds a profile of the activities for the specified scope.
O -vcd_module: Reads the VCD hierarchy from the specified module.
O -module: Applies the VCD to the specified module.
Encounter RTL Compiler, 10.1 159
04/25/11 Encounter RTL Compiler 159
Power Optimization
RTL Compiler performs timing and leakage power optimization
simultaneously during mapping and incremental optimization as shown in
an extract of the log file below:
Global mapping status
=====================
Worst
Total Neg Leakage Switching
Operation Area Slack Power Power
-------------------------------------------------------------------------------
Path: coeff[3] --> regs/big_normal/data_out_reg[3]/D
power_map 2326 -158 7997 618910
...
Incremental optimization status
===============================
Worst Total - - DRC Totals - -
Total Neg Neg Max Max Leakage Switching
Operation Area Slack Slack Trans Cap Power Power
-------------------------------------------------------------------------------
...
init_power 2560 0 0 0 0 10104 617203
p_rem_buf 2551 0 0 0 0 10047 616922
p_rem_inv 2525 0 0 0 0 10002 616379
p_merge_bi 2506 0 0 0 0 9982 613260
glob_power 2477 0 0 0 0 9387 611549
power_down 2453 0 0 0 0 9087 611250
Encounter RTL Compiler, 10.1 160
Clock gating insertion works only on 2-input MUXes with a feedback loop. Buffers and an
even-number of inverters are acceptable along the feedback loop.
The technology library can have up to 26 different types of integrated clock-gating cells. The
low power engine supports all 26 types.
Clock gating is performed on cells with:
Synchronous set/reset
Scan enable
04/25/11 Encounter RTL Compiler 160
Clock Gating: Insert Clock Gating in the Netlist
Perform clock-gating insertion on a previously synthesized netlist using the
command:
clock_gating insert_in_netlist
To insert the observability logic, enter the following command after the
clock-gating logic has been inserted:
clock_gating insert_obs [-hier] [-max_cg integer]
Netlist without clock gating Netlist with clock gating
en
clk
D
en
clk
D
Encounter RTL Compiler, 10.1 161
04/25/11 Encounter RTL Compiler 161
Clock Gating Reports
To generate a clock-gating report, use the following command(s):
report clock_gating OR
report clock_gating -ungated_ff
Summary
---------------------------------------------
Category Number %
---------------------------------------------
RC Clock Gating Instances 30 -
Non-RC Clock Gating Instances 0 -
---------------------------------------------
RC Gated Flip-flops 468 92
Non-RC Gated Flip-flops 0 0
Ungated Flip-flops 43 8
Total Flip-flops 511 100
---------------------------------------------
Ungated Flip-flops
------------------
Flip-flop Excluded Module Instance
-------------------------------------------------------------------------------
dma_grant_reg false arb dtmf_recvr_core/ARB_INST
present_state_reg[0] false arb dtmf_recvr_core/ARB_INST
present_state_reg[1] false arb dtmf_recvr_core/ARB_INST
Encounter RTL Compiler, 10.1 162
04/25/11 Encounter RTL Compiler 162
Clock Gating Reports (continued)
report clock_gating -detail
Detail
------
Clock Gating Instance : RC_CG_HIER_INST2
---------------------
Origin: Inserted by RC
Libcell: TLATNTSCAX2M (ss_g_1v08_125c)
Style: latch_posedge_precontrol
Module: dma (dtmf_recvr_core/DMA_INST)
Type: Leaf level CG Instance
Inputs:
ck_in = clk (/designs/dtmf_recv..L_INST/pins_out/m_clk)
TCF = (0.50000, 0.250000/ns)
enable = n_9 (/designs/dtmf_recv.._comb/g528/pins_out/Y)
TCF = (0.07420, 0.005208/ns)
test = LOGIC0
Outputs:
ck_out = rc_gclk
TCF = (0.02600, 0.020833/ns)
Gated FFs:
Module Clock Gating Instance Fanout Gated Flip-flops
----------------------------------------------------------
dma RC_CG_HIER_INST2 7 a_reg[1]
a_reg[2]
a_reg[3]
a_reg[4]
a_reg[5]
a_reg[6]
a_reg[7]
----------------------------------------------------------
Encounter RTL Compiler, 10.1 163
The following sort modes are available for instance-based power reports:
Internal: Sorts by descending internal power.
Leakage: (default) Sorts by descending leakage power.
Net: Sorts by descending net power.
Switching: Sorts by descending total switching power, which is the sum of the internal
and net power.
You can also request net-based power reports.
Example
report power [find /designs/m1 -max 2 -net en*]
04/25/11 Encounter RTL Compiler 163
Reporting Power
To generate a detailed power report, use the following command:
report power [-hier|-flat [-nworst] [-sort <mode>] \
[-depth] [{list_of_inst_or_net}] [>file]
Example Reports
report power -depth 1
Leakage Dynamic Total
Instance Cells Power(mW) Power(mW) Power(mW)
-----------------------------------------------------------
dtmf_recvr_core 6412 0.045 14.036 14.081
TDSP_CORE_INST 4318 0.024 3.474 3.498
RESULTS_CONV_INST 1717 0.003 1.481 1.484
Encounter RTL Compiler, 10.1 164
04/25/11 Encounter RTL Compiler 164
Report Instance Power
report instance -power
Instance Power Info
-------------------
Instance ROM_512x16_0_INST of Libcell rom_512x16A
Leakage Internal Net
Power(mW) Power(mW) Power(mW)
----------------------------------
0.017 5.789 0.001
Computed Computed Net
Pin Net Probability Toggle Rate(/ns) Power( mW)
---------------------------------------------------------------------
Q[15] rom_data[15] 0.5 0.0208 0.000
Q[14] rom_data[14] 0.5 0.0208 0.000
#####################################################################################
## write Encounter file set (verilog, SDC, config, etc.)
#####################################################################################
Analyze power
results
RTL Power
Estimation
Encounter RTL Compiler, 10.1 169
04/25/11 Encounter RTL Compiler 169
Top-down MSV Synthesis
MSV features include the following:
4 Multiple voltage domains
O Assign libraries to domains
O Assign blocks to domains
4 Top-down analysis and
optimization
4 Incremental what-if analysis
4 Level shifter insertion
4 Automatic transfer of voltage
domain and shifter information
to back-end tools
O Place and Route
O Low-power functional verification
A
C
Lib1 Lib2 Lib3 Lib4
VDD1: 0.8v VDD2: 1.0v VDD3: 1.2v
B
Encounter RTL Compiler, 10.1 170
CPF Characteristics
CPF is TCL-based.
CPF language = TCL commands + CPF objects + Design objects
CPF Objects
Power domain
Analysis view
Delay corner
Library set
Operating condition
Design objects already exist in the RTL/gate netlist: module, instance, net, pin, port, pad.
04/25/11 Encounter RTL Compiler 170
Why Use Common Power Format?
Common Power Format (CPF) is a constraint file that enables the designer
to describe low power intent and techniques.
One Golden CPF can be used throughout the flow by all the tools.
Power is not connected
Very difficult to automate
Power
Information
(no consistency)
SVP
Place and
Route
IP Libraries
Formal
Analysis
Testbench
Simulation
Management
Equivalence
Checking
Synthesis
Test
Hardware
Easily automated
Power is connected
SVP
Place and
Route
IP Libraries
Management
Equivalence
Checking
Synthesis
Test
Formal
Analysis
Testbench
Simulation
Hardware
Power
Information
(CPF)
Encounter RTL Compiler, 10.1 171
DVFS: Dynamic Voltage Frequency Scaling
ATPG: Automatic Test Pattern Generation
04/25/11 Encounter RTL Compiler 171
CPF Flow: From Simulation to Signoff
Simulation
Formal Power Analysis
Synthesis
Design for Test
E
q
u
i
v
a
l
e
n
c
e
C
h
e
c
k
i
n
g
Implementation
Timing/SI Signoff
IR drop/power Signoff
RTL
TB
CPF
(1)
CPF
(2)
Template
w/o iso.cell, SRPG,
LS, Power Switch.
including PSO
patterns.
gate(1)
w/ iso.cell, SRPG, LS
gate(2)
w/ iso.cell, SRPG, LS
gate(3)
w/ iso.cell, SRPG, LS,
Power Switch
GDSII
S
t
r
u
c
t
u
r
a
l
C
h
e
c
k
i
n
g
-
C
L
P
1. Functional verification
2. Functional PSO, SRPG and isolation verification
3. CPF consistency check
4. Structural check : ISO/LS missing/redundant
check
1. Power-domain-aware test synthesis
2. ATPG with power modes to model for low power
structures and reduce power during test
3. Scan chain reordering and insertion of ISO/LS
into DFT nets
1. Power domain/mode aware P&R
2. Incremental ISO, LS and SRPG insertion
3. Instantiate & optimize power switches
1. Power domain/mode aware delay calculation
2. STA sign-off verification
3. Power domain/mode aware IR drop verification
1. Power domain/mode aware synthesis
2. Insert ISO, LS and SRPG
3. DVFS synthesis
Complete
Encounter RTL Compiler, 10.1 172
CPF: Common Power Format
04/25/11 Encounter RTL Compiler
Low-Power Flow Using Common Power Format
172
Enable clock gating
Read target libraries and designs
Elaborate design
Set timing, power, and design
constraints
Apply clock gating and optimization
directives
Read CPF and check CPF
Synthesize design, insert clock
gating, and optimize power
Analyze power and design
Place and Route
Yes
Modify constraints
Modify optimization
directives
Meet
constraints?
No
Annotate switching activity
Commit CPF
Testbench
Simulate and
generate TCF/SAIF
file(s)
TCF/SAIF
Incremental Synthesis
173
04/25/11 Encounter RTL Compiler
Example Design
Three domains
4 Top
4 Lower
4 Shutoff
State retention in Top/Shutoff/B
Isolation on outputs of shutoff
4 Mix of low and high
Level shifters
Lower and Shutoff can operate at two
voltages
Power modes
4 All on
4 Shutoff off
Power Control Module controls
power switching
173
Top
B
D
A C
Lower
Isolation cell
+ level shifter
level shifter
SR SR
Shutoff
PCM
174
04/25/11 Encounter RTL Compiler
Domain Definition
# Define the top domain
set_design TOP
# Define hierarchy separator
set_hierarchy_separator /
# Define the default domain
create_power_domain name pdTop \
default
# Define Lower
create_power_domain name pdLower \
instances {uA uC}
# Define Shutoff. Shuts off when
# pso is low
create_power_domain name pdShutoff \
instances {uB} \
shutoff_condition {!uPCM/pso}
174
Top
B
D
A C
Lower
SR SR
Shutoff
PCM
175
04/25/11 Encounter RTL Compiler
State Retention
# Define SRPG
set srpgList {uB/reg1 uB/reg2}
create_state_retention_rule \
name sr1 \
restore_edge {uPCM/restore[0]} \
-instances $srpgList
175
Top
B
D
A C
Lower
Shutoff
SR SR
PCM
176
04/25/11 Encounter RTL Compiler
State Retention Power Gating (SRPG)
4 Even with clk off in sleep mode, leakage power still large at 90nm
4 SRPG can reduce leakage power 10x
4 Additional power gating pins added to flip-flop
176
CK
Vdd Vdd Vdd Vdd Vdd
Huge Leakage Power
Vcc Vcc Vcc
SRPG SRPG SRPG
177
04/25/11 Encounter RTL Compiler
Isolation
# Active high iso
set hiPin {uB/en1 uB/en2}
create_isolation_rule name ir1 \
from pdShutoff \
isolation_condition {uPCM/iso} \
isolation_output high \
pins $hiPin
# Default rule (active low)
create_isolation_rule name ir2 \
from pdShutoff \
isolation_condition {uPCM/iso} \
-exclude $hiPin
177
Top
B
D
A C
Lower
Isolation cell
(LS to come)
SR SR
Shutoff
PCM
178
04/25/11 Encounter RTL Compiler
Level Shifter
# Define the LS in the to domain
create_level_shifter_rule name lsr1 \
to {pdShutoff} \
-from {pdLower}
create_level_shifter_rule name lsr2 \
-to {pdLower} \
-from {pdShutoff}
create_level_shifter_rule name lsr3 \
-to {pdTop} \
-from {pdShutoff}
create_level_shifter_rule name lsr4 \
-to {pdLower} \
-from {pdTop}
178
Top
B
D
A C
Lower
Isolation cell
level shifter
SR SR
Shutoff
PCM
+ level shifter
179
04/25/11 Encounter RTL Compiler
Power Modes
# Define the conditions. Top is
# always high. Lower/Shutoff can be
# medium or low
create_nominal_condition name \
high voltage 1.2
create_nominal_condition name \
medium voltage 1.0
create_nominal_condition name low \
voltage 0.8
create_nominal_condition name off \
voltage 0
# Define the modes
create_power_mode name PM1 \
domain_conditions {pdTop@high \
pdLower@medium pdShutoff@medium}
create_power_mode name PM2 \
domain_conditions {pdTop@high \
pdLower@low pdShutoff@low}
# Mode where Shutoff is off
create_power_mode name PM3 \
domain_conditions {pdTop@high \
pdLower@low pdShutoff@off}
# End the design (for completeness)
end_design
179
Top
B
D
A C
Lower
SR SR
Shutoff
PCM
1.2v
1.0v
1.0v
0.8v
0.8v
180
04/25/11 Encounter RTL Compiler
Assign Libraries
# Define the libraries
define_library_set name HIGH_set \
libraries {high1.lib high2.lib}
define_library_set name MED_set \
libraries {med1.lib med2.lib}
define_library_set name LOW_set \
libraries {low1.lib low2.lib}
# Associate the library sets with the
# operating condition (defined with
# create_nominal_condition previously)
update_nominal_condition name high \
library_set HIGH_set
update_nominal_condition name medium \
library_set MED_set
update_nominal_condition name low \
library_set LOW_set
# Assign libraries to power domains
update_power_domain name pdTop \
library_set HIGH_set
update_power_domain name pdLower \
library_set LOW_set
update_power_domain name pdShutoff \
library_set LOW_set
180
Top
B
D
A C
Lower
SR SR
Shutoff
PCM
high
med/low
med/low
181
04/25/11 Encounter RTL Compiler
Update Low Power Design Rules
# Update state retention rules
update_state_retention_rules \
name sr1 \
cell_type DRFF \
library_set MED_set
# Update isolation rules
update_isolation_rules \
name ir1 \
-cells iso1 location to
update_isolation_rules \
name ir2 \
-cells iso2 location to
# Update level shifter rules
update_level_shifter_rules \
name ls1 \
-cells lvl location to
181
Top
B
D
A C
Lower
SR SR
Shutoff
PCM
1.2v
0.8v
0.8v
182
04/25/11 Encounter RTL Compiler
Define Multiple Modes
# Associate the sdc mode files
with
# the power modes (defined with
# create_power_mode previously)
update_power_mode name PM1 \
sdc_files power_mode1.sdc
update_power_mode name PM2 \
sdc_files power_mode2.sdc
update_power_mode name PM3 \
sdc_files power_mode3.sdc
182
Top
B
D
A C
Lower
SR SR
Shutoff
PCM
1.2v
1.0v 0.8v
1.0v 0.8v
Encounter RTL Compiler, 10.1 183
04/25/11 Encounter RTL Compiler
Check Library for Low-Power Cells
183
==================================================================================
Library Domain Total cells LS cell ISO cell Combo (LS+ISO) SR Flops
----------------------------------------------------------------------------------
ao_wc_1v08(1.08) 405 1 0 0 16
tdsp_wc_0v84(0.84) 400 0 0 0 12
----------------------------------------------------------------------------------
Unusable libcells
=================
==================================================================================
Library Domain Total cells LS cell ISO cell Combo (LS+ISO) SR Flops
----------------------------------------------------------------------------------
ao_wc_1v08(1.08) 166 16 0 4 0
tdsp_wc_0v84(0.84) 36 12 0 4 0
----------------------------------------------------------------------------------
Encounter RTL Compiler, 10.1 184
04/25/11 Encounter RTL Compiler
Report Power Domains
184
Summary
=======
=========================================================================================
Shut-off signal
-----------------------------------------------------------------
Name Name Active level Voltage(V)
=========================================================================================
AO(*) - - 1.08
PLL - - 1.08
TDSPCore PM_INST/pd_inst/power_state_i/power_switch_enable active_high 0.84
-----------------------------------------------------------------------------------------
Encounter RTL Compiler, 10.1 185
04/25/11 Encounter RTL Compiler
write_template split cpf power outfile run.tcl
185
########################################
## Template CPF file
########################################
set_cpf_version1.1
set_hierarchy_separator<hierarchy separator>
###Technology part of the CPF
define_library_set-name <name> -libraries <library list>
#### Level Shifters
define_level_shifter_cell -cells <cell name> \
-input_voltage_range<value> \
-output_voltage_range<value> \
-direction <value> \
-input_power_pin<pin> \
-output_power_pin<pin> \
-ground <pin> \
-valid_location<location>
define_isolation_cell -cells <cell name> \
-valid_location<location> \
-power_switchable\
-ground_switchable\
-enable <pin>
###############
## Headers
###############
define_power_switch_cell-cells <cell name> \
-power_switchable<value> -power <value> \
-stage_1_enable <value> \
-stage_1_output <value> \
-type <value>
#########################
### State retention cells
#########################
define_state_retention_cell-cells <cell names> \
-clock_pin<pin> \
-power <value> \
-power_switchable<value> \
-ground <value> \
-save_function<value> \
-restore_function<value>
########################
## Always ON Cells
########################
define_always_on_cell-cells <cell_list> \
-library_set <library_set> \
-power_switchable<LEF_power_pin> (or) -ground_switchable
<LEF_ground_pin> \
-power <LEF_power_pin> \
-ground <LEF_ground_pin>
#### Design part of the CPF
set_design<design name>
create_power_nets-nets <name> -voltage <value>
create_ground_nets-nets <name>
### Create power domains
create_power_domain-name <domain name> -default
create_power_domain-name <domain name> -instances <instance list>
create_global_connection-domain <domain name> -net <net name> -pin <pin
name>
update_power_domain-name <name> -internal_power_net<net name>
create_nominal_condition-name <name> -voltage <value>
update_nominal_condition-name <name> -library_set <libararyset name>
create_power_mode-name <name> -domain_conditions<conditions> -default
Whats New?
The template.cpf file.
Encounter RTL Compiler, 10.1 186
04/25/11 Encounter RTL Compiler
template.cpf (continued)
186
update_power_mode-name <name> -sdc_files<sdc file_name>
create_state_retention_rule-name <name> \
-domain <domain name> \
-restore_edge<value> \
-save_edge<value>
update_state_retention_rules-names <name> \
-cell_type<value> \
-library_set <value>
create_level_shifter_rule-name <name> -from <domain> -to <domain>
update_level_shifter_rules-names <name> -cells <cell name> -location <location value> -prefix <name>
create_isolation_rule-name <name> \
-isolation_condition<pin> \
-pins -from <power_domain> \
-to <power_domain> \
-isolation_output<low|high> \
-isolation_target<from|to>
update_isolation_rules-name <name> -location <location value> -prefix <name>
create_power_switch_rule-name <rule name> -domain <domain name> \
-external_power_net<net name>
update_power_switch_rule-name <rule name> \
-cells <name> \
-prefix <value>
end_design
Encounter RTL Compiler, 10.1 187
04/25/11 Encounter RTL Compiler
run.tcl for Low Power and CPF-based Flow
187
Whats New: setup_run.tcl:
read_cpf -library run.cpf
Whats New: run.tcl:
#### Read in CPF file.
read_cpf template.cpf
include power_run.tcl
check_cpf
## Reapply CPF rules
## reload_cpf -design /designs/$DESIGN
commit_cpf
##write_encounterdesign -basename <path & base filename> -lef <lef_file(s)>
verify_power_structure-post_synth> $_REPORTS_PATH/${DESIGN}_verify_power_struct.rpt
Encounter RTL Compiler, 10.1 188
We have built RTL exploration into RTL Compiler to help explore MSMV synthesis
approaches. You pass your normal synthesis constraints, libraries, RTL, and scripts, and you
specify exploration parameters. It then launches exploration runs in parallel. These
exploration runs take advantage of RC global synthesis to quickly report back accurate
performance, power, and area numbers for each possible scenario, in a tabulated report. It can
even take advantage of physical interconnect modeling in RC for even more accuracy.
When you have chosen a scenario to move forward, RC generates the scripts and CPF to run it
through full production synthesis.
04/25/11 Encounter RTL Compiler
RTL-based Power Versus Timing Design Exploration
Rapidly explore multi-supply multi-
voltage possibilities
4 Report performance, power, area
for each combination
Built natively into synthesis engine
4 Timing view
4 Optimization/library-aware power
view
4 Physical interconnect awareness
Continuous refinement flow
4 Early estimation
4 Quick mapping
4 Flow to production synthesis with
physical
188
Achieve the best timing-power-area balance
RTL
Target libraries
Timing constraints
CPF (library info)
Exploration settings
Switching activity
Synthesis settings
netlist
4 Name the netlist components
4 Generate files to interface to other tools
192
Encounter RTL Compiler, 10.1 193
04/25/11 Encounter RTL Compiler
Editing the Netlist
The following options to the edit_netlist command can modify the gate-level netlist:
bitblast_all_ports: Bitblasts all ports of a design or subdesign
connect: Connects a pin/port/subport to another pin/port/subport.
dedicate_subdesign: Replaces a subdesign of instances with a dedicated copy.
disconnect: Disconnects a pin/port/subport.
group: Builds a level of hierarchy around instances.
new_design: Creates a new design.
new_instance: Creates a new instance.
new_port_bus: Creates a new port_bus on a design.
new_primitive: Creates a new unmapped primitive instance.
new_subport_bus: creates a new subport_bus on a hierarchical instance.
ungroup: Flattens a level of hierarchy.
uniquify: Eliminates sharing of subdesigns between instances.
193
Encounter RTL Compiler, 10.1 194
After you set these attributes, you must write out the verilog netlist to get the modified netlist.
Verilog Writer Attributes
Object Attribute Default
root write_vlog_bit_blast_constants false
root write_vlog_bit_blast_mapped_ports false
root write_vlog_declare_wires true
root write_vlog_empty_module_for_logic_abstract true
root write_vlog_no_negative_index false
instance write_vlog_port_association_style default
root write_vlog_top_module_first false
root write_vlog_unconnected_port_style full
04/25/11 Encounter RTL Compiler
Bit-Blasted Ports
Some back-end tools require that you bit-blast the ports of the design.
194
module addinc(A, B, Carry, Z);
input [7:0] A, B;
...
module addinc(A_7, A_6, A_5, A_4, A_3, A_2, A_1, A_0, B_7,
B_6, B_5, B_4, B_3, B_2, B_1, B_0, Carry, Z_8, Z_7,
Z_6, Z_5, Z_4, Z_3, Z_2, Z_1, Z_0);
input A_7;
input A_6;
input A_5;
input A_4;
...
set_attr write_vlog_bit_blast_mapped_ports true /
set_attr bit_blasted_port_style %s_%d /
module addinc(A[7] , A[6] , A[5] , A[4] , A[3] , A[2] , A[1] ,
A[0] , B[7] , B[6] , B[5] , B[4] , B[3] , B[2] , B[1] ,
B[0] , Carry, Z[8] , Z[7] , Z[6] , Z[5] , Z[4] , Z[3] ,
Z[2] , Z[1] , Z[0] );
input A[7] ;
input A[6] ;
...
set_attr write_vlog_bit_blast_mapped_ports true
set_attr bit_blasted_port_style %s\[%d\]
Encounter RTL Compiler, 10.1 195
04/25/11 Encounter RTL Compiler
Changing the Instance Library Cell
To manually force the instance to have a different library cell, you can use
the libcell attribute. If you want to replace one cell with another, the pin
mappings must be equal.
Example
If you want to use DFFRHQX2 instead of DFFRHQX4 for the reg_5
instance, type the following command:
set_attr libcell [find / -libcell DFFRHQX2] \
/designs/top/instances_hier/I2/instances_seq/reg_5
195
rst
sel
in2
in1
clk
qout
reg_5
rst
sel
in2
in1
clk
qout
reg_5
Encounter RTL Compiler, 10.1 196
04/25/11 Encounter RTL Compiler
Remove Assigns
You can remove the assign statements from your design by setting the
remove_assigns attribute to true.
set_attr remove_assigns true /
4 You can also add certain specific options to the assign removal with
the following command:
set_remove_assign_options [options] design [subd |
design]
4 The attribute must be set before running synthesis on your design so
that incremental optimization can work on the added buffers, or you will
have to run an additional incremental optimization stage.
To remove assigns without performing any optimization on the added
buffers, use:
remove_assigns_without_optimization [options]
196
Encounter RTL Compiler, 10.1 197
RTL Compiler automatically analyzes the elaborated design for combinational feedback loops
during timing analysis; for example, when using the report timing or the synthesize command.
Upon detecting such loops, and before performing timing analysis, RTL Compiler selects a
buffer from the technology library to serve as a loop breaker instance. RTL Compiler then
instantiates this cell along the feedback loop and disables the timing arc inside the cell.
These cells follow the cdn_loop_breaker<number> nomenclature, and therefore, they are
easily identifiable in the netlist using the find command.
For example:
rc:/> find /designs -instance cdn_loop_breaker*
04/25/11 Encounter RTL Compiler
Removing the Loop Breaker Cells
RC inserts the cdn_loop_breaker instances to break combinational
feedback loops. To remove these instances from the netlist, use the
following commands:
report cdn_loop_breaker sdcfile $DESIGN.sdc
remove_cdn_loop_breaker instances [instance_list] des
write_hdl > ${DESIGN}_netlist.v
4 The -sdcfile option creates an SDC file with the appropriate
set_disable_timing settings.
197
module gate(ck_in, strobe, ck_gate);
input ck_in, strobe;
output ck_gate;
wire ck_in, strobe;
wire ck_gate;
wire ck_out_30, n_0, n_1, n_4, n_5;
cdn_loop_breaker cdn_loop_breaker(.endpoint (n_5),
.startpoint (n_4));
module is defined as
module foo();
parameter p = 0;
parameter q = 1;
endmodule
and is instantiated as
foo #(1,2) u0();
then, to specify a naming style, enter the following command:
set_attr hdl_parameter_naming_style _%s_%d /
foo_p_1_q_2
199
Encounter RTL Compiler, 10.1 200
To match the Design Compiler nomenclature, specify the following:
set_attribute hdl_array_naming_style %s_reg\[%d\] /
set_attribute hdl_reg_naming_style %s_reg /
Two-dimensional arrays are then represented in the following format in the output netlist.
<var_name>_reg_<idx1>_<idx2>
Example
cout_reg_1_1
04/25/11 Encounter RTL Compiler
Renaming Flops
You can change the naming style on the flops to match third-party
requirements on the netlist. To customize the naming scheme, use the
attributes in the following example.
Example
set_attr hdl_array_naming_style _%d_ /
set_attr hdl_reg_naming_style %s_reg_%d_ /
where %s represents the signal name, and %d is the bit vector, or bit
index.
200
a_reg f_reg_4__2__0_
b_reg_2_ d_reg_0_ f_reg_4__2__1_
b_reg_3_ d_reg_1_ f_reg_4__3__0_
c_reg_4__2_ e_reg_2__0_ f_reg_4__3__1_
c_reg_4__3_ e_reg_2__1_ f_reg_5__2__0_
c_reg_5__2_ e_reg_3__0_ f_reg_5__2__1_
c_reg_5__3_ e_reg_3__1_ f_reg_5__3__0_
f_reg_5__3__1_
Encounter RTL Compiler, 10.1 201
04/25/11 Encounter RTL Compiler 201
Changing Object Names
The object names need to match the naming conventions of other tools.
The change_names command lets you change the names of selected
objects, such as nets, busses, and instances.
Syntax
change_names [-local] [-net] [-instance] [-design] [-subdesign]
[-port_bus] [-subport_bus] [-force] [-case_insensitive]
[-prefix string] [-suffix string] [-restricted string]
[-replace_char string] [-map string]
Example
change_names -map {{ "n" "N"} {"_" "--"}} -net instance
The action is taken on all the instances and nets
O n will be replaced with N
O _ will be replaced with - -
/designs/add1/nets/n_9 /designs/add1/nets/N--9
/designs/a2/instances_hier/add_8_3/ /designs/a2/instances_hier/add--8--3/
Encounter RTL Compiler, 10.1 202
To use a specific release of RC with First Encounter
Conformal
Conformal
Constraint
Designer software, use the following command:
write_do_ccd {generate | propagate | validate}
4 generate: Generates a dofile for the Generate flow, which generates
additional false paths based on critical path timing reports.
4 propagate: Generates a dofile to create a chip-level SDC file by
propagating block-level constraints to the top-level and by integrating
them with the glue constraints.
4 validate: Generates a dofile for the Validate flow, which validates the
constraints and false path exceptions.
204
Encounter RTL Compiler, 10.1 205
04/25/11 Encounter RTL Compiler
Other RC Interfaces
RTL Compiler interfaces with a lot of other Encounter software to simplify
your design process.
4 Use the following command to interface with the Encounter Conformal
Low-Power software:
write_do_clp
4 Use the following commands to interface with the Encounter Test
software:
write_et_atpg, write_et_bsv, write_et_rrfa, write_et_mbist
4 Use the following command to interface with the Encounter Timing
System software:
write_ets
205
Encounter RTL Compiler, 10.1 206
04/25/11 Encounter RTL Compiler
Lab Exercises
Lab 8-1 Interfacing with Other Tools
OChanging Names of Design Objects
ORemoving Assign Statements from the Netlist
OControlling the Bit-Blasting of Bus Ports
OUngrouping the Hierarchy
OGenerating Interface Files to Other Tools
206
Encounter RTL Compiler, 10.1 207
April 25, 2011
Test Synthesis
Module 9
Combinational
Logic
D
TE
D
TE
Q D
TE
Q
CK
SCAN_EN
INPUTS
SDI SDO
OUTPUTS
Encounter RTL Compiler, 10.1 208
04/25/11 Encounter RTL Compiler
Module Objectives
In this module, you
4 Set up for DFT rule checker
4 Run DFT rule checker and report registers
4 Fix DFT violations
4 Synthesize design and map to scan
4 Set up DFT configuration constraints and preview scan chains
4 Connect scan chains
208
Encounter RTL Compiler, 10.1 209
Any inferred register, or any instantiated edge triggered registers that pass the DFT rule
checks will be mapped to their scan equivalent cell when the scan connection engine runs.
Remapping of instantiated edge-triggered registers that pass the DFT rule checks to their scan
equivalent cells, occurs prior to placement only.
The test process refers to testing the ASIC for manufacturing defects on the automatic test
equipment (ATE). It is the process of analyzing the logic on the chip to detect logic faults. The
test process puts the circuit into one of the three test modes:
Capture mode
This is the part of the test process that analyzes the combinational logic on the chip. The
registers act first as pseudo-primary inputs (using ATPG-generated test data), and then as
pseudo-primary outputs (capturing the output of the combinational logic).
Scan-shift mode
This is the part of the test process in which registers act as shift registers in a scan chain.
Test vector data is shifted into the scan chain registers, and the captured data from
capture mode, are shifted out of the scan registers.
System mode
This is the normal or intended operation of the circuit. Any logic dedicated for DFT
purposes is NOT active in system mode.
04/25/11 Encounter RTL Compiler
Design with Test Circuit
209
clock
data_in
data_out
shift_enable
scan_in
scan_out
Encounter RTL Compiler, 10.1 210
04/25/11 Encounter RTL Compiler 210
What Is Your Test Plan?
RC is extremely flexible with its DFT implementations
You must know what your DFT requirements are before you try to
implement them in RC
RC can easily hookup scan to existing 3rd Party Test DFT logic structures
And it can provide a broad range of DFT analysis & test logic insertion
capabilities
Encounter RTL Compiler, 10.1 211
Encounter
si1
se1
Shift-in
bit
Shift-out bit
so1
seg1
se1
seg2
clk
Encounter RTL Compiler, 10.1 220
ATPG: Automatic Test Patten Generator
04/25/11 Encounter RTL Compiler
Testability Analysis
In Encounter
RTL Compiler (RC), you can run different sets of testability analyses
starting as early as elaborating the design.
4 check_dft_rules: Identifies constructs in the design that prevent the flops from being
included into the scan chains. RC can provide feedback on the source or cause of the
DFT violation back to the HDL whenever possible.
4 check_atpg_rules : Generate scripts to run Encounter Test (ET-ATPG) rule checker
to ensure that the design is ATPG ready.
4 check_design: General design rule checker that identifies problems in the circuit, such
as unconnected nets, multidriven nets that impact the DFT coverage.
4 check_mbist_rules: Checks for MBIST rule violations.
4 analyze_testability
O This command runs ET-ATPG to do a quick estimation of the fault coverage.
O Can be used on an unmapped design in an assume scan mode. Accuracy improves
as design goes through mapping such as redundancy removal, and scan chain
hookup.
220
Encounter RTL Compiler, 10.1 221
If a flip-flop passes the DFT rule checks, automatic test pattern generated (ATPG) data can
safely be shifted in and out of the scan flip-flop during the scan shift cycle of test mode. If a
flip-flop violates the DFT rule checks, it is marked for exclusion from the scan chain. The
fewer the violating flops, the higher the fault coverage.
Syntax
check_dft_rules [design] [-advanced]
[-max_print_violations integer | > file]
[-max_print_registers integer]
[-max_print_fanin integer]
[-dft_configuration_mode dft_config_mode_name]
04/25/11 Encounter RTL Compiler
Checking DFT Rules
To check for any DFT violations, use this command:
check_dft_rules
Report
221
Warning : DFT Clock Rule Violation. [DFT-301]
: # 0: internal or gated clock signal in module top, net: Iclk, pin g1/z
Effective fanin cone: clk, en
Warning : DFT Async Rule Violation. [DFT-302]
: # 1: async signal driven by a sequential element in module top, net:
Iset, pin Iset_reg/q
Effective fanin cone: Iset_reg/q
Violation # 0 affects 4 registers
Violation # 1 affects 4 registers
Note - a register may be violating multiple DFT rules
Total number of Test Clock Domains: 1
DFT Test Clock Domain: clk
Test Clock clk (Positive edge) has 1 registers
Test Clock clk (Negative edge) has 0 registers
Number of user specified non-Scan registers: 0
Number of registers that fail DFT rules: 4
Number of registers that pass DFT rules: 1
Percentage of total registers that are scanable: 20%
Encounter RTL Compiler, 10.1 222
04/25/11 Encounter RTL Compiler
DFT Rule Checks
The following are the some of the supported rule checks:
4 Uncontrollable clock nets
O Internally generated clocks (such as a clock divider)
O Gated clocks
O Tied constant clock nets
O Undriven clock nets
4 Uncontrollable asynchronous set/reset nets
O Internally generated asynchronous set/reset signals
O Gated asynchronous set/reset nets
O Tied active asynchronous set/reset pins
O Undriven asynchronous set/reset pins
4 Conflicting clock and asynchronous set/reset nets
222
Encounter RTL Compiler, 10.1 223
04/25/11 Encounter RTL Compiler
Reporting Scan Flops
To report the scanable status of the flip-flops after running the DFT rule
checker, use:
report dft_registers
This example shows the report for a design with an internally driven clock
signal and an asynchronous set signal.
223
Reporting registers that pass DFT rules
Iset_reg PASS; Test clock: clk/rise
Reporting registers that fail DFT rules
out_reg_0 FAIL; violations: clock #(0 ) async set #(1 )
out_reg_1 FAIL; violations: clock #(0 ) async set #(1 )
out_reg_2 FAIL; violations: clock #(0 ) async set #(1 )
out_reg_3 FAIL; violations: clock #(0 ) async set #(1 )
Reporting registers that are preserved or marked dont-scan
Reporting registers that are marked Abstract Segment Dont Scan
Reporting registers that are part of shift register segments
Reporting registers that are identified as lockup elements
Summary:
Total registers that pass DFT rules: 1
Total registers that fail DFT rules: 4
i1
i2
o1
o2
ATPG untestable
module
D
TI
SE
Q
D
TI
SE
Q
0
1
0
1
testMode
Shift_out
Shadow Logic
Insertion in
Shared Mode
Encounter RTL Compiler, 10.1 227
04/25/11 Encounter RTL Compiler
Preserving Nonscan Flops During Synthesis
4 Use the following attribute to either force, or preserve, or map certain
flops based on the testability DRC checks:
set_attr dft_scan_map_mode {tdrc_pass|force_all|preserve}
/designs/design
4 To preserve a complete subdesign, use:
set_attr dft_scan_map_mode preserve [find / -
subdesign subname]
4 Use the following attribute to prevent conversion of a flop to a scan-
flop.
set_attr dft_dont_scan true flip-flop_object
4 Run the DFT rule checker to update the DFT status of all flip-flops in
the lower-level blocks attributed with preserve.
check_dft_rules
227
Encounter RTL Compiler, 10.1 228
To leave the scan data pins floating or to connect them to ground, set the following attribute:
set_attr dft_connect_scan_data_pins_during_mapping {floating |ground |
loopback} /designs/top_design
To leave the shift-enable pins floating, set the following attribute:
set_attr dft_connect_shift_enable_during_mapping {floating | tieoff}
/designs/top_design
Specify the scan flip-flop output pin to use for the scan data path connection:
set_attr dft_scan_output_preference {auto |non_inverted|inverted}
/designs/top_design
04/25/11 Encounter RTL Compiler
Synthesize and Map to Scan
To synthesize the RTL design and map the flip-flops to their scan-
equivalent flip-flops, type:
synthesize to_mapped \
[-auto_identify_shift_register \
[-shift_register_min_length integer] \
[-shift_register_max_length integer]]
4 All registers which pass the DFT rule checks that are not attributed
with a dft_dont_scan or a preserve (if non-scan flops) are mapped to
scan flops during synthesis.
Scan mapping status report
228
==========================
Scan mapping: converting flip-flops that pass TDRC.
Category Number Percentage
-----------------------------------------------------------
Scan flip-flops mapped for DFT 11 100.00%
Flip-flops not mapped for DFT
non-DFT scan flip-flops 0 0.00%
flip-flops not scan replaceable 0 0.00%
flip-flops not targeted for DFT 0 0.00%
-----------------------------------------------------------
Totals 11 100.00%
Encounter RTL Compiler, 10.1 229
Following initial synthesis, you can still fix the DFT rule violations in the mapped netlist by
running the fix_dft_violations command.
All nonscan registers that pass the DFT rule checks and are not attributed with a
dft_dont_scan or a preserve (if nonscan flops) will be remapped to scan flops.
04/25/11 Encounter RTL Compiler
Controlling Mapping to Scan in a Mapped Netlist
If you start with a structural netlist that was not mapped for scan, you can specify a
one-to-one correspondence between the non-scan flop library cells and the scan
flop library cells.
To run scan mapping on a mapped netlist, limit the changes made to the structural
netlist, and map the nonscan flops to scan flops, use:
replace_scan [-to_non_scan] [-dont_check_dft_rules]
[design]
4 -to_non_scan: Replaces all scan flops that are part of shift register segments
to non scan flops except for the first element in the segments.
To define a one-to-one correspondence between the non scan-flops and the scan
flops use the set_scan_equivalent command.
set_scan_equivalent -non_scan_cell libcell -scan_cell libcell
[-tieoff_pins string] [-pin_map list_of_pin_groups]
229
Encounter RTL Compiler, 10.1 230
To specify the minimum number of scan chains to be created, set the following design
attribute:
set_attribute dft_min_number_of_scan_chains integer /designs/top
To specify the maximum length of any scan chain, set the following design attribute:
set_attribute dft_max_length_of_scan_chains integer /designs/top
04/25/11 Encounter RTL Compiler
Controlling Scan Configuration
4 By default, the scan configuration engine inserts one scan chain per
active edge (rising and falling) of each test clock domain.
4 By default, there is no limit for the scan chain length. You control the
scan configuration by specifying the maximum length of a scan chain
in the design.
230
Scan1
clk
Scan2
Length of scan chains
Number
of scan
chains
Encounter RTL Compiler, 10.1 231
To allow the mixing of rising and falling edge-triggered scan flip-flops from the same
test clock domain along the same scan chain, use this command:
set_attribute dft_mix_clock_edges_in_scan_chain
{true | false} top_design
To specify compatible clocks, whose related scan flip-flops can be merged into a single
scan chain with lockup elements, use this command:
set_compatible_test_clocks {-all | list_of_test_clocks}
[-design design]
To specify the default type of lockup element to include in all scan chains in the design,
set the following design attribute:
set_attr dft_lockup_element_type
level_sensitive|edge_sensitive top_design
The default value is level_sensitive.
04/25/11 Encounter RTL Compiler
Controlling Scan Configuration(continued)
If multiple test clocks are defined in the same test clock domain, RC places
data lockup elements between the scan chain segments triggered by the
same active edge (rising or falling) of the different test clocks on the same
scan chain.
231
Scan1
clk1a
clk1b
Lockup
latch
Lockup
latch
Encounter RTL Compiler, 10.1 232
04/25/11 Encounter RTL Compiler
Example of a Minimum Number of Scan Chains
RTL
O 300 rising-edge scan flip-flops in test clock domain: clk1
O 100 falling-edge scan flip-flops in test clock domain: clk2
Constraint
set_attr dft_min_number_of_scan_chains 5 /designs/top
What Is the Configuration Output?
The scan configuration engine creates 5 scan chains whose lengths are
balanced across the test clock domains:
O 4 scan chains of 75 scan flops each in test clock domain: clk1
O 1 scan chains of 100 scan flops each in test clock domain: clk2
232
Encounter RTL Compiler, 10.1 233
If the dft_mix_clock_edges_in_scan_chains attribute is set to true, then the configuration
output is:
1 scan chain of 24 flops in test clock domainclk1, but with a lockup latch.
1 scan chain of 32 flops in test clock domain clk2
04/25/11 Encounter RTL Compiler
Example of a Maximum Length of Scan Chains
RTL
O Test clock domain clk1 rising edge clk1 has16 scan flip-flops, falling edge
clk1 has 8 scan flip-flops.
O Test clock domain clk2 rising edge clk2 has 32 scan flip-flops.
Constraint
set_attr dft_max_length_of_scan_chains 32 /designs/top
set_attr dft_mix_clock_edges_in_scan_chain false /designs/top
Configuration Output
Because the dft_mix_clock_edges_in_scan_chains attribute is set to false, the scan
configuration engine creates at least one scan chain for each active (rising and
falling) edge of test clock, clk1.
O 1 chain with 16 scan flip-flops of rising edge of test clock clk1
O 1 chain with 8 scan flip-flops of falling edge of test clock clk1
O 1 chain with 32 scan flip-flops of rising edge of test clock clk2
233
Encounter RTL Compiler, 10.1 234
The -pack option packs the registers to meet the configuration for maximum length of scan
chain, instead of the configuration for minimum number of scan chains.
The former approach serves better during bottom-up methodology to create proper scan
segments.
The latter approach better serves top-down methodology, or when you have precompiled
blocks and you are configuring top-level scan chains.
Run Incremental Optimization
Connecting the scans can impact the timing. To fix any timing issues, run incremental
optimization by entering this command:
synthesize incremental
The connect_scan_chains command has a -incremental option.
04/25/11 Encounter RTL Compiler
Connecting Scan Chains
The connect_scan_chains command configures and connects scan flip-
flops, which pass the DFT rule checks into scan chains. The command
works at the current level of the hierarchy and all lower hierarchies
instantiated in this module. The design must be mapped to the target library
before connecting scan chains in a design.
4 Preview the scan connection with this command:
connect_scan_chains [auto_create_chains] [-pack]
preview [design]
4 Connect the scan chains with this command:
connect_scan_chains [auto_create_chains] [-pack] [design]
234
Encounter RTL Compiler, 10.1 235
04/25/11 Encounter RTL Compiler
Reporting DFT
4 To analyze the scan chains, run the following command:
report dft_chains
Example Report
rc:/> report dft_chains
Reporting 5 scan chains (clocked_lssd_scan)
Chain 1: AutoChain_1
scan_in: DFT_sdi_1
scan_out: DFT_sdo_1
length: 80
bit 1 out1_reg_0
bit 2 out1_reg_1
...
bit 80 out1_reg_79
------------------------
Chain 2: AutoChain_2
...
4 To report the DFT setup, run the following command:
report dft_setup > [filename]
235
Encounter RTL Compiler, 10.1 236
04/25/11 Encounter RTL Compiler
Generating Output Scan Files
4 To create a scanDEF interface file for scan chain reordering in the
Encounter
system, use:
write_scandef > top_scan.def
4 To create an ATPG interface file, use:
write_et_atpg [-cadence | -stil | -mentor] > top_atpg.m
4 To use your design as a subblock in another design, generate a scan
chain abstraction model of your design by entering the following
command:
write_dft_abstract_model > DFTModelName
The abstraction models will be used by scan configuration when
creating the top-level chains without requiring the netlist views of the
lower level blocks.
236
Encounter RTL Compiler, 10.1 237
04/25/11 Encounter RTL Compiler
write_template split dft outfile run.tcl
237
##########################################################################################
# DFT SETUP (DFT design attributes & scan_chain, test clock definition ...) #
##########################################################################################
##################################################################################################
## DFT Setup
##################################################################################################
set_attr dft_scan_stylemuxed_scan/
## Uncomment for clocked_LSSD
#set_attribute dft_scan_styleclocked_lssd_scan/
#define_dftscan_clock_a-name <scanClockAObject> -period <delay in pico sec, default 50000> -rise <integer> -fall <integer> <portOrpin>
#define_dftscan_clock_b-name <scanClockAObject> -period <delay in pico sec, default 50000> -rise <integer> -fall <integer> <portOrpin>
set_attribute dft_prefixDFT_ /
# For VDIO customers, it is recommended to set the value of the next two attributes to false.
set_attribute dft_identify_top_level_test_clockstrue /
set_attribute dft_identify_test_signalstrue /
set_attribute dft_identify_internal_test_clocksfalse /
set_attribute use_scan_seqs_for_non_dftfalse /
set_attribute dft_scan_map_modetdrc_pass"/designs/$DESIGN"
set_attribute dft_connect_shift_enable_during_mappingtie_off "/designs/$DESIGN"
set_attribute dft_connect_scan_data_pins_during_mappingloopback "/designs/$DESIGN"
set_attribute dft_scan_output_preferenceauto "/designs/$DESIGN"
set_attribute dft_lockup_element_typepreferred_level_sensitive"/designs/$DESIGN"
#set_attribute dft_mix_clock_edges_in_scan_chainstrue "/designs/$DESIGN"
#set_attribute dft_dont_scantrue <instance or subdesign>
#set_attribute dft_controllable"<from pin> <inverting|non_inverting>" <to pin>
define_dfttest_clock-name <testClockObject> -domain <testClockDomain> -period <delay in pico sec, default 50000> -rise <int> -fall <int>
define_dftshift_enable-name <shiftEnableObject> -active <high|low> <portOrpin> [-create_port]
define_dfttest_mode-name <testModeObject> -active <high|low> <portOrpin> [-create_port] [-shared_in]
Whats new?
dft_run.tcl
Encounter RTL Compiler, 10.1 238
04/25/11 Encounter RTL Compiler
dft_run.tcl (continued)
238
## If you intend to insert compression logic, define your compression test signals or clocks here:
## define_dft test_mode... [-shared_in]
## define_dft test_clock...
#########################################################################
## Segments Constraints (support fixed, floating, preserved and abstract)
## only showing preserved, and abstract segments as these are most often used
#############################################################################
##define_dft preserved_segment-name <segObject> -sdi <pin|port|subport> -sdo <pin|port|subport> -analyze
## If the block is complete from a DFT perspective, uncomment to prevent any non -scan flops from being scan-replaced
#set_attr dft_dont_scantrue [filter dft_mappedfalse [find /designs/* -instance <subDesignInstance>/instances_seq/*]]
##define_dft abstract_segment-name <segObject> <-module|-instance|-libcell> -sdi <pin> -sdo <pin> -clock_port<pin> [-rise|-fall] -shift_enable_port<pin> -
active <high|low> -length <integer>
## Uncomment if abstract segments are modeled in CTL format
##read_dft_abstract_model-ctl <file>
define_dft scan_chain-name <ChainName> -sdi <topLeveLSDIPort> -sdo <topLevelSDOPort> [-hookup_pin_sdi<coreSideSDIDrivingPin>] [-
hookup_pin_sdo<coreSideSDOLoadPin>] [-shift_enable<ShiftEnableObject>] [-shared_output| -non_shared_output] [-terminal_lockup<level | edge>]
## Run the DFT rule checks
check_dft_rules> $_REPORTS_PATH/${DESIGN}-tdrcs
report dft_registers> $_REPORTS_PATH/${DESIGN}-DFTregs
report dft_setup> $_REPORTS_PATH/${DESIGN}-DFTsetup_tdrc
## Fix the DFT Violations
## Uncomment to fix dft violations
## set numDFTviolations[check_dft_rules]
## if {$numDFTviolations> "0"} {
## report dft_violations> $_REPORTS_PATH/${DESIGN} -DFTviols
## fix_dft_violations-async_set -async_reset [-clock] -test_control<TestModeObject>
## check_dft_rules
## }
Encounter RTL Compiler, 10.1 239
04/25/11 Encounter RTL Compiler
dft_run.tcl (continued)
239
## Run the Advanced DFT rule checks to identify:
## ... x-source generators, internal tristatenets, and clock and data race violations
## Note: tristatenets are reported for busses in which the enables are driven by
## tristatedevices. Use 'check_design' to report other types of multidrivennets.
check_design-multidriven
check_dft_rules-advanced > $_REPORTS_PATH/${DESIGN} -Advancedtdrcs
report dft_violations[-tristate] [-xsource] [-xsource_by_instance] > $_REPORTS_PATH/${DESIGN}-AdvancedDFTViols
## Fix the AvancedDFT Violations
## ... x-source violations are fixed by inserting registered shadow logic
## ... tristatenet violations are fixed by selectively enabling and disabilingthe tristateenable signals
## in shift-mode.
## ... clock and data race violations are not auto -fixed by the tool.
## Note: The fixing of tristatenet violations using the ' fix_dft_violations-tristate_net' command
## should be deferred until a full -chip representation of the design is available.
## Uncomment to fix x-source violations (or alternatively, insert the shadow logic using the
## 'insert_dft shadow_logic' command).
#fix_dft_violations-xsource-test_control <TestModeObject> -test_clock_pin<ClockPinOrPort> [-exclude_xsource<instance>]
#check_dft_rules-advanced
## Update DFT status
## report dft_registers> $_REPORTS_PATH/${DESIGN}-DFTregs_tdrc
## report dft_setup> $_REPORTS_PATH/${DESIGN}-DFTsetup_tdrc
Encounter RTL Compiler, 10.1 240
04/25/11 Encounter RTL Compiler
run.tcl for write_template split dft
240
#### Including DFT setup. (DFT design attributes & scan_chain, test clock definition etc..)
include dft_run.tcl
######################################################################################################
## Optional DFT commands (section 1)
######################################################################################################
#############
## Identify Functional Shift Registers
#############
#identify_shift_register_scan_segments
#############
## Add testability logic as required
#############
#insert_dft shadow_logic-around <instance> -mode <no_share|share|bypass> -test_control <TestModeObject>
#insert_dft test_point -location <port|pin> -test_control <test_signal> -type <string>
#######################
## Add Boundary Scan and MBIST logic
########################
## Uncomment to define the existing 3rd party TAP controller to be used as the master controller for
## DFT logic such as boundary-scan, compression, mbist and ptam.
#define_dftjtag_macro-name <objectName> ....
## Define JTAG Instructions for the existing Macro or when building the JTAG_Macrowith user-defined instructions.
## ... For current release, name the mandatory JTAG instructions as: EXTEST, SAMPLE, PRELOAD, BYPASS
##define_dftjtag_instruction_register-name <string> -length <integer> -capture <string>
##define_dftjtag_instruction-name <string> -opcode <string> ;# [-register <string> -length <integer>] [-private]
## ... Uncomment if building a JTAG_Macrowith MBIST instructions
## ... For current release, name the mandatory instructions as: RUN_MBIST, DIAGNOSE_MBIST, CONTINUE_MBIST
#define_dftjtag_instruction-name <string> -opcode <string> -register <string> -length <integer>
## Uncomment to define the MBIST clock if inserting MBIST logic
#define_dftmbist_clock-name <objectNameOfMBISTClock> ...
#insert_dft boundary_scan-tck <tckpin> -tdi <tdipin> -tms <tmspin> -trst <trstpin> -tdo <tdopin> -exclude_ports<list of ports excluded from
boundary register> -preview
#insert_dft mbist -config_file<filename> -test_control <testModeObject> -shift_enable<shiftEnableObject> -connect_to_jtag-directory
<MBISTworkDir> ..
## Uncomment to run the MBIST rule checks
#check_dft_rules-mbist -interface_file_dirs<InterfaceDirsForMBISTLogic>
##Write out BSDL file
#write_bsdl -bsdlout <BSDLfileName> -directory <work directory>
Encounter RTL Compiler, 10.1 241
04/25/11 Encounter RTL Compiler
run.tcl (continued)
241
######################################################################################################
## Optional additional DFT commands. (section 2)
######################################################################################################
## Re-run DFT rule checks
## check_dft_rules[-advanced]
## Build the full scan chanins
## connect_scan_chains[-preview] [-auto_create_chains]
## report dft_chains> $_REPORTS_PATH/${DESIGN}-DFTchains
## Inserting Compression logic
## compress_scan_chains-ratio <integer> -mask <string> [-auto_create] [-preview]
##report dft_chains> $_REPORTS_PATH/${DESIGN}-DFTchains_compression
#############################################
## DFT Reports
#############################################
report dft_setup> $_REPORTS_PATH/${DESIGN}-DFTsetup_final
write_scandef > ${DESIGN}-scanDEF
write_atpg[-stil|mentor|cadence] > ${DESIGN}-ATPG
write_dft_abstract_model> ${DESIGN}-scanAbstract
write_hdl -abstract > ${DESIGN}-logicAbstract
write_script -analyze_all_scan_chains> ${DESIGN}-writeScript-analyzeAllScanChains
## check_atpg_rules-library <Verilog simulation library files> -compression -directory <Encounter Test workdir directory>
## write_et_bsv -library <Verilog structural library files> -directory $ET_WORKDIR
## write_et_mbist-library <Verilog structural library files> -directory $ET_WORKDIR -bsv -mbist_interface_file_dir<string> -
mbist_interface_file_list<string>
## write_et_atpg-library <Verilog structural library files> -compression -directory $ET_WORKDIR
242
RTL Compiler is an integral component of our Encounter Platform Solution.
Here we see an overview of the Advanced DFT features now available natively in RTL
Compiler:
The advantages of combining leading RTL synthesis technology with the industries most
advanced DFT capabilities provide the highest quality netllist, testability, and predictability.
The details are discussed in the following foils.
04/25/11 Encounter RTL Compiler
Advanced DFT Features
242
Logic Synthesis
ScanDef
ATPG
Interface
Netlist
RC (Synthesis)
Load, Libraries, Design and Constraints
DFT Rule Checks and Auto-repair of Violations
Insert PTAM (Power-aware Test)
Insert Compression Architecture
Insert IEEE 1500, Shadow Logic, Test Points
Physical/Power-aware Scan Chain Synthesis
Testability Analysis with ATPG Links
Export ATPG-ready Netlist & Test Data
Insert Boundary Scan and MBIST
RTL /
netlist
Constraints
Libraries
Encounter RTL Compiler, 10.1 243
The power test access mechanism (PTAM) logic stabilizes the power test mode for test.
Insertion of overriding control logic into the power manager and enables test application
control over selected power management enable pins described in the common power format
(CPF) file.
As the size of integrated circuits grow, traditional full scan ATPG vectors take up a lot of
automatic test equipment (ATE) memory and test time to apply the vectors to the device under
test (DUT). In addition, newer chips often have more pins and functionality that cannot be
handled by older ATE equipment that have both a limited number of pins and limited buffer
memory.
To reduce the ATE runtime, you can increase the number of scan chains in the design.
However, without any other changes to the design, this results in a need for more test
pins and the ATE might not have enough test pins available.
To reduce the test data volume, you can reduce the number of patterns but that would
negatively affect the test coverage.
By using test compression, you can reduce the ATE test times and test data volume
without compromising test coverage of the design. Inserting compression logic involves
adding a decompressor and compressor.
For test input data decompression, the tool can insert broadcast-scan and an optional
XOR-based test input spreader.
For the test output data compression, the tool can insert either an XOR-based compressor
or a MISR-based compressor.
04/25/11 Encounter RTL Compiler
Advanced Design For Test Synthesis
243
DFT Flow
Read libraries and HDL
Read and check CPF
Check and fix DFT rules
No
Yes
Architecture
OK?
Set timing and design constraints,
apply optimization directives
Preview boundary scan
architecture
IOSpeclist file
Pinmap file
Edit IO SpecList output file and
DFT constraints
Insert boundary scan
Insert PTAM
Continue further
optimization
Synthesize to generic logic
Check and Fix DFT rules
often to update DFT status of
newly added logic.
IOSpeclist file
Synthesize
Insert MBIST
Insert Compression Logic
244
04/25/11 Encounter RTL Compiler
Full-Chip DFT Integration
Concurrent one-pass synthesis
Structural verification (2-Layer)
4 At both RTL and Gate Level
4 DFT rule check and auto-repair
Physically-aware DFT
4 Scan inserted during mapping
4 Placement-aware scan order
4 DFT-aware clock gating and insertion
4 Compression architecture inserted
Power-aware DFT
4 MV & MTCMOS support
4 Test for level shifters & isolation logic
4 Power Test Access Module (PTAM)
4 Scan insertion, clock-gating
244
Formal Analysis
Simulation
SDC Constraint
Generation
DFT Synthesis
SVP
Post P&R ATPG
Cluster / Block
RTL
RTL
RTL
STA for
Handoff
Post P&R STA
Logical Synthesis Synthesis with DFT
RTL Compiler
Synthesis with DFT
First Encounter
Floorplan & Placement
245
04/25/11 Encounter RTL Compiler
Full-Chip DFT Integration (continued)
Link to Encounter True Time (ATPG)
Flexible DFT compression insertion
Robust channel masking capability in XOR
and MISR compression
Enhanced test coverage and analysis
4 Efficient test point insertion (DFA)
4 Shadow logic insertion
4 Testability analysis
ATPG-ready netlist and scripts
4 Build netlist model and fault model
4 Build test mode
4 Create test patterns
4 Generate ATPG test bench
4 Validate test patterns using
Simulation
245
STA for
Handoff
Formal Analysis
Simulation
SDC Constraint
Generation
DFT Synthesis
SVP
Post P&R ATPG
Cluster / Block
RTL
RTL
RTL
Post P&R STA
Logical Synthesis Synthesis with DFT
RTL Compiler
Synthesis with DFT
First Encounter
Floorplan & Placement
Encounter
True Time
ATPG
246
We offer an Ultra-fast DFT rule checker that identifies all critical DFT violations. GUI
provides a mechanism to link back the source of DFT violations to the original RTL and to the
netlist schematic for easy debug. It also allows user to automatically fix the identified DFT
violations.
04/25/11 Encounter RTL Compiler
RC DFT Rule Check, Debug, and Auto-Fix
GUI Interface Within RC Provides Ease of Use
DFT Rule Checker
4 Ultra fast checker (100K flops in a
few seconds)
4 Handles test mode setup signals
4 Analyzes through clock-gating logic
and latches
4 Identifies test clock domains
4 Links to ATPG rule checker
4 Feedback on DFT violations at
RTL/gates/schematic
GUI Interface for DFT Debug
Auto-Fix DFT Violations
246
Schematic view
of logic
causing the
violation
Link back to RTL
code that causes
violation
Table showing
all DFT
Violations
247
Embedded modules can make it harder for ATPG to generate tests for the logic surrounding
the modules called Shadow Logic. RC can insert different test collars (bypass logic, or
control and observation test points) around such blocks to improve testability of the Shadow
Logic.
04/25/11 Encounter RTL Compiler
Shadow Logic and Test Point Insertion
247
Embedded
Module
i1
i2
o1
o2
o3
Unobservable Uncontrollable
Challenge:
Embedded Modules
block testability of
Shadow Logic
(surrounding logic)
Solutions:
Insert control and
observation test points
Scannable elements or
Bypass logic
Embedded
Module
i1
i2
I1
o1
o2
o3
Added test-collar for Shadow Logic
248
Here we show different examples of test points that RC can insert. Users can choose from 15
different pre-defined test point structures, or define their own custom test point structure.
04/25/11 Encounter RTL Compiler
Boosting Fault Coverage and Reducing Test
Patterns (Deterministic Fault Analysis)
248
x
y
x
y
Circuit before test point insertion
Control test point
Scannable observation test point
Scannable observation and
control test-point
x
y
Source
TC
x y
TC
15 Different test point types supported
Also supports any arbitrary user-defined test point structure
249
To improve test-mode access to embedded cores, RC can insert IEEE-1500 style core-wrapper
cells around such blocks. It supports both shared and dedicated wrapper cells. This feature
can also be used to partition a big design for DFT purposes. This allows generation of smaller
partitions that can have independent scan chains and ATPG flow.
04/25/11 Encounter RTL Compiler
Block-level Embedded Core Testing
Improve testability with leading IEEE 1500 solution
Multiple implementation modes
4 White box totally visible
4 Cloaked hidden from user, not
tool
4 Black box wrapper totally hidden
Insertion of dedicated and shared
wrappers
Improves full-chip test coverage
Allows partitioning for DFT & ATPG
249
White Box
IEEE 1500
Black
Box
Cloaked
A
C
E
D
B
F
IEEE 1500
IEEE 1500
250
This slide summarizes the capabilities for IEEE 1149.x boundary scan.
Scan insertion capability is based on Encounter RTL compiler technology. Encounter Test
Architect takes care of any required hierarchical connections to the TAP controller at the top
level.
Note that a test product (TDE001 or ET001) is required when the function is invoked from the
RTL compiler environment
04/25/11 Encounter RTL Compiler
Top-level Boundary Scan Integration
Automated IEEE1149.x insertion:
4 TAP state machine and ports
4 Bypass, IDCODE, USERCODE
registers and Custom
Instructions
4 Integration with MBIST and
PTAM
4 Supports Embedded I/O pads
4 Generates RTL or mapped
netlist for IEEE 1149.1 TAP
controller
Full verification and BSDL
generation
250
Top Level Design
I
O
R
I
N
G
Design Block
Design Block
I
O
R
I
N
G
BC
BC
BC
BC
BC
BC
BC
JTAG
MACRO
BC
251
Physically-aware DFT allows RC to insert much better scan chains that are localized to an
area over the chip thus, reducing the scan wire and associated congestion.
RC also generates scandef for standalone physical reordering of scan chains (so tools are very
flexible and can work within customized flows with impressive results)
04/25/11 Encounter RTL Compiler
Physically-aware Scan Chain Optimization
251
Solution:
Scan chain build with
physical information from
First Encounter or SoC
Encounter
Proven to reduce scan wire
congestion by 40%
Improved balancing
Scandef available
Challenges:
Lack of physical
information
Scan chain congestion
Impact on timing/SI
Scan Chain A Scan Chain B
read_def design.def
connect_scan_chains -physical
252
The before Power Ware Test situation is a s follows:
Current Test Solutions do not support low power design:
Power Features overridden
Testing with all Power Modes on
Power structures not specifically targeted
Power shut off
Isolation
State retention (SR)
Ad Hoc Test Strategy
Low productivity:
No ATPG based flow for testing low power designs
Relies on functional vectors to test power functions
Low Test Coverage
Power Features overridden
Testing with all Power Modes on
No test for Isolation circuits
Power structures not specifically targeted
Level shifters (LS)
State retention (SR)
04/25/11 Encounter RTL Compiler
Power Aware DFT for Testing Power Modes
252
Ad Hoc LP Test Challenges:
Low productivity
4No ATPG based flow for LP designs
4Relies on functional vectors
Low Test Coverage
4Power Features overridden
4Power structures not targeted (LS,SR)
Solution:
Power-Aware DFT understands
4Power modes, domains, structures
4Power domain control under test with
insertion of Power Test Access Mechanism
(PTAM)
Power-Aware ATPG
4Test power modes, domains (pwr dwn)
4Verify isolation target test structures
4Minimize power during test
in1
in2
in4
in5
in6
inst_D
in3
out1
out2
A
B
C
D
P_MGR
p_clk
PD1
PD2
PD3
PD4
LS
LS
SR
SR
SR
SR
253
04/25/11 Encounter RTL Compiler
Flexible RTL Compiler Compression Strategies
Advanced Masking Algorithms for High Pattern Efficiency
253
XOR Architecture
MISR Architecture
XOR
compaction
optional X-Masking
XOR / Fanout
..
..
..
Scan In
Chip
Scan Out
No compression
..
..
..
Scan In
Chip
Scan Out
Scan In
Chip
MISR
compactionX-
Masking
XOR / Fanout
..
..
..
Scan Out
Data Vol Reduction vs no comp Typically up to 150X Typically up to 50X
Test Time Reduction vs. no comp Typically up to 100X Typically up to 50X
Diagnostics methodology Two pass (off-line) for full data One pass (on-line)
Diagnostics accuracy Best with full data Effective W/O full data
254
RC includes a memory BIST compiler with robust fault coverage, easy BIST engine sharing,
automatic insertion into netlists, and failure analysis support. The major features of this
capability are:
Support for industry standard embedded memory architectures from leading suppliers,
including full validation with ARM (Artisan) memory compilers
Support includes one-port and two-port SRAMs, register files and ROM
Control via IEEE 1149.1 TAP interface to enable a common test suite and access method from
design verification through product manufacturing test through field testing.
Memory description in industry standard .lib format file
Support BIST macro sharing via binding of target memories to BIST engines.
Algorithm design complements available detailed physical neighbor knowledge and cell
structure.
BIST engine generation supports test set reductions when such knowledge is available to the
test application, reducing overall test time.
Design verification testbenches for use at the chip level; formal verification of pre-DFT
versus post-DFT insertion netlists; logical failure analysis bit mapping.
Failure analysis is supported using error information retrieved from the Diagnostic Test Data
Register within the BIST engines.
Memory redundancy analysis capabilities support row and/or column reconfigurable memory
devices.
04/25/11 Encounter RTL Compiler
MBIST Insertion and Execution
Flexible memory test solution
254
Solution:
Robust fault coverage
Easy BIST engine sharing
Automatic insertion & stitching
Failure analysis & redundancy support
Leading embedded memory support
Integrated with 1149.1 TAP
Support for
41-port (1RW)
42-port (1R/1W and 2RW)
4ROM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
March test
Checkerboard
Word line stripe
Galloping ones
Pseudo-random
address
Faults
Algorithm
- - - - -
Port interaction
Challenge:
Sharing capabilities from 3
rd
Party
Lack of comprehensive fault testing
Supported algorithms and fault models
Encounter RTL Compiler, 10.1 255
04/25/11 Encounter RTL Compiler
define_dft subcommands in RC
define_dft <subcommand>:
abstract_segment - defines an abstract scan segment
boundary_scan_segment - defines a boundary-scan segment
dft_configuration_mode - define a mode for DFT configuration purposes
domain_macro_parameters - defines the parameters of an opcg domain macro
fixed_segment - defines a fixed-ordered scan segment
floating_segment - defines a reorderablescan segment
jtag_instruction - defines a jtag instruction
jtag_instruction_register - defines a jtag instruction register
jtag_macro - defines a jtag macro
mbist_clock - defines a mbist clock
opcg_domain - defines an opcg domain
opcg_mode - defines an opcg mode for Encounter Test ATPG
opcg_trigger - defines an opcg trigger source
osc_source - defines an opcg oscillator source
preserved_segment - defines a pre-connected scan segment
scan_chain - defines a scan chain
scan_clock_a - defines scan_clock_afor LSSD scan style
scan_clock_b - defines scan_clock_bfor LSSD scan style
shift_enable - defines a shift enable signal
shift_register_segment - defines a functional shift-register as a scan segment
test_clock - defines a test clock
test_mode - defines a test mode signal
255
Encounter RTL Compiler, 10.1 256
04/25/11 Encounter RTL Compiler
DFT Feature/Command Listing
Feature
RC Command ET License required
Inserting Boundary Scan
insert_dft boundary_scan ET Architect Basic
Inserting MBIST
insert_dft mbist ET Architect Advanced
Inserting PTAM
insert_dft ptam ET Architect Advanced
Inserting Shadow Logic
insert_dft [shadow_logic |
analyzed_test_points -shadow_logic]
None
Inserting 1500 cells
insert_dft wrapper_cell None
Inserting FULLSCAN chains
connect_scan_chains None
Inserting COMPRESSION
compress_scan_chains ET Architect Advanced
Inserting OPCG insert_dft opcg ET Architect Advanced
Inserting Test Points insert_dft [test_point | user_test_point |
analyzed_test_points]
None
ET Architect Basic
Inserting RRFA Test Points insert_dft rrfa_test_points None
Inserting Deterministic Test Points insert_dft dfa_test_points None
256
Encounter RTL Compiler, 10.1 257
04/25/11 Encounter RTL Compiler
DFT Feature/Command Listing(continued)
Feature
RC Command ET License required
Checking DFT rules
check_dft_rules None
Checking DFT rules advanced
check_dft_rules -advanced ET Architect Advanced
Checking ATPG rules
check_atpg_rules None
Fixing DFT violations
fix_dft_violations None
Analyzing Testability
analyze_testability True-Time Basic
Analyzing Scan Compressibility
analyze_scan_compressibility True-Time Advanced
Identify Fixed-Value Registers
identify_test_mode_registers None
Scan Power Estimation
report scan_power None
Interface files to ET write_et_atpg, write_et_bsv,
write_et_dfa, write_et_mbist,
write_et_rrfa
ET True-Time Basic
Interface files to Encounter write_scandef None
257
Encounter RTL Compiler, 10.1 258
04/25/11 Encounter RTL Compiler
Lab Exercises
Lab 9-1 Running Scan Synthesis
OSetting up for DFT rule checker
ORunning DFT rule checks
ORunning Scan Synthesis
OConnecting Scan Chains
258
Course Title 259
04/25/11 Encounter RTL Compiler 259
Completing the Post Class Assessment
1. In a web browser enter: http://exam.cadence.com
2. Login to the exam server:
a) Name: your complete email address (example: [email protected])
b) Group: your companys email suffix (example: cadence.com)
3. Select the assessment with the title of:
ES <your course title> POST
4. Complete the assessment.
5. Click Submit at the bottom of the exam. Note: You will be given a score
and the correct answers. We will discuss these following the exam.
260 Course Title
04/25/11 Encounter RTL Compiler
How to Obtain a Certificate of Completion
Instructor-Led or Virtual Course
1. Log in to http://learning.cadence.com, using your user
name and password.
If you have problems logging in, email
[email protected].
2. Choose Catalog Advanced Catalog Search from
the pull-down menus. Enter the course title in the Title
field and click Search.
3. Locate the item with Exam in the title.
4. Click Request Approval. On the new page that
appears, click Submit.
5. After receiving approval via email from Cadence
Training, again search for the course as above and then
click Go to Content. The exam launches.
6. Complete the exam. After completion, your score will be
displayed. A passing score is 75%.
7. If you passed, download the Certificate of Completion.
Under the Learning tab, click Learning History, find
the course, and click Print Completion Certificate.
If you did not pass, you have the option of taking the
exam again.
iLS Course
1. Log in to http://learning.cadence.com, using your user
name and password.
If you have problems logging in, email
[email protected].
2. Find the course in your learning plan. (If necessary,
choose Learning Learning Plan from the pull-down
menus.)
3. Click Go to Content.
4. Locate the item with Exam in the title. Click the link to
launch the exam.
5. Complete the exam. After completion, your score will be
displayed. A passing score is 75%.
6. If you passed, download the Certificate of Completion.
Under the Learning tab, click Learning History, find
the course, and click Print Completion Certificate.
If you did not pass, you have the option of taking the
exam again.
261 Course Title
04/25/11 Encounter RTL Compiler
Thank You!
Encounter RTL Compiler, 10.1 262
04/25/11 Encounter RTL Compiler
Encounter RTL Compiler, 10.1 263
April 25, 2011
Physical Synthesis
Appendix A
264
The root of the problem is wires. At 130nm and below, wires dominate the delay equation,
and it gets worse with each process generation. Synthesis tools are tasked with creating an
optimal logic structure, but they still rely on fanout-based wireload models that treat all wires
for a given block size as the same. The reality is that every wire is unique. In a typical chip,
80-90% of wires are local interconnect, but even those can have different characteristics as
you see here, depending on the nature of the block (shape, size, density, datapath, random
logic, etc). The 10% wires that represent global interconnect are the real timing headaches.
So wireload models have become so far off the mark that many designers just ignore wire
effects altogether not a better solution, just a faster path through non-convergent iterations.
The real challenge is to give synthesis tools better wire informationhowever how do you
model wires before you have gates?
Encounter RTL Compiler, 10.1
04/25/11 Encounter RTL Compiler
Why Cant Some RC Results Close Timing in the
Back End?
264
Synthesis tools optimize for delay, without accurate wire delay info.
Common workaround - add timing margin to synthesis
4 Typical margin today: 30% global over-constrain
4 Over-powers 80-90% of the design
4 No longer practical in todays technologies
Synthesis view
All wires of fanout=n are the
same (for a given block size)
Physical view
Each wire is unique
80-90% of
wires are
local
10% are big
problems!
Its the Wires!
Encounter RTL Compiler, 10.1 265
04/25/11 Encounter RTL Compiler
The Need for Increasingly Accurate Interconnect
Modeling
265
Uses physical library characteristics
Dynamic modeling of interconnect
Fine granularity as design size increases
RC-PLE
Simplistic delay model based on size/fanout
Manually choose model up-front
WLM
G
l
o
b
a
l
s
y
n
t
h
e
s
i
s
M
u
l
t
i
-
o
b
j
e
c
t
i
v
e
o
p
t
i
m
i
z
a
t
i
o
n
Fast (non-legal) placement
Improves estimates of long wires
Improves prediction for simple floorplans
RC-Spatial
New !
Legal and incremental placement
Physical optimization tricks
Congestion analysis / fixing
Placement viewer
Legal placement handoff
RC-Physical
Improved !
Poor
Good
Better
Best
Encounter RTL Compiler, 10.1 266
04/25/11 Encounter RTL Compiler
Data File Types for RC Physical
Wireload Model :
4 liberty .lib files with WLMs
RC-PLE & RC-Spatial:
4 Mandatory:
O Tech_lef and standard cell .lef
files
O Liberty .lib standard cell files
4 Optional, but recommended:
O Captable .captable file
O Floorplan .def file
RC-Physical:
4 Mandatory:
O Tech_lef and standard cell .lef
files
O Liberty .lib standard cell files
O Floorplan .def file
4 Optional, but recommended:
O Captable .captable file
266
267
The process of going from RTL to gates has proven to make a big difference in the ultimate
predictability of physical implementation. But how do you predict interconnect delay if you
do not yet have gates to place?
This is why wireload models have survived for so long it is a difficult task. Customers
wanting to get the best results still spend a lot of time today experimenting and trying to
figure out which wireload model will get the best results out of physical design for each
block.
We have devised a method called Physical Layout Estimation that is a physical modeling
technique that can be used during the RTL structuring process. It uses actual physical library
info (LEF) and capacitance tables that provide length-based capacitance info, and it adjusts
based on changing design sizes and structures, throughout the optimization process. Because
it can dynamically adapt, we find it provides the best results. Because it is pre-placement, it is
not aware of what the long wires will be, however it does a good job modeling the local
interconnect, no matter what the characteristics of the logic are.
It is easy to use you just load the physical library information instead of wireload models,
and the runtimes are the same as WLM synthesis too.
And we have recently added the option to read in a floorplan, to add some coarse-grained
placement knowledge, like aspect ratio, pin location, macro location. Again, were not doing
placement, but we can adjust the model if we know a path goes to a RAM or an I/O.
Encounter RTL Compiler, 10.1
04/25/11 Encounter RTL Compiler
Fanout Load
1 0.0011
2 0.0092
3 0.0143
4 0.0199
5 0.0215
6 0.0278
7 0.0315
8 0.0390
9 0.0456
10 0.0577
Fanout Load
1 0.0013
2 0.0099
3 0.0158
4 0.0212
5 0.0267
6 0.0312
7 0.0386
8 0.0467
9 0.0578
10 0.0699
Fanout Load
1 0.0014
2 0.0107
3 0.0186
4 0.0284
5 0.0331
6 0.0401
7 0.0488
8 0.0592
9 0.0685
10 0.0811
Physical Layout Estimation (PLE)
What is PLE?
4 A physical modeling technique to capture
timing closure P&R tool behavior for RTL
synthesis optimization
O Result: better timing-power-area balance
Uses actual design and physical library info
Dynamically adapts during optimization to
changes in logic structures
Same runtime as WLM
set_attribute lef_library <lef file(s)>
set_attribute cap_table_file <cap table>
267
Fanout Load
1 0.0016
2 0.0111
3 0.0207
4 0.0303
5 0.0399
6 0.0495
7 0.0590
8 0.0687
9 0.0782
10 0.0879
?
Improves QoS and predictability over WLM
Does a good job modeling the
short wires in a design (80-90%)
PLE
Physical
Library
Floorplan
(optional)
268
So this begs the question, why, or more accurately when, is PLE not good enough. To answer
that we have to understand that there are different levels of requirements from different
customers. Some want to model the wires only accurately enough so that the synthesis tools
make good structuring decisions. They dont really care about how close that timing is to the
physical implementation, they just want to get a reasonable netlist to take into their back-
end flow. For these customers PLE typically is good enough, especially if the floorplan is
close to square and there are not a ton of macros. The second set of customers want more
predictability, but either dont want to or cannot hand off a DEF to the physical design team.
They want good correlation, but understand that the ultimate correlation will depend on the
production placement. This is when PLE is not good enough because PLEs are calculating
individual nets and making assumptions about the placement. What typically happens in a real
design is that the placer cannot achieve this assumptions about an optimal placement and
the gates move apart, subsequently making the nets longer that could be predicted with PLEs
alone. By adding quick placement to RC-Spacial, RTL-Compiler can get closer to predicting
the actual preCTS timing. Of course the ultimate solution is to use RC-Physical, run legal,
production placement and optimization in RC and then hand off that placement to the physical
design team, but we will talk about that later.
Encounter RTL Compiler, 10.1
04/25/11 Encounter RTL Compiler
RC-Spatial: Wasnt PLE Good Enough?!
Net Length
Explosion
Need Real
Placement
268
Encounter RTL Compiler, 10.1 269
Spatial technology is the next generation of wire modeling using PLE. The spatial mode uses
a fast, coarse-grained placement to identify where the long wires are. It is beneficial to
provide a floorplan to locate the pins and macros.
This technology adds even more physical reality to RCs global cost functions, providing
more directed optimizations, and giving more confidence to the synthesis user.
04/25/11 Encounter RTL Compiler
Spatial Technology
4 This technology adds fast
coarse placement to the
physical layout estimation
(PLE) model.
O It provides better modeling of
long wires.
O Congestion based on net
weighting is used as a global
cost function.
4 With spatial mode, the
runtime is much faster than
Encounter RTL Compiler
with physical.
4 It works on any license.
269
C
o
n
g
e
s
t
i
o
n
Performance Power
A
r
e
a
270 Encounter RTL Compiler, 10.1
04/25/11 Encounter RTL Compiler
Running RC-Spatial
Perfect for block designers
4 Good timing prediction
4 Quick physical feedback
4 Estimate on-chip space requirements
4 Little physical background required
Will work with or without floorplan
4 Although a floorplan is recommended
Syntax
synthesize to_mapped spatial effort [low|medium|high]
4 Same as:
synthesize to_mapped effort [low|medium|high]
synthesize to_mapped spatial effort [low|medium|high]
270
Encounter RTL Compiler, 10.1 271
Really the only way to identify the long wires on a chip is to use the production floorplan and
production placement, with the actual DFT logic inserted as well, since high-fanout/fanin
structures like compression and JTAG will impact physical timing. Trying to predict any other
way will fail because these wires are dependent on those two factors.
However it is a physical design use model and cockpit, and is external to the synthesis and
logic design process. So while a determined logic designer can quickly generate a physical
prototype if he has all the physical library and setup info he needs, it will not provide to him
the type of feedback that he needs to affect changes in his realm.
First Encounter silicon virtual prototyping has for a number of years provided physical
designers with a quick way to do accurate chip-level prototyping. It uses legal placement and
trial routing, which is basically detailed routing minus all the long search-and-repair to
legalize it. Its enough to get us the capacitance we need. It has been the de facto standard
SVP solution, used as the front-end to the back-end process, whether the back-end is
Cadence or not.
04/25/11 Encounter RTL Compiler 271
Long Wires Solution: synthesize to_placed
Single command in RTL Compiler runs First
Encounter full-chip silicon virtual prototyping (SVP).
Brings back relevant information into synthesis
environment.
4 Analyze physical timing in synthesis
4 Incremental optimization w/ physical timing
4 Can hand off placement for deterministic
closure
First Encounter
SVP
Full-chip virtual prototype
Use production floorplan
Tapeout-quality placement
Trial route
Encounter RTL Compiler
with Physical
Synthesis w/ DFT w/ PLE
synthesize to_placed
Analyze / re-optimize
O Long wires are dependent on
the physical implementation of:
O Floorplan, Placement &
O Routing (congestion)
O Requires Silicon Virtual
Prototype
272 Encounter RTL Compiler, 10.1
04/25/11 Encounter RTL Compiler
RC Built-In Physical Capabilities
4 Premorphing RCP uses premorphing to reduce local utilization
congestion. The idea is to move cells from highly utilized regions to low
utilization regions using flow based algorithms.
4 Incremental placement RCP automatically places any unplaced
gates generated during synthesis. In general, all IOPT tricks ensure
that any gate that is changed or newly created gets placed.
4 Legalization RCP legalizes the placement automatically.
4 Native Congestion Estimation & Optimization - Available track
calculation per metal layer, accounts for routing blockage and power
routes. All metal layer 1 routing blockages are treated as placement
blockages automatically.
synthesize -to_placed
synthesize -to_placed incremental
4 RCP can read/write DEF Output a fully placed, legal design
272
Encounter RTL Compiler, 10.1 273
04/25/11 Encounter RTL Compiler
The RC Physical Process
273
Encounter RTL Compiler
Load LIB/LEF, design, constraints, floorplan, etc.
rc:/ synthesize to_placed
QOS Prediction is similar to doing to the following:
O FE placeDesign
O FE trialRoute
O FE extractRC
Buffers long wires
Brings in physical timing
Performs incremental optimization
Incremental re-place (optional)
Constraints
Encounter: run through optDesign, pre-CTS
Netlist
Placement
(optional)
rc:/ write_encounter design
Encounter RTL Compiler, 10.1 274
This requires an RTL_Compiler_Physical license.
04/25/11 Encounter RTL Compiler
Automatic Congestion Fixing
When running physical synthesis, the
software automatically does the
following:
4 Native congestion estimation and
reporting
4 Enhanced morphing to relieve
congestion hot-spots
4 Global whitespace redistribution
O Individual gate pin-density
O Local target utilization
O Global interconnect
4 Congestion-aware incremental
optimization
274
Before After
275
RC-Physical can also help identify floorplan issues, like wires that have to cross too much of
the chip, macro placement that causes congestion, the need to create blockages to account for
blocks not yet available, etc.
Bothering the physical team to make small changes to the floorplan, wait to get a new
floorplan, see the results, possibly ask for more adjustments, etc. can waste days or even
weeks for each pass
We have added some commands to perform small what-if adjustments to the floorplan while
in RC-Physical, so the synthesis user can try these out without bothering physical design and
having to wait for new passes. The physical team will ultimately need to fix the final floorplan
on their side.
Encounter RTL Compiler, 10.1
04/25/11 Encounter RTL Compiler
Incremental Floorplan What-if Tweaking
275
f
e
e
d
b
a
c
k
f
i
x
i
n
i
t
i
a
l
Synthesi
s
Physical
Design
..........
Move objects
Change orientations
Create blockages
Move pins
Create/move groups
See effects of
floorplan
adjustments
without iterating
Encounter RTL Compiler, 10.1 276
04/25/11 Encounter RTL Compiler
write_template split physical outfile run.tcl
setup_run.tcl:
## Include leakage and dynamic power in QoS reporting
set_attribute qos_report_power true /
set_attribute enc_gzip_interface_filestrue /
set env(ENCOUNTER) <Encounter executable path>
regexp\[0-9\]+(\.\[0-9\]+) [get_attribute program_version/] exe_ver exe_sub_ver
puts "Executable Version: $exe_ver
run.tcl:
synthesize -to_mapped-eff $MAP_EFF -no_incr
puts "Runtime & Memory after 'synthesize -to_map-no_incr'"
generate_reports-outdir $_REPORTS_PATH -tag map
summary_table-outdir $_REPORTS_PATH
write_design-encounter -gzip -basename ${_OUTPUTS_PATH}/map/${DESIGN}
#####################################################################################################
## QoS Prediction & Optimization.
#####################################################################################################
set_attribute enc_temp_dir${_OUTPUTS_PATH}/rc_enc_pred/
synthesize -to_placed-effort $PHYS_EFF
# generate reports to save the encounter stats
generate_reports-outdir $_REPORTS_PATH -tag plc_enc -encounter
summary_table-outdir $_REPORTS_PATH
write_design-encounter -gzip -basename ${_OUTPUTS_PATH}/plc/${DESIGN}
######################################################################################################
## Final: write Encounter file set ( verilog, SDC, config, etc.)
######################################################################################################
generate_reports-outdir $_REPORTS_PATH -tag final
summary_table-outdir $_REPORTS_PATH
write_design-encounter -gzip -basename ${_OUTPUTS_PATH}/final/${DESIGN
276
Encounter RTL Compiler, 10.1 277
April 25, 2011
Advanced Synthesis Features
Appendix B
Encounter RTL Compiler, 10.1 278
Chip design today is becoming very complicated due to integration. We constantly see
announcements touting single-chip solutions that support multiple standards, or that perform
multiple functions. In addition to todays power densities, chips operate in different modes to
conserve power. And where there used to be only one test mode, now there can be many.
This means multiple sets of constraints, such as clocks, external delays, false paths, and
multicycle paths. How can we satisfy all these constraints while still meeting todays time-to-
market demands?
04/25/11 Encounter RTL Compiler
Multiple Mode Design
Todays chips include:
4 Multiple standards support
4 Multiple functionalities
4 Multiple power profiles
4 Multiple test modes
4 Results in multiple constraint sets
How do you:
4 Create constraints to satisfy each
mode?
4 Implement the chip while satisfying
all modes constraints?
278
GPRS
EDGE
WCDMA
MP3
Camera
Gaming
Awake
Doze
Sleep
Scan
BIST
OPMISR
func1.sdc
func2.sdc
func3.sdc
pwr1.sdc
pwr2.sdc
pwr3.sdc
test1.sdc
test2.sdc
test3.sdc
Encounter RTL Compiler, 10.1 279
If you are using the multi-mode flow, then you must specify the -mode option to each of the
commands.
04/25/11 Encounter RTL Compiler
Multi-Mode Flow
279
Mapping
Timing analysis
Load libraries
Load the constraints
for each mode.
Elaborate
Create Multi-Mode
Output files
create_mode name mode1 mode2 [design <design_name>]
read_sdc mode mode1 <mbist_1.sdc> <function_1.sdc>
read_sdc mode mode2 <mbist_2.sdc> <function_2.sdc>
report timing
report timing mode [find / -mode mode1]
Load design
Encounter RTL Compiler, 10.1 280
The Encounter