From ce097d5d7641ab31196fd663b2720e4e70a82a92 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 4 Sep 2023 14:47:23 -0400 Subject: [PATCH] One minor change to the previous commit: The check for shorting devices between two ports is ignored for top-level cells, because the scrambled ports won't affect anything in that case, and the error will be reported as a port error, as it should. --- base/flatten.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/flatten.c b/base/flatten.c index 63628fa..d24da24 100644 --- a/base/flatten.c +++ b/base/flatten.c @@ -1954,8 +1954,12 @@ PrematchLists(char *name1, int file1, char *name2, int file2) /* port lists get screwed up. It is */ /* better in that case to force the */ /* cells to be declared mismatched. */ + /* This is ignored for a top-level cell */ + /* because it will just show up as a */ + /* port mismatch error as it should. */ - if (ecomp->cell1->class != CLASS_ISOURCE) { + if (!(tc1->flags & CELL_TOP) && + (ecomp->cell1->class != CLASS_ISOURCE)) { int found1 = FALSE; int found2 = FALSE; for (ob2 = tc1->cell; ob2; ob2 = ob2->next) {