Commit Graph

75 Commits

Author SHA1 Message Date
Tim Edwards a5e0de031c Corrected the "font measure" line in the wrapper Tcl code from
revision 131, as a Tk default font size less than 10 will round the
scaling factor down to zero and result in bad things happening.
2021-04-06 22:04:53 -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 187c9285e2 Extended the "port" command with option "-quiet" to suppress error
output when using the "port ... index" or "port ... name" to query
values from a specific port by name or index.  The "readspice"
script has been modified to use this option to prevent unnecessary
error output from the script as it searches a layout for possible
name matches to a SPICE netlist subcircuit pin list.
2021-03-29 11:44:39 -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 f790ea7589 More enhancements for schematic_to_layout to parse various
non-circuit content in a SPICE netlist (mainly to ignore test-
bench elements and commands).
2021-03-11 13:30:28 -05:00
Tim Edwards 56be41932f Restored the toolkit behavior of spreading out cells that are
read in from a SPICE netlist in a row instead of placing them
on top of each other.
2021-03-11 12:27:14 -05: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 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 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 c0867ef71e Reverted about half of pull request #41 because it breaks compatibility
with qflow, which wants to launch applications from symbolic links.
The portability of magic now depends only on setting environment
variable CAD_ROOT, but the portability should still be ensured.
2021-02-02 10:19:04 -05:00
Tim Edwards ebb378da08 One additional correction to yesterday's commit, as the 2nd solution
was compatible with CentOS but not OSX.  This solution appears to be
more universally compatible.
2021-01-05 09:30:05 -05:00
Tim Edwards 22c6eb0f2c Changed "realpath" in the scripts (added from a pull request merge
earlier today) to "readlink -f", because "realpath" does not exist
on some systems (e.g., CentOS).  "readlink" seems to be more
universally available.  Noticed that the ext2spice and ext2sim
scripts use /bin/sh instead of /bin/bash, which would cause problems
with some systems where sh != bash.
2021-01-04 14:53:21 -05:00
Tim Edwards 5005f77d3f A few minor changes to the last commit to prevent compiler warnings. 2021-01-04 10:02:15 -05:00
Tim Edwards 20eb6ce6c1 Made a few modifications to the patch from Keno Fischer (pull request
startup.  I'm not sure that it is even possible to have a Tcl variable
set at this point in the startup procedure, though.
2021-01-04 09:47:03 -05:00
Keno Fischer 3e6acd43fd Make bash wrapper relocatable
By having the build system put in a relative path rather
than an absolute path. Unfortunately, make does not support
computing relative paths manually, so a small bash script is
needed that will do this for us.
2021-01-04 09:34:31 -05:00
Keno Fischer 80488a8ee9 Have magic.tcl look for the shared library in the script directory
Rather than having the build process embed an absolute path.
The first of a couple of steps to make the magic build relocatable.
2021-01-04 09:34:31 -05:00
Ahmed Ghazy 4066d50332 Add dependencies on the VERSION file
- this fixes issue where some of the binary objects would contain an
  outdated MAGIC_VERSION if "make clean" was not done after the VERSION
  file changes. (e.g., the "Magic VERSION revision REVISION" message in
  the wish console and the version requirement checks from a tech file)
2021-01-04 14:11:21 +02:00
Tim Edwards 6d009682bc Applied a patch by Matt Guthaus to a routine in the readspice
annotation script, that moves a block of code making a list of
all labels outside of an inner loop where it causes a huge slowdown.
2020-11-12 16:46:51 -05:00
Tim Edwards cd3d765f9d Changed the readspice (annotation) script so that it uses the exact
label name with "port make", resolving any issues that might arise
if the label overlaps another.
2020-11-12 13:59:22 -05:00
Tim Edwards 6d463a20fe Corrected the "suspendall" and "resumeall" Tcl scripts so that they
do not fail when using "magicexec -dnull" (because there are no
layout windows, there is nothing to suspend and resume).
2020-11-06 14:39:10 -05:00
Tim Edwards 06ab6b3a8a Made a change to the way that the parameterized cells are handled.
Instead of a 6-character suffix generated randomly, the 6-character
suffix is generated by a hash algorithm from the device parameters.
If the cell parameters are changed, then the cell itself changes.
If the instance name was default (derived from the cell name) then
the instance name changes accordingly.  The result is that there
cannot be two (auto-)generated cells with the same parameters but
with different cell names.
2020-10-30 11:20:19 -04:00
Tim Edwards 1fe032a79b Changed the readspice script to avoid changing pin direction from
a CDL file unless the existing pin direction is set to "default".
This is consistent with the way the LEF annotation works, as well.
2020-10-27 15:39:12 -04:00
Tim Edwards 4b0652ecc9 Additional change: The switch to propagating DRC errors up from
the bottom in non-interacting areas means that any change in DRC
to a subcell must be handled before checking DRC in the parent.
Previously the order of checks was reversed, moving parent cells
to the beginning of the check list.  This prevents the error cited
in the previous commit which was showing up as a delayed DRC check
when creating parameterized cells.
2020-10-15 20:59:08 -04:00
Tim Edwards 2a4baa82c3 Substantially overhauled the way that the DRC checker finds and
processes "interaction areas".  This should eliminate weirdnesses
where errors will fail to show up in a subcell that does not
interact with paint or other subcells in the top level edit cell.
These errors cannot be reported directly in the top level cell,
but a new error message has been created to direct the user to
check the subcell for errors.  Also:  Modified the toolkit procedures
to force DRC to be run on newly created or modified parameterized
cell layouts.  There is some oddity about the process that causes
DRC errors to be delayed unless a print statement is put before the
DRC check;  I would like to investigate this further.
2020-10-15 17:31:20 -04:00
Tim Edwards 581ad6041b Added new command option "box remove" that removes the cursor box
from the layout window.  The main reason for this is to keep the
box out of the image when doing "plot svg".  The "plot" command was
also modified to always do a plot of the entire cell in the active
layout window if the box is not present.
2020-10-08 13:50:14 -04:00
Tim Edwards 9c1c365a5e Added new command options "port first" and "port next" to make it
easier to scan through a cell's ports.  Used that capability in the
"readspice" script to handle case sensitivity problems, and to find
labels that are not ports and force them to be ports to match the
reference netlist.
2020-09-01 17:16:22 -04:00
Tim Edwards 14251b797f Corrected readspice.tcl script to ignore CDL parameters in the
subcircuit I/O list, and to not fail with an error if something
in the PININFO line cannot be found in the layout (just prints
an error message instead).
2020-06-30 18:05:12 -04:00
Tim Edwards 6812e7cd10 Modified readspice to support the CDL "*.PININFO" line for annotating
layouts with pin class (direction) from CDL files.
2020-06-29 21:13:57 -04:00
Tim Edwards eab0fe770d Corrected the readspice script to treat the input line as a string
and not a character list when checking the first character of a
SPICE netlist for a comment or continuation character.
2020-06-27 21:46:53 -04:00
Tim Edwards 336a7aa209 Added missing close-bracket in the readspice script, and corrected
a diagnostic error output in the port command.
2020-05-29 17:13:38 -04:00
Tim Edwards 4ad7ce3cf4 Modified LEF read and write to preserve macro PROPERTY lines. This
probably needs revisiting, because "lef write" and "lef writeall"
need handling to generate the PROPERTYDEFINITIONS block for the
PROPERTY entries to be correct.
2020-05-29 14:31:48 -04:00
Tim Edwards bf061f0012 Additional change to readspice script to handle various issues with
pins not matching between netlist and layout due to delimiter changes
or case sensitivity.
2020-05-29 11:55:30 -04:00
Tim Edwards 0b17bcdb86 Try again without confusing Tcl and python syntax. . . 2020-05-29 11:27:16 -04:00
Tim Edwards c16ae32e70 Correct readspice script to close the file after reading. 2020-05-29 11:25:13 -04:00
Tim Edwards 9522e0e9dd Added CDL to the types of file extensions checked by the readspice script. 2020-05-29 11:23:39 -04:00
Tim Edwards 0eada90eab Corrected the readspice.tcl routine to correctly handle input
without filename extensions.
2020-05-29 11:19:37 -04:00
Tim Edwards 53a488989f Moved the read-in of the readspice script from the wrapper to the
startup file, since the script is not (and should not be) wrapper-
dependent.
2020-05-28 12:40:28 -04:00
Tim Edwards 626a6355ae Added a Tcl scripted command "readspice" that can be used to read
SPICE subcircuit definitions from a netlist file and apply the port
order in the netlist to the port labels in the corresponding cell
or cells in the magic database.  Also:  Corrected an error in the
bloat-all code introduced in a recent commit that can cause a
segfault.
2020-05-28 11:46:57 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim 'mithro' Ansell b28d10f80d Convert $Id$ placeholders to $Header$ placeholders. 2020-05-23 17:00:38 -04:00
Tim 'mithro' Ansell a5f050ce21 Convert expanded $Id:XXXXX$ values back to placeholder $Id$ 2020-05-23 17:00:38 -04:00
Tim Edwards fe727cc6f2 Found that the "crash save" command in tools.tcl also disrupts
redirected command-line entry from the layout window;  fixed.
2020-03-23 11:52:31 -04:00
Tim Edwards 7ec87864a6 Corrected the "save" ("writeall") command, which after the fixes of
the last couple of days, was left in a state where it keeps appending
".mag" to the filename if "save" or "writeall" is executed more than
once in the same edit session.  Also, added ext2sim.sh and ext2spice.sh
to the CLEANS list in tcltk, and added both to .gitignore so they are
not tracked.  Removed them from git to stop the current tracking.
2020-03-23 10:19:34 -04:00
Tim Edwards 80fa495103 Removed the Depend files, which were being tracked with .gitignore
pointing to Depend instead of */Depend.
2020-03-13 15:39:08 -04:00
Tim Edwards 612251b2b0 Changed the PNG bitmaps to GIF, because PNG is not supported in
Tcl/Tk 8.5, which is still installed and considered current/stable
on a lot of systems.
2020-02-26 10:10:55 -05:00
Tim Edwards 6049b7e00e Further dealing with retinal displays: The scrollbars and related glyphs
now scale with Opts(scale), which is a zoom scalefactor (default 1), and
Opts(toolscale) sets an independent sizing for the toolbar icons, which is
multiplied by the Opts(scale) scalefactor.  Also:  Added GR_LIBS to the
link options for magicexec and magicdnull, to avoid compile-time problems
on some systems (thank you to Charlene of OpenBSD for the patch!).
2020-02-17 16:51:30 -05:00
Tim Edwards 2572421162 Added new option setting Opts(toolsize) that makes the toolbar icons
scale with the given size (default 16).  This can be put in the site.def
or .magicrc file as, e.g., "set Opts(toolsize) 32".  This is the first
part of an attempt to get everything to scale properly on ultra-high-
resolution monitors.
2020-02-17 15:13:54 -05:00
Tim Edwards 715843ca2a Changed the script drc.tcl into two routines for DRC load and save,
and merged the contents into drcmgr.tcl, with a new button in the
DRC manager for saving the DRC contents.  Loading is somewhat less
useful since the DRC error tiles are interactive.  The DRC manager
still has the issue that every checked edge becomes a separate
entry;  this is an artifact of the way the DRC checker works, but
it creates large numbers of error areas, many of which are redundant.
2020-02-17 10:25:45 -05:00