diff --git a/flow/designs/ihp-sg13g2/i2c-gpio-expander/I2cGpioExpanderTop.v b/flow/designs/ihp-sg13g2/i2c-gpio-expander/I2cGpioExpanderTop.v index 8192e38f9d..76dc2db6b8 100644 --- a/flow/designs/ihp-sg13g2/i2c-gpio-expander/I2cGpioExpanderTop.v +++ b/flow/designs/ihp-sg13g2/i2c-gpio-expander/I2cGpioExpanderTop.v @@ -162,6 +162,14 @@ module I2cGpioExpanderTop ( .p2c (sg13g2_IOPad_io_gpio_7_p2c ), //o .pad (io_gpio_7_PAD ) //~ ); + (* keep *) sg13g2_IOPadVdd sg13g2_IOPadVdd_inst ( + ); + (* keep *) sg13g2_IOPadVss sg13g2_IOPadVss_inst ( + ); + (* keep *) sg13g2_IOPadIOVss sg13g2_IOPadIOVss_inst ( + ); + (* keep *) sg13g2_IOPadIOVdd sg13g2_IOPadIOVdd_inst ( + ); assign clock = sg13g2_IOPad_io_clock_p2c; assign reset = sg13g2_IOPad_io_reset_p2c; always @(*) begin diff --git a/flow/designs/ihp-sg13g2/i2c-gpio-expander/config.mk b/flow/designs/ihp-sg13g2/i2c-gpio-expander/config.mk index 81f12c884f..219ef27437 100644 --- a/flow/designs/ihp-sg13g2/i2c-gpio-expander/config.mk +++ b/flow/designs/ihp-sg13g2/i2c-gpio-expander/config.mk @@ -18,7 +18,28 @@ export PLACE_DENSITY = 0.75 export MACRO_PLACE_HALO = 20 20 export CORNERS = slow fast -export FOOTPRINT_TCL = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/pad.tcl +export IO_NORTH_PINS = sg13g2_IOPad_io_gpio_3 \ +sg13g2_IOPad_io_gpio_4 \ +sg13g2_IOPad_io_gpio_5 \ +sg13g2_IOPad_io_gpio_6 \ +sg13g2_IOPad_io_gpio_7 +export IO_EAST_PINS = sg13g2_IOPadVdd_inst \ +sg13g2_IOPadVss_inst \ +sg13g2_IOPad_io_address_0 \ +sg13g2_IOPad_io_address_1 \ +sg13g2_IOPad_io_address_2 +export IO_SOUTH_PINS = sg13g2_IOPad_io_clock \ +sg13g2_IOPad_io_reset \ +sg13g2_IOPad_io_i2c_scl \ +sg13g2_IOPad_io_i2c_sda \ +sg13g2_IOPad_io_i2c_interrupt +export IO_WEST_PINS = sg13g2_IOPad_io_gpio_0 \ +sg13g2_IOPad_io_gpio_1 \ +sg13g2_IOPad_io_gpio_2 \ +sg13g2_IOPadIOVss_inst \ +sg13g2_IOPadIOVdd_inst +export FOOTPRINT_TCL = $(PLATFORM_DIR)/pad.tcl + export PDN_TCL = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/pdn.tcl export BLOCKS = I2cDeviceCtrl diff --git a/flow/designs/ihp-sg13g2/i2c-gpio-expander/pad.tcl b/flow/designs/ihp-sg13g2/i2c-gpio-expander/pad.tcl deleted file mode 100644 index ca3986017c..0000000000 --- a/flow/designs/ihp-sg13g2/i2c-gpio-expander/pad.tcl +++ /dev/null @@ -1,208 +0,0 @@ -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) - }] -} - -# padframe core power pins -add_global_connection -net {VDD} -pin_pattern {^vdd$} -power -add_global_connection -net {VSS} -pin_pattern {^vss$} -ground - -# padframe io power pins -add_global_connection -net {IOVDD} -pin_pattern {^iovdd$} -power -add_global_connection -net {IOVSS} -pin_pattern {^iovss$} -ground - -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 - -# Place Pads -# IO pin io_clock -place_pad \ - -row IO_SOUTH \ - -location [calc_horizontal_pad_location \ - 0 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_clock} \ - -master sg13g2_IOPadIn -# IO pin io_reset -place_pad \ - -row IO_SOUTH \ - -location [calc_horizontal_pad_location \ - 1 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_reset} \ - -master sg13g2_IOPadIn -# IO pin io_i2c_scl -place_pad \ - -row IO_SOUTH \ - -location [calc_horizontal_pad_location \ - 2 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_i2c_scl} \ - -master sg13g2_IOPadInOut4mA -# IO pin io_i2c_sda -place_pad \ - -row IO_SOUTH \ - -location [calc_horizontal_pad_location \ - 3 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_i2c_sda} \ - -master sg13g2_IOPadInOut4mA -# IO pin io_i2c_interrupt -place_pad \ - -row IO_SOUTH \ - -location [calc_horizontal_pad_location \ - 4 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_i2c_interrupt} \ - -master sg13g2_IOPadOut4mA -place_pad \ - -row IO_EAST \ - -location [calc_vertical_pad_location \ - 0 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPadVdd_east_0} \ - -master sg13g2_IOPadVdd -place_pad \ - -row IO_EAST \ - -location [calc_vertical_pad_location \ - 1 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPadVss_east_1} \ - -master sg13g2_IOPadVss -# IO pin io_address_0 -place_pad \ - -row IO_EAST \ - -location [calc_vertical_pad_location \ - 2 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_address_0} \ - -master sg13g2_IOPadIn -# IO pin io_address_1 -place_pad \ - -row IO_EAST \ - -location [calc_vertical_pad_location \ - 3 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_address_1} \ - -master sg13g2_IOPadIn -# IO pin io_address_2 -place_pad \ - -row IO_EAST \ - -location [calc_vertical_pad_location \ - 4 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_address_2} \ - -master sg13g2_IOPadIn -# IO pin io_gpio_0 -place_pad \ - -row IO_NORTH \ - -location [calc_horizontal_pad_location \ - 0 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_gpio_0} \ - -master sg13g2_IOPadInOut16mA -# IO pin io_gpio_1 -place_pad \ - -row IO_NORTH \ - -location [calc_horizontal_pad_location \ - 1 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_gpio_1} \ - -master sg13g2_IOPadInOut16mA -# IO pin io_gpio_2 -place_pad \ - -row IO_NORTH \ - -location [calc_horizontal_pad_location \ - 2 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_gpio_2} \ - -master sg13g2_IOPadInOut16mA -# IO pin io_gpio_3 -place_pad \ - -row IO_NORTH \ - -location [calc_horizontal_pad_location \ - 3 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_gpio_3} \ - -master sg13g2_IOPadInOut16mA -# IO pin io_gpio_4 -place_pad \ - -row IO_NORTH \ - -location [calc_horizontal_pad_location \ - 4 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_gpio_4} \ - -master sg13g2_IOPadInOut16mA -# IO pin io_gpio_5 -place_pad \ - -row IO_WEST \ - -location [calc_vertical_pad_location \ - 0 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_gpio_5} \ - -master sg13g2_IOPadInOut16mA -# IO pin io_gpio_6 -place_pad \ - -row IO_WEST \ - -location [calc_vertical_pad_location \ - 1 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_gpio_6} \ - -master sg13g2_IOPadInOut16mA -# IO pin io_gpio_7 -place_pad \ - -row IO_WEST \ - -location [calc_vertical_pad_location \ - 2 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPad_io_gpio_7} \ - -master sg13g2_IOPadInOut16mA -place_pad \ - -row IO_WEST \ - -location [calc_vertical_pad_location \ - 3 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPadIOVss_west_3} \ - -master sg13g2_IOPadIOVss -place_pad \ - -row IO_WEST \ - -location [calc_vertical_pad_location \ - 4 5 $IO_LENGTH $IO_WIDTH $BONDPAD_SIZE $SEALRING_OFFSET] \ - {sg13g2_IOPadIOVdd_west_4} \ - -master sg13g2_IOPadIOVdd -# 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 diff --git a/flow/designs/ihp-sg13g2/i2c-gpio-expander/rules-base.json b/flow/designs/ihp-sg13g2/i2c-gpio-expander/rules-base.json index 8898d4eaea..a2aaf4d634 100644 --- a/flow/designs/ihp-sg13g2/i2c-gpio-expander/rules-base.json +++ b/flow/designs/ihp-sg13g2/i2c-gpio-expander/rules-base.json @@ -1,6 +1,6 @@ { "synth__design__instance__area__stdcell": { - "value": 286097.29, + "value": 311335.1878, "compare": "<=" }, "constraints__clocks__count": { diff --git a/flow/platforms/ihp-sg13g2/config.mk b/flow/platforms/ihp-sg13g2/config.mk index e9e9f27691..88c2820633 100644 --- a/flow/platforms/ihp-sg13g2/config.mk +++ b/flow/platforms/ihp-sg13g2/config.mk @@ -101,6 +101,28 @@ export TAPCELL_TCL ?= $(PLATFORM_DIR)/tapcell.tcl export MACRO_PLACE_HALO ?= 40 40 +# Will be placed left to right +export IO_NORTH_PINS ??= +export IO_SOUTH_PINS ??= +# Will be placed bottom to top +export IO_EAST_PINS ??= +export IO_WEST_PINS ??= + +# Variables for bondpad +export IO_BONDPAD_SIZE ?= 70 +export IO_BONDPAD_NAME ?= bondpad_70x70 +# Variables for padframe +export IO_LENGTH ?= 180 +export IO_WIDTH ?= 80 +export IO_SEALRING_OFFSET ?= 70 +export IO_FILLER_CELLS ?= \ +sg13g2_Filler10000 \ +sg13g2_Filler4000 \ +sg13g2_Filler2000 \ +sg13g2_Filler1000 \ +sg13g2_Filler400 \ +sg13g2_Filler200 + #--------------------------------------------------------- # Place # -------------------------------------------------------- diff --git a/flow/platforms/ihp-sg13g2/pad.tcl b/flow/platforms/ihp-sg13g2/pad.tcl new file mode 100644 index 0000000000..936c2342b2 --- /dev/null +++ b/flow/platforms/ihp-sg13g2/pad.tcl @@ -0,0 +1,41 @@ +set IO_OFFSET [expr { $::env(IO_BONDPAD_SIZE) + $::env(IO_SEALRING_OFFSET) }] + +# padframe core power pins +add_global_connection -net {VDD} -pin_pattern {^vdd$} -power +add_global_connection -net {VSS} -pin_pattern {^vss$} -ground + +# padframe io power pins +add_global_connection -net {IOVDD} -pin_pattern {^iovdd$} -power +add_global_connection -net {IOVSS} -pin_pattern {^iovss$} -ground + +make_fake_io_site -name IOLibSite -width 1 -height $::env(IO_LENGTH) +make_fake_io_site -name IOLibCSite -width $::env(IO_LENGTH) -height $::env(IO_LENGTH) + +make_io_sites \ + -horizontal_site IOLibSite \ + -vertical_site IOLibSite \ + -corner_site IOLibCSite \ + -offset $IO_OFFSET + +# Place IO cells +place_pads -row IO_NORTH $::env(IO_NORTH_PINS) +place_pads -row IO_EAST $::env(IO_EAST_PINS) +place_pads -row IO_SOUTH $::env(IO_SOUTH_PINS) +place_pads -row IO_WEST $::env(IO_WEST_PINS) + +# Place Corner Cells and Filler +place_corners sg13g2_Corner + +set iofill [regexp -all -inline {\S+} $::env(IO_FILLER_CELLS)] + +place_io_fill -row IO_NORTH {*}$iofill +place_io_fill -row IO_EAST {*}$iofill +place_io_fill -row IO_SOUTH {*}$iofill +place_io_fill -row IO_WEST {*}$iofill + +connect_by_abutment + +set IO_BONDPAD_Y [expr { double($::env(IO_BONDPAD_SIZE)) * -1.0 }] +place_bondpad -bond $::env(IO_BONDPAD_NAME) sg13g2_IOPad* -offset "5.0 $IO_BONDPAD_Y" + +remove_io_rows