-
Notifications
You must be signed in to change notification settings - Fork 436
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.