summaryrefslogtreecommitdiff
path: root/scripts/placement.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/placement.sh')
-rwxr-xr-xscripts/placement.sh70
1 files changed, 38 insertions, 32 deletions
diff --git a/scripts/placement.sh b/scripts/placement.sh
index 5425720..5116f3c 100755
--- a/scripts/placement.sh
+++ b/scripts/placement.sh
@@ -167,7 +167,7 @@ endif
# information to GrayWolf for a final placement pass using fill to
# break up congested areas.
-if ( -f ${rootname}.acel && ( -M ${rootname}.acel > -M ${rootname}.cel )) then
+if ( -f ${rootname}.acel && ( -M ${rootname}.acel >= -M ${rootname}.cel )) then
cp ${rootname}.cel ${rootname}.cel.bak
mv ${rootname}.acel ${rootname}.cel
set final = 1
@@ -208,7 +208,7 @@ endif
# powerbus.tcl creates a .acel file if successful. If not, then
# leave the .cel file in place
-if ( -f ${rootname}.acel && ( -M ${rootname}.acel > -M ${rootname}.cel )) then
+if ( -f ${rootname}.acel && ( -M ${rootname}.acel >= -M ${rootname}.cel )) then
cp ${rootname}.cel ${rootname}.cel.bak
mv ${rootname}.acel ${rootname}.cel
endif
@@ -324,8 +324,35 @@ if ($makedef == 1) then
exit 1
endif
- # Copy the .def file to a backup called "unroute" (temporary)
- cp ${rootname}.def ${rootname}_unroute.def
+ #---------------------------------------------------------------------
+ # Add spacer cells to create a straight border on the right side
+ #---------------------------------------------------------------------
+
+ if ( -f ${scriptdir}/addspacers.tcl ) then
+
+ if ( !( ${?addspacers_options} )) then
+ set addspacers_options = ""
+ endif
+
+ echo "Running addspacers.tcl ${addspacers_options} ${rootname} ${lefpath} ${fillcell}" |& tee -a ${synthlog}
+
+ ${scriptdir}/addspacers.tcl ${addspacers_options} \
+ ${rootname} ${lefpath} ${fillcell} >>& ${synthlog}
+ if ( -f ${rootname}_filled.def ) then
+ mv ${rootname}_filled.def ${rootname}.def
+ # Copy the .def file to a backup called "unroute"
+ cp ${rootname}.def ${rootname}_unroute.def
+ endif
+
+ if ( -f ${rootname}.obsx ) then
+ # If addspacers annotated the .obs (obstruction) file, then
+ # overwrite the original.
+ mv ${rootname}.obsx ${rootname}.obs
+ endif
+ else
+ # Copy the .def file to a backup called "unroute"
+ cp ${rootname}.def ${rootname}_unroute.def
+ endif
# If the user didn't specify a number of layers for routing as part of
# the project variables, then the info file created by qrouter will have
@@ -351,7 +378,7 @@ if ($makedef == 1) then
echo "read_lef ${techlefpath}" >> ${rootname}.cfg
endif
echo "read_lef ${lefpath}" >> ${rootname}.cfg
- echo "catch layers ${route_layers}" >> ${rootname}.cfg
+ echo "catch {layers ${route_layers}}" >> ${rootname}.cfg
if ( ${?via_pattern} ) then
echo "" >> ${rootname}.cfg
echo "via pattern ${via_pattern}" >> ${rootname}.cfg
@@ -386,6 +413,7 @@ if ($makedef == 1) then
endif
# Add obstruction fence around design, created by place2def.tcl
+ # and modified by addspacers.tcl
if ( -f ${rootname}.obs ) then
cat ${rootname}.obs >> ${rootname}.cfg
@@ -407,14 +435,10 @@ if ($makedef == 1) then
cat ${rootname}.cfg2 >> ${rootname}.cfg
else
if (${scripting} == "T") then
- if (${final} == 0) then
- echo "qrouter::congestion_route ${rootname}.cinfo" >> ${rootname}.cfg
- else
- echo "qrouter::standard_route" >> ${rootname}.cfg
- # Standard route falls back to the interpreter on failure,
- # so make sure that qrouter actually exits.
- echo "quit" >> ${rootname}.cfg
- endif
+ echo "qrouter::standard_route" >> ${rootname}.cfg
+ # Standard route falls back to the interpreter on failure,
+ # so make sure that qrouter actually exits.
+ echo "quit" >> ${rootname}.cfg
endif
endif
@@ -461,7 +485,7 @@ if ($makedef == 1) then
${rootname}_anno.blif > ${rootname}.rtlnopwr.v
echo "Running blif2BSpice." |& tee -a ${synthlog}
- ${bindir}/blif2BSpice -p ${vddnet} -g ${gndnet} -l \
+ ${bindir}/blif2BSpice -i -p ${vddnet} -g ${gndnet} -l \
${spicepath} ${rootname}_anno.blif \
> ${rootname}.spc
@@ -494,24 +518,6 @@ if ($makedef == 1) then
endif
#---------------------------------------------------
-# 3) Add spacer cells to create a straight border on
-# the right side
-#---------------------------------------------------
-
-if ($makedef == 1) then
- if ( -f ${scriptdir}/addspacers.tcl ) then
- echo "Running addspacers.tcl"
- ${scriptdir}/addspacers.tcl ${rootname} ${lefpath} \
- $fillcell >>& ${synthlog}
- if ( -f ${rootname}_filled.def ) then
- mv ${rootname}_filled.def ${rootname}.def
- # Copy the .def file to a backup called "unroute" (final)
- cp ${rootname}.def ${rootname}_unroute.def
- endif
- endif
-endif
-
-#---------------------------------------------------
# 4) Remove working files (except for the main
# output files .pin, .pl1, and .pl2
#---------------------------------------------------