0% found this document useful (0 votes)
375 views

Script Enc

The document contains procedures to find cell slack, place unplaced ports, and locate memory instances. It defines procedures to find cells with slack less than -0.150 ns, place unplaced ports in the top-level design, and write the placement locations of memory instances to a file. It also defines several helper procedures for selection and analysis of cells and ports.

Uploaded by

pdnoob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
375 views

Script Enc

The document contains procedures to find cell slack, place unplaced ports, and locate memory instances. It defines procedures to find cells with slack less than -0.150 ns, place unplaced ports in the top-level design, and write the placement locations of memory instances to a file. It also defines several helper procedures for selection and analysis of cells and ports.

Uploaded by

pdnoob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

###find cell slack

1 setAnalysisMode -checkType setup


2 set cel [get_cells *]
3 foreach_in_collection x $cel {
4
set ref_nam [get_property $x full_name]
5 set slack [get_property [get_pins -of [get_cells $x] -filter "full_name =~
*/Q"] slack_max]
6
7 if { $slack <= -0.150 } {
8
puts -nonewline "$ref_nam $slack\n";
9 #
selectInst $ref_nam
10 }
11 }

## placing pins
2 proc checkUnplacedPorts {} {
3
set allTerms ""
4
set i 0
5
foreach_in_collection inpt [get_ports] {
6
set termName [get_object_name $inpt]
7
lappend allTerms $termName
8
}
9
10
foreach term $allTerms {
11
if { [regexp {unplaced} [dbGet [dbGet -p top.terms.name $ter
m].pstatus]] } {
12
echo "$term is unplaced"
13
incr i
14
}
15
}
16
puts "Total number of Unplaced Ports : $i"
17 }
18
19 proc placedUplacedPortsAtTOP {} {
20
set allTerms ""
21
foreach_in_collection inpt [get_ports] {
22
set termName [get_object_name $inpt]
23
lappend allTerms $termName
24
}
25
26
set unPlacedTerm ""
27
28
foreach term $allTerms {
29
if { [regexp {unplaced} [dbGet [dbGet -p top.terms.name $ter
m].pstatus]] } {
30
lappend unPlacedTerm $term
31
}
32
}
33
34
set yMax [lindex [lindex [dbGet top.fplan.box] 0] 3]
35
set unplacedPorts [get_ports $unPlacedTerm]
36
puts "Found [ sizeof_collection $unplacedPorts ] pins ( will be plac
ed in TOP ) "
37
set escapefunplacedPorts [get_property $unplacedPorts escaped_name]
38
editPin -pinWidth 0.088 -pinDepth 0.432 -fixOverlap 1 -pattern fill_ch
eckerboard -spreadDirection counterclockwise -unit MICRON -spacing 0.256 -side B

OTTOM
Ports
39
40
41 }
42

-start 300.0 $yMax -end 400.0 $yMax -layer {5 7} -pin $escapefunplaced

## memory location
18 proc mem_pl_fnd { {filename memory_plc_lst.tcl} } {
19 set f [open $filename w]
20 foreach_in_collection tril [get_cells * -filter "ref_lib_cell_name =~ *mem
* && @is_black_box==true"] {
21
set mem_name [get_object_name $tril]
22
set x_loc [lindex [dbInstLoc [dbGetInstByName $mem_name]] 0]
23
set y_loc [lindex [dbInstLoc [dbGetInstByName $mem_name]] 1]
24
set ornt [string map {dbc ""} "[dbInstOrient [dbGetInstByName $mem_name]
]"]
25
puts $f "dbPlaceInst \[dbGetInstByName $mem_name\] ${x_loc} ${y_loc} ${o
rnt}"
26
puts $f "dbSetInstPlacementStatus \[dbGetInstByName $mem_name\] dbcFixed
"
27 }
28 close $f
29 }
30
31
####some useful procs
36alias gs agGetSelected
37 alias cs cs_i
38 alias gc get_cells
39 alias gon get_object_name
40 alias gp get_property
41 alias rp report_property
42 alias si selectInst
43 alias sn selectNet
44 alias ds deselectAll
32
63 proc cs_i { cColl } {
64
foreach_in_coll x $cColl {
65
if { [ get_property $x object_type ] == "pin" } {
66
selectInst [ get_object_name [ get_cell -of $x ] ]
67
} elseif { [ get_property $x object_type ] == "port" } {
68
#skip
69
} else {
70
selectInst [ get_object_name $x ]
71
}
72
}
73 }
74
75 proc fanout_cells_of_selection {} {
76
cs [ all_fanout -from [ get_pins -of [ gs] ]]
77 }
78 proc fanin_cells_of_selection {} {
79
cs [ all_fanin -to [ get_pins -of [ gs] ]]
80 }
81 proc fanoutc_cells_of_selection {} {
82
#cs [ all_fanout -from [ get_pins -of [ gs] ] -only_cells ]

83
cs [ all_fanout -from [ get_pins -of [ gs] -filter "direction == ou
t && name != SO && name !~TEST__SO* && name != ROW_REDN_OUT && name !~ COL_REDN_
OUT*
&& name !=TEST__TDR_SOUT && name !=TEST__DFT_CLK " ] -only_cells ]
84 }
85 proc faninc_cells_of_selection {} {
86
cs [ all_fanin -to [ get_pins -of [ gs] -filter "direction == in &&
name != SI && name !=SE && name !=CK && name != TEST__TDR_SIN && name !~TEST__S
IN* &
& name != ROW_REDN_IN && name != COL_REDN_IN " ] -only_cells ]
87 }
88
89 proc pfanout_cells_of_selection {} {
90
cs [ get_cells -of [ all_fanout -from [ gs] ] ]
91 }
92 proc pfanin_cells_of_selection {} {
93
cs [ get_cells -of [ all_fanin -to [ gs] ] ]
94 }
95
96 proc fanoutce_cells_of_selection {} {
97
cs [ all_fanout -from [ get_pins -of [ gs] -filter "direction == ou
t && name != SO && name !~TEST__SO* && name != ROW_REDN_OUT && name !~ COL_REDN_
OUT*
&& name !=TEST__TDR_SOUT && name !=TEST__DFT_CLK " ] -only_cells -end
]
98 }
99 proc fanince_cells_of_selection {} {
100
cs [ all_fanin -to [ get_pins -of [ gs] -filter "direction == in &&
name != SI && name !=SE && name !=CK && name != TEST__TDR_SIN && name !~TEST__S
IN* &
& name != ROW_REDN_IN && name != COL_REDN_IN " ] -only_cells -start ]
101 }
102

You might also like