From 7cac67c81b0a5b16cd68bcd00a0f6640dd8042d6 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 27 Feb 2017 09:35:18 -0500 Subject: [PATCH] Corrected an error in the property match subroutine that was failing to stop at the end of an instance record without properties, leading to strange errors where netgen declares "There were property errors" but does not print any errors (because there aren't any). --- TO_DO | 11 ++++++----- base/netcmp.c | 6 ++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/TO_DO b/TO_DO index 1786081..d1277c5 100644 --- a/TO_DO +++ b/TO_DO @@ -1,15 +1,14 @@ TO_DO list for version 1.5 ------------------------------ - 1) Parallel (transistors and capacitors) and serial (resistors) - device merging, plus methods for describing how any device - class may be merged. + As of version 1.5.70, the major to-do item list is complete. Possible useful additions (not critical) ---------------------- 1) Add new output style allowing netlists to be described by Tcl scripts - (similar to the C-Code format, but does not require compiling). + (similar to the C-Code format, but does not require compiling) (this + was done in 1.5.72, but now needs some scripts to make use of it.) 2) Add automatic file format guessing from file extension for "write" command 3) Add Tk GUI to match (and improve upon!) the original X11 GUI. 4) Incorporate into Tcl-based xcircuit @@ -33,5 +32,7 @@ Possible useful additions (not critical) ntk and ext formats, SPICE format writing, and sim format reading). 11) Add a "property" command to add/remove properties to check, and change the slop values (done). -12) Add a "subcircuit" command to mimic a SPICE ".SUBCKT ... .ENDS" card. +12) Add a "subcircuit" command to mimic a SPICE ".SUBCKT ... .ENDS" card + (i.e., the ability to add subcircuit "stub" definitions from the + command line or from a setup file). diff --git a/base/netcmp.c b/base/netcmp.c index 5f926fc..5f458dd 100644 --- a/base/netcmp.c +++ b/base/netcmp.c @@ -5002,10 +5002,12 @@ PropertyMatch(struct objlist *ob1, struct objlist *ob2, int do_print, /* Find the first property record of each circuit. obn1, obn2 are */ /* the last device record before the properties for each device. */ - for (tp1 = ob1; (tp1 != NULL) && tp1->type >= FIRSTPIN; tp1 = tp1->next) + for (tp1 = ob1->next; (tp1 != NULL) && tp1->type > FIRSTPIN; tp1 = tp1->next) obn1 = tp1; - for (tp2 = ob2; (tp2 != NULL) && tp2->type >= FIRSTPIN; tp2 = tp2->next) + for (tp2 = ob2->next; (tp2 != NULL) && tp2->type > FIRSTPIN; tp2 = tp2->next) obn2 = tp2; + if (tp1 && (tp1->type == FIRSTPIN)) tp1 = NULL; /* tp1 had no properties */ + if (tp2 && (tp2->type == FIRSTPIN)) tp2 = NULL; /* tp2 had no properties */ /* Check if there are any properties to match */