Commit Graph

48 Commits

Author SHA1 Message Date
R. Timothy Edwards 99a5a28a3e Added a drc check to the gencell change procedure, as it appears
that otherwise DRC is not re-checked after a gencell update.  It
is not clear to me why checks are not done otherwise.
2025-10-28 15:10:03 -04:00
R. Timothy Edwards d6d8620a7c Added new statements "connect" and "disconnect" to the extract
section of the tech file, which can be used to alter the layer
connectivity tables from the default.  This can be used, for
example, to disconnect substrate and well from taps, to
generate a netlist that checks for soft-connect errors.
2025-10-06 11:50:38 -04:00
R. Timothy Edwards b1c7b52ed2 Modified "gds flatglob" to have the value "*_CDNS_*" by default,
since this is a common artifact of foundry cells and almost
always incompatible with magic.  Modified the "port" command to
allow "port make <index>" on a label where other labels of the
same text already have the same index.  Removed deprecated
documentation and added some missing documentation, such as an
explanation of the "ext2spice subcircuit auto" option.
2025-09-26 09:18:43 -04:00
R. Timothy Edwards 741216d6f3 Added a new command "archive" that works roughly like the "crash"
command, but with some critical differences, since the "crash"
command is designed for crash backups.  "crash" will save in a
temp file and removes the file after a successful recovery.
"archive" can be used at any time to make a complete snapshot of
a layout in a single file, or to read back that snapshot.
There is a "writeall" option that will make a snapshot including
layout of all read-only (PDK) cells.
2025-09-10 12:40:40 -04:00
R. Timothy Edwards b1095b323c Added a command option for "select move" without specifying the
X and Y values, in which case the selection is moved to the
current pointer position.  This allows a different implementation
of the "copy" command as "select move; select keep", which avoids
the problem that "copy" has of modifying the selection with layer
interactions with the existing layout.
2025-08-27 09:57:22 -04:00
R. Timothy Edwards 4084a6a246 Modified the syntax of the "getcell" command to make the
arguments unambiguous, and to allow coordinates to be given in
any units.  To do this, the (seldom if ever used) passing of a
label as a reference point was changed to require the "label"
keyword before the label name, avoiding the code having to
disambiguate arguments from label text.  This now makes it
possible to specify the coordinates in microns, lambda, etc.,
units.
2025-08-15 10:24:31 -04:00
Tim Edwards 7960020f7c Updated the HTML documentation on the "wire" command to add the
new syntax implemented earlier today that preserves interactive
wiring moves when logging commands.
2025-02-22 21:00:04 -05:00
Darryl L. Miles b1a9e10be7 feat: quit [exit_status], option support
Affecting process exit status.
2025-01-07 13:58:45 -05:00
Darryl L. Miles faadb774b4 docs: quit -noprompt
Was looking to implement this feature and found it was already
implemented but is a secret feature.

Updated documentation and modified implementation so it is possible
a user can discover the feature via usage such as "quit -help -invalid"
like other commands.
2025-01-07 13:58:45 -05:00
Darryl L. Miles b694827bcb feat: flush [-noprompt], option support 2025-01-07 13:58:45 -05:00
Tim Edwards de5c54e20b Added a missing description of the "flatten" property, which is
documented briefly in the "flatten" command reference page, but
no in the "property" command reference page.
2024-10-09 20:34:08 -04:00
Tim Edwards f0c3ec33d6 Modified the "lef nocheck" command to take the argument "*", meaning
that no nets will be checked for antenna gate and diffusion area,
and no antenna properties will be output to the LEF file.  This can
greatly speed up LEF output file generation for a large design.
Thank you to Tamas Hubai for the code patch.
2024-05-11 20:48:35 -04:00
Tim Edwards a816da60f9 Updated the HTML command reference files to refer to magic version 8.3,
since all of the title images still had 8.2, and the title text still
said 7.3 or 7.4, having not been updated for a long time.
2024-01-09 16:37:00 -05:00
Tim Edwards 68d6632836 Documented the "def write -anal" command option, which had
previously been implemented without being documented.
2023-09-22 16:31:36 -04:00
Tim Edwards 93eeb1b703 Documented the "extract halo" command option (which was missed at
the time the option was implemented), and also implemented (and
documented!) a similar command option "extract stepsize" for
reporting or changing the extraction step size.
2023-09-13 10:03:20 -04:00
Tim Edwards 2aab645308 Discovered an error in region and net selection that can cause
unrelated nets to be captured in the same selection, due to the
use of the label bounding box instead of the label rectangle.
The bounding box is used for display only and should not be used
for connectivity.
2023-07-29 20:36:46 -04: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
Tim Edwards 7a4a867d6e Extended the "paint" and "erase" commands to accept an option
"pick x y" which acts like "cursor", but operates on a database
coordinate instead of a pointer coordinate.  Made a few other
corrections to the command logging code so that it produces
valid output when the log file is sourced.
2023-07-08 17:34:00 -04:00
Tim Edwards 3890181ebe Completed the small set of command extensions to make sure all
commands that make use of the pointer position have an equivalent
command that operates solely on layout coordinates, or otherwise
avoids needing a pointer position.  Added the command option
"down <instance>" to avoid using the pointer to disambiguate
selections.  Added the command option "select ... at x y" to
do paint or cell selections at a specific coordinate instead of
the pointer position.
2023-07-08 13:59:00 -04:00
Tim Edwards d3b314d877 Corrected an error in the previous commit. Implemented a new form
of the "edit" command that takes an instance name as an argument.
This is the first of a small series of command extensions to
provide the capability to replace any command that is dependent on
the pointer position with an equivalent command that is not, for
the purpose of removing pointer and screen coordinate dependencies
from the log file created by "logcommands".
2023-07-08 12:47:09 -04:00
Tim Edwards cc4eef4eb1 Added a (obvious, in retrospect) additional automatic handling of
nets to be avoided for running antenna gate and diffusion area
checks when doing "lef write", which is to check if the pin of
the net is flagged with use "power" or use "ground".  This avoids
the need to use the (recently added) "lef nocheck" option (although
that still exists as an additional way to control which nets do and
do not get checked).
2023-07-05 12:37:56 -04:00
Tim Edwards c8a2d06e08 Finally got around to fixing the "logcommands" command, which has
been broken ever since moving to the Tcl/Tk wrapped version.  Added
some new features that allow background commands from the window
handling (like pointer tracking) to be omitted from the log file
via a suspend/resume function.  Added a header file and a few
commands at the top of the log file that align the log file contents
with the screen and box state at the start of logging.  This makes
a log file which can be "played back" by sourcing it from the magic
console prompt.  Per request from Harald Pretl.
2023-06-28 21:31:24 -04:00
Tim Edwards 3ae24e8a8c Extended the method of the previous commit to include the command
option "drc find <text>", to find the next error of a specific
type based on the contents of the DRC error message (e.g.,
"drc find li.1").
2023-06-26 21:17:51 -04:00
Tim Edwards 60a378842f Corrected one array overrun error caused by using the command
"drc printrules".  Implemented a new "drc" command option called
"drc ignore", which can be used to suppress reporting of specific
rules, for both "drc why" and "drc find".  This can help with
finding an error buried among a large number of other errors.
2023-06-26 20:47:37 -04:00
Tim Edwards 482d7534a2 Reimplemented the "extract do local" option as "extract path <name>"
with "extract do local" now being equivalent to "extract path .".
This allows extraction files to be put in a subdirectory and not
clog up the current working directory.  Also:  Fixed some behavior
around the use of "ext2spice -p <path>" so that it (1) works, and
(2) is compatible with the new "extract path".  Since the ext2spice
and ext2sim commands are effectively independent of the primary
extraction, the "-p" option is needed to correspond to the use of
"extract path".  Hopefully this is seen as only a minor inconvenience.
2023-06-14 13:55:59 -04:00
Tim Edwards c077e1acef Removed from the "lef" HTML document some mentions of property names
that aren't actually handled by the "lef write" command.  The three
mentions are "LEFsource", "LEFuse", and "LEFshape", all of which
refer to names of pin properties, not macro properties.  These
mentions were probably left over from early work.
2023-03-13 10:18:17 -04: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 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 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 3d1cf5aa2e Updated the documenation on the "load" command to include the
"-silent" option and the redefinition of "-quiet".
2022-12-19 11:25:09 -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 fb091fa03f Revised the string array for labels during output of a .mag file
from 256 to 2048.  The latter matches the maximum array used for
DEF file labels, although allocation is probably preferable.
2022-11-30 20:25: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
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 f7df5e7c86 Added an option to "def read" to avoid creating obstructions from
"BLOCKAGES" statements.
2022-06-24 15:22:53 -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 468a8ae0be Added a 2nd use of the "device" property, which has long been needed,
which instead of defining a device or subcircuit that exists inside
the cell, instead redefines the cell itself as a device or subcircuit
model that exists in the PDK.  This is used where a specific layout
subcell has its own associated device definition in the PDK.  Instead
of the "device" property value being the line that gets generated for
a device in the subcells .ext file, the property value should be the
word "primitive" optionally followed by any parameters that need to
be passed to the subcircuit call.
2022-05-04 16:43:38 -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 82695d981d Updated the command reference for the "def" command and the new
"display" command.
2022-03-30 17:32:29 -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 5dd0c97dce Modified the "writeall" command to (1) raise an error message when
"writeall force <cell>" is used but <cell> doesn't exist, and (2)
to add options "writeall modified" and "writeall noupdate" (which
may or may not be useful).
2022-01-21 17:43:04 -05: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 97441bc07a Extended the GDS timestamp handling to GDS input. Unlike former
behavior, in which all cells read from GDS are given a zero
timestamp, and the timestamp is set when the file is written to
disk, the default behavior now is to set the layout cell's timestamp
from the timestamp provided in the GDS (the creation date timestamp,
specifically).  The same command "gds datestamp" implemented in the
previous commit for GDS writes now also applies to GDS reads:  If
set to "no", then the timestamp value from the GDS file is
transferred to the layout view (default behavior);  if set to "yes",
then the timestamp is set to zero (legacy behavior).  If set to
a value, then the value is used as the timestamp.
2022-01-21 13:05:24 -05:00
Tim Edwards 09577b5636 Updated all of the documentation by copying back from the website.
The website documentation now points to these contents in a clone
of the repository on opencircuitdesign.com, so all future edits of
the command-line documentation will be made directly to the git
repository.  Also:  Changed the precision of box values printed in
microns from 2 to 3 digits after the decimal place, so that 5 nanometer
grids do not get values clipped in the output.
2022-01-21 10:44:13 -05:00
Tim Edwards da7cc2096d Missed a number of Makefiles in directories two levels down. 2020-01-28 13:10:31 -05:00
Alex Coffin 8e6f770afa
Fixed typo 2020-01-13 05:29:20 -08: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