Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 1 | # Power nets |
Ahmed Ghazy | 8e84e5c | 2020-07-27 14:32:34 +0200 | [diff] [blame] | 2 | set ::power_nets $::env(VDD_PIN) |
| 3 | set ::ground_nets $::env(GND_PIN) |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 4 | |
agorararmard | db87598 | 2020-11-30 19:40:31 +0200 | [diff] [blame^] | 5 | if { [info exists ::env(FP_PDN_ENABLE_GLOBAL_CONNECTIONS)] } { |
| 6 | if { $::env(FP_PDN_ENABLE_GLOBAL_CONNECTIONS) == 1 } { |
| 7 | # to parameterize -- needs a PDNGEN fix |
| 8 | set pdngen::global_connections { |
| 9 | VPWR { |
| 10 | {inst_name .* pin_name VPWR} |
| 11 | {inst_name .* pin_name VPB} |
| 12 | } |
| 13 | VGND { |
| 14 | {inst_name .* pin_name VGND} |
| 15 | {inst_name .* pin_name VNB} |
| 16 | } |
| 17 | } |
| 18 | } |
Ahmed Ghazy | 885c10a | 2020-11-24 17:00:17 +0200 | [diff] [blame] | 19 | } |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 20 | |
agorararmard | 4ddcc61 | 2020-10-08 17:05:03 +0200 | [diff] [blame] | 21 | # Used if the design is the core of the chip |
| 22 | set stdcell_core { |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 23 | name grid |
| 24 | rails { |
agorararmard | 4ddcc61 | 2020-10-08 17:05:03 +0200 | [diff] [blame] | 25 | met1 {width $::env(FP_PDN_RAIL_WIDTH) pitch $::env(PLACE_SITE_HEIGHT) offset $::env(FP_PDN_RAIL_OFFSET)} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 26 | } |
| 27 | straps { |
agorararmard | 29113fc | 2020-08-28 20:52:31 +0200 | [diff] [blame] | 28 | met4 {width $::env(FP_PDN_VWIDTH) pitch $::env(FP_PDN_VPITCH) offset $::env(FP_PDN_VOFFSET)} |
| 29 | met5 {width $::env(FP_PDN_HWIDTH) pitch $::env(FP_PDN_HPITCH) offset $::env(FP_PDN_HOFFSET)} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 30 | } |
| 31 | connect {{met1 met4} {met4 met5}} |
| 32 | } |
| 33 | |
agorararmard | 4ddcc61 | 2020-10-08 17:05:03 +0200 | [diff] [blame] | 34 | # Used if the design is a macro in the core |
| 35 | set stdcell_macro { |
| 36 | name grid |
| 37 | rails { |
| 38 | met1 {width $::env(FP_PDN_RAIL_WIDTH) pitch $::env(PLACE_SITE_HEIGHT) offset $::env(FP_PDN_RAIL_OFFSET)} |
| 39 | } |
| 40 | straps { |
| 41 | met4 {width $::env(FP_PDN_VWIDTH) pitch $::env(FP_PDN_VPITCH) offset $::env(FP_PDN_VOFFSET)} |
| 42 | } |
| 43 | connect {{met1 met4}} |
| 44 | } |
| 45 | |
| 46 | # Assesses whether the deisgn is the core of the chip or not based on the value of $::env(DESIGN_IS_CORE) and uses the appropriate stdcell section |
| 47 | if { [info exists ::env(DESIGN_IS_CORE)] } { |
| 48 | if { $::env(DESIGN_IS_CORE) == 1 } { |
| 49 | set stdcell $stdcell_core |
| 50 | } else { |
| 51 | set stdcell $stdcell_macro |
| 52 | } |
| 53 | } else { |
| 54 | set stdcell $stdcell_core |
| 55 | } |
| 56 | |
| 57 | # Adds the core ring if enabled. |
| 58 | if { [info exists ::env(FP_PDN_CORE_RING)] } { |
| 59 | if { $::env(FP_PDN_CORE_RING) == 1 } { |
| 60 | dict append stdcell core_ring { |
| 61 | met4 {width $::env(FP_PDN_CORE_RING_VWIDTH) spacing $::env(FP_PDN_CORE_RING_VSPACING) core_offset $::env(FP_PDN_CORE_RING_VOFFSET)} |
| 62 | met5 {width $::env(FP_PDN_CORE_RING_HWIDTH) spacing $::env(FP_PDN_CORE_RING_HSPACING) core_offset $::env(FP_PDN_CORE_RING_HOFFSET)} |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | pdngen::specify_grid stdcell $stdcell |
| 68 | |
| 69 | # A general macro that follows the premise of the set heirarchy. You may want to modify this or add other macro configs |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 70 | pdngen::specify_grid macro { |
| 71 | orient {R0 R180 MX MY R90 R270 MXR90 MYR90} |
Ahmed Ghazy | 885c10a | 2020-11-24 17:00:17 +0200 | [diff] [blame] | 72 | power_pins "VDD VPWR vdd" |
| 73 | ground_pins "VSS VGND gnd" |
Ahmed Ghazy | 7f45409 | 2020-11-08 17:32:18 +0200 | [diff] [blame] | 74 | blockages "li1 met1 met2 met3 met4" |
| 75 | straps { |
| 76 | } |
agorararmard | 4ddcc61 | 2020-10-08 17:05:03 +0200 | [diff] [blame] | 77 | connect {{met4_PIN_ver met5}} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 78 | } |
| 79 | |
Ahmed Ghazy | 7f45409 | 2020-11-08 17:32:18 +0200 | [diff] [blame] | 80 | set ::halo [expr min($::env(FP_HORIZONTAL_HALO), $::env(FP_VERTICAL_HALO))] |
| 81 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 82 | # POWER or GROUND #Std. cell rails starting with power or ground rails at the bottom of the core area |
| 83 | set ::rails_start_with "POWER" ; |
| 84 | |
| 85 | # POWER or GROUND #Upper metal stripes starting with power or ground rails at the left/bottom of the core area |
| 86 | set ::stripes_start_with "POWER" ; |