The Basics of Using The Advanced Timing TCL Scripting Commands
The Basics of Using The Advanced Timing TCL Scripting Commands
(/apex/homePage?
returnParam=true)
FEEDBACK
ThebasicsofusingtheAdvancedTimingTclScriptingCommands i
Problem
ThisarticleexplainsthebasicsofusingtheAdvancedTimingTclScriptingCommands.These
commandscanbeusedincombinationwitheachothertoreportandquerydatabaseobjects
basedonspecifiedcriteria.
Solution
ThisarticledescribestheAdvancedTimingTclScriptingCommands.Whatthesecommands
areusedforisexplainedwithsimpleexamples,foreachcategoryofsimilarcommands.For
specificsonsyntax,refertotheAdvancedTimingTclScriptingCommandschapterinthe
Encounter/Innovus/TempusTextCommandReference.
Thisarticlefocusesontheusageofthefollowingcommandtypesunderthiscategory:
all_*commands
get_*commands
Propertycommands
Collectioncommands
all_*commands
Theall_*commandsreturnacollectionofalltheitemsofaspecifictype.Severalofthe
commands(markedwitha(f))provideoptionstofilterthecollectionbasedoncertain
properties:
Examplesofusingtheall_*commands:
Setalltheclockstopropagatedmode
set_propagated_clock[all_clocks]
Reporttheworsttimingpaththatbeginsataregisterandendsatanoutputport
report_timingfrom[all_registers]to[all_outputs]
Storeacollectionofpinsthatfanoutfromaspecificport
https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nUjoEAE&pageName=ArticleContent&oMenu=Most%20pouplar&oMenu=Mos 1/6
3/4/2017 ThebasicsofusingtheAdvancedTimingTclScriptingCommands
setclk1Fanout[all_fanoutfromclk1pin_levels1]
get_*commands
Theget_*commandsreturnacollectionofitemsfilteredbynamepatternorobjecttype.
Additionally,youcanusethefilteroptionformostoftheget_*commandstofilterthe
collectionbypropertyvalue.Formoreinformation,seethedescriptionoftheget_property
commandintheEDISystemTextCommandReference.
Thefilter_expressionforthefilteroptioncanbecreatedbycombiningseveralobject
propertiesusingthefollowingrelationalandlogicaloperators:>,<,==,!=,<=,>=,&&,||,=~,
!~,ANDandOR.Youalsocanuseparenthesestocreateexpressions.
Returnacollectionofalltheinputports(sameasrunning[all_inputs])
FEEDBACK
get_portsfilter"direction==in"
Returnacollectionofpinsthatmatch*/D
get_pinshierfilter"hierarchical_name=~*/D"
Returnacollectionofthelibrariesacellbelongsto
get_lib_cellsINVXL
Propertycommands
Thelist_propertycommandliststhepropertiesforthedifferentobjecttypes.Whenthe
list_propertycommandisrunwithoutarguments,itlistsallthepropertiesforallobject
types.
Usethetypeoptiontolistpropertiesforaspecificobjecttype.Legaloptiontypesare:cell,
clock,design,lib,lib_cell,lib_pin,lib_timing_arc,net,path_group,pin,
port,timing_arc,timing_pathandtiming_point.Hereisanexample:
encounter>list_propertytypelib_timing_arc
object_type:lib_timing_arc
=================================================
property|return_type
from_lib_pin|collection
mode|string
object_type|string
sdf_cond|string
timing_type|string
to_lib_pin|collection
when|string
Theget_propertycommandreturnsthevalueofthespecifiedproperty.Foralistofallthe
properties,seethedescriptionoftheget_propertycommandintheEDISystemText
CommandReference.
Usage:
get_propertyvar_nameproperty[clockclock_name][view
view_name]
Example:Reporttheclockperiodofclk1
get_property[get_clocksclk1]period
Note:Thereport_propertycommandreturnsthepropertiesandtheirvaluesforaspecified
https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nUjoEAE&pageName=ArticleContent&oMenu=Most%20pouplar&oMenu=Mos 2/6
3/4/2017 ThebasicsofusingtheAdvancedTimingTclScriptingCommands
Note:Thereport_propertycommandreturnsthepropertiesandtheirvaluesforaspecified
object.
Example:Reportthepropertiesforclockclk1
report_property[get_clocksclk1]
Fortimingrelatedpropertiessuchaspropertiesfortimingarcs,pathsandpoints,run
report_timingcollection.Thisreturnstheresultsinacollectionoftimingpaths.
Example:
Reportthetimingandstorethetop10pathsasacollectioninthevariable$paths
setpaths[report_timingcollectionmax_paths10]
Filter$pathstoincludeonlythosepathswithslackbetween0.806nsand0ns Views
421
setnewPaths[filter_collection$paths{(slack>0.806&&slack
<0.0)}] Like
2
Collectioncommands
Lastly,onceyouhavethecollectiondefined,youcanmanipulate,filter,cyclethroughandquery
itusingthecollectionrelatedcommands:
FEEDBACK
add_to_collection append_to_collection compare_collections copy_collection
filter_collection foreach_in_collection index_collection query_objects
remove_from_collection sizeof_collection sort_collection
Examples:
Listthecontentsofacollection
query_objects$collectionName
Cyclethroughtheitemsofacollection
foreach_in_collectioniCell[get_cells*]{
Puts"Cell=[get_property$iCellhierarchical_name]"
}
Bydefault,AdvancedTimingTclcommandslikeget_cellsthatdisplaythecollectionobjects,
listonlythefirst100objectsinacollection.Thisdefaultbehaviorcabbechangedbyusingthe
timing_collection_result_display_limitglobal.Whensettoanintegervalue,all
thecommandssuchas,get_cells,add_to_collection,query_objects,andsoon,
whichdisplaythecollectionobjectsintheoutputreportwillbeimpacted.(Defaultvalueis100).
Todisplayalltheelementsinthecollection,setthisglobalto"1".
set_globaltiming_collection_result_display_limit1
Examplesofsamplescriptsusingthecommandsdiscussedearlier:
Example#1:Scripttoreportoftheendpointsandstartpointsslackoftop1000failingpaths
setrpt[report_timingmax_paths1000max_slack0collection]
foreach_in_collectionr$rpt{puts"Endpoint:[get_property
[get_property$rcapturing_point]hierarchical_name]\t
Startpoint:[get_property[get_property$rlaunching_point]
hierarchical_name]\tSlack:[get_property$rslack]"}
Output:
Endpoint:tdigit[7]Startpoint:
DTMF_INST/DIGIT_REG_INST/digit_out_reg_7/CKSlack:
0.727
Endpoint:tdigit_flagStartpoint:
DTMF_INST/DIGIT_REG_INST/flag_out_reg/CKSlack:
0.495
Endpoint:tdigit[6]Startpoint:
DTMF_INST/DIGIT_REG_INST/digit_out_reg_6/CKSlack:
0.488
https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nUjoEAE&pageName=ArticleContent&oMenu=Most%20pouplar&oMenu=Mos 3/6
3/4/2017 ThebasicsofusingtheAdvancedTimingTclScriptingCommands
0.488
Endpoint:tdigit[5]Startpoint:
DTMF_INST/DIGIT_REG_INST/digit_out_reg_5/CKSlack:
0.409
Endpoint:tdigit[4]Startpoint:
DTMF_INST/DIGIT_REG_INST/digit_out_reg_4/CKSlack:
0.353
Endpoint:tdigit[0]Startpoint:
DTMF_INST/DIGIT_REG_INST/digit_out_reg_0/CKSlack:
0.266
Endpoint:tdigit[3]Startpoint:
DTMF_INST/DIGIT_REG_INST/digit_out_reg_3/CKSlack:
0.218
Endpoint:tdigit[1]Startpoint:
Views
DTMF_INST/DIGIT_REG_INST/digit_out_reg_1/CKSlack:
0.189 421
Endpoint:tdigit[2]Startpoint:
DTMF_INST/DIGIT_REG_INST/digit_out_reg_2/CKSlack:
Like
0.184 2
Example#2:Togetalistoftheregistersinksforaclock
FEEDBACK
redirectclock_sink.rpt{
foreach_in_collectionck[all_clocks]{
puts"Clock_NameNo_of_register_sinksSink_list"
puts"#####################################"
puts"[get_object_name$ck][sizeof_collection
[all_registersclock$ck]][get_object_name[all_registers
clock$ck]]\n"
}
}
Output:
Clock_NameNo_of_register_sinksSink_list
#####################################
m_spi_clk23SPI_INST/spare_200SPI_INST/spare_201
SPI_INST/spare_202SPI_INST/spare_203SPI_INST/spare_204
SPI_INST/spare_205SPI_INST/spare_206SPI_INST/spare_207
SPI_INST/spare_208SPI_INST/spare_209SPI_INST/spare_210
SPI_INST/bit_cnt_reg[3]SPI_INST/bit_cnt_reg[2]
SPI_INST/bit_cnt_reg[1]SPI_INST/bit_cnt_reg[0]
SPI_INST/spi_sr_reg[2]SPI_INST/spi_sr_reg[3]
SPI_INST/spi_sr_reg[4]SPI_INST/spi_sr_reg[5]
SPI_INST/spi_sr_reg[6]SPI_INST/spi_sr_reg[7]
SPI_INST/spi_sr_reg[0]SPI_INST/spi_sr_reg[1]
Example#3:Toreturnalltheinstancepinsthatareusedinthepath
setpaths[report_timingcollection]
foreach_in_collectionpath$paths{
Puts""
settimingPoints[get_property$pathtiming_points]
foreach_in_collectionpoint$timingPoints{
setpinPtr[get_property$pointpin]
setpin[get_object_name$pinPtr]
Puts$pin
}
}
Output:
TDSP_CORE_INST/EXECUTE_INST/sel_op_a_reg[2]/CK
TDSP_CORE_INST/EXECUTE_INST/sel_op_a_reg[2]/Q
TDSP_CORE_INST/EXECUTE_INST/FE_PSC541_sel_op_a_2_/A
TDSP_CORE_INST/EXECUTE_INST/FE_PSC541_sel_op_a_2_/Z
TDSP_CORE_INST/TDSP_CORE_GLUE_INST/Fn0090D/A
https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nUjoEAE&pageName=ArticleContent&oMenu=Most%20pouplar&oMenu=Mos 4/6
3/4/2017 ThebasicsofusingtheAdvancedTimingTclScriptingCommands
TDSP_CORE_INST/TDSP_CORE_GLUE_INST/Fn0090D/A
TDSP_CORE_INST/TDSP_CORE_GLUE_INST/Fn0090D/ZN
TDSP_CORE_INST/TDSP_CORE_GLUE_INST/FE_RC_1304_0/A3
TDSP_CORE_INST/TDSP_CORE_GLUE_INST/FE_RC_1304_0/ZN
TDSP_CORE_INST/TDSP_CORE_GLUE_INST/FE_OCPC334_n_2/A
TDSP_CORE_INST/TDSP_CORE_GLUE_INST/FE_OCPC334_n_2/Z
TDSP_CORE_INST/EXECUTE_INST/FE_PSC520_n_650/A
TDSP_CORE_INST/EXECUTE_INST/FE_PSC520_n_650/Z
TDSP_CORE_INST/EXECUTE_INST/n0439D/A
TDSP_CORE_INST/EXECUTE_INST/n0439D/ZN
TDSP_CORE_INST/EXECUTE_INST/p_reg[27]/D
Example#4:Scripttoreportslackanddifferencebetweenclockarrivaltimeatlaunchand
captureclocks
seta[report_timingmax_paths4collection] Views
puts"" 421
puts"ReportingSlackandSkewbetweenpaths"
puts"" Like
puts"\tStartPoint\t\t\tEndPoint\t\t\tSlack\t\t\tSkew" 2
puts""
foreach_in_collectioni$a{
FEEDBACK
setStartPoint[get_object_name[get_property$i
launching_point]]
setEndPoint[get_object_name[get_property$icapturing_point]]
setl1[get_property$ilaunching_clock_latency]
setl2[get_property$ilaunching_clock_open_edge_time]
setlaunchClockTime[expr$l1+$l2]
setc1[get_property$icapturing_clock_latency]
setc2[get_property$icapturing_clock_close_edge_time]
setcaptureClockTime[expr$c1+$c2]
setSlack[get_property$islack]
setSkew[expr$captureClockTime$launchClockTime]
puts"$StartPoint\t$EndPoint\t$Slack\t$Skew"
}
Output:
TDSP_CORE_INST/EXECUTE_INST/sel_op_a_reg[2]/CK
TDSP_CORE_INST/EXECUTE_INST/p_reg[27]/D843.802
0.015
TDSP_CORE_INST/EXECUTE_INST/sel_op_a_reg[2]/CK
TDSP_CORE_INST/EXECUTE_INST/p_reg[30]/D762.004
0.015
TDSP_CORE_INST/EXECUTE_INST/sel_op_a_reg[2]/CK
TDSP_CORE_INST/EXECUTE_INST/p_reg[24]/D684.326
0.015
TDSP_CORE_INST/EXECUTE_INST/sel_op_a_reg[2]/CK
TDSP_CORE_INST/EXECUTE_INST/p_reg[26]/D680.548
0.015
Example#5:Scripttoreportlogicsbetweenregtoreg.Thisscriptcanbemodifiedfordifferent
pathgroups:
group_pathfrom[all_registers]to[all_registers]nameGRP
seta[report_timingpath_groupGRPmax_paths100collection]
foreach_in_collectioni$a{
setStartPoint[get_object_name[get_property$ilaunching_point]]
setEndPoint[get_object_name[get_property$icapturing_point]]
setpoints[get_property$itiming_points]
puts""
puts"Timingpointsbetween$StartPointand$EndPoint"
puts""
foreach_in_collectionj$points{
setp[get_object_name[get_property$jpin]]
puts$p
https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nUjoEAE&pageName=ArticleContent&oMenu=Most%20pouplar&oMenu=Mos 5/6
3/4/2017 ThebasicsofusingtheAdvancedTimingTclScriptingCommands
RelatedSolutions:
ExampleTclscripttoextracttiminginfofromareport_timingreport
(/apex/ArticleAttachmentPortal?id=a1Od0000000nUjXEAU&pageName=ArticleContent)
HowdoIremoveduplicateobjectsinaTclcollection?
(/apex/ArticleAttachmentPortal?id=a1Od0000000tNKCEA2&pageName=ArticleContent)
Howtoconvertacollectiontoalistorviceversa
(/apex/ArticleAttachmentPortal?id=a1Od0000000vf3UEAQ&pageName=ArticleContent)
UsageofcollectionsinInnovus&Tempus,version15.1andabove Views
(/apex/ArticleAttachmentPortal?id=a1Od0000007MJxJEAW&pageName=ArticleContent) 421
Like
Peoplewhoviewedthisalsoviewed: Youmightbeinterestedin: 2
Howtoreportthedatapath,launchclock HowtopassTclvariablesfrommasterto
path,andcaptureclockpathdelayofa clientsinDistributedMultiModeMulti
FEEDBACK
timingpath Corner(DMMMC)
(/apex/ArticleAttachmentPortal? (/apex/ArticleAttachmentPortal?
id=a1Od0000000tQefEAE&pageName=Article id=a1Od00000004q6bEAA&pageName=Ar
whoviewedthisalsoviewed) whichmaybesimilartothisdocument)
ExampleTclscripttoextracttiminginfo Howtogetthetimingtypeofallthearcs
fromareport_timingreport ofaninstance
(/apex/ArticleAttachmentPortal? (/apex/ArticleAttachmentPortal?
id=a1Od0000000nUjXEAU&pageName=Articl id=a1Od0000000nUtgEAE&pageName=Art
whoviewedthisalsoviewed) whichmaybesimilartothisdocument)
Howtocreatealistofcellsinatiming Whatisthecriteriausedbywrite_sdfto
path? dothefilteringofnegativetimingcheck
(/apex/ArticleAttachmentPortal? values?
id=a1Od0000000uahSEAQ&pageName=Artic (/apex/ArticleAttachmentPortal?
whoviewedthisalsoviewed) id=a1Od0000000nVqHEAU&pageName=Ar
whichmaybesimilartothisdocument)
UsageofcollectionsinInnovus&Tempus,
version15.1andabove Howtoredirectthelogsofmultiple
(/apex/ArticleAttachmentPortal? Innovus/Tempuscommandstoasingle
id=a1Od0000007MJxJEAW&pageName=Artic file
whoviewedthisalsoviewed) (/apex/ArticleAttachmentPortal?
id=a1Od0000000nvypEAA&pageName=Art
whichmaybesimilartothisdocument)
Exploreyourdesignwiththeseuseful
singlelinedbGetscripts
(/apex/ArticleAttachmentPortal? Examplesofhighlightingorselecting
id=a1Od0000000nUuIEAU&pageName=Articl timingpaths,andexportingaGIF
whoviewedthisalsoviewed) (/apex/ArticleAttachmentPortal?
id=a1Od0000000tExoEAE&pageName=Arti
whichmaybesimilartothisdocument)
https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nUjoEAE&pageName=ArticleContent&oMenu=Most%20pouplar&oMenu=Mos 6/6