Commit Graph

89 Commits

Author SHA1 Message Date
Tim Edwards 7ca906b7bc Modifications (in progress) to support max vertical strips rule for
horizontally-oriented route layers, to improve performance.
2020-09-12 20:29:29 -04:00
Tim Edwards 05950b16ea Corrected a problem with the last commit, in which the check for
no common directory components between parent and child should have
been outside the while loop.
2020-09-04 11:10:44 -04:00
Tim Edwards 1ef4190589 Corrected issue with parent and child cells in completely different
directories starting from root getting the root directory "/"
removed from the front of the child cell path.
2020-09-04 09:57:16 -04:00
Tim Edwards c592784750 Accidentally managed to add some test code into the database that was
not supposed to have been committed.  It has been removed.
2020-09-03 19:30:39 -04:00
Tim Edwards 9c1c365a5e Added new command options "port first" and "port next" to make it
easier to scan through a cell's ports.  Used that capability in the
"readspice" script to handle case sensitivity problems, and to find
labels that are not ports and force them to be ports to match the
reference netlist.
2020-09-01 17:16:22 -04:00
Tim Edwards 13ab2c3e59 Modified the warning in database/DBio.c that says "Cannot open file
for writing!" so that it actually tells you what is the name of the
file that it is trying to write.
2020-07-26 10:58:36 -04:00
Tim Edwards 1a774e92d1 Corrected an error pointed out by Sylvain Munaut in which the "plow"
command fails for the tutorial tut3d cell due to a missing
initialization of the cd_cellPlane record in DBCellCopyDefBody().
This was missed in the implementation of "bplane", and was not
checked because the routine is only called from the "plow" command
routines.
2020-07-17 12:38:21 -04:00
Tim Edwards fc9ecd2c9b Corrected a problem with an uninitialized entry in ExtCurStyle that
could cause serious errors on systems that do not auto-zero allocated
memory.  Also:  Fixed an error introduced by a recent commit to allocate
character memory for efReadLine() which frees the memory before reading
a .res.ext file, causing a crash when using "ext2spice" with the
"extresist on" option.
2020-06-05 12:46:46 -04:00
Tim Edwards 15f1c82bc9 Added two new features: (1) Default substrate name: Added an
optional name field to the "substrate" line in the extract section
of the techfile.  This is the default name of the substrate if not
connected to anything labeled.  It may use a Tcl variable (preferred).
(2) Added command option "instance orientation [-def]" that returns
the orientation of the named or selected instance.  The -def option
returns the orientation using DEF naming convention;  otherwise, the
naming used with "getcell" is generated.
2020-06-01 16:49:59 -04:00
Tim Edwards 483f15360a Added support for "PORT SHAPE" in LEF files. 2020-05-28 22:06:22 -04:00
Tim Edwards d4c2b878f5 Fixing the same problem again. . . actual mechanism was slightly
different than I expected.
2020-05-28 21:10:42 -04:00
Tim Edwards 28d8808c65 Corrected several improper uses of StrDup() that used the first
argument as a pointer but also set the same variable to the
return value.  This is ambiguous, because the behavior depends on
whether the value being set upon return is the original value or
the reallocated value.  The result is system-dependent behavior.
2020-05-28 17:09:03 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 4066c6821b Corrected error introduced a while ago, probably with the addition
of cell name dereferencing on file loads, where the cell load
subroutine call ended up with the wrong number of arguments,
resulting in an invalid pointer and a crash condition.
2020-05-20 10:09:02 -04:00
Tim Edwards fa60cbaaf0 Corrected the cell delete routine to include removing any elements
related to that cell (since elements are usually temporary and so
kept in a separate list, not in the cell).  Corrected a major error
in the bplane implementation that failed to remove a cell use from
the child def's parent list when deleting the use.  Can cause magic
to go into an infinite loop, especially after selecting and unselecting
cells.
2020-05-15 20:49:51 -04:00
Tim Edwards 682a559455 Added code to fail on the "cellname rename" command if the cell in
question is a read-only cell.
2020-05-12 12:31:39 -04:00
Tim Edwards 55ff3fd1ff Modified GDS read output to avoid generating error messages on
unrecognized layers when the "readonly" read option is set.
Added support to scale elements (from the "element" command,
such as the measurement text and arrows) when the grid scales,
which was missing.  Corrected the output of persistent elements
in a .mag file so that they are correctly scaled by the scale
reducer.
2020-05-12 12:03:38 -04:00
Tim Edwards 4b31af66b1 Corrected error in the bplane implementation that accidentally
called the undo record generation twice when transforming (move,
copy, etc.) cell instances.  This would cause the "undo" command
to regenerate the old instance position in the bplane records,
generally causing trouble down the road (did not encounter any
fatal errors, but it can't be good).
2020-04-14 11:00:51 -04:00
Tim Edwards 937e848d03 Modified DBTreeCopyConnect() so that it can take an argument to
not copy labels;  not copying labels speeds up the antenna checks
(which don't need labels) greatly.  Also fixed several numerical
overflow problems in the antenna checks, which resulted in false
positive errors, as well as nonsensical results.
2020-04-03 16:22:56 -04:00
Tim Edwards 42917e80cc Merge branch 'master' into bplane
Conflicts:
	VERSION

Merged master (fix to dbcConnectFunc for integer size overflow in
call to mallocMagic()).
2020-03-28 20:15:17 -04:00
Tim Edwards 70613a3778 Modified line in DBconnect.c to cast csa2_size to type (size_t), as
magic crashed when the conSrArea array exceeded the size of a 32-bit
int during the antenna rule check.  Should be good for another four
orders of magnitude.
2020-03-28 20:11:22 -04:00
Tim Edwards 33a40d1986 Merge branch 'master' into bplane
Conflicts:
	VERSION
	tcltk/ext2sim.sh
	tcltk/ext2spice.sh

Merged corrections to "save"/"writeall" from master branch
2020-03-23 11:04:50 -04:00
Tim Edwards 7ec87864a6 Corrected the "save" ("writeall") command, which after the fixes of
the last couple of days, was left in a state where it keeps appending
".mag" to the filename if "save" or "writeall" is executed more than
once in the same edit session.  Also, added ext2sim.sh and ext2spice.sh
to the CLEANS list in tcltk, and added both to .gitignore so they are
not tracked.  Removed them from git to stop the current tracking.
2020-03-23 10:19:34 -04:00
Tim Edwards ff0ba7f89d Merge branch 'master' into bplane
Conflicts:
	VERSION

Merged recent changes from master back into bplane, as the efficiency of
bplane for doing extraction on large layouts is unquestionably better.
Fixed the implementation of DBMoveCell() for bplane.  Corrected an error
in the bplane version of dbScaleCell() that enumerates cell uses but
does not free the list.
2020-03-22 14:07:25 -04:00
Tim Edwards ae6b627df7 One more change to add back the .mag extension when writing the
file from the contents of def->cd_file.
2020-03-21 15:34:41 -04:00
Tim Edwards 276bf1d78a Corrected a bad error from a few commits ago, probably 198, which
can deallocate the cell name and causes all sorts of unexpected and
unwanted behavior.
2020-03-21 12:40:35 -04:00
Tim Edwards fe8e229920 Corrected the DEF read routine's ROWCOL parsing. It was not treated
as an optional argument (which it is), and so defaults were not
applied, potentially leading to the wrong number of rows/columns in
a generated via if ROWCOL is not present in the DEF file.
2020-03-21 10:16:33 -04:00
Tim Edwards 4a0ad45627 Added a "move" command option "move origin" which will move the
coordinate system origin to the specified (current) location.
This is a much more efficient method than selecting everything in
a layout and moving it, especially for very large layouts where
selection and moving becomes prohibitive.
2020-03-20 13:40:16 -04:00
Tim Edwards be1c0d1368 Merge branch 'master' into bplane
Conflicts:
	VERSION
	calma/Depend
	cif/Depend
	cmwind/Depend
	commands/Depend
	database/Depend
	dbwind/Depend
	debug/Depend
	drc/Depend
	ext2sim/Depend
	ext2spice/Depend
	extflat/Depend
	extract/Depend
	garouter/Depend
	gcr/Depend
	graphics/Depend
	grouter/Depend
	irouter/Depend
	lef/Depend
	lisp/Depend
	mzrouter/Depend
	netmenu/Depend
	plot/Depend
	plow/Depend
	resis/Depend
	router/Depend
	select/Depend
	sim/Depend
	tcltk/Depend
	textio/Depend
	tiles/Depend
	utils/Depend
	windows/Depend
	wiring/Depend

Merged recent changes from master branch into bplane branch.  Testing the
bplane implementation which has about a 5x improvement in extraction times
for large layouts, which is significant enough to move ahead with the bplane
implementation;  however, the bplane implementation has not been thoroughly
vetted yet, so it will remain a branch until such time that it has been
validated.
2020-03-15 13:23:24 -04:00
Tim Edwards 80fa495103 Removed the Depend files, which were being tracked with .gitignore
pointing to Depend instead of */Depend.
2020-03-13 15:39:08 -04:00
Tim Edwards bb1c9a6c0e Merge branch 'master' into bplane
Conflicts:
	extract/ExtSubtree.c
	utils/Depend

Updated bplane branch from master branch.
2020-03-13 11:39:56 -04:00
Tim Edwards 2788fd70ab One more change to the extraction method to avoid extracting the
substrate more than once for the same subcell, since the substrate
extraction method scans the entire plane area;  this was making
large standard cell layouts extract very slowly, as every component
cell was causing the substrate search to be repeated.
2020-03-13 11:36:42 -04:00
Tim Edwards 2569a06c1f Substantial improvements on several fronts, mostly to do with
extraction:  Fixed a problem causing long extraction times, at
least some of which had to do with a poor string hash function
implementation.  Fixed a huge problem in ext2spice, where the
node merge function was particularly poorly implemented, causing
exponentially increasing processing times with layout size.
Corrected a minor issue with ext2spice where arguments were
improperly specified, causing unnecessary error messages to be
issued.  Fixed an error in the "load -dereference" command option,
which again caused unnecessary error messages to be issued.
Changed .gitignore to ignore Depend files, which are now regenerated
on every build.
2020-03-13 10:33:44 -04:00
Tim Edwards cd87b08b21 Merge branch 'master' into bplane
Conflicts:
	VERSION
	database/DBcellsrch.c
	database/DBconnect.c
	extract/ExtInter.c
	lef/Depend
	utils/Depend

Updated bplane branch with all changes to master since the bplane branch
was last modified.
2020-03-12 08:29:33 -04:00
Tim Edwards ed8117784e Corrected three annoying errors: (1) Select net method had been
changed to ignore labels below the top level of hierarchy.  This
turned out to be a bad idea.  However, the original behavior was
problematic due to confusion over what part of the hierarchy the
labels were in.  The new behavior prefixes each label with the
cell hierarchy, eliminating both problems.  (2) Corrected the
problem where the attachment box for rendered labels is not
displayed if the label name is not in the viewing area.  (3)
Corrected the problem where redirection of input from the layout
window to the console window with the ":" command gets inadvertently
canceled;  this turned out to be due to a missing "*bypass" in
front of the command that finds the output scale to display the
pointer coordinates, and this was happening whenever the mouse was
moved while typing in a command.
2020-02-14 09:36:30 -05:00
Tim Edwards 897a8064ba Restored the behavior of selecting and displaying labels that are
down in the hierarchy when selecting a region or net, but with a
(hopefully very useful) twist:  To avoid the problem of ambiguous
labels in subcells, the subcell name hierarchy is generated in
the same way as is done when flattening a cell, with the instance
name prepended.  For example, when selecting a net in a standard
cell design, a terminal would highlight the name "OR2X1_1/B"
instead of just "B".
2020-02-14 08:48:47 -05:00
Tim Edwards f2dc4b37f0 Corrected the connectivity search function so that it does not attempt
to copy and search on a label that already exists in the flattened,
copied database.  Otherwise multiple labels on a single net can cause
the search to go into an infinite loop, repeatedly copying and erasing
the same label over and over again.
2020-02-13 10:04:55 -05:00
Tim Edwards 61859d152d Corrected a missing argument from the call to DBFlagMismatches()
that causes the recovery option (magic -r) to fail with a segfault
(which is definitely not helpful for recovering lost work).
2020-01-18 15:55:05 -05:00
Tim Edwards ff2f2de046 Corrected the dereferencing code from the last commit, where the
flag definition had been put in database.h instead of database.h.in,
and so was deleted on "make clean".  Also, corrected a problem that
causes the cif output style to be lost when running DRC-CIF checks
if the first output style is the DRC style.
2020-01-03 12:21:39 -05:00
Tim Edwards 82e33248f2 Corrected dereferencing of cell dependencies, which was being applied
only at the time of running the command "load".  But cells are generally
loaded only on an as-needed basis, so the dereferencing option must be
saved as a flag in the cell and honored whenever its subcells are expanded
or otherwise read at a later time.
2020-01-02 10:13:04 -05:00
Tim Edwards be38dac9fb Corrected .mag file read-in so that it will not complain about
a layout being redefined if one records the full path name and
the other records the home directory tilde expression.
2019-12-14 18:30:48 -05:00
Tim Edwards 0eb3b1fe1c Corrected an error in ext2spice related to the recent modification to get
rid of redundant port entries in subcircuits.  There is still an outstanding
issue as to whether nodes and connections need to be recursively iterated
to the hierarchy bottom.  The current fix corrected the test case.  Also,
added a "-dereference" option to the "load" command to revert to the
original behavior of using only search paths from "addpath" when searching
for files to load.
2019-11-14 15:18:26 -05:00
Tim Edwards b493334c73 Preliminary changes to support extraction devices other than the original
simple FET device in extresist.  Also:  Extended the bloat-all CIF operator
again, allowing the trigger layer for the bloat operation to include both
CIF layers and magic layers (previously only magic layers were supported).
This extension is possible due to the previous extension allowing the
trigger layer and bloating layers to be on separate planes.  This operator
extension is useful for tagging geometry that is in the proximity of, but
not overlapping, geometry on another plane.
2019-10-17 16:21:56 -04:00
Tim Edwards 8b0a9275a8 Fixed the value of property FIXED_BBOX when saving a file; it needs
to be scaled down by "reducer" like all other values in the cell.
Suggests a need to have property types other than string, so that
a property type "rect" or "box" can be declared that is saved as a
Rect and always scales without special hack handling of the specific
string FIXED_BBOX. . .
2019-10-15 20:40:59 -04:00
Tim Edwards 4b5566af3e Corrected an error that causes alias names for layers to become the
principle layer name, which should not happen (especially in the
case of space, where layers may be aliased to "space" to make them
ignored on input).  Also:  Implemented a "-<types>" option to the
"substrate" record in the techfile to declare types which shield
layers from the substrate.  This allows types like pwell to be used
in different contexts, e.g., as part of the substrate, or as a P-well
in deep N-well, without requiring a different type.  This works in
conjunction with the recently-implemented "+<types>" ID types for
devices.  All of this may seem unnecessary but helps to reduce the
number of layers needing to be defined, and the subsequent complexity
of the DRC rulesets.
2019-09-18 20:48:33 -04:00
Tim Edwards 643c39a2d5 Corrected error where modification to allow use of brackets inside
a cell instance name not related to an array moved a variable that
was used later in the routine to the inside of an if block,
effectively making that variable undefined in most cases.
2019-09-03 14:02:27 -04:00
Tim Edwards aa4bb4b19c Since allowing brackets to be part of cell names in a previous
commit, found that DBTreeFindUse fails to find such uses because
it strips the array delimiters off the name.  Fixed the routine
although the routine really should be checking if the use is a
1- or 2- dimensional array and stripping off only the components
expected.  The current code will probably fail for cell uses
that have brackets in the name AND are arrayed.  Fortunately
this search routine does not appear to be used frequently or in
any critical database functions like netlisting.
2019-08-20 10:37:12 -04:00
Tim Edwards 942eaf8113 Revised the substrate extraction method: Instead of searching on
all types specified in the "substrate" statement, split such types
into those on the declared well plane, and everything else.  Any
types on the well plane are searched as before.  Types not on the
well plane (e.g., psd on active) are searched and added to the
substrate node *only* if overlapping nothing on the well plane.
This allows a type such as "psd" to be used on, e.g., both space
(substrate) and deep pwell, but only be extracted as part of the
substrate when found over space.  Note that if there is NO
implicit substrate, the substrate connections will always be
found through the usual connection rules.
2019-08-20 08:42:07 -04:00
Tim Edwards 381fc0cca4 Removed diagnostic print from last commit. 2019-08-02 14:53:22 -04:00
Tim Edwards 9635f10c5a Removed a badly implemented double-loop from the timestamp mismatch
code.
2019-08-02 14:50:32 -04:00