Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
procedures.tcl
#remove lines procedure proc removeLines {fileName startLine count} { # Work out range to remove set from [expr {$startLine - 1}] set to [expr {$startLine + $count - 2}] # Read the lines set f [open $fileName] set lines [split [read $f] "\n"] close $f # Write the lines back out, without removed range set f [open $fileName w] puts -nonewline $f [join [lreplace $lines $from $to] "\n"] close $f } #---------------------------------------------------------------------------------------------------------------------------------# #Buffer count proc proc buf_count {} { foreach_in_collection cell_name [get_lib_cells */* -filter "function_id==a1.0" ] { set buffer_name [get_attribute [get_lib_cells $cell_name] name] set inst_name [get_cells -hierarchical -quiet -filter "ref_name == $buffer_name"] #echo "Number of buffers used in this design with the reference $buffer_name [sizeof_collection $inst_name]" > buff_count.csv echo $buffer_name [sizeof_collection $inst_name] } } buf_count > ../scripts/buff_count.csv #---------------------------------------------------------------------------------------------------------------------------------# #Inverter count proc proc inv_count {} { foreach_in_collection cell_name [get_lib_cells */* -filter "function_id==Ia1.0" ] { set inverter_name [get_attribute [get_lib_cells $cell_name] name] set inst_name [get_cells -hierarchical -quiet -filter "ref_name == $inverter_name"] #echo "Number of buffers used in this design with the reference $buffer_name [sizeof_collection $inst_name]" > buff_count.csv echo $inverter_name [sizeof_collection $inst_name] } } inv_count > ../scripts/inv_count.csv #---------------------------------------------------------------------------------------------------------------------------------# #Stage to stage design save proc c b { save_block save_lib copy_block -from_block [current_design ] -to_block $b close_blocks -force open_block $b save_lib echo "Current block is changed to [get_object_name [current_design]]" } #usage #run above proc #c route #now new block will open with design route.design #---------------------------------------------------------------------------------------------------------------------------------# #Scripts dumps man page, help and example of the command #creates a directory in previous folder and opens all files in the tool #Engineer : Peddi Mani Shankar #19 Dec 2019 proc m {a} { set d ../man_help sh test -d $d || mkdir $d man $a > $d/$a\_man.txt sh sed -n "/EXAMPLES/,/SEE ALSO/p" $d/$a\_man.txt > $d/$a\_example.txt help -v $a > $d/$a\_help.txt sh gvim -O $d/$a\_man.txt $d/$a\_help.txt $d/$a\_example.txt & } #usage #run above proc #m check_design #---------------------------------------------------------------------------------------------------------------------------------#
run
|
edit
|
history
|
help
0
1
code to identify whether particular coordinate lies in bbox
Trail
Convert a collection to a list
mysrc.tcl
test
Get EarliestTimestamp
Perfect decimal to binary add
Perfect neg float bin multiplier
proc example {required {default1 А} {default2 Б} args} {...}