Skip to content

Commit 9ca1d56

Browse files
authored
Merge pull request #3936 from dnltz/WIP/dnltz/update-io-handling
ihp-sg13g2: Generic pad.tcl script
2 parents 0587ae6 + 3334d08 commit 9ca1d56

File tree

6 files changed

+94
-210
lines changed

6 files changed

+94
-210
lines changed

flow/designs/ihp-sg13g2/i2c-gpio-expander/I2cGpioExpanderTop.v

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ module I2cGpioExpanderTop (
162162
.p2c (sg13g2_IOPad_io_gpio_7_p2c ), //o
163163
.pad (io_gpio_7_PAD ) //~
164164
);
165+
(* keep *) sg13g2_IOPadVdd sg13g2_IOPadVdd_inst (
166+
);
167+
(* keep *) sg13g2_IOPadVss sg13g2_IOPadVss_inst (
168+
);
169+
(* keep *) sg13g2_IOPadIOVss sg13g2_IOPadIOVss_inst (
170+
);
171+
(* keep *) sg13g2_IOPadIOVdd sg13g2_IOPadIOVdd_inst (
172+
);
165173
assign clock = sg13g2_IOPad_io_clock_p2c;
166174
assign reset = sg13g2_IOPad_io_reset_p2c;
167175
always @(*) begin

flow/designs/ihp-sg13g2/i2c-gpio-expander/config.mk

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,28 @@ export PLACE_DENSITY = 0.75
1818
export MACRO_PLACE_HALO = 20 20
1919
export CORNERS = slow fast
2020

21-
export FOOTPRINT_TCL = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/pad.tcl
21+
export IO_NORTH_PINS = sg13g2_IOPad_io_gpio_3 \
22+
sg13g2_IOPad_io_gpio_4 \
23+
sg13g2_IOPad_io_gpio_5 \
24+
sg13g2_IOPad_io_gpio_6 \
25+
sg13g2_IOPad_io_gpio_7
26+
export IO_EAST_PINS = sg13g2_IOPadVdd_inst \
27+
sg13g2_IOPadVss_inst \
28+
sg13g2_IOPad_io_address_0 \
29+
sg13g2_IOPad_io_address_1 \
30+
sg13g2_IOPad_io_address_2
31+
export IO_SOUTH_PINS = sg13g2_IOPad_io_clock \
32+
sg13g2_IOPad_io_reset \
33+
sg13g2_IOPad_io_i2c_scl \
34+
sg13g2_IOPad_io_i2c_sda \
35+
sg13g2_IOPad_io_i2c_interrupt
36+
export IO_WEST_PINS = sg13g2_IOPad_io_gpio_0 \
37+
sg13g2_IOPad_io_gpio_1 \
38+
sg13g2_IOPad_io_gpio_2 \
39+
sg13g2_IOPadIOVss_inst \
40+
sg13g2_IOPadIOVdd_inst
41+
export FOOTPRINT_TCL = $(PLATFORM_DIR)/pad.tcl
42+
2243
export PDN_TCL = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/pdn.tcl
2344

2445
export BLOCKS = I2cDeviceCtrl

flow/designs/ihp-sg13g2/i2c-gpio-expander/pad.tcl

Lines changed: 0 additions & 208 deletions
This file was deleted.

flow/designs/ihp-sg13g2/i2c-gpio-expander/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"synth__design__instance__area__stdcell": {
3-
"value": 286097.29,
3+
"value": 311335.1878,
44
"compare": "<="
55
},
66
"constraints__clocks__count": {

flow/platforms/ihp-sg13g2/config.mk

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,28 @@ export TAPCELL_TCL ?= $(PLATFORM_DIR)/tapcell.tcl
101101

102102
export MACRO_PLACE_HALO ?= 40 40
103103

104+
# Will be placed left to right
105+
export IO_NORTH_PINS ??=
106+
export IO_SOUTH_PINS ??=
107+
# Will be placed bottom to top
108+
export IO_EAST_PINS ??=
109+
export IO_WEST_PINS ??=
110+
111+
# Variables for bondpad
112+
export IO_BONDPAD_SIZE ?= 70
113+
export IO_BONDPAD_NAME ?= bondpad_70x70
114+
# Variables for padframe
115+
export IO_LENGTH ?= 180
116+
export IO_WIDTH ?= 80
117+
export IO_SEALRING_OFFSET ?= 70
118+
export IO_FILLER_CELLS ?= \
119+
sg13g2_Filler10000 \
120+
sg13g2_Filler4000 \
121+
sg13g2_Filler2000 \
122+
sg13g2_Filler1000 \
123+
sg13g2_Filler400 \
124+
sg13g2_Filler200
125+
104126
#---------------------------------------------------------
105127
# Place
106128
# --------------------------------------------------------

flow/platforms/ihp-sg13g2/pad.tcl

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
set IO_OFFSET [expr { $::env(IO_BONDPAD_SIZE) + $::env(IO_SEALRING_OFFSET) }]
2+
3+
# padframe core power pins
4+
add_global_connection -net {VDD} -pin_pattern {^vdd$} -power
5+
add_global_connection -net {VSS} -pin_pattern {^vss$} -ground
6+
7+
# padframe io power pins
8+
add_global_connection -net {IOVDD} -pin_pattern {^iovdd$} -power
9+
add_global_connection -net {IOVSS} -pin_pattern {^iovss$} -ground
10+
11+
make_fake_io_site -name IOLibSite -width 1 -height $::env(IO_LENGTH)
12+
make_fake_io_site -name IOLibCSite -width $::env(IO_LENGTH) -height $::env(IO_LENGTH)
13+
14+
make_io_sites \
15+
-horizontal_site IOLibSite \
16+
-vertical_site IOLibSite \
17+
-corner_site IOLibCSite \
18+
-offset $IO_OFFSET
19+
20+
# Place IO cells
21+
place_pads -row IO_NORTH $::env(IO_NORTH_PINS)
22+
place_pads -row IO_EAST $::env(IO_EAST_PINS)
23+
place_pads -row IO_SOUTH $::env(IO_SOUTH_PINS)
24+
place_pads -row IO_WEST $::env(IO_WEST_PINS)
25+
26+
# Place Corner Cells and Filler
27+
place_corners sg13g2_Corner
28+
29+
set iofill [regexp -all -inline {\S+} $::env(IO_FILLER_CELLS)]
30+
31+
place_io_fill -row IO_NORTH {*}$iofill
32+
place_io_fill -row IO_EAST {*}$iofill
33+
place_io_fill -row IO_SOUTH {*}$iofill
34+
place_io_fill -row IO_WEST {*}$iofill
35+
36+
connect_by_abutment
37+
38+
set IO_BONDPAD_Y [expr { double($::env(IO_BONDPAD_SIZE)) * -1.0 }]
39+
place_bondpad -bond $::env(IO_BONDPAD_NAME) sg13g2_IOPad* -offset "5.0 $IO_BONDPAD_Y"
40+
41+
remove_io_rows

0 commit comments

Comments
 (0)