From 43d5cc280413b0fd947b555bf1e8d79ea8681450 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 20 Jun 2022 12:26:23 -0400 Subject: [PATCH] Added a quick check on cell defs when running "antennacheck" to make sure that the cell def's .ext is not marked "abstract". Otherwise, "antennacheck" appears to run, but no output is produced, and no reason is given. --- VERSION | 2 +- extflat/EFantenna.c | 2 +- extflat/EFflat.c | 17 +++++++++++++++-- extflat/extflat.h | 1 + 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index e14e457c..1f5b7e5b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.313 +8.3.314 diff --git a/extflat/EFantenna.c b/extflat/EFantenna.c index dc127cfa..419712df 100644 --- a/extflat/EFantenna.c +++ b/extflat/EFantenna.c @@ -224,7 +224,7 @@ runantennacheck: } /* Convert the hierarchical description to a flat one */ - flatFlags = EF_FLATNODES; + flatFlags = EF_FLATNODES | EF_WARNABSTRACT; TxPrintf("Building flattened netlist.\n"); EFFlatBuild(inName, flatFlags); diff --git a/extflat/EFflat.c b/extflat/EFflat.c index 1f2f82d5..6aaab538 100644 --- a/extflat/EFflat.c +++ b/extflat/EFflat.c @@ -66,6 +66,7 @@ int efAddOneConn(HierContext *, char *, char *, Connection *, bool); #define FLATNODE_STDCELL 0x01 #define FLATNODE_DOWARN 0x02 +#define FLATNODE_NOABSTRACT 0x04 /* @@ -129,6 +130,10 @@ EFFlatBuild(name, flags) if (flags & EF_FLATNODES) { + int flatnodeflags = 0; + if (flags & EF_WARNABSTRACT) + flatnodeflags = FLATNODE_NOABSTRACT; + if (flags & EF_NOFLATSUBCKT) { /* The top cell must always have the DEF_SUBCIRCUIT flag cleared */ @@ -137,8 +142,8 @@ EFFlatBuild(name, flags) } else { - int flags = FLATNODE_DOWARN; /* No FLATNODE_STDCELL flag */ - efFlatNodes(&efFlatContext, (ClientData)flags); + flatnodeflags |= FLATNODE_DOWARN; /* No FLATNODE_STDCELL flag */ + efFlatNodes(&efFlatContext, (ClientData)flatnodeflags); } efFlatKills(&efFlatContext); if (!(flags & EF_NONAMEMERGE)) @@ -316,6 +321,14 @@ efFlatNodes(hc, clientData) bool stdcell = (flags & FLATNODE_STDCELL) ? TRUE : FALSE; bool doWarn = (flags & FLATNODE_DOWARN) ? TRUE : FALSE; + if (flags & FLATNODE_NOABSTRACT) + { + Def *def = hc->hc_use->use_def; + if (def->def_flags & DEF_ABSTRACT) + TxError("Error: Cell %s was extracted as an abstract view.\n", + def->def_name); + } + (void) efHierSrUses(hc, efFlatNodes, clientData); /* Add all our own nodes to the table */ diff --git a/extflat/extflat.h b/extflat/extflat.h index d1962a4b..7de836e6 100644 --- a/extflat/extflat.h +++ b/extflat/extflat.h @@ -36,6 +36,7 @@ typedef unsigned char U_char; #define EF_NOFLATSUBCKT 0x10 /* Don't flatten standard cells */ #define EF_NONAMEMERGE 0x20 /* Don't merge unconnected nets */ /* with the same name. */ +#define EF_WARNABSTRACT 0x40 /* Warn if subcell is abstract */ /* Flags to control output of node names. Stored in EFOutputFlags */ #define EF_TRIM_MASK 0x1f /* Mask for handling name trimming */