Sie sind auf Seite 1von 33

Rapid Adoption Kit - Conformal

TCL Training
October, 2017

Note: RAK Testcase Database can be downloaded from the 'Attachments' section at the
bottom of this PDF on https://support.cadence.com.
Agenda

• Content Access on https://support.cadence.com


• Documentation
• Typical Conformal TCL Commands
• TCL Command Examples

2 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Content Access on https://support.cadence.com

Via Search Via Navigation

3 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Documentation

1. Using help at Command 2. Conformal Equivalence Checking


Prompt Command Reference 17.1
- Tcl Command Entry Mode Support

4 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


find vs find_cfm

• find and find_cfm


– Can both find -instance, -port, -pin, -net
• find_cfm
– is implemented in all conformal products (LEC, CLP, ECO, CCD)
– Best choice for LP Inquiries
– can also query power intent objects, liberty library cell, 1801 rule
filtering

5 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Structure of find

FIND
<-Module | -Instance | -Port [-Input | -Output | -Bidir]
| -Pin [ -Input | -Output| -Bidir]
| -Net | -Gate | -Id>
[-Single]
[-HIERarchical]
<object_name>
[-EXCLIB]
[-INDESIGN]
[-LEAF]
[-Golden | -Revised | -Both]
(TCL_SETUP/TCL_LEC mode)

6 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


find options

• These options specify what type of object to find:


<-Module | -Instance | -Port [-Input | -Output | -Bidir]
| -Pin [ -Input | -Output| -Bidir]
| -Net | -Gate | -Id>
• -Single - Returns none or the first found object handle instead of a list.
• -Hierarchical –
– Specifies that object_name should be matched hierarchically. (use if looking
outside the current module)
– Do not use –Hierarchical if only desire object from current module
• -leaf
– Find instance/pin at the primitive level.
– Allows find command to report inside library cells.
• -EXCLIB
– Specifies that the object is exclusive to the library.
• -INDESIGN
– Find only objects that are in the current hierarchy (the current
– module is set by the set_current_module command; by
– default, the current module is the root module).

7 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Structure of find_cfm

find_cfm
<object_type>
[<patterns> | <object_list> | -of_objects <object_list>]
[-filter <condition>]
[-hierarchical]
[-regexp]
[-limit n]
[-scope <pathname>]
[-sensitive | -nosensitive]

8 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


find_cfm options

• <object_type> – must be of -design, -instance, -port, -pin, -net, -library, -


libcell, or -libpin
• -Hierarchical –
– Specifies that object_name should be matched hierarchically. (use if looking outside
the current module)
– Do not use –Hierarchical if only desire object from current module
• -filter <condition>
– Condition must use the following format:
– <attribute_name><operator><value>.
– Where operator can be:==, !=, >=, >, <=, <, =~, and !~.
– Multiple conditions can be combined with the logical operators !, &&, ||, and parentheses ().
– Use get_attribute to find attributes to filter with
• -regexp
– Specifies a regular expression for pattern matching. Curly
– brackets are required. For example:
– find_cfm -instance -regexp {xOn \ w+}
• -limit
– Specifies how many objects are reported
• -scope
– Specifies the root of the searching tree. By default, Conformal
– uses the root of the design tree.

9 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


report_tcl_attributes
• type the command report_tcl_attributes
– Conformal supported attributes will be reported
– Attributes are used in other TCL commands
Example:
TCL_LEC> report_tcl_attribute
===============================================================================
= Conformal Object =
===============================================================================
| Conformal
| version_info none ...
===============================================================================
= RTL Objects =
===============================================================================
| Design
...
| library string Library where the module is stored
| is_in_elaborated_tree boolean 1 if the module is in elaborated
===============================================================================
= SDC Objects =
===============================================================================
...
| set_active_clocks
| id none
| command_name none ...
===============================================================================
= LIB Objects =
===============================================================================
...

10 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Options for:
get_instances, get_ports, get_pins, get_nets

• Options for these get_??? commands:


Command Structure:
get_??? [-all_hierarchy] <obj_handle>
• -all_hierarchy
Use this argument in combination with the HIERARCHY object
handle type. It returns a list of hierarchical object handles
that are associated with the given hierarchical design object (for
example, HIERARCHY_INSTANCE).

11 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Options for:
get_instances, get_ports, get_pins, get_nets

• <obj_handle>
The specified obj_handle as one of the following types:
– MODULE: lists the nets of the specified module
– MODULE_INSTANCE: lists the nets that connect with the
specified instance
– MODULE_PORT: lists the nets that connect with the specified
port
– MODULE_INSTANCE_PIN: lists the nets that connect with the
specified pin
– MODULE_NET: lists the net that identifies itself
– HIERARCHY_INSTANCE: lists the nets that connect with the
specified instance in a hierarchical context
– HIERARCHY_PORT: lists the nets that connect with the specified
port in a hierarchical context
– HIERARCHY_INSTANCE_PIN: lists the nets that connect with
the specified pin in a hierarchical context
– HIERARCHY_NET: lists the net that identifies itself
– FLAT_GATE: lists the nets that connect with the specified
flattened gate in a hierarchical context
– MAP POINT: not applicable

12 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Examples of get_?? commands
TCL_LEC> get_pins [lindex [find -instance {/syndrm/macreg}] 0]
// Command: find -instance /syndrm/macreg
{/syndrm/macreg/d[7]} {/syndrm/macreg/d[6]} ….. {/syndrm/macreg/q[0]}

TCL_LEC> get_pins [lindex [find -module {reg_3}] 0]


// Command: find -module reg_3
{U$1/I0} {U$1/O} {U$2/I0} …. {q_reg[0]/QN}

TCL_LEC> get_ports [lindex [find -module {reg_3}] 0]


// Command: find -module reg_3
{d[7]} {d[6]} {d[5]} {d[4]} …… {q[0]}

TCL_LEC> get_ports [lindex [find -instance {/syndrm/macreg}] 0]


// Command: find -instance /syndrm/macreg
{syndrm/macreg/d[7]} {syndrm/macreg/d[6]} …… {syndrm/macreg/q[0]}

TCL_LEC> get_instances [lindex [find -module reg_rst] 0] \


{regout_reg[7]} {regout_reg[6]} ……. {U$18}

The following example illustrates how to list the instance that identifies itself

TCL_LEC> get_instances [lindex [find -gate \


{/syndrm/gen_synvalid1/del_regout/regout_reg[0]}] 0]

{/syndrm/gen_synvalid1/del_regout/regout_reg[0]}

13 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Proc : get_info_ioput

• This proc does the following:


– Finds nets attached to ports
– Gets all the pins connected to that net
– Gets direction of each pin
– Prints the direction of each pin.
proc get_info_ioput {port} {
#find the port -> get connected net -> get all connected pins
foreach i [get_pins -all_hierarchy [lindex [get_nets [find -port -hier -single -revised $port]] 0]] {
set dir [get_property $i direction]
puts "$dir $i"
}
}

Result look like this:


INPUT /uclk_vcfc_ccdu_cha_pldp_wrapper/uclk_vcfc_ccdu_cha_pldp/llch__llch_uclk_rib17__0_rpt6
INPUT /uclk_vcfc_ccdu_cha_pldp_wrapper/llch__llch_uclk_rib17__0_rpt6

14 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Simple examples of get_?? commands
TCL_LEC> set a [get_map_points -dff]
(G)26(R)171 (G)27(R)74 (G)28(R)75 (G)29(R)76 (G)30(R)77

TCL_LEC> get_keypoint [lindex $a 0]


/uncorrected_error_reg

TCL_LEC> get_keypoint [lindex $a 1]


/syndrm/macreg/q_reg[7]

TCL_LEC> get_license_mode
Low_Power_GXL

TCL_SETUP> get_version
16.20-s180 26-Jan-2017 64 sjfhw537 Linux

15 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 1 – Finding Object (find / find_cfm)
• TCL based commands behavior
– Nothing found = no report
– If found = will report
• These commands return a list of objects
TCL_LEC> find -instance *
IOPADS_INST DTMF_INST

TCL_LEC> find_cfm -instance /*


/IOPADS_INST /DTMF_INST

• Report instance 2 levels down with ‘find_cfm –instance */*’


• To report all hierarchical instances:
– ‘find_cfm –hierarchical –instance *’

TCL_LEC> find_cfm -hierarchical -instance *


/IOPADS_INST /DTMF_INST /IOPADS_INST/Pvss0 /IOPADS_INST/Pvss1 /IOPADS_INST/Pvss2
/IOPADS_INST/Pvss3 /IOPADS_INST/Pvdd0 IOPADS_INST/Pvdd1 /IOPADS_INST/Pvdd2 /IOPADS_INST/Pvdd3
/IOPADS_INST/Pavdd0 /IOPADS_INST/Pavss0 /IOPADS_INST/Pcornerul /IOPADS_INST/Pcornerur
/IOPADS_INST/Pcornerll /IOPADS_INST/Pcornerlr /IOPADS_INST/Ptdspop15 ...

16 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 2 – Report Object Attributes

• Requires use of 2 commands


– find or find_cfm and get_attributes
– user can first put information into a list
– Then uses list to for get_attribute command
TCL_LEC> set a [find -instance {/DTMF_INST/PLLCLK_INST}]
/DTMF_INST/PLLCLK_INST

TCL_LEC> puts $a
/DTMF_INST/PLLCLK_INST

TCL_LEC> get_attribute $a -all


name PLLCLK_INST …… ref_object work_lib/pllclk pim_object {} is_soft_macro 0

• Get attributes of pins from a hierarchy in design


TCL_LEC> get_attribute [find_cfm -pin /DTMF_INST/vcop] –all
name vcop ref_name vcop ……tied_value Z

Note: Boolean type attributes, 0 means false; 1 means true

17 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 3 – Finding Library Location for a Cell

• Situation
– Debug shows a library cell has issues
– Multiple versions of this library cell exist
– Challenge to find which library has the cell
– Use find_cfm to get information form get_attribute
Example(s):
• Use location to find which file:
TCL_SETUP> get_attribute [find_cfm -libcell RFRDX1] location
./library/tsmc90_normal.v

• Use start_line to find beginning line of cell


TCL_SETUP> get_attribute [find_cfm -libcell RFRDX1] start_line
23677

18 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 4 - Using Filters

• Filters can be used to find specific instance or examples in


the design
Example 1 – find notranslate bbox
TCL_LEC> find_cfm -hierarchical -instance * -filter "bbox_type==notranslate" -golden
/DTMF_INST/PLLCLK_INST /DTMF_INST/ROM_512x16_0_INST
/DTMF_INST/RAM_128x16_TEST_INST/RAM_128x16_INST
/DTMF_INST/RAM_256x16_TEST_INST/RAM_256x16_INST

Example 2 – find DFF in hierarchy


TCL_LEC> find_cfm -hierarchical -instance * -filter "type==DFF" -golden
/DTMF_INST/TDSP_DS_CS_INST/t_bit_7_reg /DTMF_INST/TDSP_DS_CS_INST/t_sel_7_reg
{/DTMF_INST/DIGIT_REG_INST/digit_out_reg[7]} {/DTMF_INST/DIGIT_REG_INST/digit_out_reg[6]}
{/DTMF_INST/DIGIT_REG_INST/digit_out_reg[5]} {/DTMF_INST/DIGIT_REG_INST/digit_out_reg[4]}
{/DTMF_INST/DIGIT_REG_INST/digit_out_reg[3]} {/DTMF_INST/DIGIT_REG_INST/digit_out_reg[2]}
{/DTMF_INST/DIGIT_REG_INST/digit_out_reg[1]} {/DTMF_INST/DIGIT_REG_INST/digit_out_reg[0]}
/DTMF_INST/DIGIT_REG_INST/flag_out_reg

19 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 4 - Using Filters - continued

• continued
Example 3 – Find non-Leaf Cells in a design
TCL_SETUP> set list_of_instances [find_cfm -hierarchical -instance * -filter "is_leaf_cell ==0"]
/IOPADS_INST /DTMF_INST /DTMF_INST/TEST_CONTROL_INST
/DTMF_INST/RAM_128x16_TEST_INST /DTMF_INST/RAM_256x16_TEST_INST
/DTMF_INST/TDSP_DS_CS_INST /DTMF_INST/DATA_SAMPLE_MUX_INST ...

Example 4 – find input scan pins

TCL_SETUP> set list_of_scanin_ports [find_cfm -port scan* -filter "direction == in"]


scan_clk scan_en

20 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 5 – Using Regexp

Example1: Find instances under DTMF_INST hierarchy


TCL_SETUP> find_cfm -instance -regexp {/DTMF_INST/ \ w+}
/DTMF_INST/PLLCLK_INST /DTMF_INST/TEST_CONTROL_INST
/DTMF_INST/ROM_512x16_0_INST /DTMF_INST/RAM_128x16_TEST_INST
/DTMF_INST/RAM_256x16_TEST_INST /DTMF_INST/TDSP_DS_CS_INST
/DTMF_INST/DATA_SAMPLE_MUX_INST /DTMF_INST/DIGIT_REG_INST
/DTMF_INST/RESULTS_CONV_INST /DTMF_INST/TDSP_MUX
/DTMF_INST/TDSP_CORE_INST /DTMF_INST/ULAW_LIN_CONV_INST
/DTMF_INST/ARB_INST /DTMF_INST/DMA_INST /DTMF_INST/SPI_INST

Example2: Find all instances under IOPADS_INST


TCL_SETUP> find_cfm -instance -regexp {/IOPADS_INST/Ptdspop[0-9][0-9]}
/IOPADS_INST/Ptdspop15 /IOPADS_INST/Ptdspop14 /IOPADS_INST/Ptdspop13
/IOPADS_INST/Ptdspop12 /IOPADS_INST/Ptdspop11 /IOPADS_INST/Ptdspop10
/IOPADS_INST/Ptdspop09 /IOPADS_INST/Ptdspop08 /IOPADS_INST/Ptdspop07
/IOPADS_INST/Ptdspop06 /IOPADS_INST/Ptdspop05 /IOPADS_INST/Ptdspop04
/IOPADS_INST/Ptdspop03 /IOPADS_INST/Ptdspop02 /IOPADS_INST/Ptdspop01
/IOPADS_INST/Ptdspop00

21 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 6 – Using get_instance

Example 1 – Failed search – user does not pass name as an


object

TCL_LEC> get_instance [find -module dtmf_recvr_core]


// Error: get_instance: Argument is not a Vpx object handle or any legal argument.

Example 2 – Use lindex to access element of a list

TCL_LEC> get_instance [lindex [find -module dtmf_recvr_core] 0]

PLLCLK_INST TEST_CONTROL_INST ROM_512x16_0_INST RAM_128x16_TEST_INST


RAM_256x16_TEST_INST TDSP_DS_CS_INST DATA_SAMPLE_MUX_INST
DIGIT_REG_INST RESULTS_CONV_INST TDSP_MUX TDSP_CORE_INST
ULAW_LIN_CONV_INST ARB_INST DMA_INST SPI_INST

22 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 7 – Getting Instance Name of a Module

• The instance name of the module dtmf_recvr_core is


DTMF_INST in this design.

TCL_LEC> get_module_instance [find -module dtmf_recvr_core]


DTMF_INST

23 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 8 – Finding Object of an Object

• find_cfm allows users to find objects from a list of objects


or a single object.
>man find_cfm -v
-of_objects Queries objects from another query or list of objects. The
following lists the supported - and objects allowed in
-of_objects:

-design instance
-instance net pin
-library libcell
-libcell libpin lib instance
-libpin libcell pin
-net pin instance port
-pin net instance -port

24 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 8 – Finding Object of an Object continued

• Example 1 - request two step object querying since "-


of_objects" also takes variable with object type.
TCL_LEC> find_cfm -net -of_objects [find_cfm -instance
/DTMF_INST/SPI_INST/dflag_reg]

{/DTMF_INST/SPI_INST/N$19} /DTMF_INST/SPI_INST/dflag_reset
/DTMF_INST/SPI_INST/clk /DTMF_INST/SPI_INST/n171
/DTMF_INST/SPI_INST/dflag

• Example 2 – Alternative method – using commands


get_nets and find
TCL_LEC> get_nets [lindex [find -instance /DTMF_INST/SPI_INST/dflag_reg] 0]

{/DTMF_INST/SPI_INST/N$19} /DTMF_INST/SPI_INST/dflag_reset
/DTMF_INST/SPI_INST/clk /DTMF_INST/SPI_INST/n171
/DTMF_INST/SPI_INST/dflag

25 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 9 – Getting Fanin and Fanouts

• The get_fanin and get_fanout commands work with gate


type FLAT_GATE.
Example 1 – incorrect use
TCL_LEC> get_fanout [find -gate /DTMF_INST/TDSP_CORE_INST/DATA_BUS_MACH_INST/read_reg]
// Error: get_fanouts: Not a Vpx handle object

Example 2 – Use lindex to isolate gate to get fanout


TCL_LEC> get_fanout [lindex [find -gate /DTMF_INST/TDSP_CORE_INST/DATA_BUS_MACH_INST/read_reg] 0]
{/DTMF_INST/TDSP_DS_CS_INST/U$35} {/DTMF_INST/TDSP_DS_CS_INST/U$27}

26 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 10 PipeLining Process

Example – Add pin constraints on all port_pad_data_in pins


on DTMF_INST instance:
TCL_SETUP> foreach pin [find_cfm -pin {/DTMF_INST/port_pad_data_in*} -golden]
{ add_primary_output $pin -golden; add_primary_input $pin -pin -golden;
add_pin_constraint 1 $pin -golden; }
// commands need to seperated by ";"

Check state of pin before constraint operation:


TCL_LEC> get_attribute [find_cfm -pin {/DTMF_INST/port_pad_data_in[14]} -golden] is_constant
0

Check state and value of pin after constraint operation:


TCL_SETUP> get_attribute [find_cfm -pin {/DTMF_INST/port_pad_data_in[14]} -golden] is_constant
1
TCL_SETUP> get_attribute [find_cfm -pin {/DTMF_INST/port_pad_data_in[14]} -golden] constant_value 1
{{/DTMF_INST/port_pad_data_in[14]}}

27 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 11 – Check Connection of Library Cell Ports

• Get list of power ports:

TCL_SETUP> set port [find_cfm -port * -filter "p_pg_type {>=} power"]


VD1 VD2 VDT VR1 VR2
• Store power ports in list, use foreach loop to get_attribute of
each port
TCL_SETUP> set PG_PORTS "VD1 VD2 VR1 VR2 VR3 VDT" VD1 VD2 VR1 VR2 VR3 VDT”

TCL_SETUP> foreach pg $PG_PORTS { set gPG [get_attribute [find_cfm -port $pg -golden]
fanout] puts $gPG}
/ur3/u_iso1/VDD /ur3/s1/VDD /ur3/c1/VDD /ud1/s1/VDD /ud1/c1/VDD
//connect to VD1 /ur3/s1/VON /ud1/s1/VON
//connect to VD2 /ur2/s1/VDD /ur2/c1/VDD /ur1/s1/VDD /ur1/c1/VDD
//connect to VR1 /ur3/ur3/s1/VDD /ur3/ur3/c1/VDD /ur3/u_iso1/VDDC
//connect to VR2 /u_iso1/VDD
//connect to VDT

28 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 12 – Work with Collections

• Search results in large designs can exceed TCL space


• To overcome this user needs to store information in
collections
• Example - return all analog pins in the design
set x [find_cfm -pin * -collection]
set s [sizeof_collection $x]
set i 0
while {$i < $s} {
set y [index_collection $x $i]
if { [get_attribute $y is_analog ] == 1 } {
puts "analog pin is $y"
}
incr i
}

29 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 12 – Work with Collections of objects

• Results and proof of get_attribute


// Command: set x [find_cfm -pin * -collection]
collection_0
// Command: set s [sizeof_collection $x]
16
// Command: set i 0
0
// Command: while {$i < $s} {
// set y [index_collection $x $i]
// if { [get_attribute $y is_analog ] == 1 } {
// puts "analog pin is $y"
// }
// incr i
// }
analog pin is xmac1/OUT
analog pin is xmac1/RTO
analog pin is xmac2/RTO
0
TCL_SETUP> get_attribute [find_cfm -pin xmac1/RTO] is_analog
1

30 © 2017 Cadence Design Systems, Inc. All Rights Reserved Worldwide.


Case 13 - Find –instance -leaf

Example:
TCL_LEC> find -instance /DTMF_INST/SPI_INST/bit_cnt_reg\[0\]/* -leaf -revised
{/DTMF_INST/SPI_INST/bit_cnt_reg[0]/I1/__UU3}
{/DTMF_INST/SPI_INST/bit_cnt_reg[0]/I1/__UU2}
{/DTMF_INST/SPI_INST/bit_cnt_reg[0]/I1/__UU1}
{/DTMF_INST/SPI_INST/bit_cnt_reg[0]/I1/__UU0}
{/DTMF_INST/SPI_INST/bit_cnt_reg[0]/I0/U$1}
{/DTMF_INST/SPI_INST/bit_cnt_reg[0]/I0/__UU2}
{/DTMF_INST/SPI_INST/bit_cnt_reg[0]/I0/__UU1}
{/DTMF_INST/SPI_INST/bit_cnt_reg[0]/I0/__UU0}
TCL_LEC>

Notes:
The –leaf options is added to 17.10-d109 and later versions.
Be sure to add ‘/*’ or find will not search into the cell
Does not work with –hier option

31 © 2013 Cadence Design Systems, Inc. Cadence confidential.


Case 14 - Find isolation strategy for isolation cell
- find isolation sense

32 © 2013 Cadence Design Systems, Inc. Cadence confidential.

Das könnte Ihnen auch gefallen