Académique Documents
Professionnel Documents
Culture Documents
DAY 1
Unit 0i 1 2 3 4 Register to Register Paths Welcome Introduction to Static Timing Analysis Writing Basic Tcl Constructs in PT Reading Data Constraining Internal Reg-Reg paths Lab
3-1
3-1
Unit Objectives
3-2
Use a 3 step flow to read design(s) into PT memory Resolve errors and warnings associated with reading and linking a design Access design objects after a design has been read into PT memory
3-2
3-3
Constraints
source
Exceptions
source
Technology Libraries
Loaded at linking
PrimeTime
Constraint Script
The PrimeTime setup file is .synopsys_pt.setup. Constraints and Exceptions are usually placed in script(s).
3-3
3-4
3-4
PRIMETIME Interfaces
Two ways to interface to PrimeTime (PT)
primetime PT GUI Command line shell PRIMETIME (PT) Engine
3-5
pt_shell
3-5
3-6
Set Variables:
l l
search_path link_path
n n
3-6
3-7
printvar search_path
Reading Data Synopsys 34000-000-S16 PrimeTime: Introduction to Static Timing Analysis
What is a search_path? search_path contains a list of paths used to locate the designs, libraries and other files needed to perform STA. search_path variable usually includes paths to: Design Database(s) Timing Model(s) Technology Library Constraint files These two commands have the same effect: set search_path $search_path db vlog scripts. # lappend search_path db vlog scripts lappend search_path db vlog scripts The default value of search_path is empty string .
3-7
3-8
The Link Path specifies where PT searches for designs and library files when linking the design:
printvar link_path
Reading Data Synopsys 34000-000-S16 PrimeTime: Introduction to Static Timing Analysis
link_library = link_path. Design Compiler uses link_library, PrimeTime uses link_path. These two commands are equivalent: set link_path {* core_slow.db rams.db} lappend link_path core_slow.db rams.db
3-8
3-9
blockA
U21 INV U4
blockB
pt_shell> read_db top.db pt_shell> read_db blockA.db pt_shell> read_db blockB.db OR pt_shell> read_db blockA.db blockB.db top.db
The last design read is the current design by default. You can make another design current with the current_design command. In the above example of 2 cases, the current designs are blockB and top respectively.
3-9
3-10
Top.v is in the vlog directory, search_path should have this directory. Designs blockA.db AND blockB.db are in the DB directory; search_path should also have this directory.
3-10
3-11
blockA
U21 INV U4
blockB
3-11
3-12
pt_shell> read_db uart.db Error ! Error: Cannot read file uart.db Error: Problem in read_db: No designs were read.
3-12
3-13
pt_shell> pwd /../ISTA/ProjectX pt_shell> cd scripts pt_shell> read_db blockA.db Error: Cannot read file blockA.db
Error !
3-13
3-14
U33
RISC_CORE
What is INV?
BLOCKA U4 U21 INV BLOCKB
Where is BLOCKB?
How will PrimeTime know what each instance in RISC_CORE design netlist refers to?
Reading Data Synopsys 34000-000-S16 PrimeTime: Introduction to Static Timing Analysis
Resolving references (aka link) means finding and replacing the space holders with the actual library cells or sub designs referenced.
3-14
3-15
top
blockA
U21 INV U4
blockB
link = link_design. Design Compiler (DC) uses link while PrimeTime (PT) uses link_design command to link a design. For convenience, PT has built-in alias link for link_design. Q: What happens if you accidentally try to link the same design that has been previously linked? A: If you originally used -remove_sub_designs then, black boxes will be resulted since sub design references could not be found in the memory (*). Solution: - Use the link -incr option (OR) - Remove the (corrupted) design in memory and start over from read again (Recommended).
3-15
3-16
top
U33
blockA
U21 INV U4
blockB
PT found blockA.db and blockB.db in its memory and INV in the library. After linking, if current_design is set to a different design, all the previously established link information will be gone. PT automatically reads in Library file(s) when link_design is executed.
3-16
3-17
pt_shell> read_db CLOCK_GEN.db pt_shell> link_design pt_shell> link Linking design CLOCK_GEN... Linking design CLOCK_GEN... Warning: Unable to resolve reference to 'MUX21L' in 'CLOCK_GEN'. (LNK-005) Warning: Unable to resolve reference to 'MUX21L' in 'CLOCK_GEN'. (LNK-005) Warning: Unable to resolve reference to 'IVI' in 'CLOCK_GEN'. (LNK-005) Warning: Unable to resolve reference to 'IVI' in 'CLOCK_GEN'. (LNK-005) Warning: Unable to resolve reference to 'FD2' in 'CLOCK_GEN'. (LNK-005) Warning: Unable to resolve reference to 'FD2' in 'CLOCK_GEN'. (LNK-005) Creating black box for U31/MUX21L... Creating black box for U31/MUX21L... Creating black box for U32/MUX21L... Creating black box for U32/MUX21L... Creating black box for U34/IVI... Creating black box for U34/IVI... Creating black box for U35/IVI... Creating black box for U35/IVI... Creating black box for CLK_BY_2_reg/FD2... Creating black box for CLK_BY_2_reg/FD2... Designs used to link CLOCK_GEN: Designs used to link CLOCK_GEN: <None> <None> Libraries used to link CLOCK_GEN: Libraries used to link CLOCK_GEN: <None> <None> Design 'CLOCK_GEN' was successfully linked. Design 'CLOCK_GEN' was successfully linked. 11
WHAT!
Primetime create black boxes for unresolved references. This is because the link_create_black_boxes variable is set to true by default.
3-17
3-18
If link_design could not resolve a particular reference, PT will create black boxes A black box is an empty cell with no timing arcs
n
Substitute unresolved references with black boxes Design is linked and timing analysis can be performed
Unresolved references, cause a design to remain unlinked Most timing analysis commands will not function Fix any problems and re-link the design
set link_create_black_boxes
false
3-18
3-19
3-19
Can you have search_path and link_path variables set automatically when you invoke PT?
3-20
3-21
set search_path $search_path db vlog scripts set link_path * tech_lib.db set sh_enable_page_mode true set sh_command_log_file projectX.log alias h history alias rc report_constraint -all_violators history keep 200
Within the setup file, you can:
n
Create commands you want to execute every time PrimeTime is invoked, i.e. set search_path or set link_path Define aliases for interactive use Change log file name from its default pt_shell_command.log
Reading Data PrimeTime: Introduction to Static Timing Analysis
n n
Synopsys 34000-000-S16
history keep 200 specifies: the number of commands (200) to be retained in the history list. By default, only 20 commands are retained. You can control the naming of the Log file (default: pt_shell_command.log) via the variable: sh_command_log_file, but, it should appear inside the setup file (.synopsys_pt.setup) Example: set sh_command_log_file ./projectX.log. Do not source any script file in the setup file since it will increase invocation time and will make debugging difficult.
3-21
3-22
~user
$SYNOPSYS/admin/setup .synopsys_pt.setup
1
~/.synopsys_pt.setup
3
Standard Setup
PrimeTime will read the .synopsys_pt.setup files from three directories (in the following order): 1. The primetime root directory, which contains the PrimeTime files. For example, if PrimeTime was installed under /tools/synopsys/PT, standard installation would include a setup file under /tools/synopsys/PT/admin/setup. 2. Once the standard setup file has been read in and executed, PrimeTime then searches for a setup file in the users login directory. If a setup file exists in this directory, it will be read in and executed. -- Warning: During project archiving (using tar -cvf) you need to think about it! 3. Last, PrimeTime will read in and execute the .synopsys_pt.setup file from the directory under which it was invoked. -- It makes life easier if this project specific setup file contains everything including the contents of your home directory setup file, if you have one -- recall the Warning above.
3-22
3-23
Is PT invoked in the correct directory? Correct setup file? Is the design fully mapped to gate level instances?
l
printvar *_path
list_libraries list_libraries -used There can be only one linked design in PT memory
Reading Data
Synopsys 34000-000-S16
Q: What happens if you accidentally try to link the same design that has been previously linked? A: If you originally used -remove_sub_designs , the result will be black boxes since sub design references could not be found in the memory (*). Solution: - Use the link -incr option (OR) - Remove the (corrupted) design in memory and start over from read again (Recommended).
3-23
3-24
Cell
Net
Pin
Clock
CLK CLK
ENCODER
Here are some commands to access your design stored in PT memory: get_cells get_clocks get_nets get_pins ... all_clocks all_inputs all_outputs # Create a collection of all clocks in design # Create a collection of all input ports in design # Create a collection of all output ports in design # Create a collection of cells # Create a collection of clocks # Create a collection of nets # Create a collection of pins
3-24
3-25
Units for time, capacitance, resistance List of library cells Cell Timing (propagation delay, setup, hold ...) Operating conditions Wire load model Design rules (max_capacitance, max_fanout ...)
pt_shell> list_libraries Library Registry: * ssc_core_slow ./core_slow.db::ssc_core_slow pt_shell> report_lib ssc_core_slow **************************************** Report : library Library: ssc_core_slow Version: 2002.03 **************************************** Time Unit Capacitance Unit : 1 ns : 1 pF
Usually, library file is read in during link_design. You can also explicitly read in a library file using the read_db command: Example: read_db ssc_core_slow.db To remove all the designs and libraries from the memory: remove_design all remove_lib all NOTE: PT cannot remove a library if it is used by a design residing in memory.
PrimeTime: Introduction to Static Timing Analysis 3-25 Unit 3: Reading Data
Lab Overview
n
LAB
3-26
Given a set of design and library files, you will need to successfully read them into PrimeTime memory and access the design objects You will set the search_path and link_path variables correctly such that you can read:
l
45 min
A Top level Verilog/VHDL netlist and link using Verilog/VHDL sub blocks and the library A top level Verilog/VHDL netlist and link using DB sub blocks and the library A complete netlist in VHDL/Verilog/DB and library, link efficiently and access sevaral objects within the design
3-26
Review
3-27
Write 3 variable names that are used to read and link a design in PT:
________________________________________________ ________________________________________________ ________________________________________________
Write 3 command names that are used to read and link a design in Verilog format into PT:
________________________________________________ ________________________________________________ ________________________________________________
3-27