Commit Graph

1155 Commits

Author SHA1 Message Date
Tim Edwards 3f2210df74 Because the pull update was missed, the version was not updated to
the correct number.
2021-01-12 12:50:18 -05:00
Tim Edwards 4a1752aa61 Merge branch 'master' of 192.168.0.7:/home/tim/gitsrc/magic/
Missed a pull.
2021-01-12 12:49:34 -05:00
Tim Edwards 2462d6f220 I discovered that for large designs, running DBWredisplay will take
significant amounts of time even though there is no display to
receive the result.  However, the "suspendall" command only works
if a window exists.  The obvious solution is to set GrDisplayStatus
to DISPLAY_SUSPEND whenever magic is run with the "-dnull" option.
This should help speed up a lot of scripts, in particular where
designs are large.
2021-01-12 12:46:43 -05:00
Tim Edwards 0e1ca4ba07 A few minor edits to prevent compiler warnings around the changes
made in yesterday's commit (implicit return value, missing string.h
include).
2021-01-08 14:39:32 -05:00
Tim Edwards feeeccecda Corrected error caused by empty string labels in GDS input; when
a cell is flattened, these were getting the hierarchy prepended
and therefore became non-NULL and tending to screw up things
generally.
2021-01-07 21:47:16 -05:00
Tim Edwards 67d0d8c3f0 Corrected the use of the global substrate node name; this has been
restricted to its original intent, which is to replace the long name
formed from the plane short name and the "minfinity" coordinate.
This avoids issues with conflicting substrate names derived from a
real layer such as pwell.  Also, the global substrate node name now
returns the variable name without the "$" in front if the variable
has not been set to anything.  This avoids potential syntax errors
in the netlist.
2021-01-07 15:19:36 -05:00
Tim Edwards 2bbe1be790 Small correction to the mask hints code to correctly handle multiple
rectangles in a single property.
2021-01-06 12:17:19 -05:00
Tim Edwards a35f3b3d14 Additional code to make sure that the database scaling acts on all
values in a mask hints property, and added back the handling of
mask hints in the top level cell, since the hierarchical function
on cells does not apply the function to the top level.
2021-01-06 11:35:03 -05:00
Tim Edwards d4c3939feb Extended the "mask-hints" operator to work correctly through a
hierarchy.
2021-01-06 10:33:43 -05:00
Tim Edwards d6eeb90f6b Made corrections to the extraction based on a pull request by
Dan Moore for preventing integer overflow in the area calculations.
2021-01-05 12:25:25 -05:00
Tim Edwards ebb378da08 One additional correction to yesterday's commit, as the 2nd solution
was compatible with CentOS but not OSX.  This solution appears to be
more universally compatible.
2021-01-05 09:30:05 -05:00
Tim Edwards 22c6eb0f2c Changed "realpath" in the scripts (added from a pull request merge
earlier today) to "readlink -f", because "realpath" does not exist
on some systems (e.g., CentOS).  "readlink" seems to be more
universally available.  Noticed that the ext2spice and ext2sim
scripts use /bin/sh instead of /bin/bash, which would cause problems
with some systems where sh != bash.
2021-01-04 14:53:21 -05:00
Tim Edwards 5005f77d3f A few minor changes to the last commit to prevent compiler warnings. 2021-01-04 10:02:15 -05:00
Tim Edwards 20eb6ce6c1 Made a few modifications to the patch from Keno Fischer (pull request
startup.  I'm not sure that it is even possible to have a Tcl variable
set at this point in the startup procedure, though.
2021-01-04 09:47:03 -05:00
Keno Fischer 5b6692a914 Add configure flag for wish binary
At the moment the build system hardcodes the path
to the wish binary as it was found at compile time.
For relocatability add a configure flag that allows
the build driver to specify how to invoke the wish
binary at runtime.
2021-01-04 09:34:31 -05:00
Keno Fischer 3e6acd43fd Make bash wrapper relocatable
By having the build system put in a relative path rather
than an absolute path. Unfortunately, make does not support
computing relative paths manually, so a small bash script is
needed that will do this for us.
2021-01-04 09:34:31 -05:00
Keno Fischer 80488a8ee9 Have magic.tcl look for the shared library in the script directory
Rather than having the build process embed an absolute path.
The first of a couple of steps to make the magic build relocatable.
2021-01-04 09:34:31 -05:00
Dan Moore d675076254 Ignore derived files when compiling on OSX 2021-01-04 09:01:14 -05:00
Dan Moore 8dba03cebf Set GrClosePtr back to NULL before calling MainExit()
to squash the seg fault. It appears that calling GrTkClose
before graphics are fully initialized causes this.
2021-01-04 08:59:20 -05:00
Ahmed Ghazy 4066d50332 Add dependencies on the VERSION file
- this fixes issue where some of the binary objects would contain an
  outdated MAGIC_VERSION if "make clean" was not done after the VERSION
  file changes. (e.g., the "Magic VERSION revision REVISION" message in
  the wish console and the version requirement checks from a tech file)
2021-01-04 14:11:21 +02:00
Tim Edwards bb453f976e Changed "Writing cell" to "Generating output for cell" from the
"gds write" command, since "Writing cell" is easily confused with
writing a .mag database file.  "Generating output" seems clearer
to me.  Maybe it's just me.
2020-12-30 12:50:07 -05:00
Tim Edwards 3b137a6d14 Added a "-quiet" option to "load" so that scripts that use "load"
to create a new cell that is not expected to exist on disk will
not generate annoying error messages.
2020-12-30 09:43:24 -05:00
Tim Edwards 1426f5921f Added an option "-dobox" to the "flatten" command, which flattens
just the area inside the cursor box.  This is important for certain
methods like stepped fill pattern generation.
2020-12-29 11:51:15 -05:00
Tim Edwards 18b4375790 Correction to yesterday's commit to fix the "bridge" operator for
CIF/GDS output.  Yesterday's commit did not completely solve the
issue.  Today's commit should.
2020-12-29 11:00:04 -05:00
Tim Edwards 44325f81e6 Corrected two errors: (1) Do not write subcircuit calls to subcircuits
that have been removed by flattening into the parent cell due to lack
of devices.  Previously the checks on writing the subcircuit and writing
the call were slightly different, leading to instances in which the
subcircuit call would be written to the netlist output without the
subcircuit being defined.  (2) Corrected an error in the "bridge" CIF/GDS
output operator.  In certain (somewhat rare) geometries, the tile behind
(instead of in front of) the corner being checked may be incorrectly
flagged as a DRC spacing error.  The fix is to ignore tiles that are
behind the corner being checked.
2020-12-28 16:54:20 -05:00
Tim Edwards e12d4c7e17 Updated VERSION along with Sylvain Munaut's fix to the maskhints code. 2020-12-27 10:00:27 -05:00
Sylvain Munaut eb945dc6ef CIFgen: Fix processing of MASKHINTS_* properties
- Don't print error if there is no more data to process
 - Fix error message: `propname` already has the
   MASKHINTS_ prefix

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-12-27 10:33:02 +01:00
Tim Edwards 01e86c0d46 Updated VERSION to rev 104 in conjunction with pull request merges
from github.
2020-12-24 22:01:21 -05:00
Anton Blanchard 91f9bc166f Fix a few compiler warnings
We were missing string.h in a few places, and were also creating
a string format of %llld.
2020-12-24 22:00:44 -05:00
Anton Blanchard a31bd9f003 Update config.guess/config.log
The current version doesn't understand ppc64le Linux.
2020-12-24 21:59:14 -05:00
Tim Edwards 3aef946167 Corrected an error that can confuse a source-drain tied device
with another device record for the same magic type.
2020-12-23 13:39:25 -05:00
Tim Edwards b12734bfc2 Made a slight change to the "gds flatglob" command option to allow
cells with subcells to be flattened in this way, as there does not
seem to be any prohibition against it.
2020-12-22 21:53:36 -05:00
Tim Edwards bcc7b3d06d Added an option "gds flatglob [<string>|none]" that allows flattening
of input cells on a per-cellname basis, using glob-style pattern
matching.  This is probably the best way to deal with 3rd-party vendor
GDS with unfortunate practices like dividing devices up among cells in
a hierarchy, even though it comes across as a bit of a hack solution.
2020-12-22 14:44:30 -05:00
Tim Edwards 47f37cc13a Corrected a subtle but very bad compiler-dependent error in the
extflat code;  failure to provide a forward external reference
to EFHNBest() resulted in a failure to correctly evaluate a
boolean expression.  That resulted in a failure to merge
hierarchical nodes during ext2spice, resulting in an incorrect
netlist with single nodes broken up into pieces.
2020-12-21 14:22:24 -05:00
Tim Edwards a660d73d5a Fixed a problem with extraction. If an extraction line specifies
one terminal of a device as the substrate, but also specifies
shielding types for the substrate, then the extraction cannot just
assume that a missing terminal is connected to the substrate without
first checking that there are no substrate shielding types under the
device.
2020-12-21 10:10:18 -05:00
Tim Edwards 5f64c2b3d7 Corrected the "lef" command so that "lef help" works again.
Corrected the "lef write -hide" command option so that obstructions
outside of the boundary are included in the obstruction list, in
addition to the block inside.  This had previously been done
correctly for use with the "setback" option but would fail only
for setback = 0.
2020-12-18 16:38:06 -05:00
Tim Edwards ba77257afa Several changes and updates: (1) Added a new keyword "required" to the
tech file format "version" section.  This can be used to specify the
version of magic that must be used to be compatible with the tech file.
This effectively supercedes the technology version number.  (2) Changed
the behavior of "make" to set the version and revision numbers on doing
"make" instead of "configure".  This allows the version to update
correctly after doing a "git pull" followed by "make" without doing
"configure" in between.  (3) Fixed a couple of issues that were flagged
as compile-time warnings.
2020-12-16 11:49:24 -05:00
Tim Edwards 5755e0bcfd Added "gds" command option "gds nodatestamp [true|false]". Set to
true, this will force the "gds write" command to write out creation
date stamps as zero.  This is very useful for avoiding changing the
contents of an otherwise-unchanged layout, especially if it is in
a git repository where it will force the entire file to be replaced.
2020-12-15 14:52:30 -05:00
Tim Edwards 69bd2fe57b Changed the cif output style option "see-vendor" to "see-no-vendor"
and made the default behavior equivalent to "see-vendor".  While it is
true that running "cif see" on a readonly cell shows layers that are
not necessarily representative of what is in the file, the opposite
behavior manifests itself in ways that are confusing.
2020-12-14 16:55:29 -05:00
Tim Edwards ea9d8cc3e5 Implemented first part of "mask hints", a method to allow mask
layers that are normally automatically generated to be supplemented
with additional geometry in the form of properties.  The first
commit implements a CIF operator "mask-hints" that tells CIFGenLayer
that additional geometry may be specified with a property named
"MASKHINTS_" plus the name passed to the operator as its only
argument.  A more extensive commit to be done will allow this
operator to be used on cifinput to use mask hints to retain the
exact geometry of mask layers used in the input file.
2020-12-14 16:16:37 -05:00
Tim Edwards 2b513eb3bb Added command options "flush -dereference" and also "cellname dereference"
to allow a cell to be flushed with dereferencing (i.e., discard any file
path attached to the cell, and use the search paths to find the cell when
it is reloaded).
2020-12-10 12:13:48 -05:00
Tim Edwards 6952e814f6 Added a command option "cellname dereference" to force a dereferencing
flush of a cell, by name.
2020-12-10 11:49:53 -05:00
Tim Edwards f8edb30d4e Removed .gitconfig, which I thought I did yesterday. But apparently
not.
2020-12-09 09:18:06 -05:00
Tim Edwards 0429d94e1c Corrected a scaling error in the post-order reading routine. The
routine attempts to rescale the contents of the top-level cell after
moving forward in the GDS to find a cell that was used before it was
defined, if reading that cell caused the scale to change.  However,
the numerator and denominator were reversed, causing the scaling to
be the inverse of what it should have been.
2020-12-08 20:38:33 -05:00
Tim Edwards a78b459303 Modified the DEF read routine (following a diff script from Ahmed
Ghazy) to read pin uses from a DEF file, including the three types
that are not defined by the LEF format (go figure).  Expanded the
bitmask of label flags to include the additional use types.  Also
shifted the label flag bitmask up to make additional room for more
port number, as there is no point in having unused bits in the
bitmask.
2020-12-07 10:39:39 -05:00
Tim Edwards 1c82265244 Several enhancements: (1) Added command option "gds no_duplicates"
to allow a "gds read" command to ignore cells in the GDS which already
exist in memory.  This allows magic to be "pre-seeded" with specific
views of cells in the GDS.  Default is false, which is backwards-
compatble behavior.  (2) Changed the behavior of the the way the use
path is written to and read from a .mag file, checking the path prefix
against Tcl variables PDK_PATH, PDKPATH, PDK_ROOT, and PDKROOT, and
replacing any such leading path component with the variable name.
On reading a .mag file, any variable name at the start of the path
that matches a Tcl variable will be substituted.
2020-12-04 16:56:51 -05:00
Tim Edwards 1b3299ec90 Updated PaOpen() to handle a Tcl variable of the type ${X} as well as
just plain $X (i.e., ignore any brackets around the variable) when
doing variable expansion.
2020-12-04 14:46:48 -05:00
Tim Edwards 414f4a8ccb Modified the DEF and LEF read/write routines to keep the
defMakeInverseLayerMap() from returning complete contact types when used
by the lefWrite command when writing LEF macros, which contain cut layers
but not entire contacts.
2020-12-03 21:37:32 -05:00
Tim Edwards 825ec353b1 Added missing brackets around a phrase in the "close" operator that
was causing false positive errors in DRC checks involving CIF rules
using the "close" operator, such as the minimum hole size in the
sky130A PDK.
2020-12-03 14:22:09 -05:00
Tim Edwards 0d10b7f785 Corrected a crash condition that can occur if a GDS file pointed
to by GDS_FILE does not exist.
2020-12-03 10:35:54 -05:00