Commit Graph

1716 Commits

Author SHA1 Message Date
Tim Edwards 5dd0c97dce Modified the "writeall" command to (1) raise an error message when
"writeall force <cell>" is used but <cell> doesn't exist, and (2)
to add options "writeall modified" and "writeall noupdate" (which
may or may not be useful).
2022-01-21 17:43:04 -05:00
Tim Edwards 93c4503fa8 Refined the new "gds maskhints" command option for GDS input from
yesterday's commit to allow the syntax "gds maskhints <types>", in
which mask hints can be restricted to a specific list of layers
rather than all layers which define mask hints in the cifoutput
rule.
2022-01-21 14:48:59 -05:00
Tim Edwards 97441bc07a Extended the GDS timestamp handling to GDS input. Unlike former
behavior, in which all cells read from GDS are given a zero
timestamp, and the timestamp is set when the file is written to
disk, the default behavior now is to set the layout cell's timestamp
from the timestamp provided in the GDS (the creation date timestamp,
specifically).  The same command "gds datestamp" implemented in the
previous commit for GDS writes now also applies to GDS reads:  If
set to "no", then the timestamp value from the GDS file is
transferred to the layout view (default behavior);  if set to "yes",
then the timestamp is set to zero (legacy behavior).  If set to
a value, then the value is used as the timestamp.
2022-01-21 13:05:24 -05:00
Tim Edwards 09577b5636 Updated all of the documentation by copying back from the website.
The website documentation now points to these contents in a clone
of the repository on opencircuitdesign.com, so all future edits of
the command-line documentation will be made directly to the git
repository.  Also:  Changed the precision of box values printed in
microns from 2 to 3 digits after the decimal place, so that 5 nanometer
grids do not get values clipped in the output.
2022-01-21 10:44:13 -05:00
Tim Edwards 5629c2a6cd Changed the "gds nodatestamp" option to "gds datestamp" and added
"gds datestamp <value>" as an option to force a specific datestamp
on the GDS output.  This is a third option beyond the previous two
which were either to use the current time or to write zero.  The
new option allows an entire library to get a common timestamp, for
example, related to a PDK version number.  The "gds nodatestamp"
option has been retained for backwards compatibility.
2022-01-21 10:26:29 -05:00
Tim Edwards c2755a061f First cut at a method to automatically generate mask hint properties
in a cell to account for the difference between what's in an input
GDS file and what magic would write out itself from the processed
data.  This potentially allows library cells to be read in that
will generate the equivalent mask data as output without resorting
to using GDS file references as properties.  The method is activated
with the new command option "gds maskhints on" and the default is
off.
2022-01-20 21:50:13 -05:00
Tim Edwards 6deb7d4f01 Missed a few calls in CIFsee.c to the routine that was modified
in the previous commit, causing segfaults when using "cif see".
2022-01-19 15:46:15 -05:00
Tim Edwards 10c5ba99c9 Corrected an error in the hierarchical GDS processing of mask hints,
which failed to translate hint coordinates from subcells into the
composite cell, resulting in hierarchical GDS errors.
2022-01-19 15:37:45 -05:00
Tim Edwards c8c8f8b362 Slight change to the criteria for "electrical" types: Removed
device ID layers, and added substrate shield layers.
2022-01-14 17:42:21 -05:00
Tim Edwards 73314e30d7 Added some automatic handling of the "extract" section in the tech
file to generate a mask of all the types called out in the section
as being used for parasitic calculations (resistive and capacitive)
and device terminal types.  This is supplemented with a list of all
types that are specified in the "connect" and "contact" sections as
connecting to something other than themselves.  All remaining types
are considered non-electrical and removed from the list of types
that can be considered electrical nodes.  This works a bit better
than the existing method of using "resist <types> None" to specify
non-electrical types, as it is backwardly-compatible to older tech
files.  The upshot is that in the worst case, if a type needs to be
extracted as an electrical node but does not satisfy any of the
above criteria, then it should be added to the "resist" list, with
a resistance of 0 if necessary.
2022-01-14 17:30:05 -05:00
Tim Edwards d4961f244d Modified the extraction code to work around a problem created some
time ago by cleaning up excess usage of "equiv" lines in the .ext
file output.  The hierarchical extraction code did not distinguish
between node names which were output and those that were not,
requiring a setting "extract do aliases" to force all node aliases
to be output with "equiv" statements.  So hierarchical names
might be any alias, whether output or not, and "merge" and "cap"
lines might contain references to nodes that were not output,
causing them to be disconnected nodes.  This fix handles the
"extract no aliases" (default) case by flagging node names that
are redundant and not output, and not creating hierarchical names
with them.
2022-01-14 16:13:36 -05:00
Tim Edwards 453d276f20 Cleaned up a bit of confusing diagnostic output when reading GDS.
If cells are instanced before being defined, causing the GDS parser
to rewind the cell from the top, then the "already defined" error
messages will be suppressed, since it is to be expected that cells
will be seen twice (and ignored the 2nd time).  When rewinding, an
output message is issued so that it is clear that the file contains
instances that are used before they are defined, and recommends the
"gds ordering on" setting.  Also:  Fixed the "gds ordering" command
code so that the command with no third argument returns the state
of the "gds ordering" setting instead of generating a parser error.
2022-01-14 11:07:08 -05:00
Tim Edwards 91b00a633f (1) Modified the method used for the previous commit, as it was
found to make ext2spice runtimes very long for large layouts.
The new method is equivalent but doesn't incur the overhead.
Also:  Changed a flag check which was causing the substrate node
to be output as a port for certain layouts where the substrate
node connects to no devices, and so should be optimized out.
2022-01-13 17:00:07 -05:00
Tim Edwards b68744a944 Made a change to basic extraction to avoid generating an extra
node representing the global substrate on cells that are abstract
views.  Corrected a typecasting issue in ext2spice.c that throws
a compiler warning.  Added another check for a cell being editable
when painting, which is a case that was not covered by the
previous code change to address the same issue.
2022-01-13 12:56:20 -05:00
Tim Edwards b12589d09f Fix to the previous commit, which was implemented incorrectly.
The current implementation works, but it is not clear that it
does anything differently than before the start of today's
modifications.
2022-01-12 17:19:29 -05:00
Tim Edwards 0f9dc76681 Changed FPRINT* macros to FPUTS* in DBio.c to match the change of the
underlying function from fprintf() to fputs(), which was changed for
gcc11 compatibility by Jean-Paul Chaput in github issue #123.  Also
corrected a typo from the previous commit.
2022-01-12 15:36:33 -05:00
Jean-Paul Chaput f354920133 Patch for gcc11/RHEL9 2022-01-12 15:33:42 -05:00
Tim Edwards b5f2b75768 Removed code from ext2spice that is no longer functional.
Implemented a separate check for ports when writing a subcircuit
that cross-checks against the port list in the flattened
extraction.  This allows ports that were optimized out during
flattening of the hierarchy to be removed from the cell's port
list, which cuts down on disconnected nodes in the output port
list.
2022-01-12 15:30:07 -05:00
Tim Edwards f43bd19e36 Made small modifications to Anton Blanchard's pull request #120 to
use DBTypeLongNameTbl[] instead of DBTypeShortName() to print the
names of the illegally overlapping types.
2022-01-10 22:38:20 -05:00
Anton Blanchard 93dbc77dcf Add more information to illegal overlap warnings
Print the names of the tile types that are illegally overlapping. This
gives us a better idea of what is wrong, eg:

feedback add "Illegal overlap between obsm2 and m2 (types do not connect)" medium
2022-01-10 22:34:56 -05:00
Tim Edwards 940a18efab Updated the version to go along with the merge of several pull
requests (117, 118, and 119) from Anton Blanchard.
2022-01-10 14:05:34 -05:00
Anton Blanchard 73fee3e5fd Add missing types in function prototypes
It would be nice to convert the codebase from K&R to ANSI function
prototypes, but for now just clean up the warnings.
2022-01-10 14:04:37 -05:00
Anton Blanchard 4f79580248 Add missing includes
A number of places are using isspace(), tolower(), toupper() and strcmp()
without including the relevant header.
2022-01-10 14:01:36 -05:00
Anton Blanchard a5614e0d97 Fix typo in MakeLegalLEFSyntax
In MakeLegalLEFSyntax we step through the badLEFchars string
but instead of looking for the NULL terminator, we instead
look for a NULL pointer.
2022-01-07 20:37:00 +11:00
Tim Edwards f89d52dbcc Modified the short selection routine (again) to avoid issues when
tracing the short path back through stacked contacts.  Discovered
a problem with the connectivity search routine (which has been in
the code for a very long time) which will fail to copy contacts
to the selection cell if it has already drawn one of the metal
layers in the same place.  This has now been fixed.
2022-01-06 13:29:43 -05:00
Tim Edwards 2fc0e669b6 Some optimizations on the "select search" function. Mainly this
stops checking for the "best" path during the feed-forward check
and only enumerates the cost function for every tile in the
selection, moving outward from the source.  This keeps the
algorithm efficient.
2022-01-03 17:49:54 -05:00
Tim Edwards 1fceef6acd Corrected the last commit's problem with file locking, which is that
there was no distinction between a locked file and a new cell
(initial state) before writing to disk.  This prevents any new cell
from being saved!  Also:  Revised the behavior of the "select short"
search, but this still has issues with long run-times on complex
layouts, so this is an ongoing effort.
2022-01-03 16:00:31 -05:00
Tim Edwards 1bb4cb92ea Played around with the file locking and discovered to my chagrin that
whenever a process writes a cell to disk, it immediately releases the
file lock it had on that cell, which is clearly not the intent of file
locking.  Fixed this issue.  On a related topic, revised the "cellname
writeable" command so that it can make a cell editable even if the cell
has an advisory lock and cannot be made writeable.  Perhaps there should
be a clearer distinction here between "writeable" and "editable".  Also:
Reconsidered the previous commit, which removed the "--disable-locking"
from the configuration options.  Because some operating systems may not
implement fnctl()-based file locking (Cygwin, for one, apparently doesn't),
it is still useful to be able to completely remove the function, in case
the operating system will fail to recognize the fnctl() values in the
code.  Now, file locking behavior can be permanently removed through the
configuration option, or temporarily disabled from the command line.
2022-01-01 16:53:46 -05:00
Tim Edwards e4d1c29112 Reworked the file locking option as a command instead of as a
compile-time option.  The behavior can now be controlled from
within the program with "locking disable" or "locking enable".
2022-01-01 14:28:59 -05:00
Tim Edwards 6a78f4967e Updated the version to go along with pull request #115 from github
user susinxy.  Edited the merged code slightly, without changing
the functionality.
2022-01-01 13:24:18 -05:00
susinxy 620217b860 fix tech file load error with qflow 2022-01-01 13:18:09 -05:00
Tim Edwards 72227b4995 Revised the messaging coming from "gds read" so that it does not
post error messages when a GDS library addendum is read.  It now
assumes that if a cell is called but not defined in the GDS, and
that cell happens to be in memory already, then this is intentional.
2021-12-31 23:11:24 -05:00
Tim Edwards cb27fba5ab Attempted another optimization to speed up the short-finding
algorithm, but it's clear it needs a lot more than that.
2021-12-31 22:57:54 -05:00
Tim Edwards abc4b263a5 One additional optimization to the routine just committed, which
avoids pushing space tiles and processing them just so it can pop
them off the stack and deallocate the memory.
2021-12-31 22:25:22 -05:00
Tim Edwards f81560557b Modified the routines used by "select short" so that they use the
stack routines in utils/stack.c instead of relying on a recursive
routine, which will run out of the computer's stack space pretty
quickly on a large layout.
2021-12-31 22:19:11 -05:00
Tim Edwards 05b1c75455 Missed one use of the word "fatal" in ExtCell.c. 2021-12-31 14:06:04 -05:00
Tim Edwards d65be34f98 Attempt to lighten up on the use of "fatal" referring to errors
that are not fatal to the program, the circuit, and sometimes not
even errors.
2021-12-31 14:02:58 -05:00
Tim Edwards 271449128a Updated the way that the technology file parser handles the
"defaultareacap" and "defaultperimeter" statements in the technology
file.  Now, the parser makes use of the configuration of the
substrate from the "substrate" line to generate a default list of
which types and planes represent the substrate, and which types and
planes represent shielding to the substrate.  This solves an issue
with the use of substrate isolation layers (e.g., "isosub" in
sky130A), because its definition and usage created substrate shields
on two planes (well and dwell), while the syntax for "defaultareacap"
and "defaultperimeter" only allow one shielding plane to be defined.
2021-12-31 11:13:59 -05:00
Tim Edwards 9a17539ca7 Corrected the use of EF_SUBS_NODE to distinguish between device
substrate (bulk terminal) and global substrate.  Otherwise, the
routine in ext2hier.c that finds the substrate node will find the
first device bulk connection, not the default substrate.
2021-12-30 13:27:42 -05:00
Tim Edwards be5b6dec0c Updated version to go along with the merge of pull request #113
from Brad Smith.
2021-12-30 09:26:38 -05:00
Brad Smith 10fa302bba Correct & has lower precedence than parentheses warnings.
CmdRS.c:1269:22: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
DRCtech.c:2573:16: warning: & has lower precedence than !=; != will be evaluated first [-Wparentheses]
2021-12-30 04:35:03 -05:00
Tim Edwards cf28ad6cf9 Removed a bogus setting for freeBSD that was pointed out by Brad
Smith and which had escaped my attention.  The commit from 8/3/2019
fixed an obvious fatal error but just replaced it with something
syntactically clean but nonsensical.  This commit just removes the
questionable line altogether.
2021-12-29 21:14:44 -05:00
Tim Edwards 6adcd2dc74 Updated the version to go along with the merge of pull request
112 from Brad Smith.  Also ran autoconf, since change was made
to configure.in and the standard instructions don't call for
autoconf to be run.
2021-12-29 21:06:48 -05:00
Brad Smith 60b2660b39 Eliminate bogus clearing of CPPFLAGS so the contents of CPPFLAGS
is properly passed down throughout the autoconf script.
2021-12-29 19:03:37 -05:00
Tim Edwards 9af44230eb Removed an oddball method put into the extflat code some time ago
that makes a net a global net if there is a Tcl variable of the
same name.  This conflicts with a later use of Tcl variables VDD
and GND to denote power and ground names, which is a completely
different usage.
2021-12-25 16:14:37 -05:00
Tim Edwards 86f7c1f2cf Corrected the return value of extSubsFunc2(), which was returning
value 1 after finding a substrate connecting type shielded (by deep
nwell, in the example) from the substrate, thus preventing the
search from processing any remaining substrate types.  Solved by
changing the return value to zero to keep the search going.
2021-12-23 16:31:34 -05:00
Tim Edwards 716848067e Made a few corrections that stem from the change to add a separate
record to the label structure to hold the port number.  One major
issue stemming from this was reported in github issue #203 by Anton
Blanchard.  This commit fixes that error.
2021-12-22 12:08:34 -05:00
Tim Edwards ea414c822d Got to the bottom of why area and perimeter values are no longer
output for transistors.  The problem came from a change made to
fix an issue with capacitors marked as floating nodes because some
nodes are not output as source or drain.  But those nodes are output
before the parameters, so when generating parameter output, all
nodes appear to have already been output.  Solution:  Specify an
additional bit in the "visited" mask for the node having been output
that is separate from the mask for resist classes used by the code
that writes parameter values, and use that bit as a test for whether
the node is connected to some device (not necessarily a FET source
or drain).
2021-12-20 13:12:49 -05:00
Tim Edwards 5e3c26c95a Tracked down two more memory leaks coming from ext2spice, due to
client data generated by ext2spice and attached to a node's
nodeClient record;  there is an initNodeClient() routine but no
corresponding freeNodeClient() routine.  Eventually had to add a
callback function passed to EFDone() and EFFlatDone() to clean up
these entries.  After doing that, valgrind reports clean for all
memory allocated within ext2spice (there are other things that are
not freed but not related to a specific command, so do not need to
be treated as leaks).
2021-12-13 18:05:53 -05:00
Tim Edwards 7297ca079f Found another long-time error in which a hash table created during
ext2spice is not freed.  This may account for the rest of the memory
leak that was partially fixed in the previous commit.
2021-12-13 16:55:02 -05:00