Repository navigation
Description
Description
Right now the ihp-sg13g2 platform has one design with a padring, which is generated as soon as FOOTPRINT_TCL is defined.
This tcl file can be found here: https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/designs/ihp-sg13g2/i2c-gpio-expander/pad.tcl
Problem: This file contains a lot of commands, helper functions, etc. . However, the only interesting part for a new design (in ORFS or out-of-tree) are the place_pad commands.
Suggested Solution
Let's introduce two new variables FOOTPRINT_PRE_HOOK_TCL and FOOTPRINT_POST_HOOK_TCL. The platform will set those with a weak assignment.
export FOOTPRINT_PRE_HOOK_TCL ?= $(PLATFORM_DIR)/pad.pre.tcl
export FOOTPRINT_POST_HOOK_TCL ?= $(PLATFORM_DIR)/pad.post.tcl
This allows to overwrite those hooks in case they don't work for specific designs.
The default pre-padring hook could contain the following content with slight adjustments to make, for example, the bondpad size configurable:
set IO_LENGTH 180
set IO_WIDTH 80
set BONDPAD_SIZE 70
set SEALRING_OFFSET 70
set IO_OFFSET [expr { $BONDPAD_SIZE + $SEALRING_OFFSET }]
proc calc_horizontal_pad_location { index total IO_LENGTH IO_WIDTH BONDPAD_SIZE SEALRING_OFFSET } {
set DIE_WIDTH [expr { [lindex $::env(DIE_AREA) 2] - [lindex $::env(DIE_AREA) 0] }]
set PAD_OFFSET [expr { $IO_LENGTH + $BONDPAD_SIZE + $SEALRING_OFFSET }]
set PAD_AREA_WIDTH [expr { $DIE_WIDTH - ($PAD_OFFSET * 2) }]
set HORIZONTAL_PAD_DISTANCE [expr { ($PAD_AREA_WIDTH / $total) - $IO_WIDTH }]
return [expr {
$PAD_OFFSET + (($IO_WIDTH + $HORIZONTAL_PAD_DISTANCE) * $index)
+ ($HORIZONTAL_PAD_DISTANCE / 2)
}]
}
proc calc_vertical_pad_location { index total IO_LENGTH IO_WIDTH BONDPAD_SIZE SEALRING_OFFSET } {
set DIE_HEIGHT [expr { [lindex $::env(DIE_AREA) 3] - [lindex $::env(DIE_AREA) 1] }]
set PAD_OFFSET [expr { $IO_LENGTH + $BONDPAD_SIZE + $SEALRING_OFFSET }]
set PAD_AREA_HEIGHT [expr { $DIE_HEIGHT - ($PAD_OFFSET * 2) }]
set VERTICAL_PAD_DISTANCE [expr { ($PAD_AREA_HEIGHT / $total) - $IO_WIDTH }]
return [expr {
$PAD_OFFSET + (($IO_WIDTH + $VERTICAL_PAD_DISTANCE) * $index)
+ ($VERTICAL_PAD_DISTANCE / 2)
}]
}
make_fake_io_site -name IOLibSite -width 1 -height $IO_LENGTH
make_fake_io_site -name IOLibCSite -width $IO_LENGTH -height $IO_LENGTH
set IO_OFFSET [expr { $BONDPAD_SIZE + $SEALRING_OFFSET }]
# Create IO Rows
make_io_sites \
-horizontal_site IOLibSite \
-vertical_site IOLibSite \
-corner_site IOLibCSite \
-offset $IO_OFFSET
The post-hook would place corner and filler cells as well as the bondpads.
# Place Corner Cells and Filler
place_corners sg13g2_Corner
set iofill {
sg13g2_Filler10000
sg13g2_Filler4000
sg13g2_Filler2000
sg13g2_Filler1000
sg13g2_Filler400
sg13g2_Filler200
}
place_io_fill -row IO_NORTH {*}$iofill
place_io_fill -row IO_SOUTH {*}$iofill
place_io_fill -row IO_WEST {*}$iofill
place_io_fill -row IO_EAST {*}$iofill
connect_by_abutment
place_bondpad -bond bondpad_70x70 sg13g2_IOPad* -offset {5.0 -70.0}
remove_io_rows
Additional Context
Afterwards, we could also work on something like Cadence's .io file to define the pad-ring in a YAML/JSON/... file.
Activity
maliberty commentedon Feb 8, 2026
@gadfort opinion?
gadfort commentedon Feb 8, 2026
@maliberty opinion on what?
SiliconCompiler handles the padring setup / rdl routing as a set of files, and processes the global connections separately from the power grid code for the reason @dnltz ran into issues with its placement.
The pad placer has the ability to place the pads automatically now so not sure why they need to be manually placed.
As for supporting some kind of setup file, we would need a full spec to look at to determine if it makes sense. But generally I don't find those files any easier to implement compared to TCL and when they lack features it makes it extremely painful to use them.
maliberty commentedon Feb 8, 2026
Could you outline how/where you handle global_connect, pad, and pdn. I hear it is different but I'm not clear what you do instead.
gadfort commentedon Feb 8, 2026
global connect is like UPF so it needs to be loaded around the same time that UPF would be loaded which is around the same time as the SDCs (so right after loading the design). (this also ensures the tapcells are correctly connected right after they are added and not when the power grid is handling this)
pad placement / rdl routing is handled right after the floorplan is initialized.
pdn is same, right after tap cell as always.
dnltz commentedon Feb 12, 2026
@gadfort Ahh cool, I wasn't aware of
place_padsand always placed them manually. I will update to them soon.Do you have any problems with introducing these pre and post hooks? Maybe for the IHP platform first?
dnltz commentedon Feb 12, 2026
Well, since
place_padsonly needs a list of IOs, one platform-specific file might be actually enough. Let me prepare a draft...dnltz commentedon Mar 12, 2026
Thanks again @gadfort and @maliberty !
This issue is solved with #3936