Skip to content

Commit 03c3657

Browse files
authored
Merge pull request #122 from siliconcompiler/fix-pdn
ensure pdns snap to grid
2 parents 4c3256b + 63f9325 commit 03c3657

File tree

5 files changed

+74
-21
lines changed

5 files changed

+74
-21
lines changed

lambdapdk/gf180/libs/gf180mcu_fd_sc_mcu7t5v0/apr/openroad/pdngen.tcl

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,20 @@ if {$metal5_pitch > 89.6} {
1717
set metal5_pitch 89.6
1818
}
1919

20-
add_pdn_stripe -grid {block} -layer {Metal4} -width {4.480} -pitch $metal4_pitch \
21-
-offset [expr {$metal4_pitch / 4}]
22-
add_pdn_stripe -grid {block} -layer {Metal5} -width {4.480} -pitch $metal5_pitch \
23-
-offset [expr {$metal5_pitch / 4}]
20+
proc snap_grid {value} {
21+
set grid [[ord::get_db_tech] getManufacturingGrid]
22+
set dbus [[ord::get_db_tech] getDbUnitsPerMicron]
23+
24+
set val_dbus [ord::microns_to_dbu $value]
25+
set val_snapped [expr {$grid * round($val_dbus / $grid)}]
26+
27+
return [ord::dbu_to_microns $val_snapped]
28+
}
29+
30+
add_pdn_stripe -grid {grid} -layer {Metal4} -width {1.600} -pitch [snap_grid $metal4_pitch] \
31+
-offset [snap_grid [expr {$metal4_pitch / 4}]]
32+
add_pdn_stripe -grid {grid} -layer {Metal5} -width {1.600} -pitch [snap_grid $metal5_pitch] \
33+
-offset [snap_grid [expr {$metal5_pitch / 4}]]
2434
add_pdn_connect -grid {block} -layers {Metal1 Metal4} -max_columns {5} \
2535
-ongrid {Metal2 Metal3 Metal4}
2636
add_pdn_connect -grid {block} -layers {Metal4 Metal5}

lambdapdk/gf180/libs/gf180mcu_fd_sc_mcu9t5v0/apr/openroad/pdngen.tcl

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,20 @@ if {$metal5_pitch > 89.6} {
1717
set metal5_pitch 89.6
1818
}
1919

20-
add_pdn_stripe -grid {block} -layer {Metal4} -width {4.480} -pitch $metal4_pitch \
21-
-offset [expr {$metal4_pitch / 4}]
22-
add_pdn_stripe -grid {block} -layer {Metal5} -width {4.480} -pitch $metal5_pitch \
23-
-offset [expr {$metal5_pitch / 4}]
20+
proc snap_grid {value} {
21+
set grid [[ord::get_db_tech] getManufacturingGrid]
22+
set dbus [[ord::get_db_tech] getDbUnitsPerMicron]
23+
24+
set val_dbus [ord::microns_to_dbu $value]
25+
set val_snapped [expr {$grid * round($val_dbus / $grid)}]
26+
27+
return [ord::dbu_to_microns $val_snapped]
28+
}
29+
30+
add_pdn_stripe -grid {grid} -layer {Metal4} -width {1.600} -pitch [snap_grid $metal4_pitch] \
31+
-offset [snap_grid [expr {$metal4_pitch / 4}]]
32+
add_pdn_stripe -grid {grid} -layer {Metal5} -width {1.600} -pitch [snap_grid $metal5_pitch] \
33+
-offset [snap_grid [expr {$metal5_pitch / 4}]]
2434
add_pdn_connect -grid {block} -layers {Metal1 Metal4} -max_columns {5} \
2535
-ongrid {Metal2 Metal3 Metal4}
2636
add_pdn_connect -grid {block} -layers {Metal4 Metal5}

lambdapdk/ihp130/libs/sg13g2_stdcell/apr/openroad/pdngen.tcl

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,24 @@ set met5_pitch [expr {([lindex [ord::get_core_area] 3] - [lindex [ord::get_core_
1111
if {$met5_pitch > 75.6} {
1212
set met5_pitch 75.6
1313
}
14-
add_pdn_stripe -grid {grid} -layer {Metal5} -width {2.200} -pitch $met5_pitch \
15-
-offset [expr {$met5_pitch / 2}]
1614
set top1_pitch [expr {([lindex [ord::get_core_area] 2] - [lindex [ord::get_core_area] 0]) / 2}]
1715
if {$top1_pitch > 75.6} {
1816
set top1_pitch 75.6
1917
}
20-
add_pdn_stripe -grid {grid} -layer {TopMetal1} -width {1.800} -pitch $met5_pitch \
21-
-offset [expr {$met5_pitch / 2}]
18+
19+
proc snap_grid {value} {
20+
set grid [[ord::get_db_tech] getManufacturingGrid]
21+
set dbus [[ord::get_db_tech] getDbUnitsPerMicron]
22+
23+
set val_dbus [ord::microns_to_dbu $value]
24+
set val_snapped [expr {$grid * round($val_dbus / $grid)}]
25+
26+
return [ord::dbu_to_microns $val_snapped]
27+
}
28+
29+
add_pdn_stripe -grid {grid} -layer {Metal5} -width {2.200} -pitch [snap_grid $met5_pitch] \
30+
-offset [snap_grid [expr {$met5_pitch / 2}]]
31+
add_pdn_stripe -grid {grid} -layer {TopMetal1} -width {1.800} -pitch [snap_grid $top1_pitch] \
32+
-offset [snap_grid [expr {$top1_pitch / 2}]]
2233
add_pdn_connect -grid {grid} -layers {Metal1 Metal5}
2334
add_pdn_connect -grid {grid} -layers {Metal5 TopMetal1}
24-
####################################

lambdapdk/sky130/libs/sky130hd/apr/openroad/pdngen.tcl

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,20 @@ set met5_pitch [expr {([lindex [ord::get_core_area] 3] - [lindex [ord::get_core_
1515
if {$met5_pitch > 27.200} {
1616
set met5_pitch 27.200
1717
}
18-
add_pdn_stripe -grid {grid} -layer {met4} -width {1.600} -pitch $met4_pitch \
19-
-offset [expr {$met4_pitch / 4}]
20-
add_pdn_stripe -grid {grid} -layer {met5} -width {1.600} -pitch $met5_pitch \
21-
-offset [expr {$met5_pitch / 4}]
18+
19+
proc snap_grid {value} {
20+
set grid [[ord::get_db_tech] getManufacturingGrid]
21+
set dbus [[ord::get_db_tech] getDbUnitsPerMicron]
22+
23+
set val_dbus [ord::microns_to_dbu $value]
24+
set val_snapped [expr {$grid * round($val_dbus / $grid)}]
25+
26+
return [ord::dbu_to_microns $val_snapped]
27+
}
28+
29+
add_pdn_stripe -grid {grid} -layer {met4} -width {1.600} -pitch [snap_grid $met4_pitch] \
30+
-offset [snap_grid [expr {$met4_pitch / 4}]]
31+
add_pdn_stripe -grid {grid} -layer {met5} -width {1.600} -pitch [snap_grid $met5_pitch] \
32+
-offset [snap_grid [expr {$met5_pitch / 4}]]
2233
add_pdn_connect -grid {grid} -layers {met1 met4}
2334
add_pdn_connect -grid {grid} -layers {met4 met5}

lambdapdk/sky130/libs/sky130hdll/apr/openroad/pdngen.tcl

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set_voltage_domain -name {CORE} -power {VDD} -ground {VSS}
77
####################################
88
define_pdn_grid -name {grid} -voltage_domains {CORE}
99
add_pdn_stripe -grid {grid} -layer {met1} -width {0.48} -pitch {5.44} -offset {0} -followpins
10+
1011
set met4_pitch [expr {([lindex [ord::get_core_area] 2] - [lindex [ord::get_core_area] 0]) / 2}]
1112
if {$met4_pitch > 27.140} {
1213
set met4_pitch 27.140
@@ -15,9 +16,20 @@ set met5_pitch [expr {([lindex [ord::get_core_area] 3] - [lindex [ord::get_core_
1516
if {$met5_pitch > 27.200} {
1617
set met5_pitch 27.200
1718
}
18-
add_pdn_stripe -grid {grid} -layer {met4} -width {1.600} -pitch $met4_pitch \
19-
-offset [expr {$met4_pitch / 4}]
20-
add_pdn_stripe -grid {grid} -layer {met5} -width {1.600} -pitch $met5_pitch \
21-
-offset [expr {$met5_pitch / 4}]
19+
20+
proc snap_grid {value} {
21+
set grid [[ord::get_db_tech] getManufacturingGrid]
22+
set dbus [[ord::get_db_tech] getDbUnitsPerMicron]
23+
24+
set val_dbus [ord::microns_to_dbu $value]
25+
set val_snapped [expr {$grid * round($val_dbus / $grid)}]
26+
27+
return [ord::dbu_to_microns $val_snapped]
28+
}
29+
30+
add_pdn_stripe -grid {grid} -layer {met4} -width {1.600} -pitch [snap_grid $met4_pitch] \
31+
-offset [snap_grid [expr {$met4_pitch / 4}]]
32+
add_pdn_stripe -grid {grid} -layer {met5} -width {1.600} -pitch [snap_grid $met5_pitch] \
33+
-offset [snap_grid [expr {$met5_pitch / 4}]]
2234
add_pdn_connect -grid {grid} -layers {met1 met4}
2335
add_pdn_connect -grid {grid} -layers {met4 met5}

0 commit comments

Comments
 (0)