was checked using "subcktname" before its initialization. Added
a check for a subcircuit called inside itself, which causes an
immediate failure (see issue tracker issue #106). If allowed to
continue, netgen will either crash or produce inscrutable output
that doesn't pinpoint the issue.
the code changes in the last commit. There is still an issue in
which pins should match between name X on one side and X[Y] on
the other side, if there is no X[Z] where Z != Y, specifically if
one or both cells is a black box, since the equivalence cannot
be determined by net matching.
The pin matching has gotten out of hand and really should be
completely redone. . .
pin assignment when a verilog input file declares a signal "bundle"
with only one signal in it. The solution is to detect bundles which
have only one component in them, and remove the bundle delimiters
("{...}") so that the pin connection is treated as a simple signal
or vector.
netcmp.c:55 declares oldinthandler with empty parameter list:
void (*oldinthandler)() = SIG_DFL;
In K&R / pre-C23, this means 'function with unspecified parameters'.
GCC 14+ infers void(*)(void), which is incompatible with signal(2)'s
expected void(*)(int) handler. The signal(SIGINT, oldinthandler) calls
at lines 8777 and 8784 then fail with -Wincompatible-pointer-types
(now a default error in GCC 14+).
This 1-line fix matches the actual usage as a SIGINT handler with int
signum parameter, and restores tclnetgen.so build on Fedora 41+ /
Debian 13+ / Ubuntu 24.04+ (any system with GCC 14+).
Tested: tclnetgen.so now builds successfully and 'netgen -batch lvs'
mode works again.
ChatGPT about hash implementations. Switched from SDBM to FNV-1a,
which should be a better/stronger hash algorithm. Could do
something more sophisticated, but this change can be done in a few
minutes.
code that were surfaced by Stefan Thiede running clang on Mac
OS. Function prototype warnings have not been fixed yet, as
that is a more involved fix, although it needs to be done.
output string buffer if the size of the copied string is just
the wrong amount, due to the use of strcpy() instead of
strncpy() in at least one place. Just hacked a solution by
allocating more space for the string, but this should be fixed
properly. Also: Discovered that the "zero valued resistor"
routine looks for shorted ports in the wrong place, and if it
finds shorted ports it wrongly decides that the device it's
looking at is a zero-valued resistor whether or not it really
is zero-valued.
missing brace in the file (a common error), then the fact that
there is an unevaluated command when the file has finished being
read will trigger an evaluation of the unfinished code and emit
an error. Previously, the command and anything after the
unterminated brace would just silently get ignored, which was not
helpful for debugging setup syntax errors.
parser was not assigning the correct file number for the first
input file, which resulted in the effect that if the first
file read sets definitions for the netlist, then those definitions
are wiped out on the following file read. There has been a workaround
to read from /dev/null on the first file read so that the file number
is set on all subsequent reads. This fix avoids the need for the
workaround.
additional syntax for wire bundles specified as a pin connection
on an array of instances, and a few other things. These are not
exhaustive but are solving an immediate problem. I will go back
and clean up the code to make it work for more general cases
later.
also a problem with the underlying "flatten prohibit" command
option; in one place, the cell's subcircuits were being prohibited
from being flattened, causing issues including a potential infinite
loop.
Makefile to pass EXTRA_CFLAGS for testing with "-std=c99" and
"-std=gnu99". Made some additional corrections to ensure a
clean compile using -std=gnu99.
The capitalized version of this got removed from the Tcl headers
as some point and is no longer valid. Added an include of
"strings.h" to base/actel.c, which was missing it (uses
strcasecmp() in the code, and needs the function declaration).
this was not doing the correct cross-check, instead looking in the
same netlist for the permutable pin and checking its node number,
which is useless since the node number is the same by definition
for permutable pins. This error would result in occasional false
negative results during pin matching, showing matching where pins
are actually not matched.
ago (and may have been, but only under limited circumstances). Do
to several errors, using "-noflatten" on the command line and using
"flatten prohibit" in a script would not prevent cells from being
flattened; the "-noflatten" list needed to be used to call "flatten
prohibit", and "flatten prohibit" needed to be fixed to flag the
specified cell instead of the top level cell where it exists.
subcircuit devices) do not output information about mismatched
pins. This can end up being treated as a non-error but the
mismatch should be noted in the output regardless.