Commit Graph

28 Commits

Author SHA1 Message Date
Darryl L. Miles d55a2b74ac header file #ifndef guard namespace consistency (global change)
This add an effective namespace prefix to the guard ifndef
2025-07-29 10:50:32 -04:00
Darryl Miles bf96348502 printf: vararg functions use 'const' for format string 2025-01-03 09:08:14 +00:00
Darryl Miles 94ec5cf98f printf: use compiler __attribute__((format (printf,fff,aaa))) 2025-01-03 09:08:14 +00:00
Darryl L. Miles d79533a255 K&R calma: move internal prototypes and typedef to calmaInt.h
K&R obsolete syntax removal for C23 compatibility series
2024-12-26 12:44:50 -05:00
Darryl L. Miles 979c810c38 K&R calma: missing HAVE_ZLIB ifdef around function using type gzFile
K&R obsolete syntax removal for C23 compatibility series
2024-12-26 12:44:50 -05:00
Darryl L. Miles 40b317979d K&R calma.h: conversion to ANSI
K&R obsolete syntax removal for C23 compatibility series
2024-12-26 12:44:50 -05:00
Tim Edwards 36fa9aabd1 Implemented a new command option "gds magscale" to reinterpret the
meaning of the MAG record in GDS files.  Most available GDS
documentation is decidedly vague about what MAG means.  Most
layout tools seem to interpret a MAG of 1 as corresponding to a
text height of 1um.  However, there are a few tools that
interpret it as 1 centimicron, and there's no reason to assume
that any given interpretation is correct.  "gds magscale" allows
the scale to be redefined.
2023-07-19 20:33:01 -04:00
Johan Euphrosine 96eb275622 quick and dirty emscripten port 2023-07-12 00:31:37 +09: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 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 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
Alessandro De Laurenzis b306a39560 Compatibility with C99 standard
This commit makes the code (mostly) C99-compatible, enabling to compile
it without the -Wno-error=implicit-function-declaration flag. This
way, Magic becomes usable on arm64 architectures, specifically on Apple
computers with M1/M2 SoC.
2022-10-29 06:07:46 +02:00
Tim Edwards 0c38707542 A number of other corrections around CalmaFullDump, which had
mistakenly recast the input file routines from zlib back to stdio;
only the output file routines should have been changed.
2022-05-12 09:55:38 -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 93c4503fa8 Refined the new "gds maskhints" command option for GDS input from
yesterday's commit to allow the syntax "gds maskhints <types>", in
which mask hints can be restricted to a specific list of layers
rather than all layers which define mask hints in the cifoutput
rule.
2022-01-21 14:48:59 -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 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 7dfe407787 Implemented a return value for the cell read-in checks with an option
to stop the search whenever a cell is not found.  Used this to implement
a new option for GDS writes, "gds undefined allow|disallow" (default
"disallow") controls whether or not GDS with undefined references will
be allowed to be written.  Similarly affects CIF and LEF writes, extraction,
and DRC (when running "drc check" from the top).
2021-01-14 15:21:39 -05:00
Tim Edwards bcc7b3d06d Added an option "gds flatglob [<string>|none]" that allows flattening
of input cells on a per-cellname basis, using glob-style pattern
matching.  This is probably the best way to deal with 3rd-party vendor
GDS with unfortunate practices like dividing devices up among cells in
a hierarchy, even though it comes across as a bit of a hack solution.
2020-12-22 14:44:30 -05:00
Tim Edwards 5755e0bcfd Added "gds" command option "gds nodatestamp [true|false]". Set to
true, this will force the "gds write" command to write out creation
date stamps as zero.  This is very useful for avoiding changing the
contents of an otherwise-unchanged layout, especially if it is in
a git repository where it will force the entire file to be replaced.
2020-12-15 14:52:30 -05:00
Tim Edwards 1c82265244 Several enhancements: (1) Added command option "gds no_duplicates"
to allow a "gds read" command to ignore cells in the GDS which already
exist in memory.  This allows magic to be "pre-seeded" with specific
views of cells in the GDS.  Default is false, which is backwards-
compatble behavior.  (2) Changed the behavior of the the way the use
path is written to and read from a .mag file, checking the path prefix
against Tcl variables PDK_PATH, PDKPATH, PDK_ROOT, and PDKROOT, and
replacing any such leading path component with the variable name.
On reading a .mag file, any variable name at the start of the path
that matches a Tcl variable will be substituted.
2020-12-04 16:56:51 -05:00
Tim Edwards c0015efbe0 Added experimental "calma addendum" option to output only references
to readonly cells but not the readonly cells themselves when writing
a GDS library.
2020-10-13 09:47:54 -04:00
Tim Edwards 838c9b840d Added a "calma library" command option, to generate a GDS library
from the subcircuits of a top-level layout without also writing the
top level.
2020-07-16 08:55:46 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -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 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 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00