You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.5 KiB
Tcl

3 years ago
if {![info exists standalone] || $standalone} {
# Read lef
read_lef $::env(TECH_LEF)
read_lef $::env(SC_LEF)
if {[info exist ::env(ADDITIONAL_LEFS)]} {
foreach lef $::env(ADDITIONAL_LEFS) {
read_lef $lef
}
}
# Read liberty files
foreach libFile $::env(LIB_FILES) {
read_liberty $libFile
}
# Read design files
read_def $::env(RESULTS_DIR)/2_2_floorplan_io.def
read_sdc $::env(RESULTS_DIR)/2_floorplan.sdc
if [file exists $::env(PLATFORM_DIR)/derate.tcl] {
source $::env(PLATFORM_DIR)/derate.tcl
}
} else {
puts "Starting TDMS placement"
}
proc find_macros {} {
set macros ""
set db [::ord::get_db]
set block [[$db getChip] getBlock]
foreach inst [$block getInsts] {
set inst_master [$inst getMaster]
# BLOCK means MACRO cells
if { [string match [$inst_master getType] "BLOCK"] } {
append macros " " $inst
}
}
return $macros
}
# Set res and cap
source $::env(PLATFORM_DIR)/setRC.tcl
set_dont_use $::env(DONT_USE_CELLS)
if {[info exists ::env(MACRO_PLACEMENT)]} {
puts "\[INFO\]\[FLOW-xxxx\] Using manual macro placement file $::env(MACRO_PLACEMENT)"
} elseif {[find_macros] != ""} {
global_placement -density $::env(PLACE_DENSITY) \
-pad_left $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT) \
-pad_right $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT)
} else {
puts "No macros found: Skipping global_placement"
}
if {![info exists standalone] || $standalone} {
write_def $::env(RESULTS_DIR)/2_3_floorplan_tdms.def
exit
}