Commit 261b7391 by sakundu

Added PDN generation script and updated protobuf generation scripts

Signed-off-by: sakundu <sakundu@ucsd.edu>
parent 2fa5afdc
Flows/*/*/run/*/ Flows/*/*/run/*/
Flows/*/*/run-* Flows/*/*/run-*
Flows/job Flows/job
Flows/util/__pycache__
CodeElements/*/*/__pycache__ CodeElements/*/*/__pycache__
...@@ -49,7 +49,7 @@ def PlaceMacros(macro_map, grid_list, chip_width, chip_height, n): ...@@ -49,7 +49,7 @@ def PlaceMacros(macro_map, grid_list, chip_width, chip_height, n):
# Place macro one by one # Place macro one by one
for key, value in macro_map.items(): for key, value in macro_map.items():
width = value[0] width = value[0]
height = value[0] height = value[1]
macro_id = key macro_id = key
placed_flag = False placed_flag = False
for grid in grid_list: for grid in grid_list:
......
#################################################################
# 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 "metal1 metal4 metal5 metal6 metal7 metal10"
set width "0 0.84 0.84 0.84 2.4 3.20"
set pitch "0 20.16 10.08 10.08 40 32"
set spacing "0 0.56 0.56 0.56 1.6 1.6"
set ldir "0 1 0 1 0 1"
set isMacro "0 0 1 1 0 0"
set isBM "1 1 0 0 0 0"
set isAM "0 0 1 1 1 1"
set isFP "1 0 0 0 0 0"
set soffset "0 2 2 2 2 2"
set addch "0 1 0 0 0 0"
...@@ -73,13 +73,13 @@ proc print_net { net_ptr fp } { ...@@ -73,13 +73,13 @@ proc print_net { net_ptr fp } {
### Print Macro Pins ### ### Print Macro Pins ###
foreach macro_pin [dbget [dbget [dbget ${net_ptr}.instTerms.isInput 1 -p \ foreach macro_pin [dbget [dbget [dbget ${net_ptr}.instTerms.isInput 1 -p \
].inst.isHaloBlock 1 -p2 ].name -e] { ].inst.cell.subClass block -p3 ].name -e] {
puts $fp " input: \"${macro_pin}\"" puts $fp " input: \"${macro_pin}\""
} }
### Print Stdcells ### ### Print Stdcells ###
foreach inst [dbget [dbget [dbget ${net_ptr}.instTerms.isInput 1 -p \ foreach inst [dbget [dbget [dbget ${net_ptr}.instTerms.isInput 1 -p \
].inst.isHaloBlock 0 -p ].name -e] { ].inst.cell.subClass core -p2 ].name -e] {
puts $fp " input: \"${inst}\"" puts $fp " input: \"${inst}\""
} }
} }
...@@ -270,14 +270,14 @@ proc gen_pb_netlist { } { ...@@ -270,14 +270,14 @@ proc gen_pb_netlist { } {
write_node_port $port_ptr $fp write_node_port $port_ptr $fp
} }
foreach macro_ptr [dbget top.insts.isHaloBlock 1 -p] { foreach macro_ptr [dbget top.insts.cell.subClass block -p2] {
write_node_macro $macro_ptr $fp write_node_macro $macro_ptr $fp
foreach macro_pin_ptr [dbget ${macro_ptr}.instTerms] { foreach macro_pin_ptr [dbget ${macro_ptr}.instTerms] {
write_node_macro_pin $macro_pin_ptr $fp write_node_macro_pin $macro_pin_ptr $fp
} }
} }
foreach inst_ptr [dbget top.insts.isHaloBlock 0 -p] { foreach inst_ptr [dbget top.insts.cell.subClass core -p2] {
write_node_stdcell $inst_ptr $fp write_node_stdcell $inst_ptr $fp
} }
......
#################################################################
# 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 nets [list VDD VSS]
#### Un Place Global Placed cells and cut Row ####
dbset [dbget top.insts.isHaloBlock 0 -p ].pStatus unplaced
finishFloorplan -fillPlaceBlockage hard $minCh
cutRow
finishFloorplan -fillPlaceBlockage hard $minCh
###################################################
############### Global Net Creation ###############
clearGlobalNets
globalNetConnect VDD -type pgpin -pin VDD -inst * -override
globalNetConnect VSS -type pgpin -pin VSS -inst * -override
# globalNetConnect VDD -type pgpin -pin VDDCE -inst * -override
# globalNetConnect VDD -type pgpin -pin VDDPE -inst * -override
# globalNetConnect VSS -type pgpin -pin VSSE -inst * -override
#
# globalNetConnect VDD -type pgpin -pin VNW -inst * -override
# globalNetConnect VSS -type pgpin -pin VPW -inst * -override
globalNetConnect VDD -type tiehi -all -override
globalNetConnect VSS -type tielo -all -override
####################################################
setGenerateViaMode -auto true
generateVias
editDelete -type Special -net $nets
setViaGenMode -ignore_DRC false
setViaGenMode -optimize_cross_via true
setViaGenMode -allow_wire_shape_change false
setViaGenMode -extend_out_wire_end false
setViaGenMode -viarule_preference generated
sroute
setAddStripeMode -orthogonal_only true -ignore_DRC false
setAddStripeMode -over_row_extension true
set prevLayer [lindex $layers 0]
set prevbl ""
set i 1
set lcount [llength $layers]
set flag1 0
while { $i < $lcount } {
set lname [lindex $layers $i]
set isfp [lindex $isFP $i]
set dir "vertical"
if { [lindex $ldir $i] == 0 } {
set dir "horizontal"
}
if { $isfp == 1 } {
puts "Add follow pin creation script"
} else {
set isbm [lindex $isBM $i]
set ism [lindex $isMacro $i]
set isam [lindex $isAM $i]
set spc [lindex $spacing $i]
set wdth [lindex $width $i]
set ptch [lindex $pitch $i]
set sofst [lindex $soffset $i]
set isch [lindex $addch $i]
setAddStripeMode -stacked_via_bottom_layer $prevLayer -stacked_via_top_layer $lname
setAddStripeMode -inside_cell_only false
setAddStripeMode -route_over_rows_only false
setAddStripeMode -extend_to_closest_target area_boundary
if { $isbm == 1 } {
set prevbl $lname
setAddStripeMode -route_over_rows_only true
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch
if { $isch == 1 } {
setAddStripeMode -extend_to_closest_target same_dir_stripe
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch -narrow_channel 1
}
} elseif { $ism == 1 } {
setAddStripeMode -extend_to_closest_target none
setAddStripeMode -inside_cell_only true
foreach mcell [dbget [dbget top.insts.isHaloBlock 1 -p ].cell.name -u] {
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch -master $mcell
}
foreach inst [dbget [dbget top.insts.isHaloBlock 1 -p ].name ] {
createRouteBlk -inst $inst -cover -layer $prevLayer -name mcro_blk
}
} elseif { $isam == 1 } {
if { $flag1 == 0 } {
set flag1 1
set prevLayer $prevbl
setAddStripeMode -stacked_via_bottom_layer $prevLayer -stacked_via_top_layer $lname
}
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch
if { $isch == 1 } {
setAddStripeMode -extend_to_closest_target same_dir_stripe
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch -narrow_channel 1
}
} else {
puts "Layer:$lname is not routed"
}
set prevLayer $lname
set i [expr $i + 1]
}
}
deleteRouteBlk -name mcro_blk
verify_connectivity -net $nets -geom_connect -no_antenna -error 0
# placeDesign -concurrent_macro changes the default placement
# settings
#setPlaceMode -place_opt_run_global_place full
#!/usr/bin/env bash #!/usr/bin/env bash
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 BLOCK_NAME=`echo $PWD | awk -F'/' '{print $(NF-2)}'` export NETLIST_FILE=`readlink -f *.pb.txt`
export BLOCK_NAME=`basename ${NETLIST_FILE} | sed 's@.pb.txt@@'`
export TECH=`echo $PWD | awk -F'/' '{print $(NF-3)}'` export TECH=`echo $PWD | awk -F'/' '{print $(NF-3)}'`
export OUTPUT_DIR="./output_${BLOCK_NAME}_${TECH}" export OUTPUT_DIR="./output_${BLOCK_NAME}_${TECH}"
export NETLIST_FILE=`readlink -f *.pb.txt`
export HMETIS_DIR="${PROJ_DIR}/../../../GB/CT/hmetis-1.5-linux" export HMETIS_DIR="${PROJ_DIR}/../../../GB/CT/hmetis-1.5-linux"
export PLC_WRAPPER_MAIN="${PROJ_DIR}/../../../GB/CT/plc_wrapper_main" export PLC_WRAPPER_MAIN="${PROJ_DIR}/../../../GB/CT/plc_wrapper_main"
export CT_PATH="${PROJ_DIR}/../../../GB/CT/circuit_training" export CT_PATH="${PROJ_DIR}/../../../GB/CT/circuit_training"
......
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