Commit Graph

86 Commits

Author SHA1 Message Date
Tim Edwards f45f3c96e5 Updated version to go along with the merge of pull requests 175 and 176
(OpenBSD/NetBSD/DragonFly support), and a change to the wrapper to allow
manual override of the number of icon columns (because sometimes some
window managers are clueless about the correct window dimensions).
2022-08-22 12:20:59 -04:00
Tim Edwards c997f4cccf Modified the configure script and Makefiles so that systems that do
not include zlib by default will pick it up from the compile line.
2022-05-28 17:51:20 -04:00
Tim Edwards f760b038d6 Updated VERSION to go along with the merge of pull requests 160
and 161 from Donn, and modified one of the files from PR 161 to
maintain typographic consistency.
2022-05-03 08:32:00 -04:00
Mohamed Gaber 9bf3d76260 Mac Build Fixes
+ Add "smoke test" build CI to Github Actions
+ Added a configure_mac script (requires brew)
~ caddr_t -> void* (was never a part of any UNIX standard)
2022-05-03 08:30:39 -04:00
Donn 2820aa49e2 Add AppImage Building Capabilities
(Take two)

+ Adds a GitHub Actions flow that builds an AppImage (see AppImages.org) that can produce a monolithic magic binary
~ Fix a portability issue in tcltk/magic.sh.in

This binary should theoretically work on any Linux distro with Glibc 2.3+ and Cairo 1.8+, which is any up to date distro in the last decade.
2022-05-03 08:28:53 -04:00
Tim Edwards e675decfc0 Cleaned up a bunch of stuff around "magicdnull", starting with not
linking it to Tk or X11 graphics.  Added new command "display" which
returns the display type, which is good for finding out if the
display is "NULL".  Added code to allow the wrapper to be defined
for NULL graphics with the Tk console, the main necessities of which
are to remove the "openwrapper" command, and to return immediately
from a number of tag callback functions.
2022-03-30 10:55:08 -04:00
Tim Edwards bae5d9cd06 Added a command-line option "magic --commit" which provides the commit
number from the git repository, which is overall more reliable than
the version number, but mainly to support a common method across the
open source tools for providing information to builds like open_pdks
that may need to know what version of every tool was used for the
build.
2022-02-25 09:56:22 -05:00
Tim Edwards 021e9b5eec Modified the print routines so that TxPrintf and certain uses of
Tcl_SetResult() will backslash-escape "$" characters occurring in
names (e.g., cell and net names) when the "$" does not represent
a Tcl variable.
2021-11-24 12:40:59 -05:00
Sai Charan Lanka b099b17178 Create techbuilder.tcl 2021-08-28 12:58:58 -04:00
Sai Charan Lanka e7bc994224 Delete techbuilder.tcl 2021-08-28 12:58:58 -04:00
Sai Charan Lanka 6b646fd103 Update techbuilder.tcl 2021-08-28 12:58:58 -04:00
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