From dacbfc4e1f2b41fea2a191139bb162014061edf2 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 29 Sep 2023 10:48:05 -0400 Subject: [PATCH] Found that "extresist" double-counts contacts because no attempt was made to limit the ExtFindRegions() search to one plane per contact. Fixed this simply by doubling the resistance per via so that the final result is correct. --- VERSION | 2 +- resis/ResMain.c | 13 ++++++++----- resis/ResMakeRes.c | 10 +++++++++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index a85871a9..1e7c7bfb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.436 +8.3.437 diff --git a/resis/ResMain.c b/resis/ResMain.c index a16d93d4..8ced8b02 100644 --- a/resis/ResMain.c +++ b/resis/ResMain.c @@ -132,9 +132,8 @@ ResGetReCell() * results: none * * Side Effects: All contacts in the design are broken into their - * constituent - * layers. There should be no contacts in ResDef after this procedure - * runs. + * constituent layers. There should be no contacts in ResDef after + * this procedure runs. * * *------------------------------------------------------------------------ @@ -147,7 +146,7 @@ ResDissolveContacts(contacts) Tile *tp; TileTypeBitMask residues; - for (; contacts != (ResContactPoint *) NULL; contacts = contacts->cp_nextcontact) + for (; contacts != (ResContactPoint *)NULL; contacts = contacts->cp_nextcontact) { oldtype=contacts->cp_type; @@ -224,7 +223,6 @@ ResMakePortBreakpoints(def) rect->r_ytop++; } - /* If label is on a contact, the contact has been dissolved. */ /* Assume that the uppermost residue is the port. This may */ /* not necessarily be the case. Could do a boundary scan on */ @@ -1032,6 +1030,11 @@ ResExtractNet(node, goodies, cellname) /* Find all contacts in design and note their position */ + /* NOTE: ExtFindRegions() will call ResFirst or ResEach for BOTH */ + /* planes of a contact. Rather than attempting to limit the */ + /* search, ResDoContacts() will just double the resistance per via */ + /* so that the final value is correct. */ + ResContactList = (ResContactPoint *)ExtFindRegions(ResUse->cu_def, &(ResUse->cu_def->cd_bbox), &DBAllButSpaceAndDRCBits, diff --git a/resis/ResMakeRes.c b/resis/ResMakeRes.c index 16add5d4..5c3a2f9f 100644 --- a/resis/ResMakeRes.c +++ b/resis/ResMakeRes.c @@ -894,7 +894,15 @@ ResDoContacts(contact, nodes, resList) resistor->rr_cl = squaresy; resistor->rr_width = squaresx; - resistor->rr_value = + + /* NOTE: ExtFindRegions() finds tiles on the top AND */ + /* bottom planes of the contact. So there are two */ + /* tile entries per contact, in parallel. To prevent */ + /* double-counting, double the resistance of each */ + /* entry; this is (probably?) easier than limiting the */ + /* entries to a single plane per contact. */ + + resistor->rr_value = 2.0 * (float)ExtCurStyle->exts_viaResist[contact->cp_type] / (float)(squaresx * squaresy); #ifdef ARIEL