Skip to content

Commit 4760737

Browse files
authored
Merge pull request #8932 from shinkuan/fix-writespef-coordinates
rcx: fix coordinates option in write_spef
2 parents 3c23c30 + d9bbb38 commit 4760737

File tree

8 files changed

+25030
-0
lines changed

8 files changed

+25030
-0
lines changed

src/rcx/src/ext.i

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ write_spef(const char* file,
9191
opts.nets = nets;
9292
opts.net_id = net_id;
9393
opts.coordinates= coordinates;
94+
if (coordinates) {
95+
opts.N = "Y";
96+
}
9497

9598
ext->write_spef(opts);
9699
}

src/rcx/test/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ COMPULSORY_TESTS = [
1414
"generate_pattern",
1515
"names",
1616
"net_name_consistency",
17+
"coordinates",
1718
]
1819

1920
# Disabled in CMakeLists.txt

src/rcx/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ or_integration_tests(
77
generate_pattern
88
names
99
net_name_consistency
10+
coordinates
1011
PASSFAIL_TESTS
1112
rcx_unit_test
1213
)

src/rcx/test/coordinates.def

Lines changed: 6471 additions & 0 deletions
Large diffs are not rendered by default.

src/rcx/test/coordinates.ok

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[INFO ODB-0128] Design: gcd
3+
[INFO ODB-0130] Created 54 pins.
4+
[INFO ODB-0131] Created 1820 components and 4618 component-terminals.
5+
[INFO ODB-0132] Created 2 special nets and 3640 connections.
6+
[INFO ODB-0133] Created 350 nets and 978 connections.
7+
[INFO RCX-0431] Defined process_corner X with ext_model_index 0
8+
[INFO RCX-0029] Defined extraction corner X
9+
[INFO RCX-0435] Reading extraction model file 45_patterns.rules ...
10+
[INFO RCX-0436] RC segment generation gcd (max_merge_res 0.0) ...
11+
[INFO RCX-0040] Final 2656 rc segments
12+
[INFO RCX-0439] Coupling Cap extraction gcd ...
13+
[INFO RCX-0440] Coupling threshhold is 0.1000 fF, coupling capacitance less than 0.1000 fF will be grounded.
14+
[INFO RCX-0442] 48% of 1954 wires extracted
15+
[INFO RCX-0442] 100% of 1954 wires extracted
16+
[INFO RCX-0045] Extract 350 nets, 2972 rsegs, 2972 caps, 2876 ccs
17+
[INFO RCX-0443] 350 nets finished
18+
No differences found.

src/rcx/test/coordinates.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from openroad import Design, Tech
2+
import rcx_aux
3+
import helpers
4+
import via_45_resistance as via_45
5+
6+
test_nets = ""
7+
8+
tech = Tech()
9+
tech.readLef("Nangate45/Nangate45.lef")
10+
tech.readLiberty("Nangate45/Nangate45_typ.lib")
11+
12+
design = helpers.make_design(tech)
13+
design.readDef("coordinates.def")
14+
15+
# Load via resistance info
16+
via_45.set_resistance(tech)
17+
18+
rcx_aux.define_process_corner(design, ext_model_index=0, filename="X")
19+
20+
rcx_aux.extract_parasitics(
21+
design, ext_model_file="45_patterns.rules", max_res=0, coupling_threshold=0.1
22+
)
23+
24+
spef_file = helpers.make_result_file("coordinates.spef")
25+
rcx_aux.write_spef(design, filename=spef_file, nets=test_nets, coordinates=True)
26+
27+
helpers.diff_files("coordinates.spefok", spef_file, "^\\*(DATE|VERSION)")

0 commit comments

Comments
 (0)