From 26da5adf98901033f222679c0012f077bf43ee42 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 28 Feb 2023 16:49:17 -0500 Subject: [PATCH] Corrected an error in the check for coincident instances. This check was too aggressive and would delete coincident instances based on cell def and bounding box only. If the cells were at different orientation or mirrored, they would be incorrectly flagged as coincident. Instances read from GDS could be deleted due to this issue. --- database/DBcell.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/database/DBcell.c b/database/DBcell.c index e5c5bcbb..57444bae 100644 --- a/database/DBcell.c +++ b/database/DBcell.c @@ -107,7 +107,17 @@ DBCellFindDup(use, parent) BPEnumInit(&bpe, parent->cd_cellPlane, &use->cu_bbox, BPE_EQUAL, "DBCellFindDup"); while (dupUse = BPEnumNext(&bpe)) - if (dupUse->cu_def == use->cu_def) break; + if (dupUse->cu_def == use->cu_def) + /* Transforms must be equal---Aligned bounding boxes are + * an insufficient measure of exact overlap. + */ + if ((dupUse->cu_transform.t_a == use->cu_transform.t_a) && + (dupUse->cu_transform.t_b == use->cu_transform.t_b) && + (dupUse->cu_transform.t_c == use->cu_transform.t_c) && + (dupUse->cu_transform.t_d == use->cu_transform.t_d) && + (dupUse->cu_transform.t_e == use->cu_transform.t_e) && + (dupUse->cu_transform.t_f == use->cu_transform.t_f)) + break; BPEnumTerm(&bpe); return dupUse;