Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

DC TCL script to find Logic_level between 2 FFs in design

Status
Not open for further replies.

harsh_patel_707

Newbie level 1
Newbie level 1
Joined
Jun 16, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
INDIA
Activity points
1,292
can any one tell me how i can get these 2 things in DC..

1. DC TCL script to provide a list of all combinatorial cells and their corresponding areas side by side like a table

2.DC TCL script to find out the levels of logics between every two flip-flop in a design.

I need help very soon..
plz help me asap..
 

I want to do something like this on parallel grounds. I need DC-TCL script for checking a chain of buffers/inverters in a netlist. can some1 please point to some script which can help me over it.
Thanks !
 

hai buddy,
using the below command u can get all combinational cells, count and their cell area side by side like a table..

summaryReport -noHtml -outfile summaryReport.rpt

---------- Post added at 10:27 ---------- Previous post was at 10:15 ----------

hai shaival,
Here a sample script in encounter tcl for calculating the number the number of buffers and nonbuffers. I wroted using function. The logic simply you can do is check using "if statement " for the presence of chain bufffers and inv.. This logic may help you...

proc level_count {path} {
set points [get_property $path timing_points]
set buffer_count 0
set non_buffer_count 0
foreach_in_collection point $points {
set pin [get_property $point pin]
set cell [get_object_name [get_cells -of_object $pin]]
foreach_in_collection cell [get_cells $cell -filter "ref_name =~ BUF*"] {
incr buffer_count
}
foreach_in_collection cell [get_cells $cell -filter "ref_name !~ BUF*"] {
incr non_buffer_count
}
}
set non_buffer_count [expr {$non_buffer_count/2}]
set buffer_count [expr {$buffer_count/2}]
puts "number of buffer level = $buffer_count"
puts "number of logic level = $non_buffer_count"
}

level_count [report_timing -collection]


Thanks...:razz:
 
Hi Vijay , Thanks :)

Your script does count the buffers but I guess its not having the logic of checking the presence of consecutive buffers. can you elaborate a little more how you were suggesting using "if statement "?

And thanks for the summary command too :)
 

hai shaival,

first set the buffer count to 0

Inside the foreach use this

set buf [get_object_name [get_cells $cell -filter "ref_name =~ BUF*"]]
if {[get_property [get_cells $buf] ref_name] ne "" }

Inside this if statement you can increment the buffer count

Also check for nonbuffers like the same above if statement

inide this if statement you can check for the buffer count using another if statement

if its greater than 1 then u can predict that there is consecutive buffers

Then reset the buffer count to 0.

Thats it... I tried and i got the consecutive buffers..

i hope it may help u.. thanks::razz:
 
Can any1 help me to point out the error with this to identify a bufferchain? Thanks in advance :)

proc buffer_chain {} {
set buffer_inv_cells [get_object_name [get_cells -hier -filter "ref_name =~ BUF*" ] ]
foreach cell $buffer_inv_cells {

set bf_temp [list $cell ];
set i 0
while { [llength $bf_temp] > 0 } {
set bf [lindex $bf_temp $i ] ;
incr i ;
if { [sizeof_collection [all_fanout -from ${bf}/Y* -flat -levels 1 -only_cells ] ] > 2 } {
#echo " Buffer/Inv $bf_temp is part of a buffer tree and not a buffer chain " ;
break ;
} else {
if {[sizeof_collection [get_cells[all_fanout -from ${bf}/Y* -flat -levels 1 -only_cells ] -filter "ref_name =~ BUF*" ]]!=0} {
# echo " Found the next stage in the buffer chain " ;
set a [get_object_name [all_fanout -from $bf/Y* -flat -levels 1 -only_cells ] ]
lappend bf_temp [lindex $a [expr [llength $a] -1 ]] ;
} else {
#echo " Found the end of the buffer tree " ;
set b [get_object_name [all_fanout -from $bf/Y* -flat -levels 1 -only_cells ] ]
echo " Buffer Chain starts at $cell and ends at $b] ";
break ;
}
}
}
}
}
buffer_chain
 

Hai shaival,

There are two bugs.. Both are spacing errors...


proc buffer_chain {} {
set buffer_inv_cells [get_object_name [get_cells -hier -filter "ref_name =~ BUF*" ] ]
foreach cell $buffer_inv_cells {
#bug1 space should be in bf_temp[list $cell ] so use like below i mentioned
set bf_temp [list $cell ];
set i 0
while { [llength $bf_temp] > 0 } {
set bf [lindex $bf_temp $i ] ;
incr i ;
if { [sizeof_collection [all_fanout -from ${bf}/Y* -flat -levels 1 -only_cells ] ] > 2 } {
#echo " Buffer/Inv $bf_temp is part of a buffer tree and not a buffer chain " ;
break ;
} else {
#bug2 Also space should be in getcells so use like below i mentioned
if {[sizeof_collection [get_cells [all_fanout -from ${bf}/Y* -flat -levels 1 -only_cells ] -filter "ref_name =~ BUF*" ]]!=0} {
# echo " Found the next stage in the buffer chain " ;
set a [get_object_name [all_fanout -from $bf/Y* -flat -levels 1 -only_cells ] ]
lappend bf_temp [lindex $a [expr [llength $a] -1 ]] ;
} else {
#echo " Found the end of the buffer tree " ;
set b [get_object_name [all_fanout -from $bf/Y* -flat -levels 1 -only_cells ] ]
echo " Buffer Chain starts at $cell and ends at $b] ";
break ;
}
}
}
}
}
buffer_chain

After this your coding will work only thing u need to check only the logic............

This may help u... Thanks:razz:

---------- Post added at 09:28 ---------- Previous post was at 09:00 ----------

shaival

i havent metioned the space there.... sorry


use like this..

set bf_temp [list $cell ];

:wink:
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top