Commit bdc6ffd5 by sakundu

Updated PDN flow and added PDN config for ASAP7 and SKY130HD

Signed-off-by: sakundu <sakundu@ucsd.edu>
parent 2cb68375
#################################################################
# This is the config file for power grid generation. Variables in
# this files are used by pdn_flow.tcl available in the Flows/util
# directory.
#################################################################
# minCh: If channel width is less than minCh it will be filled
# with hard blockages.
# layers: Name of the layers.
# width: Width of the layer.
# pitch: Distance b/w two vdd/vss set.
# spacing: Spacing b/w the stripe of vdd and vss.
# ldir: Layer direction. 0 is horizontal and 1 is vertical.
# isMacro: If layer stripe is only above macro.
# isBM: If layer is below the top layer of macro.
# isAM: If layer is above the top layer of macro.
# isFP: If layer is for follow pin.
# soffset: Start offset of the stripe.
# addch: Any requierment to add extra layer in the macro
# channel.
#################################################################
set minCh 2
set offset [expr 2.88 - [expr 0.081 + [dbget top.fplan.coreBox_llx ]] ]
set layers "M1 M2 M3 M5 M6 M7"
set width "0 0.018 0.162 0.312 0.416 0.544"
set pitch "0 0 2.88 2.016 12.8 7.2"
set spacing "0 0 0.27 0.504 0.672 0.672"
set ldir "0 0 1 1 0 1"
set isMacro "0 0 0 1 0 0"
set isBM "1 1 1 0 0 0"
set isAM "0 0 0 0 1 1"
set isFP "1 1 0 0 0 0"
set soffset "0 0 $offset 0.254 0.416 0.544"
set addch "0 0 1 0 0 0"
\ No newline at end of file
#################################################################
# This is the config file for power grid generation. Variables in
# this files are used by pdn_flow.tcl available in the Flows/util
# directory.
#################################################################
# minCh: If channel width is less than minCh it will be filled
# with hard blockages.
# layers: Name of the layers.
# width: Width of the layer.
# pitch: Distance b/w two vdd/vss set.
# spacing: Spacing b/w the stripe of vdd and vss.
# ldir: Layer direction. 0 is horizontal and 1 is vertical.
# isMacro: If layer stripe is only above macro.
# isBM: If layer is below the top layer of macro.
# isAM: If layer is above the top layer of macro.
# isFP: If layer is for follow pin.
# soffset: Start offset of the stripe.
# addch: Any requierment to add extra layer in the macro
# channel.
#################################################################
set minCh 5
set layers "met1 met4 met5 met6 met7 met8 met9"
set width "0 1.38 1.36 1.36 2.76 2.76 3.40"
set pitch "0 20.24 10.2 10.2 30.36 30.36 34.0"
set spacing "0 0.23 0.34 0.34 0.46 0.46 1.70"
set ldir "0 1 0 1 0 1 0"
set isMacro "0 0 1 1 0 0 0"
set isBM "1 1 0 0 0 0 0"
set isAM "0 0 1 1 1 1 1"
set isFP "1 0 0 0 0 0 0"
set soffset "0 2 2 2 2 2 2"
set addch "0 1 0 0 0 0 0"
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
set nets [list VDD VSS] set nets [list VDD VSS]
#### Un Place Global Placed cells and cut Row #### #### Un Place Global Placed cells and cut Row ####
dbset [dbget top.insts.isHaloBlock 0 -p ].pStatus unplaced dbset [dbget top.insts.cell.subClass core -p2 ].pStatus unplaced
finishFloorplan -fillPlaceBlockage hard $minCh finishFloorplan -fillPlaceBlockage hard $minCh
cutRow cutRow
finishFloorplan -fillPlaceBlockage hard $minCh finishFloorplan -fillPlaceBlockage hard $minCh
...@@ -28,6 +28,10 @@ clearGlobalNets ...@@ -28,6 +28,10 @@ clearGlobalNets
globalNetConnect VDD -type pgpin -pin VDD -inst * -override globalNetConnect VDD -type pgpin -pin VDD -inst * -override
globalNetConnect VSS -type pgpin -pin VSS -inst * -override globalNetConnect VSS -type pgpin -pin VSS -inst * -override
######################## For SKY130HD #######################
globalNetConnect VDD -type pgpin -pin VPWR -inst * -override
globalNetConnect VSS -type pgpin -pin VGND -inst * -override
# globalNetConnect VDD -type pgpin -pin VDDCE -inst * -override # globalNetConnect VDD -type pgpin -pin VDDCE -inst * -override
# globalNetConnect VDD -type pgpin -pin VDDPE -inst * -override # globalNetConnect VDD -type pgpin -pin VDDPE -inst * -override
# globalNetConnect VSS -type pgpin -pin VSSE -inst * -override # globalNetConnect VSS -type pgpin -pin VSSE -inst * -override
...@@ -39,6 +43,10 @@ globalNetConnect VDD -type tiehi -all -override ...@@ -39,6 +43,10 @@ globalNetConnect VDD -type tiehi -all -override
globalNetConnect VSS -type tielo -all -override globalNetConnect VSS -type tielo -all -override
#################################################### ####################################################
deselectAll
select_obj [dbget top.fplan.pBlkgs.name finishfp_place_blkg_* -p1]
deleteSelectedFromFPlan
deselectAll
setGenerateViaMode -auto true setGenerateViaMode -auto true
generateVias generateVias
...@@ -63,6 +71,7 @@ set flag1 0 ...@@ -63,6 +71,7 @@ set flag1 0
while { $i < $lcount } { while { $i < $lcount } {
set lname [lindex $layers $i] set lname [lindex $layers $i]
set isfp [lindex $isFP $i] set isfp [lindex $isFP $i]
set wdth [lindex $width $i]
set dir "vertical" set dir "vertical"
if { [lindex $ldir $i] == 0 } { if { [lindex $ldir $i] == 0 } {
...@@ -71,12 +80,18 @@ while { $i < $lcount } { ...@@ -71,12 +80,18 @@ while { $i < $lcount } {
if { $isfp == 1 } { if { $isfp == 1 } {
puts "Add follow pin creation script" puts "Add follow pin creation script"
deselectAll
editSelect -layer [lindex $layers 0] -net $nets
editDuplicate -layer_horizontal $lname
deselectAll
editSelect -layer $lname -net $nets
editResize -to $wdth -side high -direction y -keep_center_line 1
deselectAll
} else { } else {
set isbm [lindex $isBM $i] set isbm [lindex $isBM $i]
set ism [lindex $isMacro $i] set ism [lindex $isMacro $i]
set isam [lindex $isAM $i] set isam [lindex $isAM $i]
set spc [lindex $spacing $i] set spc [lindex $spacing $i]
set wdth [lindex $width $i]
set ptch [lindex $pitch $i] set ptch [lindex $pitch $i]
set sofst [lindex $soffset $i] set sofst [lindex $soffset $i]
set isch [lindex $addch $i] set isch [lindex $addch $i]
...@@ -98,11 +113,11 @@ while { $i < $lcount } { ...@@ -98,11 +113,11 @@ while { $i < $lcount } {
} elseif { $ism == 1 } { } elseif { $ism == 1 } {
setAddStripeMode -extend_to_closest_target none setAddStripeMode -extend_to_closest_target none
setAddStripeMode -inside_cell_only true setAddStripeMode -inside_cell_only true
foreach mcell [dbget [dbget top.insts.isHaloBlock 1 -p ].cell.name -u] { foreach mcell [dbget [dbget top.insts.cell.subClass block -p2 ].cell.name -u] {
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \ addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch -master $mcell -start_offset $sofst -set_to_set_distance $ptch -master $mcell
} }
foreach inst [dbget [dbget top.insts.isHaloBlock 1 -p ].name ] { foreach inst [dbget [dbget top.insts.cell.subClass block -p2 ].name ] {
createRouteBlk -inst $inst -cover -layer $prevLayer -name mcro_blk createRouteBlk -inst $inst -cover -layer $prevLayer -name mcro_blk
} }
} elseif { $isam == 1 } { } elseif { $isam == 1 } {
...@@ -112,7 +127,7 @@ while { $i < $lcount } { ...@@ -112,7 +127,7 @@ while { $i < $lcount } {
setAddStripeMode -stacked_via_bottom_layer $prevLayer -stacked_via_top_layer $lname setAddStripeMode -stacked_via_bottom_layer $prevLayer -stacked_via_top_layer $lname
} }
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \ addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch -start_offset $sofst -set_to_set_distance $ptch -extend_to design_boundary
if { $isch == 1 } { if { $isch == 1 } {
setAddStripeMode -extend_to_closest_target same_dir_stripe setAddStripeMode -extend_to_closest_target same_dir_stripe
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \ addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
...@@ -121,13 +136,13 @@ while { $i < $lcount } { ...@@ -121,13 +136,13 @@ while { $i < $lcount } {
} else { } else {
puts "Layer:$lname is not routed" puts "Layer:$lname is not routed"
} }
set prevLayer $lname
set i [expr $i + 1]
} }
set prevLayer $lname
set i [expr $i + 1]
} }
deleteRouteBlk -name mcro_blk deleteRouteBlk -name mcro_blk
verify_connectivity -net $nets -geom_connect -no_antenna -error 0 # verify_connectivity -net $nets -geom_connect -no_antenna -error 0
# placeDesign -concurrent_macro changes the default placement # placeDesign -concurrent_macro changes the default placement
# settings # settings
#setPlaceMode -place_opt_run_global_place full setPlaceMode -place_opt_run_global_place full
...@@ -3,6 +3,5 @@ source /home/tool/anaconda3/etc/profile.d/conda.sh ...@@ -3,6 +3,5 @@ source /home/tool/anaconda3/etc/profile.d/conda.sh
conda activate py-tf conda activate py-tf
export PROJ_DIR=`pwd | grep -o '\S*/MacroPlacement'` export PROJ_DIR=`pwd | grep -o '\S*/MacroPlacement'`
export PYTHONPATH=$PYTHONPATH:${PROJ_DIR}/Flows/util/ export PYTHONPATH=$PYTHONPATH:${PROJ_DIR}/Flows/util/
cd $1 python ${PROJ_DIR}/Flows/util/flow.py $PWD output_CodeElement 2>&1 | tee log/codelement.log
python ${PROJ_DIR}/Flows/util/flow.py $1 output_CodeElement_run1 2>&1 | tee log/codelement_run1.log
exit exit
#!/usr/bin/env bash #!/usr/bin/env bash
##########################################################################
# Update HMETIS_DIR PLC_WRAPPER_MAIN and CT_PATH
##########################################################################
if [ $PHY_SYNTH -eq 1 ]; then if [ $PHY_SYNTH -eq 1 ]; then
export PROJ_DIR=`pwd | grep -o '\S*/MacroPlacement'` export PROJ_DIR=`pwd | grep -o '\S*/MacroPlacement'`
export NETLIST_FILE=`readlink -f *.pb.txt` export NETLIST_FILE=`readlink -f *.pb.txt`
......
## Make sure all the Macro has HALO ##
addHaloToBlock -allMacro $HALO_WIDTH $HALO_WIDTH $HALO_WIDTH $HALO_WIDTH
deselectAll deselectAll
set top_module [dbget top.name] set top_module [dbget top.name]
...@@ -16,7 +18,13 @@ defOut -selected -floorplan ./def/${top_module}_fp_macro_placed.def ...@@ -16,7 +18,13 @@ defOut -selected -floorplan ./def/${top_module}_fp_macro_placed.def
dbset [dbget top.insts.isHaloBlock 1 -p ].pStatus fixed dbset [dbget top.insts.isHaloBlock 1 -p ].pStatus fixed
deselectAll deselectAll
### Remove Halo as OR do not support ###
deleteHaloFromBlock -allBlock
#### Below files can be used in the Code element to generate clustered netlist #### #### Below files can be used in the Code element to generate clustered netlist ####
defOut -netlist ./def/${top_module}.def defOut -netlist ./def/${top_module}.def
saveNetlist -removePowerGround ./def/${top_module}.v saveNetlist -removePowerGround ./def/${top_module}.v
saveNetlist -flat -removePowerGround ./def/${top_module}_flat.v saveNetlist -flat -removePowerGround ./def/${top_module}_flat.v
### Add halo again ###
addHaloToBlock -allMacro $HALO_WIDTH $HALO_WIDTH $HALO_WIDTH $HALO_WIDTH
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment