Commit Graph

32 Commits

Author SHA1 Message Date
Tim Edwards a75aec4d7c Finally realized the problem came from a quick addition of a TO-DO
item that was never properly validated.  Corrected the root of the
problem, which was an attempt to deallocate memory that had never
been allocated in the first place.
2019-08-20 15:10:45 -04:00
Tim Edwards d5b695fea0 Corrected one other instance of checking for NULL when it should
have checked for CLIENTDEFAULT.
2019-08-20 15:05:30 -04:00
Tim Edwards c360fb9d5a Corrected check on cd_client in CalmaRdcl; if not set for holding
GDS plane data, it is initialized to CLIENTDEFAULT, not NULL.
2019-08-20 14:44:20 -04:00
Tim Edwards d08593997a Cleaned up an inconsistency with GDS read-in that generates
informational output that references a (non-existing) CIF file.
2019-07-23 08:45:42 -04:00
Tim Edwards cd32e39d58 Modified the GDS read routine to account for use of WIDTH in a text
record without a MAG in the PRESENTATION record to override it.
2019-07-16 16:26:56 -04:00
Tim Edwards 70927709c7 Added the capability to read a value from a WIDTH entry for text.
Still not sure how it is supposed to be used, exactly.  Used it
to set a default text size in case a MAG value is missing.
2019-07-16 11:45:10 -04:00
Tim Edwards feac3d94dd Added missing handling of text in GDS input with PRESENTATION
followed by WIDTH (previously it assumed that PRESENTATION and
WIDTH were mutually exclusive).
2019-07-16 10:32:36 -04:00
Tim Edwards 547f0448d9 Cleanup of a number of uninitialized variable issues flagged by
the compiler.  Some are obscure functions (plot verstatec hasn't
been used in years) but others (like SPICE distributed junctions)
are potentially significant sources of unexpected crashes on
systems that don't zero uninitialized memory.
2019-06-07 14:13:50 -04:00
Tim Edwards bbf6008363 Enhancements to cifinput and cifoutput in the tech file: Added
option "labels ... cellid" to handle some vendor files where
apparently to get around the 30-character cell name limit, the
actual cellname is encoded on a text layer.  Added new cifop
"boundary" (no arguments) for cases where a cell abutment box
is encoded on a GDS layer;  this now translates the bounding
box to the FIXED_BBOX property, as is done with the LEF bounding
box.  Also corrected the property set function to free existing
property value allocated memory when overwriting a property with
a new value.
2019-06-05 15:03:51 -04:00
Tim Edwards a56309fdb6 Additional change to CalmaWrite: when handling cellnames with
lengths exceeding the maximum GDS name length (32 characters),
truncate by removing all but the last 32 characters, instead of
the previous behavior which was to remove all but the first 32
characters.  The last 32 characters are far more likely to be
unique than the first 32, given that the usual reason for extra-
long names is the concatentation of hierarchical names.
2019-05-22 17:03:52 -04:00
Tim Edwards 30a2226dbb Corrected a problem in CalmaWrite where a cell that was defined
redundantly was flagged, and output anyway, but the cellname was
not being written to the output, resulting in a bad GDS file.
2019-05-22 16:52:34 -04:00
Tim Edwards 243e9652e5 Added information to the GDS read routine error output to indicate
the byte position of the error.
2019-05-22 16:12:13 -04:00
Tim Edwards ec8ffe7333 Corrected an error in the GDS read routine which attempts to kill
a hash table that was never initialized, if the GDS file input
reader encounters an error in the GDS data.
2019-05-22 14:24:44 -04:00
Tim Edwards 92bf587a46 Fixed an error in the previous commit handling pin labels in GDS
input, which failed to update the "lastLabel" record of the cell
in the case that the placeholder label being deleted was the last
label, leading to labels being lost during GDS input.
2019-03-20 10:07:25 -04:00
Tim Edwards 1533424590 Corrected scaling of label rectangles in GDS (that is, GDS layer
types that have been specified as being ports or text), since the
labels are in the magic database and at a different scale.  Added
code to cope with the fact that the labels may come after the
definition of the rectangle, so a rectangle identified as a port
or text label will generate an empty placeholder label, and all
new labels are checked against any empty labels in the database to
see if they are bounded by them.  If so, then the empty label is
removed and the label point is replaced by the rectangle.  This is
a ridiculously round-about way to deal with an under-specified
file format. . .
2019-03-19 22:25:25 -04:00
Tim Edwards 78666d57e0 Modified the behavior of label handling in GDS input so that a
label specified as having type "space" automatically overrides
the "no-reconnect-labels" flag.  Modified the behavior of the
label reconnect algorithm so that it searches by plane order so
that material on the highest plane that matches the reconnection
criteria is chosen over similar materials on lower planes.
2019-01-31 10:56:38 -05:00
Tim Edwards 17227ee427 Added new option "-hide" to the "lef write" command, which causes
the output to have an obstruction area over the entire cell except
for a keep-out area around each pin.  Instead of marking every
part of the pin geometry, only the "chunk" (largest immediate
rectangle) surrounding the port label is output as part of port
LEF geometry.  This avoids making unnecessarily complicated
abstract views, and makes it easier for other tools to read and
manage the same abstract views.
2018-11-19 15:01:20 -05:00
Tim Edwards f756825828 Removed a few diagnostic output statements from the last commit. 2018-11-16 14:43:41 -05:00
Tim Edwards dd3a92762c Update for writing files from abstract views. Previous behavior was
to prefix all library components read from GDS files pointed to by
an abstract view (other than the cell itself) with a prefix.  But
this does not account for the fact that the same library may be read
by other cells.  The solution is for every cell in the library, check
if there is a cell in magic with the same name which is also an abstract
view that points to the same GDS library.  Those cells do not get
prefixes.  At the same time, however, it was discovered that the GDS
cellname character limit is set at 32, and so prefixes must be kept
short.  To keep the prefixes unique, the prefix was changed to a 4
character random alphanumeric sequence, and a warning is issued if
any GDS cell exceeds the 32 character limit.
2018-11-16 13:59:17 -05:00
Tim Edwards 9eb406ffba Implemented an idea from Staf Verhaegen to have "labels" options
"port" and "noport" in the cifoutput section to distinguish
between layer:purpose pairs for port text vs. other kinds of
text.  This allows a closer correspondence between GDS read and
write.  Note that the port writing is currently only in the GDS
write routine, not in the CIF routine.
2018-09-09 15:09:15 -04:00
Tim Edwards b964f9d33a Corrected a number of errors in the last two commits, as well as
additional functionality for ports in GDS format.  This has been
tested with a techfile encoding pin types on a different purpose
than the metal layer drawing purpose.  The label rectangle is
correctly written to the GDS output as geometry on the pin
purpose layer, and the same layer gets read back in from the GDS
file and translated back into the label rectangle.  Port order
is maintained.
2018-08-27 12:23:10 -04:00
Tim Edwards 5c6bc5db34 Extended the code of the previous commit to include attaching
labels to geometry defined using either the "port" or "text"
options of the "label" statement in a cifinput section.
2018-08-27 11:03:05 -04:00
Tim Edwards 925136c652 Attempt at finishing the support of standard practices to define
geometry attached to a label in GDS using specific layer:purpose
pairs.  The additional code maintains the order of ports when
writing out text to GDS, and attempts to attach geometry to labels
when the geometry is defined on the same layer:purpose pair as
the text, and the cifinput style declares the purpose to be a
port label.
2018-08-27 10:57:51 -04:00
Tim Edwards 404629e49f Added new option "port" for the "labels" statement in cifinput.
This allows text appearing on a specific GDS layer:purpose pair
to be interpreted as a port.  This does not quite match the
intended behavior of such layers, since it is implied that any
layer geometry coincident with the text should form the area of
the port, which is not (yet) handled.  Also, it is presumably
implied that the port order matches the order in which text
appears in the GDS stream, but magic does not preserve this
order when re-writing any GDS output.
2018-08-26 22:36:15 -04:00
Tim Edwards c522acab33 Corrected a minor issue with the database read incorrectly generating
an error message when reading uses from a .mag file.  Also modified
the GDS write routine to provide an error message when an abstract
view points to a GDS file but the GDS file cannot be found.
2018-04-24 09:29:05 -04:00
Tim Edwards 956fefdae2 Extremely useful new GDS compositing feature: Any cell that is
both an abstract view (i.e., comes from a LEF file or otherwise
has been marked with the LEFview property) and a GDS_FILE
property expects to insert the contents of GDS_FILE into the GDS
output stream minus header and trailer, and with all internal
cells renamed by prefixing them with the top-level cell name to
avoid naming conflicts.
2018-04-18 13:57:26 -04:00
Tim Edwards efb1f00879 Preliminary method to record polygons and wire paths with property
records when they are read in into their own subcells using the
cif/gds read options.
2017-10-09 11:51:51 -04:00
Tim Edwards 5ba46da6b9 Corrected custom wire extension handling in GDS file reads. 2017-10-06 22:56:34 -04:00
Tim Edwards 6e066ededa Modified the gds command options to separate "gds path subcell"
from "gds polygon subcell".  Previously both polygons and paths
were put into subcells named polygonXXXXX (substitute numbers
for XXXXX).  Now polygons go into cells named polygonXXXXX and
paths go into cells named pathXXXXX.  This makes it easier to
keep track of the original path.  NOTE:  The path centerline
should be kept as a cell property in this case, and the path
options like endcap style can also be held as properties.  The
polygon boundary should be treated similarly.
2017-10-06 22:32:52 -04:00
Tim Edwards e099dde8d2 Fixed calma custom paths (pathtype 4) so that it doesn't generate
an error message (otherwise it was already being handled correctly).
2017-10-06 16:42:41 -04: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