INSTALL XSCHEM
in order to install the program run the following command (execute as root if you plan to do a system-wide installation, for example in /usr/local):
user:~$ make install
This will install all the runtime needed files into the locations defined in the Makefile. It is possible to setup a configuration file, .xschem, into your home directory. This file will tell XSCHEM where to look for schematic and component libraries. this is neded if you decide to add or change the library locations specified at compile time. XSCHEM will look for this file in the current directory or in the user's ${HOME} directory.
#### #### .xschem configuration file, to be placed in user HOME directory #### or in the directory where xschem is launched #### this file is called after system xschemrc, so any variable set here #### overrides the default #### #### xschem design libraries root dir #### hint: put user dir before system dirs, so file selector #### will present user dir. set XSCHEM_DESIGN_PATH $env(HOME)/xschem_library:${XSCHEM_DESIGN_PATH} #### directory where simulations, netlist and simulator outputs are placed #### if unset xschem asks user to choose one when doing a netlist # set netlist_dir $env(HOME)/xschem_library/simulations #### Window to open on startup set XSCHEM_START_WINDOW {mylib/0_top}
For testing purposes xschem can be run and invoked from the build directory
xschem-<version>/ or xschem-<version>/src/ without
any .xschem or xschemrc definitions.
When xschem is running, type puts $XSCHEM_DESIGN_PATH in the xschem tcl prompt to
know the library search path.
Type puts $XSCHEM_HOME_DIR to see the installation path.
Note that .xschem is a TCL file, so use the TCL syntax for setting
variables and accessing environment variables.
The XSCHEM_DESIGN_PATH contains a list of library directories separated by colons.
These directories contain all xschem symbols and schematics. Normally you should append
${XSCHEM_DESIGN_PATH} to this list to avoid loosing system-wide definitions contained in
the ${XSCHEM_HOME_DIR}/xschemrc startup file which is read before user's
.xschem file. All system-wide definitions can be overridden in user's
.xschem file, which is read after xschemrc.
A sample user design library is provided and installed in the path
specified by the Makefile's variable user_library_prefix, you can use it
as a starting point.
XSCHEM installation creates also a sample system-wide symbol library by default at:
${prefix}/share/xschem/xschem_library, where prefix is specified in the Makefile.
The XSCHEM_START_WINDOW specifies a schematic to preload at startup, to avoid absolute paths use a path that
is relative to one of the XSCHEM_DESIGN_PATH directories. XSCHEM will figure out the actual location.
You may comment the definition if you don't want any schematic on startup.
If you need a .xschem file in your $HOME directory you may start from
a sample .xschem file that is provided in the distribution sources.
Change it to fit your needs.
user:xschem-<version>/src$ cp .xschem ~/
XSCHEM_HOME_DIR and XSCHEM_DESIGN_PATH shell environmental variables may be used to override any definition in xschem startup files
Detailed XSCHEM startup sequence
- look for XSCHEM_HOME_DIR from environment variables.
- else if there is ../src/xchem.tcl with respect to current dir and ../xschem_library then we are starting from a build directory, set XSCHEM_HOME_DIR to `pwd` and also set XSCHEM_DESIGN_PATH to `pwd`/../xschem_library.
- else if there is a PREFIX/share/xschem directory then set XSCHEM_HOME_DIR,
to PREFIX/share/xschem.
PREFIX is a preprocessor macro passed at compile time by setting the Makefile prefix variable. - source XSCHEM_HOME_DIR/xschemrc if existing.
- source `pwd`/.xschem or $HOME/.xschem if existing.
- if XSCHEM_HOME_DIR not defined --> error and quit.
- look for XSCHEM_DESIGN_PATH from environment variables. This will override any value given in xschemrc and .xschem startup files.
- if XSCHEM_DESIGN_PATH undefined set it to compile time default provided by Makefile variable xschem_library_path.
- source $XSCHEM_HOME_DIR/xschem.tcl.
- start loading user provided schematic file or start with empty window (or filename specified in XSCHEM_START_WINDOW tcl variable).