Commit Graph

44 Commits

Author SHA1 Message Date
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 f7df5e7c86 Added an option to "def read" to avoid creating obstructions from
"BLOCKAGES" statements.
2022-06-24 15:22:53 -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 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 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 81ecdbf209 Added a "lef datestamp" command option which is the equivalent of
"gds datestamp" for LEF reads.  When set to non-default, all cell
definitions created from LEF macros will be given the specified
timestamp, which allows the stamps of abstract views to match the
stamps of full views, preventing issues of updated timestamps
whenever a layout is switched between views.
2022-01-22 13:02:47 -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 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 2bb3580f3e Also modified DEF reads to avoid letting instance names contain
either slash or comma.
2021-02-24 14:51:46 -05:00
Anton Blanchard e30472d009 Skip over BLOCKAGES section when reading DEF files
I'm seeing warnings when parsing a DEF with BLOCKAGES in it:

DEF read, Line 572201 (Message): Unknown keyword "BLOCKAGES" in DEF file; ignoring.
DEF read, Line 572202 (Message): Unknown keyword "-" in DEF file; ignoring.
DEF read, Line 572205 (Error): END statement out of context.

Skip over the section.
2021-01-13 09:13:04 -05:00
Tim Edwards a78b459303 Modified the DEF read routine (following a diff script from Ahmed
Ghazy) to read pin uses from a DEF file, including the three types
that are not defined by the LEF format (go figure).  Expanded the
bitmask of label flags to include the additional use types.  Also
shifted the label flag bitmask up to make additional room for more
port number, as there is no point in having unused bits in the
bitmask.
2020-12-07 10:39:39 -05:00
Tim Edwards 414f4a8ccb Modified the DEF and LEF read/write routines to keep the
defMakeInverseLayerMap() from returning complete contact types when used
by the lefWrite command when writing LEF macros, which contain cut layers
but not entire contacts.
2020-12-03 21:37:32 -05:00
Tim Edwards 0a532f5721 Applied a patch from Ahmed Ghazy that corrects an error reading PINS
from a DEF file that have the PLACED or FIXED property declared before
LAYER.
2020-08-08 14:02:29 -04:00
Tim Edwards e63e8f5761 Corrected the expected position of top and bottom layers in a
DEF VIA ENCLOSURE when doing "def read".  Thanks to Ahmed Ghazy
for finding the error and providing the patch.
2020-05-27 18:02:36 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards ff0ba7f89d Merge branch 'master' into bplane
Conflicts:
	VERSION

Merged recent changes from master back into bplane, as the efficiency of
bplane for doing extraction on large layouts is unquestionably better.
Fixed the implementation of DBMoveCell() for bplane.  Corrected an error
in the bplane version of dbScaleCell() that enumerates cell uses but
does not free the list.
2020-03-22 14:07:25 -04:00
Tim Edwards 276bf1d78a Corrected a bad error from a few commits ago, probably 198, which
can deallocate the cell name and causes all sorts of unexpected and
unwanted behavior.
2020-03-21 12:40:35 -04:00
Tim Edwards fe8e229920 Corrected the DEF read routine's ROWCOL parsing. It was not treated
as an optional argument (which it is), and so defaults were not
applied, potentially leading to the wrong number of rows/columns in
a generated via if ROWCOL is not present in the DEF file.
2020-03-21 10:16:33 -04:00
Tim Edwards cd87b08b21 Merge branch 'master' into bplane
Conflicts:
	VERSION
	database/DBcellsrch.c
	database/DBconnect.c
	extract/ExtInter.c
	lef/Depend
	utils/Depend

Updated bplane branch with all changes to master since the bplane branch
was last modified.
2020-03-12 08:29:33 -04:00
Tim Edwards a37fc1e242 Implemented the "def read ... -labels" option, which labels each net
with the name given to the net in the DEF file.  Especially useful
for LVS.
2020-03-05 14:29:54 -05:00
Tim Edwards b6cb1fb54a Modified the LEF VIAGEN reading such that it can accomodate a different
order of layers than specified in the LEF/DEF spec.  It is not clear
whether this is common practice, or a bug in the tool that produced the
DEF file that prompted this change.  NOTE:  The "grow" function applied
in this case should be replaced by the actual GDS input rule sequence,
that includes the grow and shrink merge.  Otherwise, vias read from
DEF files do not match the layout from those read from GDS, even though
the mask layers represented by the layouts are the same.
2020-03-03 17:13:37 -05:00
Tim Edwards 82e33248f2 Corrected dereferencing of cell dependencies, which was being applied
only at the time of running the command "load".  But cells are generally
loaded only on an as-needed basis, so the dereferencing option must be
saved as a flag in the cell and honored whenever its subcells are expanded
or otherwise read at a later time.
2020-01-02 10:13:04 -05:00
Tim Edwards 0eb3b1fe1c Corrected an error in ext2spice related to the recent modification to get
rid of redundant port entries in subcircuits.  There is still an outstanding
issue as to whether nodes and connections need to be recursively iterated
to the hierarchy bottom.  The current fix corrected the test case.  Also,
added a "-dereference" option to the "load" command to revert to the
original behavior of using only search paths from "addpath" when searching
for files to load.
2019-11-14 15:18:26 -05:00
Tim Edwards df77f7853c Corrected the handling of UNPLACED components in a DEF file, which
was previously (and erroneously) lumped with PLACED and FIXED which
take a position argument afterward.  Note that this fix allows the
DEF file to be read without error but does not have the (presumably
desired) behavior of parsing SITE information from the LEF file and
ROWS information from the DEF file and giving each unplaced component
an arbitrary but legal position.  That would require a significant
amount of additional coding work.
2019-07-29 09:51:48 -04:00
Tim Edwards 982bb8aa63 Changed a recent commit which removed brackets from instance names
while reading DEF.  To preserve names as much as possible, such
names are now kept.  To avoid problems, EFbuild.c and ext2hier
behavior has been changed to only parse entries in a .ext file as
instance arrays if the array notation follows the specific syntax
of [ax:bx:cx][ay:by:cy], letting all other uses of brackets pass
through unaffected.
2019-07-25 10:20:24 -04:00
Tim Edwards 197c3f3448 Merge branch 'master' into bplane
Conflicts:
	commands/CmdCD.c
	database/DBcellsrch.c
	database/DBconnect.c
	database/DBio.c
	lef/lefRead.c
	select/selDisplay.c

Updated the bplane implementation with all recent updates (merged master).
2019-07-24 20:36:55 -04:00
Tim Edwards 9ec5e8e747 Modified DEF reads to avoid instance names with brackets. Not
sure if this is the best policy.  The brackets should be okay
but interfere with ext2spice when it reads them from the .ext
file and decides that they refer to arrays.  May be a better
way to handle this.
2019-07-19 22:58:45 -04:00
Tim Edwards d839cc26e2 One last problem fixed, as RECT entries in nets are relative, not
absolute.
2019-07-03 15:36:21 -04:00
Tim Edwards 0141ca8c95 Corrected error in generated vias (set top layer type on bottom,
so bottom layer went missing).
2019-07-03 14:52:22 -04:00
Tim Edwards 49d98115bb Added a number of enhancements to the DEF reading to handle various
forms of syntax found in the LEF/DEF spec up to version 5.8.  Handles
vias formed by parameter and a number of syntax variations that mess
up the usual parsing.  Corrected an error in the calculation of wire
extensions when wires are given with three coordinates.
2019-07-03 13:58:13 -04:00
Tim Edwards 95ca3d93cc Added the handling of SHAPE statements in NET records in the DEF
file read routine.
2019-07-02 10:48:34 -04:00
Tim Edwards 51b70f6577 Corrected an error in the LEF/DEF geometry reading, because I
discovered that not all LEF/DEF rectangle coordinates are in
canonical order.  Took the opportunity to update the LefError()
routine with an additional argument so that it can separate
errors, warnings, and informational messages, and will correctly
state whether the output is for a LEF or DEF read operation.
2019-06-06 09:59:56 -04:00
Tim Edwards 770a6f4a17 Updated the handling of fixed bounding boxes for abstract views
(once corrected in an experimental branch but never merged).  This
avoids changing the actual bounding box of the cell to match the
LEF bounding box, but defines a property instead and uses that
property for certain functions such as displaying the bounding box
outline or selecting the cell.  This avoids certain related errors
such as the failure to extract connections to areas outside of the
fixed bounding box.
2019-05-06 16:30:29 -04:00
Tim Edwards 1d04f20f5d Moved new work on magic-8.4 (experimental merging of micromagic bplane structure
into magic-8.2) into the newly-reorganized git repo as branch "bplane".
2019-03-22 19:58:47 -04:00
Tim Edwards 5693729ad5 Added code to avoid mishandling negative layer numbers when a
label in a DEF file is on a layer that has not been properly
mapped to a magic layer.  This would apply a negative index to
a TileType bitmask and crash the program.  Also:  Changed the
style and colormap slightly to make the via2 and via4 styles
more visible.
2019-02-14 12:19:50 -05:00
Tim Edwards cbd279d718 Changed behavior of DEF read to flag labels as "sticky" so that the
layer a label is attached to in the DEF file does not get reassigned.
2018-05-17 09:50:55 -04:00
Tim Edwards 8ef32cb8c1 Corrected an error in the DEF read that skips a line if a cell
cannot be found.  This particularly screws up the file parsing
if the "END COMPONENTS" line is skipped.
2018-01-30 10:01:58 -05:00
Tim Edwards 088fc759c4 Set of changes updating version 8.2 to the level of 8.1, since 8.2
development had been halted since it was first created back in April.
Version 8.2 is now the official development version, with the first
development push to create a Cairo graphics interface.
2017-08-01 22:14:42 -04:00
Tim Edwards 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00