diff --git a/flow/platforms/asap7/openRoad/pdn/BLOCKS_grid_strategy.tcl b/flow/platforms/asap7/openRoad/pdn/BLOCKS_grid_strategy.tcl index 2c971d7e45..524029180b 100644 --- a/flow/platforms/asap7/openRoad/pdn/BLOCKS_grid_strategy.tcl +++ b/flow/platforms/asap7/openRoad/pdn/BLOCKS_grid_strategy.tcl @@ -1,5 +1,6 @@ # Top level PDN for macros using BLOCK_grid_strategy.tcl source $::env(SCRIPTS_DIR)/util.tcl +source [file join [file dirname [info script]] ring_offsets.tcl] #################################### # global connections @@ -18,16 +19,24 @@ set_voltage_domain -name {CORE} -power {VDD} -ground {VSS} define_pdn_grid -name {top} -voltage_domains {CORE} -pins {M6} add_pdn_stripe -grid {top} -layer {M1} -width {0.018} -pitch {0.54} -offset {0} -followpins add_pdn_stripe -grid {top} -layer {M2} -width {0.018} -pitch {0.54} -offset {0} -followpins -add_pdn_ring -grid {top} -layers {M5 M6} -widths {0.504 0.544} -spacings {0.096} \ - -core_offset {0.504} - -add_pdn_stripe -grid {top} -layer {M5} -width {0.12} -spacing {0.072} -pitch {2.16} \ - -offset {1.50} -extend_to_core_ring +# The ring on the routing tracks: each wire an odd number of track widths, each +# width plus spacing a whole number of track pitches, and the offsets from the +# core chosen to centre the wires on tracks. M5 is 0.408, a width the LEF allows +# under the 0.48 maximum; +# M6 is 0.288, the one width M6_M5widePWR1p152 makes a V5 bar as wide as. +add_pdn_ring -grid {top} -layers {M5 M6} -widths {0.408 0.288} -spacings {0.072 0.096} \ + -core_offsets [asap7_ring_core_offsets M6 0.288 M5 0.408 0.504] + +# Minimum-width M5 straps: a V4 cut is then as wide as its M5 (V4.M5.AUX.2). +# Five times as many as the 0.12 um straps they replace, for the IR drop. +add_pdn_stripe -grid {top} -layer {M5} -width {0.024} -spacing {0.072} -pitch {0.432} \ + -offset {1.50} -extend_to_core_ring -snap_to_grid add_pdn_stripe -grid {top} -layer {M6} -width {0.288} -spacing {0.096} -pitch {4.32} \ - -offset {1.504} -extend_to_core_ring + -offset {1.504} -extend_to_core_ring -snap_to_grid add_pdn_connect -grid {top} -layers {M1 M2} -add_pdn_connect -grid {top} -layers {M2 M5} +# M3 and M4 at minimum width and the M4 pad on the M4 tracks, not on the M2 rails. +add_pdn_connect -grid {top} -layers {M2 M5} -min_width_layers {M3 M4} -ongrid {M4} add_pdn_connect -grid {top} -layers {M5 M6} #################################### diff --git a/flow/platforms/asap7/openRoad/pdn/BLOCK_grid_strategy.tcl b/flow/platforms/asap7/openRoad/pdn/BLOCK_grid_strategy.tcl index 0b54067ea9..a3d1a78113 100644 --- a/flow/platforms/asap7/openRoad/pdn/BLOCK_grid_strategy.tcl +++ b/flow/platforms/asap7/openRoad/pdn/BLOCK_grid_strategy.tcl @@ -1,4 +1,5 @@ # macro level counterpart to BLOCKS_grid_strategy.tcl +source [file join [file dirname [info script]] ring_offsets.tcl] #################################### # global connections @@ -14,20 +15,22 @@ set_voltage_domain -name {CORE} -power {VDD} -ground {VSS} #################################### # standard cell grid # M1 M2 are for follow pin, width derived from PG rail in standard cell -# M5 stripe width rerived from one of width allowed in LEF, offset and pitch -# put stripe on M5 track -# M4 M5 ring follow stripe width +# M5 stripes at minimum width on the M5 tracks: a V4 cut is then as wide as its +# M5 (V4.M5.AUX.2), so the same holds where they meet the M4 ring +# The M4 M5 ring on the routing tracks (see ring_offsets.tcl); its M5 at +# minimum width for the V4s at the ring's corners #################################### define_pdn_grid -name {top} -voltage_domains {CORE} -pins {M5} -add_pdn_ring -grid {top} -layers {M5 M4} -widths {0.12 0.12} -spacings {0.072} -core_offset {0.084} +add_pdn_ring -grid {top} -layers {M5 M4} -widths {0.024 0.12} -spacings {0.072} \ + -core_offsets [asap7_ring_core_offsets M4 0.12 M5 0.024 0.084] add_pdn_stripe -grid {top} -layer {M1} -width {0.018} -pitch {0.54} -offset {0} -followpins add_pdn_stripe -grid {top} -layer {M2} -width {0.018} -pitch {0.54} -offset {0} -followpins -add_pdn_stripe -grid {top} -layer {M5} -width {0.12} -spacing {0.072} -pitch {2.976} -offset {1.5} \ - -extend_to_core_ring +add_pdn_stripe -grid {top} -layer {M5} -width {0.024} -spacing {0.072} -pitch {2.976} -offset {1.5} \ + -extend_to_core_ring -snap_to_grid add_pdn_connect -grid {top} -layers {M1 M2} -add_pdn_connect -grid {top} -layers {M2 M5} +add_pdn_connect -grid {top} -layers {M2 M5} -min_width_layers {M3 M4} -ongrid {M4} add_pdn_connect -grid {top} -layers {M4 M5} diff --git a/flow/platforms/asap7/openRoad/pdn/grid_strategy-M1-M2-M5-M6.tcl b/flow/platforms/asap7/openRoad/pdn/grid_strategy-M1-M2-M5-M6.tcl index 1202b0fc82..90977e6683 100644 --- a/flow/platforms/asap7/openRoad/pdn/grid_strategy-M1-M2-M5-M6.tcl +++ b/flow/platforms/asap7/openRoad/pdn/grid_strategy-M1-M2-M5-M6.tcl @@ -17,10 +17,19 @@ set_voltage_domain -name {CORE} -power {VDD} -ground {VSS} define_pdn_grid -name {top} -voltage_domains {CORE} -pins {M6} add_pdn_stripe -grid {top} -layer {M1} -width {0.018} -pitch {0.54} -offset {0} -followpins add_pdn_stripe -grid {top} -layer {M2} -width {0.018} -pitch {0.54} -offset {0} -followpins -add_pdn_stripe -grid {top} -layer {M5} -width {0.12} -spacing {0.072} -pitch {5.4} -offset {0.300} -add_pdn_stripe -grid {top} -layer {M6} -width {0.288} -spacing {0.096} -pitch {5.4} -offset {0.513} +# Minimum-width M5 straps on the M5 tracks: a V4 cut is then as wide as its M5 +# (V4.M5.AUX.2) and the strap's edges lie on the 24 nm grid (M5.AUX.1, W.4). +# Five times as many as the 0.12 um straps they replace, at a fifth of the +# pitch, so the M5 metal and the M2-to-M5 stacks keep the IR drop down. +add_pdn_stripe -grid {top} -layer {M5} -width {0.024} -spacing {0.072} -pitch {1.08} -offset {0.300} \ + -snap_to_grid +add_pdn_stripe -grid {top} -layer {M6} -width {0.288} -spacing {0.096} -pitch {5.4} -offset {0.513} \ + -snap_to_grid add_pdn_connect -grid {top} -layers {M1 M2} -add_pdn_connect -grid {top} -layers {M2 M5} +# The M2-to-M5 stacks: M3 and M4 at minimum width, so each cut is as wide as the +# metal over it (V2.M3.AUX.2), and the M4 pad on the M4 tracks rather than +# centred on the 270 nm M2 rails, which are off M4's 24 nm grid (M4.AUX.1/2). +add_pdn_connect -grid {top} -layers {M2 M5} -min_width_layers {M3 M4} -ongrid {M4} add_pdn_connect -grid {top} -layers {M5 M6} #################################### # macro grids diff --git a/flow/platforms/asap7/openRoad/pdn/ring_offsets.tcl b/flow/platforms/asap7/openRoad/pdn/ring_offsets.tcl new file mode 100644 index 0000000000..32c2c5db35 --- /dev/null +++ b/flow/platforms/asap7/openRoad/pdn/ring_offsets.tcl @@ -0,0 +1,37 @@ +# Core offsets {left bottom right top} for an add_pdn_ring on hlayer (horizontal, +# width hwidth) and vlayer (vertical, width vwidth) that centre every ring wire +# on its layer's routing tracks, so its edges also fall on the ASAP7 routing grid. +# Each offset is at least min_offset. The ring's width plus spacing on each +# layer must be a whole number of track pitches for the outer rings to stay on +# the tracks too. Tracks must exist (make_tracks) before this is called. +proc asap7_ring_core_offsets { hlayer hwidth vlayer vwidth min_offset } { + set block [ord::get_db_block] + set tech [ord::get_db_tech] + set core [$block getCoreArea] + set min [ord::microns_to_dbu $min_offset] + + set offsets {} + foreach { layer width axis lo hi } [list \ + $vlayer $vwidth X [$core xMin] [$core xMax] \ + $hlayer $hwidth Y [$core yMin] [$core yMax]] { + set grid [$block findTrackGrid [$tech findLayer $layer]] + lassign [$grid getGridPattern$axis 0] origin count step + set w [ord::microns_to_dbu $width] + # The low edge of a wire centred on a track, modulo the track pitch. + set residue [expr { ($origin - $w / 2) % $step }] + + # Low side: the wire's low edge is lo - offset - w. + set edge [expr { $lo - $min - $w }] + set edge [expr { $edge - (($edge - $residue) % $step) }] + set low_offset [expr { $lo - $w - $edge }] + + # High side: the wire's low edge is hi + offset. + set edge [expr { $hi + $min }] + set edge [expr { $edge + (($residue - $edge) % $step) }] + set high_offset [expr { $edge - $hi }] + + lappend offsets $low_offset $high_offset + } + lassign $offsets left right bottom top + return [lmap v [list $left $bottom $right $top] { ord::dbu_to_microns $v }] +}