Skip to content

Commit feeb34b

Browse files
committed
Merge remote-tracking branch 'origin/master' into secure-update-openroad-rsz-core-clamp
Signed-off-by: minjukim55 <mkim@precisioninno.com> # Conflicts: # flow/designs/rapidus2hp/hercules_is_int/rules-verific.json
2 parents e8923f4 + ec63655 commit feeb34b

7 files changed

Lines changed: 170 additions & 12 deletions

File tree

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ OpenROAD-flow-scripts supports Verilog to GDS for the following open platforms:
150150
- Nangate45 / FreePDK45
151151
- SKY130
152152
- GF180
153+
- SG13G2
153154

154155
These platforms have a permissive license which allows us to
155156
redistribute the PDK and OpenROAD platform-specific files. The platform

flow/designs/gf12/bp_single/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"compare": ">="
4141
},
4242
"cts__timing__hold__tns": {
43-
"value": -3310.0,
43+
"value": -4460.0,
4444
"compare": ">="
4545
},
4646
"globalroute__antenna_diodes_count": {

flow/designs/gf12/jpeg/rules-base.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -10300.0,
35+
"value": -13300.0,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -52,7 +52,7 @@
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -7010.0,
55+
"value": -8780.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -64,7 +64,7 @@
6464
"compare": ">="
6565
},
6666
"detailedroute__route__wirelength": {
67-
"value": 427011,
67+
"value": 413827,
6868
"compare": "<="
6969
},
7070
"detailedroute__route__drc_errors": {

flow/designs/rapidus2hp/hercules_is_int/rules-verific.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -1020.0,
71+
"value": -1190.0,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {
Lines changed: 141 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,142 @@
1-
# IHP SG13G2 official port for OpenROAD-flow-scripts
1+
# IHP SG13G2 Platform for OpenROAD-flow-scripts
22

3-
to be documented
3+
## Overview
4+
5+
The IHP SG13G2 is a **130 nm BiCMOS open PDK** developed by
6+
[IHP – Innovations for High Performance Microelectronics](https://www.ihp-microelectronics.com/)
7+
and released under the Apache 2.0 licence. It is one of the few fully open
8+
silicon PDKs that includes not only standard CMOS logic cells but also
9+
heterojunction bipolar transistors (HBTs), RF MOS devices, MIM capacitors,
10+
spiral inductors, and ESD protection structures.
11+
12+
Core supply voltage is **1.2 V**; the I/O ring operates at **3.3 V**.
13+
14+
---
15+
16+
## Metal Stack
17+
18+
The process provides **7 routing layers**:
19+
20+
| Layer | Direction | Min. Width | Pitch | Notes |
21+
|------------|------------|------------|---------|-------------------------------|
22+
| Metal1 | Horizontal | 0.16 µm | 0.42 µm | Signal / PDN follow-pins |
23+
| Metal2 | Vertical | 0.16 µm | 0.42 µm | Signal |
24+
| Metal3 | Horizontal | 0.16 µm || Signal |
25+
| Metal4 | Vertical | 0.16 µm || Signal |
26+
| Metal5 | Horizontal | 0.16 µm || Signal (default MAX_ROUTING) |
27+
| TopMetal1 | Vertical | thicker || PDN rings & stripes |
28+
| TopMetal2 | Horizontal | thicker || PDN rings & stripes / bumps |
29+
30+
The default routing range for digital designs is **Metal2 – Metal5**.
31+
Designs that use a padframe (see below) typically extend routing up to
32+
**TopMetal2** so the PDN ring can connect to the IO power pads.
33+
34+
The manufacturing grid is **0.005 µm**.
35+
36+
---
37+
38+
## Standard-Cell Library
39+
40+
The `sg13g2_stdcell` library ships three timing corners. The IO library
41+
(`sg13g2_io`) follows the same corner names with separate core/IO voltages:
42+
43+
| Corner | Core VDD | IO VDD | Temp |
44+
|---------|----------|--------|--------|
45+
| Typical | 1.20 V | 3.3 V | 25 °C |
46+
| Slow | 1.08 V | 3.0 V | 125 °C |
47+
| Fast | 1.32 V | 3.6 V | −40 °C |
48+
49+
Latch and clock-gate synthesis mappings are provided via `cells_latch.v` and
50+
`cells_clkgate.v`.
51+
52+
Fill / decap cells: `sg13g2_fill_1`, `sg13g2_fill_2`, `sg13g2_decap_4`,
53+
`sg13g2_decap_8`.
54+
55+
---
56+
57+
## SRAM Macros
58+
59+
SRAM macros are available in the following configurations and are ready to use
60+
as hard macros (single-port today; dual-port variants are forthcoming). Each
61+
variant ships LEF, LIB (slow/typ/fast), and is covered by the
62+
`GDS_ALLOW_EMPTY` pattern for the internal placeholder cells that appear
63+
during GDS merge.
64+
65+
| Macro name | Depth × Width |
66+
|------------------------------------|---------------|
67+
| RM_IHPSG13_1P_64x64_c2_bm_bist | 64 × 64 bit |
68+
| RM_IHPSG13_1P_256x48_c2_bm_bist | 256 × 48 bit |
69+
| RM_IHPSG13_1P_256x64_c2_bm_bist | 256 × 64 bit |
70+
| RM_IHPSG13_1P_512x64_c2_bm_bist | 512 × 64 bit |
71+
| RM_IHPSG13_1P_1024x8_c2_bm_bist | 1024 × 8 bit |
72+
| RM_IHPSG13_1P_1024x16_c2_bm_bist | 1024 × 16 bit |
73+
| RM_IHPSG13_1P_1024x64_c2_bm_bist | 1024 × 64 bit |
74+
| RM_IHPSG13_1P_2048x64_c2_bm_bist | 2048 × 64 bit |
75+
| RM_IHPSG13_1P_4096x8_c3_bm_bist | 4096 × 8 bit |
76+
| RM_IHPSG13_1P_4096x16_c3_bm_bist | 4096 × 16 bit |
77+
78+
To include a macro in your design, add the corresponding LEF to
79+
`ADDITIONAL_LEFS` and the three `.lib` files to the respective
80+
`ADDITIONAL_SLOW_LIBS` / `ADDITIONAL_TYP_LIBS` / `ADDITIONAL_FAST_LIBS`
81+
variables in your design's `config.mk`.
82+
83+
---
84+
85+
## Padframe
86+
87+
The SG13G2 IO library (`sg13g2_io`) provides mixed-signal GPIO pads that
88+
operate at 3.3 V on the outside and 1.2 V on the core side. Wire-bond
89+
designs use `bondpad_70x70` (70 × 70 µm) pads placed immediately outside
90+
the IO ring.
91+
92+
### How it works
93+
94+
The platform's `pad.tcl` script drives the entire padframe flow when
95+
`FOOTPRINT_TCL` is set in the design's `config.mk`. Setting that variable
96+
also causes `config.mk` to automatically add the IO LEF, LIB, and GDS files.
97+
98+
`pad.tcl` performs the following steps in order:
99+
100+
1. Computes the IO offset from `IO_BONDPAD_SIZE` (default 70 µm) and
101+
`IO_SEALRING_OFFSET` (default 70 µm).
102+
2. Creates fake IO sites (`IOLibSite` 1 × 180 µm, `IOLibCSite` 180 × 180 µm).
103+
3. Instantiates IO rows on all four sides with `make_io_sites`.
104+
4. Places the IO pads listed in `IO_{NORTH,EAST,SOUTH,WEST}_PINS` with
105+
`place_pads`.
106+
5. Places corner cells (`sg13g2_Corner`) and fills the remaining gaps with
107+
the `sg13g2_Filler*` series.
108+
6. Calls `connect_by_abutment` to wire the power rails that run through the
109+
IO ring.
110+
7. Places bondpads at offset `(5.0, −70)` relative to each `sg13g2_IOPad*`
111+
instance.
112+
8. Removes the temporary IO rows.
113+
114+
### Design config.mk snippet
115+
116+
```makefile
117+
# Point to the platform pad script to enable the padframe flow
118+
export FOOTPRINT_TCL = $(PLATFORM_DIR)/pad.tcl
119+
120+
# Ordered pad instance names, one entry per side
121+
export IO_NORTH_PINS = sg13g2_IOPad_foo sg13g2_IOPad_bar
122+
export IO_EAST_PINS = sg13g2_IOPadVdd_inst sg13g2_IOPadVss_inst \
123+
sg13g2_IOPad_baz
124+
export IO_SOUTH_PINS = sg13g2_IOPad_clk sg13g2_IOPad_rst
125+
export IO_WEST_PINS = sg13g2_IOPad_gpio_0 sg13g2_IOPadIOVss_inst \
126+
sg13g2_IOPadIOVdd_inst
127+
128+
# Die area must be large enough to accommodate the padframe
129+
# IO ring = 180 µm deep; sealring offset = 70 µm; bondpad = 70 µm
130+
# -> minimum margin from die edge to core edge ≈ 320 µm per side
131+
export DIE_AREA = 0.0 0.0 1050.24 1050.84
132+
export CORE_AREA = 351.36 351.54 699.84 699.3
133+
134+
# Extend routing to TopMetal2 so the PDN ring reaches the IO power pads
135+
export MAX_ROUTING_LAYER = TopMetal2
136+
137+
# Optional sealring GDS (merged in the final step)
138+
export SEAL_GDS = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/sealring.gds.gz
139+
```
140+
141+
The sealring GDS can be generated with the IHP SG13G2 sealring Pcell in
142+
KLayout, sized to match `DIE_AREA`.

flow/scripts/run_command.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"""
1919

2020
import argparse
21+
import os
2122
import resource
2223
import subprocess
2324
import sys
@@ -85,7 +86,12 @@ def run(argv: list[str] | None = None) -> int:
8586
log_file = open(args.log, "a" if args.append else "w")
8687

8788
wall_start = time.monotonic()
88-
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
89+
env = os.environ.copy()
90+
for var in ("RUNFILES_DIR", "RUNFILES_MANIFEST_FILE", "RUNFILES_MANIFEST_ONLY"):
91+
env.pop(var, None)
92+
proc = subprocess.Popen(
93+
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env
94+
)
8995

9096
try:
9197
for line in iter(proc.stdout.readline, b""):

flow/scripts/variables.mk

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,18 @@ export NUM_CORES
7070

7171
#-------------------------------------------------------------------------------
7272
# setup all commands used within this flow
73+
#
74+
# HERE BE DRAGONS: use bare `export VAR`, never `export VAR := $(VAR)`.
75+
#
76+
# `export VAR := $(VAR)` rebinds the variable to origin "file", which makes
77+
# get_variables (below) include it in UNSET_VARIABLES_NAMES. UNSET_AND_MAKE
78+
# then unsets it before the sub-make runs, so any `?=` fallback here fires
79+
# with the wrong value in the sub-make (e.g. the in-tree tools/install path
80+
# that does not exist in a Bazel sandbox). A bare `export` preserves the
81+
# original origin (environment when bazel-orfs supplies it, file when the
82+
# local default fills in), so the value survives UNSET_VARS.
7383
PYTHON_EXE ?= $(shell command -v python3)
74-
export PYTHON_EXE := $(PYTHON_EXE)
84+
export PYTHON_EXE
7585

7686
export RUN_CMD = $(PYTHON_EXE) $(FLOW_HOME)/scripts/run_command.py
7787

@@ -92,8 +102,9 @@ else
92102
OPENSTA_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/sta)
93103
endif
94104

95-
export OPENROAD_EXE := $(OPENROAD_EXE)
96-
export OPENSTA_EXE := $(OPENSTA_EXE)
105+
# See dragons comment near PYTHON_EXE: bare `export`, not `export VAR := $(VAR)`.
106+
export OPENROAD_EXE
107+
export OPENSTA_EXE
97108

98109
OPENROAD_IS_VALID := $(if $(OPENROAD_EXE),$(shell test -x $(OPENROAD_EXE) && echo "true"),)
99110

@@ -108,7 +119,8 @@ else
108119
YOSYS_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/yosys/bin/yosys)
109120
endif
110121

111-
export YOSYS_EXE := $(YOSYS_EXE)
122+
# See dragons comment near PYTHON_EXE: bare `export`, not `export VAR := $(VAR)`.
123+
export YOSYS_EXE
112124

113125
YOSYS_IS_VALID := $(if $(YOSYS_EXE),$(shell test -x $(YOSYS_EXE) && echo "true"),)
114126

0 commit comments

Comments
 (0)