PEX ERROR: src/db/db/dbPLC.cc,543,false

Hi Mattias,
I am using on PEX extraction and stuck on this error.
Not sure why min_b=0 in region.delaunay works but extraction keeps failing.
And, in your opinion, when dealing with non-orthogonal shape in PEX, these statements are correct (assume we don't care the R result) ?
1. min_b=0 is better than min_b=0.3
2. tessellation is better than squarecounting
Sorry I try to read online but still cannot understand the functions completely.
Since I cannot post too much information here. I hope you can reproduce the error using limited information below.

I installed klayout 0.30.9 in linux system.

from typing import *
import klayout.db as kdb
import klayout.pex as klp


tech1 = klp.RExtractorTech()
tech2 = klp.RExtractorTech()

m1 = 10
m2 = 20
v1 = 15

for l in (m1, m2):
    m = klp.RExtractorTechConductor()
    m.layer = l
    m.resistance = 1
    m.algorithm = klp.Algorithm.Tesselation
    m.triangulation_max_area = 0
    m.triangulation_min_b = 0
    tech1.add_conductor(m)
    m.triangulation_min_b = 0.3
    tech2.add_conductor(m)

v = klp.RExtractorTechVia()
v.cut_layer = v1
v.bottom_conductor = m1
v.top_conductor = m2
v.resistance = 1
tech1.add_via(v)
tech2.add_via(v)

points = """-13025.42800    -33338.54100
-13127.95900    -33236.01000
-13132.73200    -33240.78300
-13135.91400    -33237.60100
-13026.13600    -33127.82300
-12923.60500    -33230.35400
-12920.42300    -33227.17200
-13022.95400    -33124.64100
-13014.99900    -33116.68600
-13011.81700    -33119.86800
-13016.59000    -33124.64100
-12914.05900    -33227.17200
-12923.60500    -33236.71800
-13026.13600    -33134.18700
-13029.31700    -33137.36900
-12926.78700    -33239.89900
-12936.33300    -33249.44500
-13038.86300    -33146.91500
-13042.04500    -33150.09700
-12939.51500    -33252.62700
-12949.06100    -33262.17300
-13051.59100    -33159.64300
-13054.77300    -33162.82500
-12952.24300    -33265.35500
-13012.70100    -33325.81300
-13115.23100    -33223.28300
-13118.41300    -33226.46400
-13015.88200    -33328.99500"""

points = points.split("\n")
points_kdb = []
for p in points:
    x, y = p.split()
    points_kdb.append(kdb.Point(round(float(x)/0.001), round(float(y)/0.001)))

polygon = kdb.Polygon(points_kdb)
region = kdb.Region([polygon])
geo: Dict[int, kdb.Region] = {m1: region}

x1, y1 = -13133, -33238.8
x2, y2 = -13015,-33120
port_a = kdb.Point(round(x1/0.001),round(y1/0.001))
port_b = kdb.Point(round(x2/0.001),round(y2/0.001))


vertex_ports: Dict[int, List[kdb.Point]] = { m1: [port_a, port_b] }
polygon_ports: Dict[int, List[kdb.Polygon]] = {}
rexer = klp.RNetExtractor(dbu=0.001)
try:
    network = rexer.extract(tech1, geo, vertex_ports, polygon_ports)
    print(f"PEX min_b=0 PASS: {network.to_s(with_coords=True)}\n")
except Exception as e:
    print(f"PEX min_b=0 ERROR: {e}\n")

try:
    network = rexer.extract(tech2, geo, vertex_ports, polygon_ports)
    print(f"PEX min_b=0.3 PASS: {network.to_s(with_coords=True)}\n")
except Exception as e:
    print(f"PEX min_b=0.3 ERROR: {e}\n")

try:
    m1_delaunay = region.delaunay(max_area=0, min_b=0)
    print(f"REGION min_b=0 PASS\n")
except Exception as e:
    print(f"REGION min_b=0 ERROR: {e}\n")

try:
    m1_delaunay = region.delaunay(max_area=0, min_b=0.3)
    print(f"REGION min_b=0.3 PASS\n")
except Exception as e:
    print(f"REGION min_b=0.3 ERROR: {e}\n")

ERROR: src/db/db/dbPLC.cc,543,false
PEX min_b=0 ERROR: Internal error: src/db/db/dbPLC.cc:543 false was not true in RNetExtractor.extract

ERROR: src/db/db/dbPLC.cc,543,false
PEX min_b=0.3 ERROR: Internal error: src/db/db/dbPLC.cc:543 false was not true in RNetExtractor.extract

REGION min_b=0 PASS

ERROR: src/db/db/dbPLC.cc,543,false
REGION min_b=0.3 ERROR: Internal error: src/db/db/dbPLC.cc:543 false was not true in Region.delaunay

Comments

  • Hi @jinxtopcs,

    thanks for the nicely prepared test case. This problem looks like a numerical issue. I'll try debugging the problem.

    Just fyI: a better place for bug reports is the GitHub issue tracker: https://github.com/KLayout/klayout. Bugs reported there can be tracked for easily and connected to pull requests.

    Matthias

Sign In or Register to comment.