How To Install Magic Vlsi In Windows 7
Compile and Install Instructions for Magic
Table of Contents
Magic Compile and Install From Source
Magic Precompiled Packages Installation
Windows Version Installation
Debugging Runtime Bug
Compiling and Installing Magic From Source
While it is truthful that most people want to install and run an executable "out-of-the-box," without worrying virtually compiling, it is also true that EDA tools are complicated, require a lot of care and maintenance, and usually piece of work best when compiled from the original source code. The developers go to slap-up lengths to make sure that the source code will compile on various systems without trouble.In the electric current (8.3) distribution, compile and install instructions can exist found in the INSTALL file in the top-level directory of the source distribution.
In releases prior to vii.4, see the file README.Tcl in the source distribution for complete instructions on compiling the Tcl/Tk-based version of magic.
For the impatient, the general rule is:
Support for the interactive script "make config" is deprecated; use the GNU autoconf script. The "make config" pick was completely removed from version 7.four. Also since version seven.4, the final output of "configure" reports the condition of cardinal requirements, and suggests what might demand to exist done to correct bug with primal requirements non being establish. More detailed information on solving configuration problems tin can be establish below.
% ./configure % make % make install Word of warning: Some of the compile-fourth dimension scripts are not thread-safe, and so exercise Non use, e.one thousand., "-j4" or "-j8" as an pick to "brand", or else some of the automatically generated files can get screwed up. Magic is written in plain C, and then the compile time is very fast even equally a single thread process.
Organisation Requirements
These comments were helpfully provided by Jason Schonberg, January 2010. Although specifically for Ubuntu Linux, they provide a skilful summary of the packages required on all systems. Different distributions of Linux may or may not come with all of the following packages, and missing ones will demand to be installed.Updated October 2018. The reference to BLT has long been deprecated since near BLT functions were captivated into the Tk distribution. Added the package dependency for the Cairo graphics parcel (for magic-viii.ii).
In lodge to compile Magic on a vanilla installation of Ubuntu, the following boosted packages are needed (at a minimum):If you wish to have the Tcl/Tk wrapper around magic (recommended) y'all volition need to install the Tcl/Tk libraries. Version 8.5 or higher is highly recommended.
- M4 preprocessor
- $ sudo apt-get install m4
- tcsh shell
- $ sudo apt-get install tcsh
- csh beat out (note that Ubuntu has unlike csh and tcsh)
- $ sudo apt-become install csh
- Xlib.h
- $ sudo apt-go install libx11-dev
The best graphics for Magic is the OpenGL interface ("magic -d OGL"), but since that is problematic for off-screen rendering on many systems, a good alternative is the Cairo graphics interface ("magic -d XR"). This is optional, but if you desire to employ it, you need the Cairo library development package:
- Tcl/Tk
- $ sudo apt-get install tcl-dev tk-dev
The OpenGL interface itself may need these dependencies:
- Cairo
- $ sudo apt-get install libcairo2-dev
For the non-Tcl/Tk version only: The readline source makes reference to the `tputs` function which is provided past the ncurses library. Although the ncurses library is installed in Ubuntu, the include files to build against it are not, and then the development version is required.
- OpenGL
- $ sudo apt-get install mesa-common-dev libglu1-mesa-dev
- ncurses
- $ sudo apt-get install libncurses-dev
GNU Autoconf Compilation: Hints for "configure"
Compile-fourth dimension options tin be queried by doing "configure --help". The major options, which one might take reason to invoke, are as follows:
- --assistance
- List all of the compile-fourth dimension options.
- --prefix= DIR
- Set the install destination to directory path DIR. The default installation destination is /usr/local. Magic will exist installed in various subdirectories of the prefix, such as /bin for executables and /lib for run-time files (technology files, startup scripts, display settings, etc.). This is specially useful to install magic in a local directory to avoid requiring root privileges to install, or to install a test version of a new release of magic which won't disharmonize with whatever existing installed versions.
- --libdir= DIR
- Specify the install location of run-time files. On systems where the run-time files and the executables accept the aforementioned root directory ${prefix}, ${libdir} is ${prefix}/lib and exectutables are installed int ${prefix}/bin. When runtime files are to be installed somewhere else, for instance, /usr/share in some distributions, ${libdir} must be prepare with this switch.
- --with-interpreter= TYPE
- Compile magic with an interpreter. Possible values of TYPE are tcl, scheme, or no. The default compilation is to utilize Tcl/Tk if found, or no interpreter otherwise. Use this option only to force a non-Tcl-based compile. Generally, the Tcl/Tk-based version is preferred, due to the large number of enhancements available nether the TCL version (such as the GUI frontend).
- --with-distdir= DIR
- Specify an install location that is different from where magic volition be at run-fourth dimension. That is, if magic is going to be installed to a local filesystem and then distributed to some other filesystem, say through an NFS mount, then --with-prefix= should point to the path of magic as information technology is seen at run-fourth dimension on the machines where it has been distributed, while --with-distir= should point to the location where it will exist installed on the local machine where it is being compiled.
Some systems may see trouble with the TCL interpreter, OpenGL, Cairo, or X11 if they are installed in unusual places. The autoconf script goes to great lengths to detect them, but in case of failure, the location of files may be specified explicitly by passing an argument to autoconf.
- --with-tcl= DIR
- One of the well-nigh likely issues with configure is the inability to discover Tcl/Tk libraries and/or header files. Normally this is due to having an executable-merely version of Tcl/Tk (libraries but no header files), merely it can also be due to having Tcl/Tk installed in an unexpected place. If header files are nonexistant, the solution is either to install them, or to compile the latest version of Tcl/Tk from source. Otherwise, if header files and libraries exist, so use the option above with DIR pointing to the directory containing the file tclConfig.sh.
- --with-tk= DIR
- Specifies the path to find the file tkConfig.sh. This is likely to be necessary if you demand to use the --with-tcl= option.
- --with-opengl= DIR
- OpenGL capability is a runtime pick. Magic defaults to the X11 interface; enable the OpenGL graphics by specifying "-d OGL" on the command line at runtime. This pick is preferred when OpenGL libraries are available on systems with fast graphics and a hardware implementation of OpenGL on the video card. It is not recommended on systems running a software emulation of OpenGL calls, such as Mesa GL in conjunction with an unsupported video bill of fare. There is no reason not to compile in OpenGL support, and so it is enabled by default. If the OpenGL libraries and/or header files cannot be found, they may need to be downloaded from the video card vendor. If they exist but are in a non-standard location, the location of the header files tin can be specified by DIR.
- --with-cairo= DIR
- Cairo second rendered graphics capability is a runtime option. Magic defaults to the X11 interface; enable the Cairo graphics by specifying "-d CAIRO" or "-d XR" on the command line at runtime. This option is preferred when Cairo libraries are bachelor on systems with fast graphics and vido card hardware acceleration. There is no reason not to compile in Cairo support, and then information technology is enabled by default. If the Cairo libraries and/or header files cannot exist constitute, they may need to exist downloaded from the video card vendor. If they be but are in a non-standard location, the location of the header files tin be specified by DIR.
- --x-libraries= DIR
- Specifies the path to detect the X11 library files (e.g., libX11.so and then forth). This is usually non necessary merely some platforms may put the X11 in an unexpected identify. If so, it may as well be necessary to specify --x-includes= DIR to point to the directory where X11 header files can be found.
- --disable-locking
- Disallow file locking for multiple-user environments (used with magic version 7.4). Magic seven.4 has a simplified file locking mechanism that does not create directories and files, only uses the fcntl advisory lock system. Nonetheless, each locked file must remain open up, and it is possible that some platforms may non allow enough open up file descriptors, causing magic to exist unable to open layout files. Should this happen, magic tin exist recompiled with file locking disabled.
- --enable-framebuffer-backing-store
- Commonly OpenGL uses Tk pixmaps for managing backing store (graphics acceleration through saving and copying the screen epitome). Implementations of OpenGL that do non allow direct rendering to off-screen targets will require this to be enabled. If the cursor box doesn't erase just keeps getting drawn multiple times on the screen every bit it is moved around (in OpenGL graphics mode), then you need to enable this option.
- --enable-cairo-offscreen
- Usually if off-screen rendering doesn't piece of work for the bankroll store (see above), then the generation of the layer images on the buttons in the GUI window doesn't piece of work, either. If magic exits with an X11 server "Bad Drawable" error, then this needs to be enabled (and the Cairo libraries and include files demand to be installed on the system).
- --disable-client-render
- Disable customer-side rendering, when OpenGL has been selected equally an optional graphics package. Some video drivers may not handle server-side rendering correctly, although this is pretty rare.
All of the optional modules in magic can exist enabled or disabled by individual switches on the command line. Normally, these should be left lone.
- --enable-locking
- Allow file locking for multiple-user environments (used with magic versions other than vii.4). File locking allows layout databases to be accessed past multiple users. Only ane user at a fourth dimension may edit a layout file, preventing accidental overwrites. Because having this option turned on allows magic to create new directories for lock files, it is disabled past default. Even so, even with the choice enabled, magic cannot create new directories unless a system-level directory "/usr/local/flock" has been created (it is non created past the install procedure). This directory must be world-writable.
- --disable-readline
- Disable the "readline" package. Note that the Tcl-based version of magic does not utilize "readline", so this pick has no effect unless compiling with either the SCHEME interpreter or no interpreter.
- --disable-threads
- Disable the apply of POSIX threads (pthreads) with the X11 graphics interface. This reverts back to the use of a forked "helper" plan to capture graphics calls. This is unlikely to be necessary unless there is some suspicion of a thread-related lock-upwards.
- --disable-nonmanhattan
- Disable the non-Manhattan geometry extensions.
- --disable-calma
- Disable the GDS module. In that location is no reason to practice this.
- --disable-cif
- Disable the CIF module. Notation that this volition also disable the GDS module, which depends on it. So at that place is no reason to do this, either.
- --disable-lef
- Disable the LEF/DEF format module.
- --disable-plot
- Disable the plot module.
- --disable-route
- Disable the various router modules (these can not be enabled or disabled individually).
- --disable-rsim
- Disable the IRSIM interface. Notation that the Tcl-based version of magic interfaces with IRSIM through the interpreter, so this option has no effect unless compiling with the SCHEME interpreter or no interpreter.
- --disable-new-macros
- Disable the use of the new macros, reverting back to the macros used past magic versions half dozen.5 and earlier. Veteran users of Magic may prefer the older macros. The newer macro gear up, adult by Philippe Pouliquen, makes utilize of the keypad and cursor keys for directional actions such as "motility" and "stretch". The older macro set mapped the keys "QWER" to directions.
For even more obscure options which may event compilation on peculiar systems, refer to the text dump from "configure --help".Note that distributions which require the use of "--libdir= DIR" may besides need to use the equivalent "--mandir= DIR" to point to the manual pages directory. "--bindir= DIR" tin can be set likewise. However, if all three switches are used, then "prefix" no longer has whatsoever meaning, since its merely utilise is to define the default values of libdir, mandir, and bindir.
Distribution Maintainers: Those maintainers who wish to compile in the so-called "sandbox" can do (as of Magic distribution version 7.4.six and development version vii.5.four):./configure [options]This procedure will install everything into the specified directory tree rooted at staging_area, without breaking the hard-coded links to run-time files. To run Magic from the staging area, either chroot to the staging expanse directory, or set
brand
brand DESTDIR= staging_area installsetenv CAD_ROOT staging_area / libdirwhere libdir is, by default prefix /lib, unless otherwised specified in the configure options, and prefix is by default /usr/local unless otherwise specified in the configure options.A Note about Autoconf: The bodily autoconf script is in the subdirectory scripts, just there is a tiptop-level beat script wrapper called configure that invokes scripts/configure. Office of the purpose of the wrapper script is to allow much of the useless cruft that has to accompany the GNU autoconf files to be stuffed in an out-of-the-manner subdirectory. The other is to set up the CFLAGS surround variable, so that the optimizer flag can exist removed. Magic may run marginally faster with compile-time optimization; if you wish to enable it, and then yous may add "-O2" to CFLAGS in the height-level "configure" shell script. All the same, please annotation that optimized executables are very difficult to debug should something get incorrect with the plan during run-time.
A Note about Tcl/Tk: Compilation under Tcl/Tk is probably both the well-nigh mutual option and the most problematic. A number of standard OS distributions exercise non come up with all the bits and pieces necessary to compile a Tcl/Tk extension. If this is the case, and then you will see this when you exercise configure when information technology says:
checking for tclConfig.sh... no.Assuming that you lot really, really desire the Tcl version of magic (and in my stance, you really, really do), your best bet is to download, compile, and install new versions of Tcl and Tk. This is pretty straightforward. Get the latest version from the Tcl/Tk Developers Substitution (click on the download link up near the top). Ane important affair to know when compiling your own: The executables for "tclsh" and "wish" volition be installed equally "tclsh8.iv" and "wish8.4" (or whatever is the electric current version number). "wish" is disquisitional, considering magic uses it. You will need to rename or remove any existing executable for wish, and and so either rename "wish8.4" to "wish" or else create a symbolic link "ln -s wish8.4 wish" (preferred).For example, I had a RedHat system which came with Tcl/Tk 8.0 installed in /usr/bin/. Compiled from source, Tcl/Tk viii.4 installed by default in /usr/local/bin/. I changed "/usr/bin/wish" to "/usr/bin/wish8.0" and changed "/usr/local/bin/wish8.four" to "/usr/local/bin/wish" (hmm, did I simply say "preferred"?).
Note that Magic version vii.two compiled with Tcl makes employ of the optional Tcl/Tk parcel "BLT". Magic will run fine without it (information technology detects its absenteeism and works effectually it), but if you don't have information technology, you'll miss the "jail cell manager" widget with the hierarchical cell view. BLT can be downloaded from SourceForge at the post-obit location: BLT Toolkit Projection on SourceForge.
Installing Precompiled Packages
At this fourth dimension, packages are just available for prior releases of magic. See the download page for available precompiled executables and packages.Windows/Cygwin
The Windows/Cygwin version installation instructions can be found nether a dissever link for the Cygwin versions of various related EDA tools. These are in a carve up section because all of them are Tcl/Tk-based, and the tools with graphical user interfaces require an X11-enabled version of Tcl/Tk, which must be installed beginning. To install magic for windows, start with this link:
Cygwin EDA Tools
Debugging Runtime Errors nether Tcl
The Tcl version, especially using the panel, can make debugging runtime errors difficult, especially if the error appears in the console and then the console is destroyed forth with the interpreter as magic exits suddenly. Also, the convoluted way magic starts upwardly under the interpreter means that some reported errors may non actually point to the correct origin of the mistake.The methods described below progress from easiest to well-nigh difficult, only each can be useful depending on how and when the program bites the dust.
gdb "attach" method
The easiest method to debug magic is to use the "attach" function in gdb, which can exist specified on the command line every bit:gdb program ppidIf merely one process using the Tk wish graphical shell is running, the post-obit Linux shell control (which can be copied into a crush script, for convenience) volition adhere and run gdb on the magic procedure:gdb program `ps -C wish --no-headers -o "%p"`Although this is supposed to work co-ordinate to the manual page for gdb, I notice that gdb doesn't recognize any symbols unless I do:ps -C wish --no-headers -o "%p"using the result of the first control for process_id in the gdb adhere command. On machines that don't recognize the "-C" switch to ps, utilize whatever variant that will testify yous the procedure ID of the "wish" executable.
gdb wish
attach process_idNote that once gdb is running, the program may be interrupted at any point with a control-C key sequence in the final running gdb, to check variables, calling sequences, prepare breakpoints, etc. The gdb command "continue" resumes the program after attaching the debugger to the procedure. If y'all want the magic developers to investigate a division mistake, run the plan nether the debugger using the above method, and endeavor to repeat the minimum number of steps leading to the crash. Afterwards the crash condition has caused the process to drop back to the debugger prompt, run the command "where" to get a stack trace of the subroutine call stack. E-mail this information to the developers, along with any other relevant information.
If the program fails during or subsequently loading the technology file, merely does not crash, it is still possible to use this method by attaching gdb, setting a breakpoint, then running
tech load tech_namefrom the magic command line. The tech load command clears out most of the allocated memory structures used by magic and regenerates them from scratch every bit the technology file is loaded back in.If the program crashes too fast to adhere gdb to the running procedure, then one of the methods below may be necessary.
"noconsole" method
Errors which disappear along with the console tin can exist viewed by running magic without the console:magic -noconsoleTo debug more pernicious runtime errors, it may be necessary to do a partially transmission startup of magic. For non-fatal errors (i.eastward., an exit with an error merely not a sectionalization violation or bus mistake), do the following:wishNote that with this kind of transmission startup, it is non possible (or at least, it'south not like shooting fish in a barrel) to use the "tkcon" console window.
source /usr/local/lib/magic/tcl/magic.tclstandalone method
Sometimes it may be necessary to pass arguments to magic. An example follows:wish
set argc 4
gear up argv {-d OGL -T scmos}
source /usr/local/lib/magic/tcl/magic.tclexecutable method
Magic has two versions that kickoff every bit an executable stand up-in for the "wish" and "tclsh" Tcl interpreter shells. These two can exist run directly under gdb. 1 of them is magicexec and is ordinarily invoked when running magic as "magic -noconsole":gdb /usr/local/lib/magic/tcl/magicexecThe other is magicdnull and is unremarkably invoked when running magic as "magic -dnull". It is not possible to create a layout window when using this version:
rungdb /usr/local/lib/magic/tcl/magicdnull
runmanual object load method
Nether some circumstances, it may exist necessary to manually load the magic shared object file to effigy out what went wrong. This is a good affair to do if, for instance, magic reports that it tin can't notice the "tclmagic.then" file:wishFor fatal errors (crashes), do the following:
load /usr/local/lib/magic/tcl/tclmagic.so
magic::startgdb wishVarious combinations of the above tactics may be necessary to become the program to run in the right mode for reproducing the runtime mistake. Note that all of the examples to a higher place assume that magic has been installed in the default directory /usr/local, and proper substitutions should be made if required past a non-default location of the installation.
run
source /usr/local/lib/magic/tcl/magic.tcl
| email: | |
Terminal updated: July 4, 2021 at 10:46am
Source: http://opencircuitdesign.com/magic/install.html
Posted by: cruzglas1952.blogspot.com

0 Response to "How To Install Magic Vlsi In Windows 7"
Post a Comment