Commit Graph

1241 Commits

Author SHA1 Message Date
Donn b9f1ebd439 Makefile cleanup, dockerignore 2022-05-03 08:28:53 -04:00
Donn 2820aa49e2 Add AppImage Building Capabilities
(Take two)

+ Adds a GitHub Actions flow that builds an AppImage (see AppImages.org) that can produce a monolithic magic binary
~ Fix a portability issue in tcltk/magic.sh.in

This binary should theoretically work on any Linux distro with Glibc 2.3+ and Cairo 1.8+, which is any up to date distro in the last decade.
2022-05-03 08:28:53 -04:00
Tim Edwards e082bf8c77 Corrected a problem with extresist in which node names are not
transferred when doing a node merge, which can cause named
terminals to get lost, because there is no longer a node with
a name corresponding to the terminal.  The node gets a default
name which is not the terminal name, and the netlist is broken.
2022-05-02 17:49:42 -04:00
Tim Edwards 4000dd758f Made a correction to the command option "contact erase" which was
not properly handling stacked contacts, failing to erase a contact
out of the middle of a stack.
2022-05-02 14:38:46 -04:00
Tim Edwards fcc884332b Made some corrections to the "extresist" code to avoid issues with
extracting a port-to-port net that does not touch any devices.
The error happens in a fairly rare set of cases.
2022-05-02 12:27:39 -04:00
Tim Edwards fe2eb6d390 Modified the file locking behavior so that the command "locking" is
recognized as a valid command when file locking has been disabled as
a compile-time option.  The command then generates an error on
"locking enable" but simply ignores the command "locking disable".
2022-04-25 13:23:29 -04:00
Tim Edwards fd4f239e2d Additional extensions to allow "extend" to be used for transistor
gates when the gate length minimum may be larger than the gate
width minimum, and to implement an "angles" option on the "width"
rule that can implement rules where a layer width must be wider
as measured from angled edges than from straight edges.
2022-04-20 21:29:32 -04:00
Tim Edwards a1adfaaa09 Corrected an issue with non-Manhattan tiles, caused by the fact that
the "width" rule is assumed to be symmetric, and not checked in all
four directions, as that would be redundant.  But non-Manhattan tiles
are not symmetric and must be checked all four directions.  Implemented
in a way that does not increase the DRC processing time.
2022-04-20 17:12:58 -04:00
Tim Edwards 55128d3437 Updated version. 2022-04-20 16:18:31 -04:00
Tim Edwards 8b2c33d8dd Added new tech DRC rule option "angles 45-only", which handles
rules such as "No 90 degree bends on transistors".
2022-04-20 16:16:20 -04:00
Tim Edwards 30ab57ee79 Found a problem with the calculation for the non-Euclidean grow/
shrink routine that over-computes the diagonal position (the
equation failed to divide the intersecting angle in half).
Rewrote the equation for the correct grow distance, still
accounting for the grid limit (if set).
2022-04-19 18:20:58 -04:00
Tim Edwards 62df377ba8 Made a correction to extHierSubstrate, which was checking for
substrate shielding types in a subcell inside the interaction area
only.  Since the interaction area is clipped by the "cookie cutter"
extraction areas, it could completely miss the shielding.  As
revised, any shielding under a subcell will effectively shield the
entire subcell.  This could be improved by warning if the subcell
has substrate connections outside of the shield area (as that is
not extractable), but that requires additional processing.
2022-04-13 18:01:18 -04:00
Tim Edwards e7de38899d Also fixed the error noted by Ryan Schmidt in Issue #156 (void
function attempts to return a value).
2022-04-13 08:39:05 -04:00
Tim Edwards 7b08d16542 Updated version to go along with pull requests 155, 157, and 158
from Ryan Schmidt.
2022-04-13 08:35:41 -04:00
Ryan Schmidt 874209b884 Fix inadequate quoting in MSED variable
Fixes:

sed: 1: "s/\/\\/
": unescaped newline inside substitute pattern
2022-04-13 08:35:14 -04:00
Ryan Schmidt 4c4b0e301b Resolve -Wcomment warnings
Resolve -Wcomment warnings like:

./cifin-cmos14b.gen:2:1: warning: '/*' within block comment [-Wcomment]
2022-04-13 08:33:45 -04:00
Ryan Schmidt b4d635a3ab Use the python3 that configure found
When running preproc.py, use the python3 that the configure script found
instead of assuming (via preproc.py's #! line) that it is called
"python3" and is located in PATH. This allows the user to specify a
different python3 by running e.g.:

./configure ac_cv_path_PYTHON3=/path/to/python3
2022-04-13 08:32:05 -04:00
Tim Edwards eb1e94f440 Corrected issue with extresist that involves a device with a
terminal connected to a substrate or well type that is not a
FET 4th terminal (e.g., a varactor, or maybe a diode).
2022-04-12 17:41:17 -04:00
Tim Edwards 9402b0dcdd Added a new command option "contact erase". This provides a way to
remove contact cuts from a layout without affecting the surrounding
metals, which is something that the "erase" command does not do.
2022-04-07 11:10:24 -04:00
Tim Edwards 44df4fc125 Corrected another instance where running a command on a non-
writeable cell causes magic to crash.
2022-04-06 08:38:25 -04:00
Tim Edwards a09fa78d2c Found another issue with the substrate extraction, caused by the
fact that "extract all" does not enumerate cells from bottom up
as I had assumed---The order is roughly bottom-to-top, but cells
re-used in different places in the hierarchy could end up called
before one or more of their own subcells is extracted.  Since
this conflicted with the preparation of the substrate in each
extracted subcircuit, I changed the method to enumerate cells so
that it is properly bottom-to-top.  Also, methods were added to
"extract" (incremental), "extract cell", and "extract parents"
to ensure that the substrate is prepared on all subcells before
extraction.
2022-04-05 21:33:15 -04:00
Tim Edwards ff10aedf69 Added a prototype declaration for LefReadLayerSection (see github
issue tracker issue #154).
2022-04-05 09:50:36 -04:00
Tim Edwards 7199cefddc Found that ExtFindRegions() does not set temp_subsnode to NULL like
extFindNodes() does;  consequently, ExtLabelRegions() when called
after ExtFindRegions() may accidentally chain together a substrate
region with whatever was left in this linked list after the
previous call to extFindNodes(), with unpredictable results.
2022-04-04 21:16:03 -04:00
Tim Edwards a4c5945d60 Corrected parsing of NONDEFAULTRULES in a LEF file. Modified the
DEF reading to use vector fonts on PIN labels, with some ad hoc
rules for size and rotation (may need refinement).  Modified the
DEF annotation (def read -annotate) so that the preferred position
of labels is on a wire leading out from a pin connection, which
is a "safer" place to put it, in case the layout was manually
edited between the DEF read and annotation.  Fixed another two
crash conditions related to read-only views.  Corrected a startup
error caused by an uninitialized variable used by the "wiring"
section of the tech file.
2022-03-31 20:02:12 -04:00
Tim Edwards 37fec8a06a Tentative implementation of parsing NONDEFAULTRULE definitions in
a LEF file (complementary to the implementation recently added to
the DEF file parser).
2022-03-31 10:23:39 -04:00
Tim Edwards 222639e4c4 Corrected the diagnostic output of "configure" to no longer refer
to the "make.log" and "install.log" files, which no longer exist.
2022-03-30 17:38:40 -04:00
Tim Edwards 82695d981d Updated the command reference for the "def" command and the new
"display" command.
2022-03-30 17:32:29 -04:00
Tim Edwards a74f11e3b2 One correction to prevent some unnecessary messages when doing a
label annotation from a DEF file.
2022-03-30 17:17:09 -04:00
Tim Edwards cfb81101ec Added command option "-annotate" for "def read" that allows nets
to be annotated from a DEF file.  This is particularly useful if
"def read" has been used without the "-labels" option, and the
labels are needed at some point.
2022-03-30 13:02:12 -04:00
Tim Edwards e675decfc0 Cleaned up a bunch of stuff around "magicdnull", starting with not
linking it to Tk or X11 graphics.  Added new command "display" which
returns the display type, which is good for finding out if the
display is "NULL".  Added code to allow the wrapper to be defined
for NULL graphics with the Tk console, the main necessities of which
are to remove the "openwrapper" command, and to return immediately
from a number of tag callback functions.
2022-03-30 10:55:08 -04:00
Tim Edwards bfa4272481 Removed some diagnostic messages from "def write", and added code to
prevent "def write" from running on an unnamed cell.
2022-03-29 17:10:50 -04:00
Tim Edwards 0c584f9e77 Modified the configure scripts and makefile per Proppy's comments
in github issue #149.  This causes magic to no longer write log files
for "make" and "make install" but will properly exit with a non-zero
return code on any error during compile.

Also:  Corrected the command "tech drc surround <type1> <type2>" so
that it now returns the correct value when <type1> and <type2> are in
the same plane.  Added new command "tech drc directional <type1> <type2>"
which works the same way as "tech drc surround" except for directional
surround rules.  Used this to generate vias from "def write" with the
correct metal surround amounts included in the via definiton.  The
route analysis then ignores tile slivers that make up the surrounding
material around contacts.  Also implemented a method that handles
routes that are made of multiple thin tiles due to the maximum horizontal
stripes rule.  Now magic handles "def write" well except for not dealing
with non-minimum-width routes unless they're specifically called out as
"special" nets.
2022-03-29 16:52:01 -04:00
Tim Edwards 3bc80a9869 Reran autoconf after merging changes from configure.in. 2022-03-28 22:35:49 -04:00
Johan Euphrosine 6947b8c6d7 scripts/configure: enable building without x 2022-03-28 22:35:19 -04:00
Tim Edwards 3b44dacab5 Corrected a minor issue in "def write" that will ignore a wire
completely if the width does not match the wire minimum width,
rather than attempt to cope with it gracefully.
2022-03-28 22:34:12 -04:00
Tim Edwards 84fbaa4ee1 Updated version with the offset fix. 2022-03-25 21:40:40 -04:00
Tim Edwards 2147d0a882 Corrected the offsets caused in "def write" when writing components
with "FIXED_BBOX" properties, which need to be positioned relative
to the abutment box, not the cell bounds.
2022-03-25 21:38:41 -04:00
Tim Edwards cf39fb102c Fixed some errors in DEF read/write and added behavior to "def write"
to treat unlabeled/unconnected layout as blockage statements in the
output.
2022-03-24 17:58:05 -04:00
Tim Edwards 645a872967 Implemented non-default rules for DEF reads. This is in preparation
for using such non-default rules for "def write" to capture any
layout geometry that is not a "special net" and does not have the
default wire width.
2022-03-23 17:08:39 -04:00
Tim Edwards 59b68606e0 Corrected the equations for fringe shielding, as the equation for
the shielding fraction was inverted---I do not know how the tests
could pass that way.
2022-03-23 10:49:02 -04:00
Tim Edwards a205a0e941 Corrected a potential segfault condition on "extract" if a cellname
contains slashes (which makes it look like a full path).
2022-03-21 09:06:35 -04:00
Tim Edwards d98645afc1 Added an important new method: If the keyword "fringeshieldhalo"
is specified in the extraction section of the techfile, then magic
will compute the effect of a nearby shape partially shielding the
sidewall overlap capacitance, which approaches 100% shielding as
the shapes converge to zero separation.  This method prevents
magic from vastly overestimating the fringe capacitance of closely
spaced wires, which was magic's worst problem with parasitic
accuracy.  The "fringeshieldhalo" value is the distance at which
the fringe shielding becomes negligible.  Typically, it will be
about three times the distance at which half the fringe value is
shielded.  It may be necessary at some point to make both the
fringe shielding halo and the sidewall halo values per-type values
(or per-plane, at least).  For now, it should suffice to bring
Magic's parasitic extraction back in line with other tools.
2022-03-17 17:35:41 -04:00
Tim Edwards 083c0c10e9 Modified the routine that flattens labels so that it does not prepend
the name of the cell use if the cell use is a top level window.  It
was accidentally discovered that using "select top cell ; select flat"
will do this (creating label text with spaces in the process, which is
illegal syntax for netlists).
2022-03-08 13:55:07 -05:00
Tim Edwards 353ca3aff6 Corrected the (recently implemented) "labellayer" GDS/CIF output
function, which was incorrectly multiplying through by two scale
factors, resulting in incorrectly-placed labels in the GDS output.
2022-03-07 11:44:30 -05:00
Tim Edwards 47df9da0d3 Debugged an issue where a label on the default substrate node may
not be seen during hierarchical processing, causing the substrate
to get split into several names that may conflict in the netlist.
At issue is the fact that ExtLabelRegions() will not attach a
default substrate label to a default substrate region.  This may
need further untangling, as extFindNodes() will set the default
substrate node and is sometimes followed by ExtLabelRegions(),
which will label it.  Any place ExtFindRegions() is called, this
could be an issue.
2022-02-26 17:39:36 -05:00
Tim Edwards b1b986cbe4 Added a procedure to esMakePorts() in ext2hier.c which tracks the
EF_SUBS_PORT flags up the hierarchy.  This is a rather lot of code
needed to make substrate connections to circuits where the substrate
connects to devices but not make such connections where the substrate
doesn't.  There may be simpler ways to accomplish the same thing,
depending on whether the order of "merge" statements in a .ext file
is reliable;  this code does not depend on it.
2022-02-25 20:59:59 -05:00
Tim Edwards bae5d9cd06 Added a command-line option "magic --commit" which provides the commit
number from the git repository, which is overall more reliable than
the version number, but mainly to support a common method across the
open source tools for providing information to builds like open_pdks
that may need to know what version of every tool was used for the
build.
2022-02-25 09:56:22 -05:00
Tim Edwards db4fa65bfc Corrected some issues related to the handling of substrate hierarchy.
Most of this had to do with the incorrect use of the parent's substrate
name in extHierSubstrate().  After the correction, there still remains
an issue that is caused when a labeled isolated substrate region overlaps
an extraction tile boundary.  I believe that this particular error has
existed for some time and is not new, so I am committing these changes.
2022-02-24 16:47:11 -05:00
Anton Blanchard 3d41b3e98b Fix a few issues with missing or incorrect prototypes
There are a few places we either don't have a variable or
function prototype and need one, or we have one and they
don't match.
2022-02-23 21:04:19 -05:00
Tim Edwards 16c0a65adc Several important fixes to the handling of coupling capacitance,
which had become fouled up due to the changes in the way that the
substrate is defined and handled.  Worked through a large torture
test until all types of substrate coupling and overlap shielding
were resolved to be extracted as expected.
2022-02-23 20:57:30 -05:00