Additional corrections fix the problem of devices being removed from

the output if they reference a killed node.  This will result in an
invalid netlist, but at least now all devices are represented in the
output, and a warning is issued about the error.  There are still
multiple problems that need to be tracked down and fixed.  Most
problems are stemming from the unusual "Short" device handling.
This commit is contained in:
R. Timothy Edwards 2026-06-04 17:45:03 -04:00
parent a157ec9aa8
commit 7a0e2aa2b9
2 changed files with 12 additions and 3 deletions

View File

@ -32,6 +32,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "utils/utils.h" #include "utils/utils.h"
#include "extflat/extflat.h" #include "extflat/extflat.h"
#include "extflat/EFint.h" #include "extflat/EFint.h"
#include "textio/textio.h"
/* /*
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
@ -491,7 +492,13 @@ efHierVisitDevs(hc, ca)
{ {
dev = (Dev *)HashGetValue(he); dev = (Dev *)HashGetValue(he);
if (efHierDevKilled(hc, dev, hc->hc_hierName)) if (efHierDevKilled(hc, dev, hc->hc_hierName))
continue; {
TxError("Error: Device at (%d %d) is connected to one or more"
" eliminated nodes.\n",
dev->dev_rect.r_xbot, dev->dev_rect.r_ybot);
/* Output the device anyway, but something needs fixing */
// continue;
}
const cb_extflat_hiervisitdevs_t ca_hiervisitdevs_proc = (cb_extflat_hiervisitdevs_t) ca->ca_proc; /* FIXME temporary */ const cb_extflat_hiervisitdevs_t ca_hiervisitdevs_proc = (cb_extflat_hiervisitdevs_t) ca->ca_proc; /* FIXME temporary */
if ((*ca_hiervisitdevs_proc)(hc, dev, scale, ca->ca_cdata)) /* @invoke cb_extflat_hiervisitdevs_t */ if ((*ca_hiervisitdevs_proc)(hc, dev, scale, ca->ca_cdata)) /* @invoke cb_extflat_hiervisitdevs_t */

View File

@ -338,7 +338,9 @@ readfile:
/* Device name "Short" is a reserved name indicating /* Device name "Short" is a reserved name indicating
* that the device does not get output but acts as a * that the device does not get output but acts as a
* short between the first two terminals. Consequently, * short between the first two terminals. Consequently,
* it acts like an "equiv" statement. * it acts like an "equiv" statement. However, unlike
* regular "equiv" statements, it should always merge
* the nodes, so do not pass "resis" to efBuildEquiv().
*/ */
int argstart = 7; int argstart = 7;
/* "Short" devices should not have parameters, but just in /* "Short" devices should not have parameters, but just in
@ -349,7 +351,7 @@ readfile:
efReadError("Bad terminal description for Short device\n"); efReadError("Bad terminal description for Short device\n");
else else
efBuildEquiv(def, argv[argstart + 1], argv[argstart + 4], efBuildEquiv(def, argv[argstart + 1], argv[argstart + 4],
resist, isspice); FALSE, isspice);
break; break;
} }