Commit Graph

693 Commits

Author SHA1 Message Date
Tim Edwards e10901e32b Updated the version to go along with the merge of pull request
222 from Sean Cross.  Corrected a few places where the blanket
conversion "Region"->"ExtRegion" picked up some comment lines
that were unrelated to the structure name.
2023-03-10 11:14:23 -05:00
Tim Edwards 5e5879c53d Made a simple but important change to "readspice.tcl" to unexpand
the cell being reworked for port numbering.  Otherwise *all*
labels are selected, which can take a very long time depending on
how many labels are in the layout.  Note:  Need a "select area
ports" function, and better yet, rework the whole label database
so that magic no longer has to run compute-intensive routines
like DBEraseLabelsByContent().
2023-03-08 11:14:22 -05:00
Tim Edwards a8c3117020 Implemented and revised the "CIFhier" property to override the
"cif *hier write disable" and "cif *array write disable" commands
for a specific cell def and its descendents.  The revision ensures
that all descendents apply the override.  The "cif write" command
uses a stack instead of recursion, which makes it difficult to
apply the same method.  Currently the method only works for the
"gds write" command, and implementing the feature for "cif write"
is deemed not worth the effort.
2023-03-07 11:16:49 -05:00
Tim Edwards 73398e7e0b Corrected a buffer overrun situation in ExtBasic.c when printing
the "connected other node to. . ." message when terminals of a
device are shorted.  A long enough node name, especially one
created by concatenating hierarchy when flattening a cell, can
easily overrun the short 256-byte string buffer.  Fixed by
changing strcat() to strncat().
2023-03-05 16:39:58 -05:00
Tim Edwards eb36edf35a Corrected the ext2spice device output for device length, which
somehow acquired a typo which made it write "w=".  Resolves
issue #223 from Mitch Bailey.
2023-02-28 09:34:25 -05:00
Tim Edwards 3da6172706 Modified the "port renumber" command to use (case-insensitive)
natural sort instead of ASCII-based sorting, so that ports that
are numbered arrays will be indexed properly by count.  Also:
Modified the "extresist" handling of substrate to draw the default
substrate type over the entire cell area (less areas of nwell or
other conflicting type).  This allows extresist to extract the
entire substrate as a resistive network.  The result is ugly and
may warrant some aggressive network simplification, but it should
at least be realistic.
2023-02-27 22:22:09 -05:00
Tim Edwards e72f85fd10 Corrected the ext2sim output and extresist to properly handle
2-terminal devices without complaining.  The previous handling
seemed to be technically correct other than spitting out warnings
about missing terminals.
2023-02-24 12:58:46 -05:00
Tim Edwards 7b485efa9b Added code to handle string overflows in property strings. It
might be better to flag a warning, as property strings longer than
the original buffer size of 2048 are probably a bad idea.
2023-02-23 16:44:58 -05:00
Tim Edwards be577d4318 Corrected the reading of the "defaultsidewall" statement in the
tech file "extract" section to work correctly when the offset is
negative.  Generally, a negative offset is nonphysical and is just
curve-fitting round-off error, but the existing code was failing
to divide out the factor of 1000 that had been multiplied through
when reading the tech file, resulting in a very wrong offset.
2023-02-22 15:30:50 -05:00
Tim Edwards d4790d2f31 Corrected the "measure" (Tcl scripted) command to fix an error
when internal units no longer match lambda units.  The text
would match the dimension of the cursor box, but the measurement
lines would be drawn assuming a lambda scale, not the internal
scale.
2023-02-20 16:06:18 -05:00
Tim Edwards c7f11d2169 Important update: Reworked the extraction method to properly
isolate the terminal areas of a device (e.g., source and drain)
and calculate their area and perimeter individually for the
device (in addition to the traditional method of calculating
area and perimeter of each resistance class for the entire node).

Also:  Reworked the SPICE syntax output to generate SI values
in the range 1-1000 with the appropriate suffix (e.g., "20u")
instead of defaulting to "u" for lengths and "p" for areas.
This prevents it from producing weird units like "150000u" when
a process definition already includes a scalefactor.

Reworked the "extresist" code to use the device terminal area
and perimeter.  This fixes an error in which "extresist" would
lose these values and "ext2spice" with option "extresist on"
would generate a new netlist output with zero terminal areas
and perimeters.
2023-02-16 11:59:13 -05:00
Tim Edwards 5fcd4441c1 Corrected the "extresist" command behavior to ensure that
transistor records match between the ".ext" file and the ".res.ext"
file for the number of terminals per device.  Previously, the first
device type for the layer type was always being used, and if it had
fewer terminals (e.g., a MOScap), then one terminal would go missing
in the output.
2023-02-13 10:57:43 -05:00
Tim Edwards adda4092d6 Updated version to go along with the merge of pull request #217 from
Anton Blanchard.
2023-02-02 09:18:22 -05:00
Tim Edwards 1a3caee376 (1) Added a check for unclosed boundaries when reading GDS.
This is diagnostic only and does not change the read-in
    behavior.
(2) ext2spice:  Corrected an error that had been introduced
    into version 8.3.171 that accidentally marks all devices
    as visited which causes all source/drain areas and
    perimeters to be output as zero.
(3) extract:  Sweeping changes to handling of fringe
    capacitance.  Removed the (recently added) "fringeshieldhalo"
    parameter from the tech file.  Reworked the fringe
    capacitance models based on results from the "capiche"
    project (github/RTimothyEdwards/capiche).  Fringe shielding
    is now done by clipping fringe at the boundary of a
    shielding shape, rather than trying to calculate the
    amount of shielding (as the "capiche" project proved this
    to be equivalent).  Values for partial fringing are modeled
    by atan(x), which like the sidewall (1/x) curve, extends to
    infinity and values are limited by the halo but do not
    otherwise depend on the halo.  Because of this, the halo can
    be made variable and controlled by the user for deciding on
    the tradeoff between accuracy and run time.  A new command
    option "extract halo" was added to allow this control over
    the halo distance.
2023-01-27 11:47:37 -05:00
Tim Edwards be59d787a1 Modified the "gds subcell polygon" command option to split into
three types:  "none", "temporary", and "keep" (instead of "true"
or "false").  "none" now reverts back to the original behavior,
because it was found that saving polygons in subcells prevents
them from participating in boolean operations.  The "keep"
option is the original option (polygons kept in subcells), and
"temporary" is the one recently introduced (which puts polygons
in subcells and then flattens them).  This restores the original
method while retaining the recently implemented method.  However,
a proper solution needs to be found that deals with the problem
of boolean operators.
2023-01-17 20:14:38 -05:00
Tim Edwards 05ad386500 Updated the version to go along with the merge of pull request
213 from Anton Blanchard (1. Don't cast pointer to struct and back
again in DBDiagonalProc(), 2.  Fix compiler warning in
drcMaskSpacing(), 3. Fix a few issues in leaDBSearchForTech(),
4. Remove spurious ";" from PlotPS()).
2023-01-16 22:11:15 -05:00
Tim Edwards f06f3b47db Added an experimental option for the cifoutput tech file section to
force magic to scale down the internal grid to the minimum
manufacturing grid size specified in the cifoutput section, upon
reading the techfile.
2023-01-13 17:21:37 -05:00
Tim Edwards ff608b51f1 Updated version to go along with pull requests #208 from
Alessandro de Laurenzis, and pull requests #209 and #210
from Anton Blanchard.
2023-01-08 13:11:06 -05:00
Tim Edwards 6d99e5326e Added a command option "setlabel box" to modify the attachment box
of a label from the command line.  Also fixed a long-standing
irritation that "setlabel" would change the properties of a label
in the edit cell but not in the selection itself, which would
cause the label to be drawn both with the original properties
in the selection and the new properties in the edit cell.  Now
both views will track the same changes.
2023-01-04 14:08:39 -05:00
Tim Edwards 83e17706fe Added handling of mask-hints properties to the flatten-in-place
method to ensure that mask hint geometry is retained when a
cell instance is flattened into the parent cell.
2022-12-22 11:27:37 -05:00
Tim Edwards 0bbb558b94 Reworked the "port" and "noport" label type designations in the
tech file to correct the underlying problem with the SkyWater
sky130 process in which a different layer/purpose pair is used
for TEXTTYPE and DATATYPE for the same layer.  Previously, all
output from magic writes the same pair for both when writing a
port label.  The new method preserves existing syntax, although
there are some differences based on what order the "port"
statement appears relative to other types for the same layer.
2022-12-21 17:49:43 -05:00
Tim Edwards 23b8d08f86 Modified the "load" command so that "-quiet" is promoted to
"-silent", and "-quiet" now produces relatively little output
except for important warnings and errors.
2022-12-19 11:20:50 -05:00
Tim Edwards a0f502501e Corrected the method of "flatten in place" from the previous
commit to prevent port labels from being copied up from the
flattened cell into the parent, and prefixing the instance
name to text in the instance top level so that there will be
no port or label collisions in the parent cell after flattening
the child cell in place.  Also:  Changed "extract dolabelcheck"
to be the default setting.
2022-12-16 12:03:38 -05:00
Tim Edwards 3b396d65f0 Reverted the toolkit change from the last commit after realizing
that the feature for implementing callbacks on a selection list
was already implemented via the add_dependency procedure.
Modified the GDS read to remove cell instances that are placed
directly on top of one another in the same cell.  Modified the
GDS read to make a better selection of a default font size for
text that specifies a font but not a size, using the minimum
width for the layer the text is placed on.  Modified the GDS
read to remove text with empty-string placeholders (created when
a pin layer is read but no text exists to go along with it, due
to GDS not having a specific way to make pins, such that pins
have to be split between one record for geometry and another
for text).
2022-12-15 12:25:23 -05:00
Tim Edwards e5813f51fa Added a new option "-doinplace" for the "flatten" command. This
should have been done a long time ago!  Allows an instance to be
flattened in place inside a cell def, which otherwise requires
a complicated set of commands to do.  Also:  Modified the polygon
handling routine from the previous commit so that it correctly
removes the polygon cell defs after flattening them into the
parent cell.
2022-12-14 12:44:30 -05:00
Tim Edwards 53682af668 Added a new special device model name "Short" which enables the
use of a resistor type as a FET extended drain, allowing the
FET drain node to short across to the other side of the resistor
so that the resistor is absorbed into the FET device.  Used with
the GF180MCU process to describe the salicide-block ESD FET types.
2022-12-13 16:02:49 -05:00
Tim Edwards 86b4ac3e4c Modified the "lef read -annotate" method so that pins are checked
for compatible layout over the area of the pin rectangle in the
entire hierarchy of the cell, not just in the top level.  This
corrects issues where pins are placed in the top level cell with
no metal underneath.  It is written in such a way that it will
work regardless of whether paint is split across the hierarchy,
or the label spans different types (such as crossing a contact).
2022-12-12 14:49:42 -05:00
Tim Edwards 11ddd559b2 Fixed an error with LEF read where duplicate macros are encountered
in the input.  The name of one was being modified but was being
right-justified into the string, resulting in a name starting with
many space characters.  Also:  Fixed an issue with extresist where
a label that ends up with an empty string can become a node with
an empty string name in the .res.ext file output.
2022-12-09 17:31:47 -05:00
Tim Edwards 02bbb1064e Corrected an error in "extresist" that can output an incorrect
number of terminals for devices that don't have the usual gate/
source/drain terminals (e.g., diodes, resistors, capacitors) when
writing the devices with re-mapped terminals into the .res.ext
file.  Also:  Changed the size of the word containing the name
refcount for "equiv" statements, since an accidental shorting
of pins can cause a large number of "equiv" statements in a .ext
file, causing an overrun of the previously 1-byte refcount (this
probably does not make the structure any longer, since it likely
has to fit to a word boundary).
2022-12-06 21:55:01 -05:00
Tim Edwards e5e1e04146 Made a variant of the "directional surround" rule to be able to
implement a GF DRC rule.  This variant allows for a difference
between the minimum allowed surround on one side and the amount
that must be extended on the adjacent side.
2022-11-30 15:33:21 -05:00
Tim Edwards f222004d65 Fixed an error in "lef read" that fails to apply an annotated
pin on a compatible area due to an incorrect type mask.  (Also
note that this routine only works (after correction) for RECT
statements, but there should be a similar check for POLYGON
statements.)
2022-11-29 17:02:36 -05:00
Tim Edwards 01f2ce37b8 Modified the "dereference" behavior so that it does not produce
warnings when rereferencing a layout file as intended.
2022-11-22 11:05:55 -05:00
Tim Edwards 71dffb2fd2 Implemented a method to handle empty subcells that exist because a
library has been read in with the "gds readonly true" option set
because the cell contains information on where in the GDS the
cell is located, but the cell is empty because it was flattened
into the magic view and all of its contents were erased.  This can
cause issues with LVS if magic generates an empty cell into the
netlist and the LVS tool tries to compare the cells by name.  Also,
this prevents unnecessary .ext files and unnecessary merges to the
substrate of such cells (since all cells have an implied substrate).
2022-11-21 17:13:33 -05:00
Tim Edwards 44af9aaf9f Added pin connection to the list of NET connections in a DEF file
when doing "def write", which was missing.
2022-11-20 13:30:19 -05:00
Tim Edwards 65ef9a1ad3 Final (I hope!) corrections to the "def write" command. 2022-11-19 22:02:44 -05:00
Tim Edwards fe89170f5a Small correction to defWrite to cancel a non-default rule when a
wire with default width is encountered.
2022-11-18 21:00:23 -05:00
Tim Edwards f066844761 Substantially revised the "def write" and "def read" routines.
Both were corrected with respect to the definition of non-default
(taper) rules.  "def write" was additionally modified to avoid
redundantly processing tiles where tile areas were merged together
to form a complete wire.  There is plenty of room for optimization,
but the output appears to be matching the layout.  Also:  Revised
the definition of "(not) visible layers" to include labels attached
to those layers, so that turning off visibility of any layer will
also hide all labels attached to that layer.
2022-11-17 20:24:39 -05:00
Tim Edwards 2519d0a4d8 Corrected an issue with readline that breaks the non-Tcl/Tk flow
due to a missing function prototype.  Modified the GDS output
flow to always output instance IDs as a property, not just in the
non-default case.  The property has been used for many years and
appears to be accepted by all tools reading GDS, so there is no
downside to always generating this output.  This has the upside
that default instance names don't get scrambled by going from
magic to GDS and back to magic.
2022-11-11 11:20:34 -05:00
Tim Edwards e37a4f418a Based on output from a large contact array for a pad, modified the
default behavior of magic to make use of the "gds contacts true"
option to output contacts as arrays of subcells instead of
individual boundary entries, as the former is much more efficient
than the latter.  Set the option to be true by default, and set
the "gds flatglob" option to have one entry "$$*$$" corresponding
to the contact subcells created by the "gds contacts" option, so
that GDS reads and writes as it did previously (but using a
different method).  Expanded the method to include "squares-grid"
and "slots" operators (the latter should produce much more
efficient fill pattern arrays).  Implemented for both compressed
and uncompressed GDS.  Tested in all variations.
2022-11-10 14:08:58 -05:00
Tim Edwards f4c5ec3a78 Fixed the DEF write routine, which had an error in identifying
"slivers";  the error tended to produce artifacts (extra metal)
around contacts.  Fixed an issue that caused the DEF write routine
to open the same file twice instead of a new file for the second
part of the DEF data, and then potentially hit a runaway condition
when trying to merge the two files together.
2022-11-09 11:15:06 -05:00
Tim Edwards 2059d6fbb1 Corrected an error in "def write" that starts output on the wrong
layer when the first part of the route is a contact (starts on the
via top instead of the via bottom).
2022-11-08 09:59:43 -05:00
Tim Edwards a9aafebfc4 Corrected the antenna checking routines, which were incorrect with
respect to calculations around diode-connected diffusion regions.
The diffusion area calculation needed to be fixed to avoid double-
counting contacts, and the value for the ratioDiffA coefficient
needed to be scaled, since it is multiplied by the diffusion area
and therefore has dimensioned units of (1/area^2) and should be
treated like all other dimensioned units in magic.
2022-11-06 11:50:05 -05:00
Tim Edwards 3534b79994 Fixed an instance where dbFgets() was used in the "def write"
routine;  that is incorrect, and it should have been fgets().
When dbFgets() is recast to a zlib version, then its use in
"def write" causes magic to crash.
2022-11-03 16:15:36 -04:00
Tim Edwards 0dac37cb46 Changed the behavior of GDS writing to halt with an error if an
attempt is made to write an abstract view to GDS.  This behavior can
be overridded with the new command option "gds abstract [enable|disable]".
Also:  Corrected extraction to allow split tiles to be set as the
reference tile for a node.  Previously this was allowed only if the
tile was the first to be searched, but that can cause different tiles to
be marked as the reference depending on where the search starts,
resulting in different names for the same node in .ext files, which is
bad.  Also:  Modified the LEF annotation to avoid bad entries in the LEF
that would create layers in the layout where none exist.
2022-11-02 09:40:20 -04:00
Tim Edwards d229aefb15 A handful of changes after applying pull request #191 from
Alessandro De Laurenzis.  That pull request cleaned up the vast
majority of compiler warnings.  However, that cleanup exposed a
few additional warnings pointing to errors in the code that needed
fixing.  The code now compiles cleanly except for one warning
about redefined CAD_DIR that I have not looked into.
2022-10-29 09:57:41 -04:00
Tim Edwards 9d40fbfecb Corrected an error in parsing the "defaultperimeter" statement in
tech files which incorrectly parses the syntax using five
parameters.  This syntax variant does not get used often, which
is why the error went undetected for a long time.
2022-10-22 22:12:15 -04:00
Tim Edwards 94daf986ab Corrected the GDS write for "boundary" to make sure that the
calculation of the area to check for output and the clip box
does not reduce the size of any layer associated with the
fixed bounding box declared by the FIXED_BBOX property.
2022-10-18 14:14:22 -04:00
Tim Edwards eecdc3c642 Added a "flatten -doproperty" command option that allows selective
flattening based on cells which have a property "flatten".  Also:
Modified the DEF read and write to convert DIEAREA into a
FIXED_BBOX property.  This solves issues with placing of components
from DEF, when those components may not have have come from place &
route and may not have P&R bounding boxes.  Also:  Fixed the
documentation for the "dump" command, which was missing the optional
orientation in the description.
2022-10-15 11:33:59 -04:00
Tim Edwards bc5093502c Corrected a small error in "extract unique" that will attempt to
run free() on a memory location that was never allocated.  This
error has no effect on anything, but correcting it prevents magic
from issuing a mysterious warning.
2022-10-07 08:43:49 -04:00
Tim Edwards 189d62da9b Corrected a really stupid error which prevented the "extract
unique notopports" from working.  Fixes issue #186 reported by
Mitch Bailey.
2022-09-28 17:45:28 -04:00
Tim Edwards 65b54e0cd5 Corrected a stack corruption error (that I have never seen in
practice but which was detected by AddressSanitizer.  Also
corrected a crash condition in the absence of a window;  also
hard to reproduce.
2022-09-27 10:43:04 -04:00
Tim Edwards a550d615c0 Made some modifications to the "def write" command: It now handles
non-default rules and so can accurately capture wire widths other
than the technology LEF defaults (also corrected a bug with non-
default rules for "def read").  Corrected via handling in "def
write" to function as claimed (although the algorithm is still
naive and expects all contacts to be rectangular, which is usually
true but doesn't have to be).
2022-09-23 15:02:22 -04:00
Tim Edwards 82c79b36ee Added a check for unfortunate values of a MAG record in a GDS text
record.  Failure to use the right 8-byte real format can produce
bizarre results where a label's bounding box ends up in some random
place and messes up an entire top level circuit's bounding box.
2022-09-19 17:26:42 -04:00
Tim Edwards 7905e15ae3 Enhanced the "def read -annotate" option to correctly annotate pins
with class, use, and shape information from the DEF file PINS record.
This is similar to what is done with LEF file annotation, but less
sophisticated (only erases an existing pin if it is an exact match
for pin name and location).
2022-09-14 13:02:55 -04:00
Tim Edwards 1c20abad5b Updated the version with the last commit, which was supposed to be
done yesterday and so shouldn't have needed a version update.
2022-09-08 11:13:25 -04:00
Tim Edwards 4087ac2dba Added a prototype function for DBDescendSubcell(), without which
the return value is cast to the wrong size and all calls fail.
2022-09-07 15:27:11 -04:00
Tim Edwards 63b9590958 Updated version to go along with the merge of pull request #181
from Brad Smith, for OpenBSD compatibility.
2022-09-04 12:48:42 -04:00
Tim Edwards 4afc476d92 Modified the "element" command so that coordinates may be given in
physical units (e.g., um).
2022-09-01 17:58:30 -04:00
Tim Edwards 5d51e10fb9 Corrected an error with perimeter calculation of a device that was
caused by other code that can move the plane of a device to match
the plane of a port.  Solved by retaining the original plane of the
node in the extTransRec structure, and using that to determine the
device plane for purposes of calculating perimeters and not double-
counting contacts.
2022-08-30 10:13:18 -04:00
Tim Edwards eed9882bf2 Modified the handling of GDS library names to avoid creating cells
with slashes in the name (picks up the text after the last slash).
Also allowed the "gds library" command option to modify the
behavior of "gds read" (previously only affected "gds write") to
indicate that the GDS file is a library and that there are no top-
level contents, only subcell definitions.  Also:  Corrected a typo
from yesterday's commit that prevents magic from compiling (oops).
2022-08-26 08:59:25 -04:00
Tim Edwards 2561afd402 Implemented the correction of Anton Blanchard's git pull request #180
"Antenna checker should ignore vias in partial mode".  I changed the
implementation by moving the correction into the antennaAccumFunc()
subroutine so that it skips the area calculations for the contacts,
avoiding unnecessary computation.  Otherwise, it's the same (vias
do not contribute to the surface area of the antenna when calculating
antenna area in "partial" mode).
2022-08-25 11:03:56 -04:00
Tim Edwards f45f3c96e5 Updated version to go along with the merge of pull requests 175 and 176
(OpenBSD/NetBSD/DragonFly support), and a change to the wrapper to allow
manual override of the number of icon columns (because sometimes some
window managers are clueless about the correct window dimensions).
2022-08-22 12:20:59 -04:00
Tim Edwards f7df5e7c86 Added an option to "def read" to avoid creating obstructions from
"BLOCKAGES" statements.
2022-06-24 15:22:53 -04:00
Tim Edwards 43d5cc2804 Added a quick check on cell defs when running "antennacheck" to
make sure that the cell def's .ext is not marked "abstract".
Otherwise, "antennacheck" appears to run, but no output is
produced, and no reason is given.
2022-06-20 12:26:23 -04:00
Tim Edwards 2b7b12d34c Added a catch for a node named "(none)" in a merge line. This
prevents magic from crashing but does not do anything about the
fact that a non-existent node ended up in the .ext file, which
will have to be investigated.
2022-06-16 19:54:21 -04:00
Tim Edwards bb9b9660e7 Updated version to go along with the merge of pull request #169 from
Matt Guthaus.
2022-06-14 08:55:43 -04:00
Tim Edwards 085131b090 Modified the handling of polygon cells when writing GDS; if a
polygon cell has been created with the "gds polygon subcell"
option and the parent cell is read-only (vendor GDS), then the
polygon cell does not actually exist in the original GDS and
should not be output during a "gds write".
2022-06-09 11:44:58 -04:00
Tim Edwards d099562e85 Fixed two issues: (1) Found a backwards-incompatibility with the
fringe capacitance halo where the default halo distance was set to
zero instead of one and caused divide-by-zero issues;  (2) Found
extraction issues where labels picked up from cells flattened
during GDS reading cause the flattened/emptied cells to show up
in the extraction with extra pins that can mess up LVS.  Solved
this by removing labels from flattened/emptied cells.
2022-06-08 16:02:40 -04:00
Tim Edwards bcf35db713 Working through various issues with parasitic capacitance extraction
using the newer methods for nearest-edge searching and fringe area
of effect.  Removed a same-net check in a routine that removes
capacitances that are redundant due to hierarchical overlaps;  these
redundancies must be checked on shapes within the same net.  Corrected
(again) an out-of-clip-bounds check.
2022-06-04 08:16:50 -07:00
Tim Edwards 8d985ea766 Corrected an error in the fringe area calculation that was supposed
to be ignoring geometry outside the area of the halo, but wasn't.
2022-05-31 22:45:46 -04:00
Tim Edwards bbcc05c004 Corrected a (very bad) accidental deletion in the last commit that
causes the compile to fail.
2022-05-29 21:20:32 -04:00
Tim Edwards c001de3d9d (1) Corrected an error in generating GDS_FILE properties when
reading GDS files, caused by an unneeded change to pass both
the "original" filename and the actual filename when handling
compressed files---The original filename is unneeded.
(2) Implemented several new methods for parasitic extraction.  The
first is an option offset value to apply to sidewall calculations.
This handles issues where actual wire separation is different
from drawn wire separation, which can be significant for the
1/d calculation of sidewall coupling.  The second method is to
use the recently-added fringe halo to compute the coupling of the
fringe capacitance to nearby wires.  Prior to this change, all
fringe capacitance was applied to surfaces directly under a wire
edge as if the fringe capacitance did not extend outward from the
edge.  Now the capacitance is properly pro-rated for the position
of any overlapped shape inside the fringing field.  Finally, the
third method added is a new search algorithm for finding the
nearest shapes along the length of a boundary.  This is used for
sidewall coupling and fringe shielding, where the nearest shape
dominates the coupling, and any shapes behind are shielded and
may (to first order) be ignored.  Previously, the entire halo
was searched without regard to shapes shielding other shapes
behind, and a recent correction added an ad-hoc search for
blocking shapes that was inefficient and not always correct.
The new method is both efficient and accurate.
2022-05-28 10:33:21 -04:00
Tim Edwards 4f5e1aec6b Corrected a typo in the new sidewall coupling shield check that
will cause an infinite loop during extraction.  Fixes issue #166
on the github issue tracker.
2022-05-18 09:26:00 -04:00
Tim Edwards f5382b824c Updated the version because the github mirror was copied earlier
today due to the critical fix for the compressed GDS file code.
2022-05-12 17:36:28 -04:00
Tim Edwards b643f44659 Modified the configure script to allow zlib compression to be
disabled from the configure command line.  Corrected an error with
the non-zlib-enabled compile.
2022-05-12 09:27:32 -04:00
Tim Edwards 93c96c23a1 Corrected an error in the new zlib GDS reading code that missed
changing the "rewind" function to "gzrewind", causing a crash when
a GDS file has to be re-read due to out-of-order contents.
2022-05-11 12:38:05 -04:00
Tim Edwards 371018ae4b Implemented native gzip compression/decompression using zlib routines.
Compression levels of the output can be controlled with the "gds
compress [<value>]" command, where <value> 0 (default) is uncompressed
output, 6 is "normal" gzip compression, and 9 is maximum compression.
2022-05-10 09:19:39 -04:00
Tim Edwards 6e0768ebd4 Removed the "-k" option from "gunzip", which is not only redundant
with "-c" but is unsupported on some OS versions of gunzip.
2022-05-09 15:27:51 -04:00
Tim Edwards 85d8ad6622 Added the capability to handle compressed GDS files through the use
of systems calls to "gzip" and "gunzip".  A compressed GDS file can
be made simply by doing "gds write <name>.gds.gz", and can be read
simply by doing "gds read <name>.gds.gz".  Names of compressed files
can be put in the GDS_FILE property of a cell.
2022-05-05 17:40:56 -04:00
Tim Edwards e00633b8a1 Corrected an issue in the extraction where a region could be set to
a split tile type, causing a crash if the node name had to be
discovered by a "hard search".
2022-05-04 12:00:09 -04:00
Tim Edwards 99384a63c7 Still recovering from unintended consequences of setting EditCellUse
to NULL for a read-only view. . .  Changed the command "what" so that
it will not fail on a non-edit cell.  There are likely a few other
commands that should not fail on non-edit cells because they do not
alter anything.
2022-05-03 18:03:27 -04:00
Tim Edwards f760b038d6 Updated VERSION to go along with the merge of pull requests 160
and 161 from Donn, and modified one of the files from PR 161 to
maintain typographic consistency.
2022-05-03 08:32:00 -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 55128d3437 Updated version. 2022-04-20 16:18:31 -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 7b08d16542 Updated version to go along with pull requests 155, 157, and 158
from Ryan Schmidt.
2022-04-13 08:35:41 -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 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 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 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 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 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 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 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 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
Tim Edwards 505155497e Resolved an issue with magic crashing during "antennacheck" due to
a routine that should have been called with a NULL argument, but
instead was called with no argument, making the behavior system-
dependent.  Revised the parsing of the "defaultareacap" and
"defaultperimeter" statements in the tech file, such that the short
version of both statements gets automatic handling of the substrate
and isolated substrate areas;  this goes back to the recent change
in extraction behavior to redefine the "substrate type" (e.g., pwell)
during extraction as defining isolated substrate areas, and not the
default substrate.  The earlier code change dealt with problems
related to extracting nodes and regions, but did not consider how
parasitic capacitance was affected.  This commit resolves that issue.
2022-02-23 15:02:40 -05:00
Tim Edwards f8390b78f8 Tackling a section of code with poor performance in extraction.
The extSubtree() routine cuts a layout into squares and extracts
each separately, checking for subcell interactions.  In each
square it parses all labels looking for unconnected ones.  This
section of code not only parses all labels M x N times, but it
then marks interaction areas where there may be none, forcing
additional unnecessary processing.  This commit makes the first
quick optimization, which is to change the return value of
DRCFindInteractions() from boolean to integer, allowing it to
return a value indicating that there are no subcells in the
area.  This prevents the loop through labels from happening in
cases where there can never be interactions.  More to come.
2022-02-20 17:36:49 -05:00
Tim Edwards 2e99d0cff7 Changed the behavior of "extract" routine extFindNodes() to not
check for abstract views to determine how to handle the substrate
node.  Running tests to check if this has any negative impact on
the extraction of abstract views that do not specify substrate
and well types.
2022-02-17 11:27:43 -05:00
Tim Edwards f23aec37b9 Corrected the "select flat" command, which failed to recompute the
selection bounding box, causing all following commands to fail to
handle anything in the selection outside of the unit area (0, 0) to
(1, 1).
2022-02-16 11:28:06 -05:00
Tim Edwards 3a758912c4 Corrected a small issue in the "property" command that will attempt
to free memory from location 0 if the cell is not editable.
2022-02-15 12:01:11 -05:00
Tim Edwards 6ecd077ab4 Restored compiling of the non-Tcl/Tk version of magic. This has
traditionally been kept for backwards compatibility.  However, the
operation of "ext2spice" and "ext2sim" as separate programs has
become extremely difficult to maintain, and so it has been dropped
in favor of folding both into the program as commands, as was done
a long time ago in the Tcl/Tk version.
2022-02-08 16:12:07 -05:00
Tim Edwards 113f0dfb3f Applied the same method as used in the last commit, to put all
cell properties in natural sort order when writing a .mag file.
This should remove the last bit of indeterminism in the output
of magic database files.
2022-02-01 11:58:11 -05:00
Tim Edwards 750ad12677 Updated version (after pulling last commit). 2022-01-31 15:33:56 -05:00
Tim Edwards ea80e30a8e Applied a string sort to the dump of cell uses when writing a .mag
file.  This makes the output of .mag files deterministic (except
possibly for properties, which may also need to be handled this
way).
2022-01-31 15:30:24 -05:00
Tim Edwards ee1d1ae5b0 Corrected an error in LEF write in which sticky labels that declare
the label to be attached to a non-contact type when the label is
actually over a contact are not handled correctly when checking if
multiple labels should belong to the same port record.
2022-01-24 17:19:13 -05:00
Tim Edwards e1aedc6f41 Decided that a different approach needed to be taken for having
timestamps that are fixed, since the timestamp update routine is
called from too many places, too many times.  Instead created a
new cell definition flag indicating a fixed timestamp, which can
be set by "cellname timestamp" for an individual cell, or with
"gds datestamp" for cells read from a GDS file.
2022-01-22 11:18:32 -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 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 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 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 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 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
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 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
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 be5b6dec0c Updated version to go along with the merge of pull request #113
from Brad Smith.
2021-12-30 09:26:38 -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
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 859879ce5d There being a specific situation where the enumeration of ports
used by "topVisit" and "subcktVisit" in ext2spice.c, probably
caused by having different names on the same port number, the
subcktVisit() routine was modified to use exactly the same
enumeration as topVisit() so that they are guaranteed to have
the same result.
2021-12-13 11:33:02 -05:00
Tim Edwards 43bb499bcf Corrected an issue with the limited bitfield dedicated to port numbers;
this limited ports to 16384, which seemed reasonable at the time.
However, the sky130_sram_macro layouts connect power and ground in a
way that when coupled with "extract unique" can generate tens of
thousands of ports and overrun the bit field, showing that automation
can do the unexpected.  The solution was to split out the port number
from the label record as its own 32-bit value.
2021-12-12 22:09:31 -05:00
Tim Edwards 552d6de0f7 Modification to prevent crashing on an attempt to do an area erase on
a read-only layout.
2021-12-07 14:25:50 -05:00
Tim Edwards f68c2c7657 One small change to the ext2spice topVisit code to ignore nodes that
have already been output;  i.e., that have EF_PORT set.  However,
since EF_PORT is now set on all implicit ports, it is likely that
this part of the code is no longer exercised at all, and may be
removed.
2021-12-06 09:52:59 -05:00
Tim Edwards bfdf1227a7 Modified the "extract unique" behavior so that it treats "soft"
connections through the substrate as the same node, and so will
not force different nodes names on the soft connection to be
unique.  This should probably be selectable behavior.  However, as
written, the "extract" command will always merge soft connections,
so giving them unique names just causes problems with "extract".
2021-12-04 15:04:01 -05:00
Tim Edwards 5913643ad0 Reverted most of yesterday's modifications. Instead located the
issue at the change made in revision 214.  This was done incorrectly
in two ways, one being a set of statements inside an if() block that
should have been executed always, and the other an incorrect use of
the EF_DEVTERM flag, setting it when it should not have been set.
2021-12-03 12:29:02 -05:00
Tim Edwards 6a8f1226d1 Corrected a problem with implicit substrate ports and connections;
implicit substrate connections under some conditions were not added
to the subcircuit pin list.  When this was corrected, the call to
the subcircuit was missing the implicit substrate port.  When that
was corrected, the implicit substrate port printed was the subcircuit's
local node name, not the connection from above in the hierarchy.  The
underlying problem was that the substrate was marked as a port in a
node record that was in another (flattened and unused) def and so not
seen when enumerating the def's node list.  It's possible that the
better solution is that the efNodeHashTable() should be enumerated to
write subcircuit ports, not def->def_nodes.  However, now, by using
EFHNLook(), the corresponding entry in efNodeHashTable() is found and
used.
2021-12-02 11:38:46 -05:00
Tim Edwards 65747132a0 Added behavior for reading cells with or without "-dereference" to
work around the issue of loading a file containing references to
cells with the same name as cells already loaded.  This is probably
going to cause additional headaches until a proper checksum method
is implemented.
2021-11-30 12:17:21 -05:00
Tim Edwards d43013048d Corrected a recent line change to return "0" instead of void, per
github Issue #104 by lantertronics.
2021-11-29 17:57:18 -05:00
Tim Edwards 8957d4b947 Slightly modified various use cases of "cellname" so that they
behave as one would expect;  e.g., "cellname self" returns the name
of the currently edited cell if nothing is selected;  "cellname
rename <name>" renames the currently edited cell to <name>.
Modified the "extract" command so that it will not extract a cell
named "(UNNAMED)" but will insist that the cell must be given a
proper name, much like the "writeall" command does.
2021-11-25 12:40:51 -05:00
Tim Edwards 6b72a51b17 Fixed a segfault condition if doing "splitpaint" on a zero-area
rectangle.  Likewise, this also fixes an unexpected result when
doing "spliterase" on a zero-area rectangle (which does not cause
a segfault, but is not what one would want magic to do).
2021-11-24 10:00:15 -05:00
Tim Edwards a6e57093f8 Realized a very stupid error in the handling of the "use" lines
when reading in a .mag file.  The routine was not checking for
whether a "use" entry in the file was the first one encountered
or not.  The path is only ever given for the first use of any cell
def, so for any cell after the first, the path should have already
been resolved.  This fix avoids lots of unnecessary error messages
when reading a file in a different directory.  Also, because the
routine now checks for the first use in a file, any error messages
that do occur will only be displayed for the first use, not all of
them.
2021-11-20 20:54:51 -05:00
Tim Edwards 73bad08457 Updated the version to go along with the merge of pull request
the existing coding style.
2021-11-17 09:12:47 -05:00
Tim Edwards e8eb96103d Modified the Euclidean distance "grow" operator so that it honors
the grid limit setting.
2021-11-16 09:59:23 -05:00
Tim Edwards 898783467c Corrected the "lef write" routine to more correctly handle port
statements, with all "hard" connections being enumerated in the
same PORT entry, and "soft" connections (same label on unconnected
areas;  e.g., through substrate or resistor device) being
enumerated as separate PORT entries, per the LEF spec.  Also
corrected behavior with respect to the "lef write -toplayer"
option, which was treating each port label independently, and so
generating entries for lower layers of a port if there were ports
on those layers, in contravention to the "-toplayer" option.
Also:  Added the PINS section to the "def write" output;  this had
been left as a "to be completed" item but was never done in spite
of being easy to add.
2021-11-12 11:34:16 -05:00
Tim Edwards 3afc462cac Removed the dependence on EXT_DOLABELCHECK when generating node
entries for "floating" labels.  Otherwise it is possible for the
hierarchical checks to find the label in flattened geometry and
reference it, resulting in merge statements in an .ext file that
reference undeclared nodes, ultimately resulting in extflat
failing to perform the merge, and an incorrect netlist.
2021-11-11 10:01:05 -05:00
Tim Edwards f6695cea52 Added an error message when writing GDS if any cell being written
still has the default "(UNNAMED)" cell name;  this is not strictly
an error, but is almost certainly not what the user intended.
2021-11-08 10:25:38 -05:00
Tim Edwards 9af83abfe5 Updated version with the previous commit. 2021-11-05 12:17:10 -04:00
Tim Edwards c0ea133e98 A recent commit caused connections to implicit (unlabeled) substrate
to not get into the subcircuit port list during ext2spice.  The new
fix brings back (unfortunately) the behavior of creating a substrate
node for cells that have no substrate connection to any device;
this will have to be handled separately.
2021-11-03 17:34:38 -04:00
Tim Edwards 3e07197dfa Adjusted LAYERS_PER_CONTACT from 3 to 4. This is not a preferred
solution;  it would be much better to make the value adjustible, but
the array of tiles sized to LAYERS_PER_CONTACT is a Region structure,
and the routine that frees the Region structures does not have a way
to call a routine to take additional measures like free'ing a sub-
structure of the Region.  A proper solution will require some work.
2021-11-01 09:26:21 -04:00
Tim Edwards c82c96cb73 Added checks to prevent magic from crashing when running various
commands on selections in a cell that is not editable.  Moves
and Copies were already handled correctly;  this correction fixes
Delete and transforms (e.g., rotates and flips).
2021-10-28 15:57:17 -04:00
Tim Edwards 34af2f3309 The "extresist" command was still generating "Couldn't find wire"
messages which was traced to code that changes a drivepoint position
to match a label;  the same drivepoint may be part of the record for
the initial position to search on the net, in which case if the
position is changed, then the tile type needs to be changed to match
the new position.
2021-10-11 10:18:27 -04:00
Tim Edwards bb8f7e6960 Revised the routine ResSortByGate() in ResRex.c so that it sorts
using qsort() instead of its own linked-list-based sorting, which
is horribly inefficient.  This change allows power nets (which
tend to be connected to all transistors) to be extracted in a
reasonable amount of time (hours instead of days).
2021-10-10 19:20:24 -04:00
Tim Edwards 2f7813094b Implemented glob-style matching for label selection. Introduces
an optional extra argument to the "select" command that can be used
to select labels by glob-style matching;  e.g., "select area labels
VSS*" or "select less area labels *_1".  This will help in managing
labels after flattening a standard cell design;  e.g., by using
"select less area labels */VDD".
2021-10-09 13:44:04 -04:00
Tim Edwards 537b1f057d Modified the generation of "equiv" statements in "extract" some more,
to eliminate all redundant names resulting from redundant labels.
Changed the behavior of "goto" so that it will find local names with
slashes, which are the result of using "flatten".  A hierarchical
search is done first, as before, but on failure to find a subcell
component, the local cell is searched for the verbatim name.
2021-10-08 10:58:10 -04:00
Tim Edwards 083ef458a8 Update of version with the fix to the last commit. 2021-10-08 09:36:51 -04:00
Tim Edwards 6b1365708d Made another correction to the recent change in ext2spice.c where
an out-of-bounds array access occurs that can cause bad output at
best and a crash condition at worst.
2021-10-07 10:58:21 -04:00
Tim Edwards c4221889ed Correction to yesterday's commit (minor issue with line length in
the SPICE netlist output of ext2spice).
2021-10-05 08:50:45 -04:00
Tim Edwards 52a424e511 Added another option to the "extresist" command, this one to include
specific nets to extract, rather than excluding them.  That allows
"extresist" to target specific nets like the power supply or a clock
tree for extraction.
2021-10-04 15:32:37 -04:00
Tim Edwards 98a631144c Updated version to go along with the merge of pull request #90 from
Harald Pretl.
2021-10-02 11:07:17 -04:00
Tim Edwards 36864bc79e Reverted a change made in version 8.1.154. The implementation is
wrong, and it needs revisiting.  This is the cause of a number of
negative capacitances appearing in the netlist (even after accounting
for overlap with subcircuits).
2021-09-28 21:26:27 -04:00
Tim Edwards c101d98921 Modified EFbuild.c to stop generating an error message when an
"equiv" statement is encountered in a .ext file when using the
"ext2spice short" option.
2021-09-20 15:02:57 -04:00
Tim Edwards 35a65a9ba1 Corrected the "def read" command so that when reading PIN blocks,
all geometry will be handled;  the previous behavior expected only
a single rectangle per pin and so would only acknowledge the last
entry in any list of rectangles for the pin.
2021-09-15 14:45:14 -04:00
Tim Edwards bfab888bc9 Cleaned up a few lines related to "equiv" nodes, which are not
actually an issue and probably never relevant.  extresist now works
except for substrate connections and soft connections between substrate
regions.  That will require additional coding, not bugfixing, so I'm
committing the last of this set of bugfixes before starting that.
2021-09-14 13:42:27 -04:00
Tim Edwards c7077d38c3 Separated out the flag used for "ext2spice extresist on" and
"ext2sim extresist on", which was being shared;  that leads to
confusion, especially when using "ext2sim" to generate a node
name input file for "extresist".  Also:  Added a warning when two
ports are merged in a .ext file, as this can lead to numerous
incorrect entries in netlist output.
2021-09-13 10:36:01 -04:00
Tim Edwards 02f42e7260 Corrections to the extresist code. Some of the changes are just
text formatting.  Made one critical correction to ResGetDevice() to
pass the device type;  otherwise, devices on different planes (e.g.,
MiM caps) with the same coordinate will always return the device on
the lowest plane, leading to incorrect results and an eventual crash
when the device record is free'd twice.
2021-09-12 17:20:22 -04:00
Tim Edwards 96b7c20c17 Added option "notopports" to "extract unique". The option
behaves like "extract unique all" on all cells below the topmost
level of hierarchy, and "extract unique noports" on the top
level.
2021-09-09 15:47:48 -04:00
Tim Edwards d63a102515 Made various updates and corrections to the "extresist" code in
support of devices with terminals on different plances, such as
capacitors, diodes, and bipolar transistors.  Output now appears
to give meaningful results for flattened layouts, although
numerous issues remain for hierarchical layouts.
2021-09-08 16:41:36 -04:00
Tim Edwards 0ebdf3e513 Updated VERSION to go along with pull request #87 from Ryan Schmidt.
Also using this to test the last update to the continuous integration.
2021-08-28 13:18:33 -04:00
Tim Edwards 4cba342ad0 Changed README to README.md to be compatible with github. 2021-08-28 13:15:08 -04:00
Tim Edwards 303c4c45dc Corrected the badge link in the README file to point to my own
repository and not Sai Charan's fork.
2021-08-28 13:04:52 -04:00
Tim Edwards 1ffd1c51ec Updated VERSION to go along with the merge of pull request #88 from
Sai Charan.
2021-08-28 13:00:06 -04:00
Tim Edwards d711b12311 Updated the version with the last commit. 2021-08-25 21:42:20 -04:00
Tim Edwards f428b7c792 Corrected a scaling error that causes all extraction dimension values
to be scaled twice when using the "extract style" command and with an
extraction style that uses micron units.  The microns-to-internal
units conversion expects an unscaled result when calling
CIFGetOutputScale(), but except when loading a tech file for the
first time, this value is scaled, and causes the double scaling.
Fixed by unscaling the CIF output before reloading the extraction
style, then scaling it afterward.
2021-08-23 13:46:19 -04:00
Tim Edwards 56d1d9380e Corrected an error caused by the modifications to the DRC engine
to copy up errors from non-interacting subcells.  The routine was
only copying up TT_ERROR_P type errors, but for deep hierarchies,
TT_ERROR_S type errors may have to be propagated up as well.
2021-08-20 21:49:27 -04:00
Tim Edwards e50dab7e52 Modified the way that ToolGetEditBox() works so that it does not
require that an edit cell be defined.  This stops a lot of commands
from failing on non-writeable cells.  There really should not be a
concept of "non-editable" cells at all, just non-writeable ones.
2021-08-04 12:05:21 -04:00
Tim Edwards c776c82445 Fixed an error in the DRC rule optimization ("||" used instead of
"|"), pointed out by Jim Everitt.  The error is pretty major, but
because the section of code it affects is just eliminating
unnecessary DRC rules, I believe that the only effect is that the
DRC ruleset ends up using more memory than it needs to.  But, good
to have fixed.
2021-08-01 12:04:13 -04:00
Tim Edwards 1d8a59049c Added sanity checks to the GDS dump from GDS_FILE pointers. Since
it is easy to subvert the process by updating GDS without updating
the pointers, it is trivial to end up with bad GDS output.  The
sanity checks confirm that the position pointed to is a complete
structure (check begin and end records), and that it has the same
name as the cell (this is not a requirement, as there are reasons
one might want to point to data from a structure of a different
name, but a warning will be printed).
2021-07-30 13:45:03 -04:00
Tim Edwards 07e366ad8a Extended the "cellname rename" command to add an option "-force"
that can be used to force renaming of a read-only cell.  The
action revokes the read-only status of the cell and removes any
GDS filename and pointers from the cell's properties.  This can be
used to swap out a library cell in a layout for a custom version,
by first forcing a rename of the cell, and then resetting the
filepath of the cell and flushing.
2021-07-29 17:34:39 -04:00
Tim Edwards 55bf0ebd54 Corrected the "bridge" operator, which failed to check for "false"
tile corners in the check area to find areas needing bridges.
This prevents generation of unnecessary bridging geometry;  and
since the error made the check rotation-dependent, this may
resolve some "parent and child disagree on CIF" errors.
2021-07-28 09:40:36 -04:00
Tim Edwards 25166f2f7c Corrected issue with finding devices in ResMain()---there is not
necessarily a 1:1 correspondence from tile types to extracted
device names, and not necessarily a 1:1 correspondence in the other
direction, either.  So the search for devices at the location given
by the .sim file has been loosened to look for any tile type at that
location.  Matches are restricted to those in which the plane of the
type found is the same as the plane of the device recorded in the .sim
file;  this prevents matching device like MiM caps that may be in the
same location as a device in another plane.
2021-07-27 14:34:01 -04:00
Tim Edwards cc16b82a79 Corrected a problem in ext2spice which has been in the code for a
very long time but never discovered;  in which any implicit port
connection into a subcell (that is otherwise labeled with ports) that
appears at the end of the node list (i.e., after all the declared
ports), will not be output, either in the subcircuit definition or
calls.
2021-07-25 13:49:13 -04:00
Tim Edwards 758a7d72ec Corrected a potential segfault issue in "extresist" if it encounters
a port label that is not connected to a valid layer (e.g., space).
2021-07-23 10:39:59 -04:00
Tim Edwards 7c973ad91a Corrected an error caused by fixing the unterminated comment in
the last commit, which was an undeclared variable in the block
that was being left out accidentally.  So that has now been fixed.
2021-07-13 14:08:35 -04:00
Tim Edwards 648f27dcf0 Corrected an unterminated comment pointed out by Jim Everitt. 2021-07-12 09:52:14 -04:00
Tim Edwards 1d24d2869d Updated version with the last commit. 2021-07-10 21:17:12 -04:00
Tim Edwards 355399d3ef Modified the startup behavior so that if a ".tcl" script file is
presented on the command line, then all following arguments are
assumed to be arguments of the script and not additional input
to be processed by magic.  This allows arguments to be passed to
scripts passed to magic on the command line.
2021-07-08 16:03:05 -04:00
Tim Edwards 3b70c95013 Updated the version along with the fix to "cif coverage". 2021-07-04 22:34:52 -04:00
Tim Edwards 958d6f1670 Updated the version to match pull request #84 from Dan Moore. 2021-06-29 14:25:33 -04:00
Tim Edwards b0ed7f09a9 Modified the "flatten" command so that when used with "-dobox", it
is not necessary that the target cell not exist.  That allows a
layout to be flattened into a destination in pieces.  Also found
that the "flatten" command never frees memory for the CellUse it
creates for the copy, so fixed that as well.
2021-06-23 17:41:32 -04:00
Tim Edwards e36560fb90 Added a missing include of ctype.h to a source file that uses the
isalnum() subroutine.  Corrected an assignment in utils/tech.c
which was a syntax error that passes through the compiler.
2021-06-19 10:30:47 -04:00
Tim Edwards e55c1ecbda Corrected issues with GDS write that come from two features recently
introduced:  The use of substitutions for PDKPATH and home directory
in path names for GDS files referenced in abstract views, and the
"gds addendum" option.  Both were interfering with magic's handling
of writing GDS files from abstract layout views.
2021-06-17 12:40:21 -04:00
Tim Edwards 39630ea710 Added missing function declaration for GeoCanonicalRect in
geometry.h.
2021-06-14 09:45:36 -04:00
Tim Edwards 6e09586c54 Changed the property attribute number used for cell instance names
from 98 (arbitrarily selected) to 61 (apparently commonly used by
other tools).  This should help increase compatibility with GDS
files output from other tools.
2021-06-13 12:23:07 -04:00
Tim Edwards 75386e6467 Corrected the GDS read routine so that the "gds noduplicates"
option does not get undermined by GDS files that have cell
instances appear before cell definitions.
2021-06-12 11:40:13 -04:00
Tim Edwards 36f61ca601 Modified the CIF/GDS array processing in CIFhier.c, finding that there
were incorrect assumptions made in the code from 35 years back or so,
for the case where the CIF layer halo is larger than the size/separation
of the cells in the array.  The new code will prevent the array routine
from copying hierarchical additions to the mask layers outside of the
array area.  Whether or not the new code has its own faulty assumptions
remains to be seen through thorough vetting.
2021-06-07 16:38:12 -04:00
Tim Edwards 35b60531e5 Corrected CalmaRead to remove a syntax error that managed to end up in
the last commit, unfortunately.  Thanks to Matt Guthaus for alerting me
to this.  Also updated parts of the extresist code that remove the
dependence on ResConDCS;  this is a minor update and should not affect
the operation of extresist.  It is preparatory to doing more work to
support additional device types like capacitors, bipolars, and diodes.
2021-06-06 21:44:52 -04:00
Tim Edwards 78be76a650 Corrected a potential crash condition if attempting to read a GDS
cell without any edit cell defined.
2021-06-05 17:02:39 -04:00
Tim Edwards 0503ce0ebf Corrected the "surround_ok" spacing rule, which did not prevent
the layers2->layers1 swapped case from being implemented;  the
surround_ok rule type is by definition asymmetric and the two
layer sets cannot just be swapped.
2021-06-04 12:26:11 -04:00
Tim Edwards a8fcca13ee Corrected an error in the implementation of the CIF "mask-hints"
operator that failed to set cifplane to curplane before drawing into
it.  This can cause the "mask-hints" layers to vanish, or worse,
cause a segfault.
2021-06-01 10:25:34 -04:00
Tim Edwards 7d6c7f5797 Updated the version number. 2021-05-27 16:15:56 -04:00
Tim Edwards 7f11020ab4 Additional changes, almost all stylistic, to make the resis/ section
style conform to the rest of the database.  It is difficult to work
with code written in a sloppy, random style.
2021-05-26 22:34:36 -04:00
Tim Edwards c22d584ac3 Corrected a problem with character array bound overflow when writing
values to a LEF file.
2021-05-25 11:05:33 -04:00
Tim Edwards 5e02726f7f Modified the cell load routine to avoid creating an "undo" record
for loading a cell after displaying an unmodified "(UNNAMED)" cell,
because "(UNNAMED)" will be deleted, leaving the undo record
invalid and causing a crash if it is attempted to be invoked.
2021-05-23 12:07:31 -04:00
Tim Edwards 123219b5f1 Corrected an error in the extresist code that will cause an infinite
recursive loop and crash magic.  Corrected a number of other issues
along the way, especially one where routines in EFantenna and extresist
make use of array EFDevTypes which was only created by ext2sim and
ext2spice, and freed when done.  Having run extresist through valgrind,
there are still issues in the code.
2021-05-21 16:33:20 -04:00
Tim Edwards 032a2e7221 Merge branch 'master' of 192.168.0.7:/home/tim/gitsrc/magic 2021-05-19 17:24:04 -04:00
Tim Edwards 33edee6b42 Modified the condition under which the (UNNAMED) file is deleted
on loading a layout to avoid doing so with in a suspendall ...
resumeall block.  That avoids weird errors occurring when the
PDK toolkit scripts are run to generate a new device layout if
the top level layout is still (UNNAMED) and empty.
2021-05-19 17:21:59 -04:00
Tim Edwards ff913ddb23 Updated VERSION. 2021-05-17 15:22:27 -04:00
Tim Edwards 8d647287e2 Implemented a basic DRC check on non-Manhattan edges. Previously
checks on non-Manhattan tiles were made only on the straight edges;
this was sufficient for most checks.  However, it can miss the case
of facing non-Manhattan edges.  This check does not do triggered
rules because there is no non-Manhattan maxwidth algorithm implemented,
and because the triggering clipping area is a triangle and needs an
extension to support it.
2021-05-14 18:02:34 -04:00
Tim Edwards f8b6bd1525 Updated version for the last commit. 2021-05-12 22:50:53 -04:00
Tim Edwards d8450cf1d4 Corrected an issue with a conflict between the "gds ordering" and
"gds noduplicates" options (essentially, they were canceling each
other out).
2021-05-12 22:49:25 -04:00
Tim Edwards 94a6daa9b0 Corrected the array DRC checking, which was clipping to the error
area + halo but then failing to limit overlap checks to that clip
area, resulting in bizarre errors whenever an array is made.  Not
sure why the error didn't show up more often.
2021-05-07 10:42:44 -04:00
Tim Edwards be19fda504 Added a "gds unique" option that behaves like the default CIF behavior,
in which if a cell is read from GDS that has the same name as a cell
in memory, then the cell in memory is renamed to keep all cell names
unique in the database.
2021-04-27 13:07:27 -04:00
Tim Edwards 538d7201e1 Modified the behavior of "extract" so that it does not try to check
for sticky labels making connections through the hierarchy.  This
is only needed for some annoying layouts that put point-size labels
with no connecting geometry in cells, and causes magic to spent
excessive amounts of time searching through labels for any layout
that has lots of labels.
2021-04-26 12:19:33 -04:00
Tim Edwards 0dcc9c6ca7 Corrected two potentially fatal errors: (1) Code doing the PDK_PATH
and HOME substitution in filenames needs to watch for a NULL
cd_file, and (2) The routine that removes the (UNNAMED) cell when
another cell is loaded needs to NULL the boxRootDef pointer or else
it ends up pointing to deallocated memory.
2021-04-24 22:13:30 -04:00
Tim Edwards 6bd96a68dc Created a method for annotating abstract views with GDS pointers.
This can be done now by reading a LEF file, followed by reading
a GDS file with the "noduplicates" option set.  In addition,
annotation of either the LEF view or a read-only view follows the
same protocol as cell paths in the .mag file, which is to replace
leading path components matching Tcl variables for PDKPATH or
PDKROOT, and replace the home directory path with a tilde.
2021-04-22 14:39:34 -04:00
Tim Edwards 59fc24729c Corrected issues in the extresist function found after the previous
commit, mostly relating to the scale of values in the ".nodes" file
produced by ext2sim.  Making this file CIF syntax seemed unnecessary,
so I removed the CIF syntax and scaling.  "extresist" can now produce
an apparently valid output on a standard cell layout.  Even with the
change, the extresist output is still only pseudo-hierarchical, so
this does not preclude the need for eliminating the .sim format file
in favor of the .ext file, but it provides a working intermediate
form.
2021-04-21 13:03:26 -04:00
Tim Edwards 5b00ee7b83 Added a "-pinonly" option to "lef write" to restrict the pin area
to what is defined by the label, and no additional surrounding
geometry.
2021-04-20 10:19:12 -04:00
Tim Edwards 04fca92bf0 Finally got around to modifying the "cellname [list] top" command
so that it returns cellnames in "natural sort" alphabetical order
instead of the random order produced by scanning the hash table
of cell names.  Since this command is used by the "cell manager"
window code, which was also not doing any sorting, then this fixes
the same issue in the "cell manager".
2021-04-19 10:08:58 -04:00
Tim Edwards 84f4bf82ea Corrected a few errors in the code from yesterday's commit. 2021-04-06 10:13:36 -04:00
Tim Edwards 865a4040dd Updated version along with isolated substrate handling in extraction. 2021-04-05 10:23:05 -04:00
Tim Edwards 8f8c3f77f2 Got rid of the annoying behavior of "popstack" to not return to the
original view position;  this was due to not setting units to
internal before re-applying the previous view position.  Also wrapped
most of the "popstack" routine into a suspendall...resumeall block so
that the view is refreshed only once;  this is especially important
when popping back into a full chip view.
2021-04-01 12:31:46 -04:00
Tim Edwards fcdce0553d Corrected an error in the previous commit, and updated the version
number.
2021-03-29 11:54:47 -04:00
Tim Edwards f3febfae73 Updated VERSION 2021-03-25 11:17:27 -04:00
Tim Edwards b0f89ea4af Updated VERSION 2021-03-24 14:57:13 -04:00
Tim Edwards e152deb97b Corrected typo from the last commit that will cause a crash. . . 2021-03-23 11:14:44 -04:00
Tim Edwards c2aedcebab Applied the same change made yesterday to DBconnect.c to ResConDCS.c
and SimDBstuff.c, which have nearly the same connectivity search
functions.  All three now use the hybrid list + stack method.
2021-03-22 09:49:56 -04:00
Tim Edwards 58cdbc5356 Made the "select short" command a bit easier to use (and more in line
with the existing documentation) by not requiring the net containing
the two labels to be selected before running the "select short" command.
The command now first checks if the labels exist in the selection, and
if not, the command effectively executes "goto label1 ; select net" and
then continues as previously implemented.
2021-03-21 12:02:43 -04:00
Tim Edwards b77352849d Corrected the "what" command so that the correct cells are listed
that contain the selected paint.  Previously, all cells inside the
area of the selection box would be printed, which is completely
wrong, and can lead unexpectedly to thousands of cell instance
names being printed out.
2021-03-20 17:04:31 -04:00
Tim Edwards 2532a696e4 Correction from a recent commit; complicated sets of "equiv"
statement in a .ext file require that all aliases of a node name be
rehashed after a node merge, or else node loops can occur.  Also
prevented statements of the form "equiv A A" from being output in
the .ext file, as they are useless.
2021-03-18 11:37:44 -04:00
Tim Edwards 8a0b180cde Modified the crash backup script to add options "disable" and "resume".
However, this has not been implemented as it has been observed that
the use of itimer() has a restriction of one timer per process, which
interferes with the three or more uses of the timer within magic.  The
timer method will have to be changed to use the POSIX timer_create()
routine, before this will work properly.
2021-03-17 12:45:35 -04:00
Tim Edwards 7757384355 Modified the "label" and "setlabel" commands, giving "setlabel" an
extra option "-default" that allows defaults to be set for any
label property other than text or port-related properties.
Subsequently, the command "label <text>" will apply the given
defaults to the label.  This allows a simpler way to create
rendered labels from the command line without remembering all of
the arguments to the extended "label" command.
2021-03-16 13:37:15 -04:00
Tim Edwards 3bd9adbaf8 Corrected a set of regexps in the schematic-to-layout script that
prevented normal x=y type parameters from being parsed.
2021-03-11 11:09:37 -05:00
Tim Edwards 5b8a59c4ad Added extensions to the toolkit base to add netlist-to-layout
conversion, largely converted from the python script in open_pdks,
which itself was derived from an efabless script, and none of
which have been particularly well tested.
2021-03-09 22:07:51 -05:00
Tim Edwards feddffcf45 Modified the handling of subcircuit names beginning with non-alphanumeric
characters.  Instead of removing the non-alphanumeric characters, magic
now prepends an "x" to the name.  Since this naming restriction does not
necessarily impact, say, LVS, it would probably be better to let this
behavior be enabled or disabled by a command.
2021-03-06 19:39:34 -05:00
Tim Edwards 324721b514 Added some options to the net selection with respect to labels.
The previous behavior was to generate hierarchical names for all
labels when copying contents of subcells.  This is "safe" for
copying selections without accidentally shorting things through
labeling, but it can make a mess of the selection.  Options are
now "select do labels" for the existing behavior, "select no labels"
to not show any labels, and "select simple labels" to show only the
root name of labels in subcells.
2021-03-04 14:00:31 -05:00
Tim Edwards c99e632744 Modification of readspice.tcl script to work around issue if no ports
are found (i.e., "port first" returns nothing, instead of a number).
2021-03-03 11:39:35 -05:00
Tim Edwards e4bebffeb4 Updated VERSION with the previousl commit to fix problems with the
hierarchical SPICE netlist generation.
2021-03-01 11:28:15 -05:00
Tim Edwards 114b9a59f7 Implemented more automation for attempting to find a tech file
based on the contents of a .mag file being read in, assuming
compatibility with principles of open_pdks.  The search paths
are not meddled with unless a file is read for which the technology
cannot be found (and a technology has not already been read, or at
least no database file exists in memory using any technology that
has already been read).  If so, then variables PDK_PATH and PDK_ROOT
are searched for in both the shell environment and the local Tcl
environment.  Also, if open_pdks has installed PDKs in the path
/usr/share/pdk/, then that path will be searched.  If a corresponding
technology file is found, it will be loaded.  If the path corresponds
to an open_pdks-style path, then the library paths in libs.ref will
also be added to the search paths for cells.
2021-02-25 13:37:31 -05:00
Tim Edwards 2bb3580f3e Also modified DEF reads to avoid letting instance names contain
either slash or comma.
2021-02-24 14:51:46 -05:00
Tim Edwards 9a79a1eee2 Fixed a minor error in the plot command that is missing a value
in the print statement on detecting an invalid plot parameter
value name.
2021-02-23 09:58:52 -05:00
Tim Edwards 2e9c554f2c Revised the wrapper script to use the Tk command "font measure"
to get the pixel size of the default font, and scale the window
glyphs and scrollbars to match, so that the display is automatically
adjusted for screen resolution and does not require manual intervention
to correct for high resolution displays.
2021-02-20 13:24:02 -05:00
Tim Edwards 3af205cd66 Altered the way that cells in unknown GDS libraries get prefixed,
to make it more compatible with SPICE by keeping it case-sensitive
and avoiding a number for the first character.
2021-02-19 08:52:56 -05:00
Tim Edwards 59b021af73 Corrected an error in which the "select" command returns the name
of an instance with double-escaped brackets if the instance name
contains brackets.  This then undermines the use of the backslash
escape and causes the interpreter to raise an error instead of
printing the name.
2021-02-18 13:05:29 -05:00
Tim Edwards dca33becd9 Updated VERSION along with pull request #68 from Anton Blanchard 2021-02-17 20:46:26 -05:00