Commit Graph

66 Commits

Author SHA1 Message Date
Tim Edwards edbefbd1c4 Corrected an error in handling partial buses connected to a
full-bus pin in a module instance.
2019-06-15 03:05:50 -04:00
Tim Edwards 8e0371e09b Corrected handling of verilog backslash-escaped names in the
verilog netlist parser.
2019-05-05 10:52:07 -04:00
Tim Edwards 7889e2ae73 Small typo, large effect; wrong reference to ob1 (instead of ob2) in
flatten.c can cause a segfault when analyzing whether flattening
cells generates a better circuit match.
2019-01-21 20:29:42 -05:00
Tim Edwards 56b4174646 Fairly substantial overhaul of the tokenizing routine to better
handle verilog syntax.  Also:  Added SPICE voltage and current
sources as separate classes (as opposed to being converted to
subcircuits, which was how they were previously handled).  That
allowed voltage sources to be checked for zero value and removed
by shorting the ends together, as was being done for zero value
resistors (note that like zero-value resistors, removal is only
done if removing the component makes a better match than leaving
it in).  In particular, yosys has SPICE netlist output that
converts equality assignments ("assign a = b") into zero-value
voltage sources, so these components need to be treated as
non-physical elements.
2019-01-09 20:26:38 -05:00
Tim Edwards 079e0ab5d3 Corrected an error in the handling of node names in verilog that was
accidentally erasing array delimiters from node names, a move that
surprisingly has no effect at all on LVS until the cell containing
the truncated nodes is flattened, at which point it causes odd and
confusing behavior that seems to have nothing to do with node names
at all.
2018-11-14 19:53:19 -05:00
Tim Edwards 4fb892a64f Fixed configure script error that reports python3 as being
configured even when it is not found on the system.  This was only
a reporting error, and had no other repercussions.
2018-11-14 13:45:02 -05:00
Tim Edwards 13c45c6d0c Encountered a problem with parsing non-inlined ports of a module and
tracked it down to a "to be completed" comment in the source code.
So it is now completed.
2018-11-12 16:32:33 -05:00
Tim Edwards 09b2bb3316 Extended the verilog parser to account for the fact that there can
be whitespace between a wire/register name and its array delimiter.
2018-10-29 15:19:13 -04:00
Tim Edwards 0de1c232e4 Corrected property matching so that properties are promoted to
type double before sorting (previously, property promotion was
being done after parallel sorting).  Also, modified the verilog
file reading so that parameters and definitions that are numeric
are stored as numeric (not string) properties.
2018-09-26 10:46:55 -04:00
Tim Edwards 3a03e769af Substantially improved verilog parsing (although almost certainly not
perfect).  Given the complexities of the verilog language, the simple
strtok() tokenizer used by the SPICE parser is not sufficient.  Wrote
a better tokenizer that can distinguish between whitespace and
functional tokens like parentheses, semicolons, etc., which are tokens
themselves but also token separators.
2018-09-24 15:09:29 -04:00
Tim Edwards 036e1f0947 Modified the verilog reading code so that it will automatically
determine if a parameter is a floating-point number, integer, or
string, and set the parameter accordingly.  Found an error in the
parameter comparison if the subcircuit definitions don't agree
on the type of parameter. Now all values are promoted to a single
type based on preference order (double, integer, string).  Tested
on a verilog file with a primitive device type defined as a module
with its properties encoded as parameters.  This successfully
matched against the SPICE primitive device.
2018-08-01 15:40:23 -04:00
Tim Edwards 534ea839c0 Revised the verilog parser to correctly identify and parse
parameters passed to instances, so that these can match critical
parameters in the SPICE netlist being compared against.
2018-05-23 13:04:31 -04:00
Tim Edwards 1fe341833c Expanded the verilog parsing to include simple handling of ifdef,
ifndef, endif conditional statements.  Pre-define the key "LVS"
for use with netgen.  Also corrected some problems stemming from
the way delimiters are handled and the flexible use of whitespace
in verilog.
2018-04-25 15:00:49 -04:00
Tim Edwards aee4b846e2 Corrected the known issue with pin bus index matching that was in
the last commit and which was expected to be corrected by this
commit.
2018-04-16 17:19:26 -04:00
Tim Edwards 58d7e17231 Corrected basic problem with verilog instance pins not needing to
be in any specific order since all ports are named.  Also corrected
problem with pin names not using the same string matching function
as used for nets in general (which affects the ability to match
against different bus delimiters).
2018-04-16 15:41:20 -04:00
Tim Edwards 4d65b0006d Added new handling for verilog structural netlists, and fixed
some problems stemming from comparing a case-sensitive netlist
against a case-insensitive one.  Verilog netlist reading does
not yet have support for macros other than "`include", and it
does not yet have support for bit vectors constructed with
braces ({}).
2018-04-12 17:09:10 -04:00