Coder Social home page Coder Social logo

wrcad / xictools Goto Github PK

View Code? Open in Web Editor NEW
140.0 12.0 40.0 207.42 MB

XicTools: Xic graphical editor, WRspice circuit simulator, and accessories. for electronic design.

Home Page: http://wrcad.com

Makefile 0.55% HTML 0.69% C 5.99% Shell 0.38% Perl 0.62% C++ 78.76% Yacc 1.68% TeX 7.30% Verilog 2.05% Lex 0.03% SourcePawn 0.08% Roff 1.58% AMPL 0.03% Batchfile 0.03% sed 0.20% IDL 0.01% RouterOS Script 0.01%
eda cad circuit-simulator design-tools

xictools's Introduction

                  XicTools Open-Source  Release
                         October 1, 2017
                       Revised May 29, 2022
                       Revised June 18, 2024

Whiteley Research is pleased to offer the XicTools programs:  Xic
(graphical editor) and WRspice (circuit simulator) as open-source. 
The two programs have sold commercially for more than 20 years, having
been updated steadily along the way.  However, a lot more development
is required to increase usage, and Stephen Whiteley, the author of most
of this, is ready to try a new approach.

It is expected that these programs will enjoy accelerated development
in an open-source environment, with the contributions of one and all
adding capability.  One day they may become widely used and known for
stability and available on-line support through user and developer
groups.  With this critical mass, the programs may become a viable
choice for foundry users, particularly those who may lack the
resources to pay for the Big Box tools.  This would never be achieved
with a proprietary software model given the limited capabilities of a
tiny company such as Whiteley Research.

The XicTools software is being released under the Apache-2.0 license,
which is actually one of the most "free" licenses available.  One is
not restricted in using this software in a commercial environment, or
in commercial products.  There is no requirement that you must share
your source code if you use this.  The code can be redistributed with
few restrictions.  See the LICENSE-2.0.txt file for the wording of the
license.  Basically, if you are commercial and this software can add
to your bottom line, go for it, and we might even help you!

However, this software, like virtually all software, has a history. 
Much of it originalted from places like the University of California,
Berkeley (e.g., WRspice is a direct descendent of Berleley Spice). 
There are bits and pieces that come from other universities.  The
university licenses are also very unrestrictive and likely highly
compatible with the Apache-2.0 license (remember that if you paid US
taxes, you almost certainly paid for the software developed at the
university).

At least one accessory (the help viewer) is tainted by the GNU library
license.  So, at the time of this initial release, there may be some
question as to whether the full terms of the Apache-2.0 license apply
in some cases.  This shall presumably be clarified in the future.  All
old headers have been retained, so users can make their own judgement
about the constraints on a given set of files.  Incorporating a better
HTML viewer, that understands CSS, should be a priority.


1. Overview - What's Here

The distribution consists of several semi-independent programs and
libraries, rooted in subdirectories.  These are described below.

adms
This is a wrapper around the adms tool for creating run-time loadable
device models for WRspice.

fastcap
This is a customized version of the venerable capacitance extraction
program from MIT.  It is called from within Xic for capacitance
extraction of layouts, and can be used stand-alone as well.

fasthenry
This is a customized version of the venerable inductance extraction
program from MIT.  It is called from within Xic for inductance
extraction of layouts, and can be used stand-alone as well.

KLU
This is simply a wrapper around the SuiteSparse sparse matrix package
written by Timothy A. Davis, available from
http://faculty.cse.tamu.edu/davis/suitesparse.html

The provided makefile operates on the SuiteSparse distribution file,
applying needed patches, compiling and linking.  The reslt is a
run-time loadble module which provides the sparse matrix capability,
for use with WRspice (or any other application with a suitable interface).
WRspice does not require this plug-in, but will employ it when provided.
Use of the SuiteSparse package generally reduces simulation time.

mozy
The mozy package contains the help system and viewer used by Xic and
WRspice, including an http/ftp file transfer utility, and a screen
capture into image file utility.  This code (and only this program
code) is derived from GNU-licensed code.  Commercial users may wish to
build the XicTools without the mozy package, which is a top-level
option.

mrouter
The MRouter is derived from the Qrouter maze router by Tim Edwards,
available at http://www.opencircuitdesign.com.  It may be used as a
stand-alone tool similar to Qrouter, or run-time loaded into Xic as
a plug-in, in which case its functionality is available within Xic.
This integration is at a very early development stage.

secure (aka xtlserv)
This package provides the license server, client-side code, and
license-generating utilities for the licensing system used with the
commercial version of Xic and WRspice.  This, of course, is no longer
used.  This package is retained, for now at least, in the chance that
it may be of value to someone.

vl
This is a Verilog simulator, which is integrated with WRspice but can
be used as a stand-alone non-graphical simulator.

wrspice
The WRspice program is a SPICE-derived circuit simulator.

xic
The Xic program is a graphical editor, used for displaying and editing
layouts and schematics.  It provides DRC, extraction, and a lot of
other  capability.

xt_base
This contains base libraries and configuration scripts for use with
the other packages.


2.  Dependencies

wrspice
  mozy (optional)
  xt_base
  KLU
  vl

xic
  mozy (optional)
  xt_base
  mrouter

mozy
  xt_base

vl
  xt_base

adms
fastcap
fasthenry
  xt_base


3.  Building the XicTools

3.1  Graphics Toolkit

The Xic, WRspice and other graphical programs have historically used
the GTK-2.0 toolkit.  This, however, is rather old and obsolete. 
After an abortive effort to migrate to GTK-3.0 (which is also obsolete
but less so) it became clear that a major change of direction was
required, and a huge effort was initiated to switch to the Qt toolkit. 
This is mostly done, but details are still being fixed and probably a
lot of issues will be uncovered in use.

Status as of April 27, 2024
- The GTK-2.0 remains as the "reference".
- Pre-built packages use the GTK-2.0 toolkit.
- The GTK version should be considered as approaching "end of life".
- Qt releases are equivalent and users are encouraged to try them.
- New features will be developed in the Qt branch, and may not be
  ported to the GTK branch.

3.2  Packages vs. Building from Source

Historically, pre-built packages were available for various operating
systems on wrcad.com.  However, due to time constraints the packages
have not kept up with operating system or code changes, and only
Windows may have reasonably current packages available.

The plan is to drop packages entirely, and instead users will build
from source.  By providing detailed information and possibly
automation scripts, building from source should be easy for most
users.  This will provide several advantages for users:

1. The tools can be updated through a simple command, and rebuilt.
2. If the operating system is updated, the tools can be rebuilt if
   necessary.
3. Users can track either the "master" branch, which is stable, or
   the "devel" branch, which contains the latest code, or both.
4. Users can control aspects of the build, such as file locations,
   GTK vs. Qt, etc.
5. We at the factory can focus on improving the programs instead of
   churning out and uploading package files.
6. The make system used to build the programs can also generate
   package files, so if anyone wants to produce their own, this is
   possible.

3.3  Building from Source, Prerequisites

The XicTools can be built on macOS with MacPorts, Windows with MSYS2,
or any reasonably current Linux system.

In general, it will be helpful to have some familiarity with building
open-source software, with makefiles, compilers, and the tools needed
to build and maintain Linux programs.  However, this is mostly for
cases when something goes wrong, so the user can diagnose and fix a
problem.  Eventually, we hope to make everything "just work" with no
intervention required, but this will take time to evolve.

Your system will need to have the standard software development tools
and utilities.  You will also need to have the development versions of
several different libraries installed.  As you encounter missing
header files, etc., these should be installed on your system from your
operating system source repositories.  It can be a bit of a challenge
to figure out which packages to install, Google is your friend. 
Requirements are partially listed below for various operating systems.

3.3.a  Installing Needed Packages on Linux

To install system software on Linux, you will need root permission, or
an IT department that can do this for you.  If you are already in a
corporate software development environment, then this software will
quite likely be installed already, as it is at Synopsys, for example.

Programs and Utilities:
There may be a meta-package containing the development toolchain,
which should be installed.  These programs may be missing and would
require installation.

  git, autoconf, flex, bison,
  pkg-config (GTK only)

Libraries and Development Packages:
Often, the basic libraries are provided, but a separate "devel"
package contains the include files needed to compile programs with the
libraries.  If a build fails with a missing header (.h) file, the game
is to figure out which development package provides it, and install
the package.  In other cases, the library may be wholly missing, so
both the library and development packages should be installed. 
Install the devel version, which will also install the bare library if
necessary.

  libgsl, libjpeg, libtiff, ncurses
  gtk2 (GTK only)
  Qt5  (For Qt.  You can alternatively install the newer Qt6 if available)

The gtk2 and Qt packages will bring in a large number of dependent
packages.

Below are lists of package names that I had to install on some
operating systems.  Note that I've mostly specified the Qt5 libraries
here.  These may well be already installed, and seemed to be the
standard.  You should also be able to build with the newer Qt6
libraries if available.  These would have the same form as below but
with "qt5" -> "qt6".

I've indicated the requirements for GTK and Qt below. You can choose
either one or both, depending on the tools version(s) you intend to
build.

Note:  It doesn't hurt to attempt to install software that is already
installed with the commands below.  If the software is alredy installed.
you will get a message indicating this.

Ubuntu 20
Debian 11
   These use the same packages.  The "build-essential" provides the
   program development toolchain.  The package names can be listed after
   "apt install", or the command can be invoked on the packages
   individually or in smaller groups.

   apt install build-essential autoconf automake flex bison gpp git
   apt-install libgsl-dev libtiff-dev libjpeg-dev libncurses5-dev
   apt-install libgtk2.0-dev  (for GTK)
   apt-install qt5-qtbase-devel  (for Qt)

Fedora 40
    In Fedora, the development tools are preinstalled, but you may have
    to install g++ to get C++ support.  Again, packages can be installed
    one at a time or in groups.

    dnf install autoconf automake flex bison patch g++ gpp
    dnf install gsl-devel rpm-build libjpeg-turbo-devel ncurses-devel
    dnf install gtk2-devel  (for GTK)
    dnf install qt5-qtbase-devel  (for Qt)

CentOS 8 Stream/ Rocky 8/ AlmaLinux8/ Red Hat 8
    The first line installs the development tools, including for C++.

    dnf group install "Development Tools"
    dnf install gsl-devel ncurses-devel libtiff-devel libjpeg-devel
    dnf install gtk2-devel  (for GTK)
    dnf install qt5-qtbase-devel  (for Qt)

3.3.b  Installing MSYS2 and Needed Packages on Windows

This is based on experience installing on a new Windows 11 machine,
June 2024.

Currently the MSYS2/MinGWx64 environment is used to build and run on
Windows.  This replaces the "gtk2-bundle" which provided the needed
libraries previously and was distributed with the program packages. 
The user will have to install the MSYS2/MinGW64 environment.

Go to msys2.org, download and run the installer, and follow the
instructions, using the defaults.  When done you will have a shell
window on screen.  The package manager program for MSYS2 is named
"pacman".  Basic information on this can be found in the installation
web site.  It will be used to add packages to the shell environment to
support building/running XicTools.  Type the commands below to install
the needed packages.  In the future, you may wish to install extra
goodies, a lot is available.

Add the software development commands for the "MinGW" environment. 
MinGW "Minimal GNU for Windows" is a simplified Linux-like environment
called "Posix" provided by Microsoft as part of Windows.

    pacman -S base-devel
    pacman -S mingw-w64-x86_64-toolchain

Add the vim editor, the winpty program needed to run WRspice, and
the mingw64 versions of the gtk2 and/or Qt and gsl libraries.

    pacman -S vim
    pacman -S winpty
    pacman -S mingw-w64-x86_64-gsl
    pacman -S mingw-w64-x86_64-gtk2  (for GTK)
    pacman -S mingw-w64-x86_64-qt5  (for Qt)
    pacman -S mingw-w64-x86_64-qt6  (for Qt)
Note: 6/30/2024  The Qt6 display looks terrible on my NVidia GeForce
laptop, but is fine on an older system.  Qt5 looks fine on both
systems.

Add some other needed utilities:

    pacman -S git
    pacman -S autoconf-wrapper

That is all of the packages that need to be installed currently.  You
should now close the shell window.

In the future, to upgrade the packeges to the lastest, give the command

    pacman -Syu

This should be done every so often to keep current.  When this is done,
the XicTools programs should be rebuilt, as will be described below.

To continue with the configuration and build, you should open a new
shell window specificly for the MinGW64 environment.  In the Start
menu, scroll down to th MSYS2 entry and open the sub-menu.  There are
five alternative environments available.  Select the one with the
MinGW64 lable.  You should ALWAYS choose only this option for working
with XicTools programs, the others will probably NOT WORK!  Making the
selection will bring up a new shell window, similar to what you had
before, but the prompt will include "MinGW64".

You will always use a window like this to build and run XicTools
programs.  It is similar to a Linux shell, and provides many of the
same commands.  You can add more of your favorite Linux commands with
the pacman tool.

We can now continue the first time only configuration.

1.  Type the following command.

    mkdir -p /c/usr/local/xictools

2.  Use the vim editor to edit the .bash_profile file that exists in
    the current (and home) directory adding the following lines to the
    bottom of the file.  Of course, replace <your_username> with the
    correct text.  This is the name of the current directory, or the
    name printed when you give the "whoami" command.

    mount c:/usr/local/xictools /usr/local/xictools
    export PATH="/usr/local/xictools/bin:$PATH"
    export XT_HOMEDIR=c:/msys64/home/<your_username>

3.  You will need to set "Developer Mode".  Developer mode is required
    to create symbolic links, used in the install.
    a. From Settings (grear-shaped icon in the Start menu) select System
    b. Scroll down to "For Developers" and select.
    c. Turn on "Developer Mode", answer prompt.

4.  Finally, if you intend to create packages, you will need the
    inno-setup packager (http://www.jrsoftware.org/).
    The Makefiles assume release 5.5.9.  You might wish to get this
    (or a newer release) if you intend to produce packages for Windows.
    The XicTools Makefile assumes that this is installed at c:/inno-5.5.9
    which is mounted on /inno-5.5.9 in MSYS2.

You will run the pacman installer in the future to update your
packages, and to add any packages needed later.

3.3.c  Installing MacPorts and Needed Packages on macOS.

1.  Install xcode
    This is Apple's development package, available as a download from the
    App store.

2.  Install the "command line tools"
    Install this by giving the following command in a terminal window:
      xcode-select --install

3.  Run xcode to sign off on the license agreement.
    Give the following command and agree to the terms:
      xcodebuild -license

4.  To run the GTK versions of the programs you will need an X11
    server.  The recommended server is XQuartz (www.xquartz.org). 
    This is the "official" X server for the Mac, however others are
    available, including one through macports.  Follow the
    instructions to install and start the server.

    If you will build and run the Qt versions only, you do not need
    XQuartz.

5.  Download the MacPorts installer from macports.org.  This will
    provide the graphical libraries used by the programs.  Following
    the instructions, install MacPorts for your operating system.  Be
    sure to install the default package which installs in the default
    location (i.e., don't build from source and change the location).

    Once the basic installation is done, run, the following commands:

    sudo port -v selfupdate
    sudo port install autoconf
    sudo port install python27
    sudo port install python2_select
    sudo port install gsl
    sudo port install gtk2  (for GTK)
    sudo port install pkgconfig  (for GTK)
    sudo port install qt6  (for Qt)

6.  Set your shell search path to include /usr/local/xictools/bin.

In the future you will want to update the ports every so often to keep
current.  This can be done with the commands

    sudo port -v selfupdate
    sudo port upgrade outdated

After doing this you will need to rebuild and reinstall the XicTools
programs as will be described below.

The Qt versions of the tools are "native" masOS applications.  Other
than not needing an X-server, the main difference is that the
application main menus appear in the Mac location at the top of the
screen, and not in the application window.

3.4  Obtaining the Git Repository

The file you are presently reading (README) is at the top level of the
XicTools source tree.  It may or may not be part of a git repository
depending on how the files were obtained.  You really want to have a
git repository, and not just a collection of files from a zip or tar
file.  The "git" program is a software management tool, and using a
git repository allows you to update the files from the primary
repository on github.com with a simple command.

If there is a subdirectory named ".git" in the directory containing
this file, then you probably have a git repository.  If not, lets
start over.  Go to the parent directory containing this one, and use
"rm -rf" to delete this directory and everything under it (which will
include this file unless you save a copy some place).

Here is the starting point to create a new xictools git repository. 
Make sure that you have the git program installed (the command "which
git" should provide a path to the git program).  It needs to be installed
if not.  From terminal (shell) window give the following command to
clone the xictools repository into the current directory:

    git clone https://github.com/wrcad/xictools.git

You should have a subdirectory named "xictools" which contains this
README file, and a whole lot more.  This contains all of the source
code for XicTools, and a "hidden" compressed git database.  You will
build the tooks in this area.  The top directory (xictools) can be
moved or renamed if desired.  For example, you may want to create two
such directory trees, "xictools" and "xictools.gtk" to separately
build Qt and GTK versions of the tools.

3.5  The Build Procedure.

First, change to the top directory of the cloned repository created as
above.

This section assumes that you are in the directory containing this
README file in your xictools git repository.  It assumes that you have
installed the software build tools and development libraries as listed
above, or a best guess depending on your system.

The procedure is as follows.

The first time, you will need to set up the main Makefile.

1.  Copy Makefile.sample into "Makefile", edit Makefile to set the
    configuration flags, as described by the comments in the Makefile.
    Crucial for Windows:  Make sure you add a drive letter to the
    PREFIX path, and uncomment the MINGW define.

2.  Give the command "make config" to configure the source tree to
    your build environment.  You may see errors and early termination
    if there are missing utilities or libraries.  This should take
    maybe 5 minutes.

3.  Give "make all" to build all of the programs.  If everything went
    correctly for Xic and WRspice, there should be files present:
    xic/bin/xic and wrspice/bin/wrspice

4.  in the future, after changes, do "make reconfig" followed by
    "make all" to rebuild the programs.  Alternatively, if you
    want to start over from a fresh environment, give
    "make distclean", then "make config" and "make all".

5. Make sure that your shell search path includes the main XicTools
   bin, which is by default /usr/local/xictools/bin.  Use the actual
   path if you changed PREFIX or TOOLROOT in the Makefile.

3.6  The Installation Procedure.

The present default installation procedure assumes that the intended
installation procedure is to first build a binary package (e.g., RPM)
for each program, then install the packages on your system using the
wr_install script.  The wr_install script is available in the source
tree under xictools/xt_base/packages/util/wr_install.  The Makefiles
will actually prevent running "make install" to the default location
(typically under /usr/local).  However, you can modify the top-level
Makefile (in this directory) to allow this (see the ITOPOK variable),
and skip the packaging step entirely if you wish.

If you are building/installing packages:
1. "make packages" will create all of the package files.
   Packages are left in xictools/xt_base/packages/pkgfiles.  It may
   take half an hour or so, since this builds the example Verilog-A
   models for WRspice which takes a while.

2. cd to xt_base/packages/pkgfiles, then give
   "../util/wr_install all". This will install the programs from
   the package files.  If you are installing to a system location
   such as the default under /usr/local, you need to have sudo
   privileges.  The wr_install script will ask for your password. 
   It doesn't matter if this fails if you are installing to a
   location where you have write permission.

Otherwise:
1,2.  If you are installing to a system location like the default
   under /usr/local, you must get root privileges somehow.  On
   Current Linux systems this means that you will probably use the
   sudo command and your account will be listed in the
   /etc/sudoers file.  If at work, you may have to get help from
   IT.  However you can install to a directory where you have
   write permission without becoming root.  Next, give "make
   install".  It may take half an hour or so, since this builds
   the example Verilog-A models for WRspice which takes a while.

You should now be able to use the programs.  Have fun!


4.0  Maintaining the Installation Using Git

There are two "branches" in the git repository:  "master" (the
default) and "devel".  The "master" branch is intended to provide
stable releases of the tools for effective use, and most users should
choose this.  The devel branch represents the latest development code. 
You should track this if you are helping develop the programs, or just
want the latest.  However, programs may not build and other transient
problems may be encountered.

To check out the devel branch, give the command
    git checkout devel
To revert to the master branch
    git checkout master
To see which branch you're on
    git branch

To update the current branch code to the latest from the github
repository:
    git pull

You should do this every so often to update your source code so as
to not get too out of date.

On Windows and macOS, you should periodically upgrade the packages you
have installed to support XicTools.  For Windows the command is

    pacman -Syu

For macOS the commands are

    sudo port selfupdate
    sudo port upgrade outdated 

After updating, or changing the branch, you will need to recompile
and reinstall the programs.  This means repeating the procedure described
above:
    make reconfig
    make all
    follow the installation procedure you have chosen

If your operating system is updated, you may also want to rebuild the
programs, however this is only required if a program no longer works. 
This can happen if a system library is updated, and no backwards
compatibility library is provided.  In this case, run the same
commands as above to rebuild/reinstall the tools.

End of document.

xictools's People

Contributors

markvolkmann avatar thasti avatar wrcad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xictools's Issues

wrspice has a help problem

Compiled from source on the WSL 2.0, Ubuntu. Some part of "help" work, some part doesn't.

marcel@BigBox:~/XIC/wrspice/bin$ ./wrspice
WRspice circuit simulation system, release 4.3.12, build 112720-203430
Copyright (C) Whiteley Research Inc, Sunnyvale CA 2020
All Rights Reserved

Warning: no graphics package available.
Loading KLU fast sparse matrix solver, by Tim Davis,
Texas A&M University, http://faculty.cse.tamu.edu/davis/welcome.html.
Listening for input on pipe named /home/marcel/wrsfifo.

Welcome to WRspice.
Type "help" for general information. Type "quit" to leave.
WRspice 1 -> help display

display command

*** stack smashing detected ***: terminated

Received signal 6, exiting.

does not install

tried installing in both centos and ubuntu linux. it fails to install..
g++: ../../xt_base/lib/miscutil.a: No such file or directory
only two rpm were created in created.. one adms and another fasthenry.. no other rpm came..

Credit Berkeley

Could we add Berkeley's copyright to the wrspice startup banner? I'm pretty sure this is required by Berkeley's licence for the original C* ("provided that the above copyright notice and the following two paragraphs appear in all copies of this software.") quoted from here

Even if it's not required in the binary (such as if that compiled binary isn't redistributed), giving credit for their work seems like a nice thing to do. :-)

    • strictly speaking, the spice license was changed in 2007 to that quoted above, but it was broadly similar beforehand.

Jacob

When building xictools, the error messages come out with the incorrect directory references

Hi Stephen,

I have been building the tools from source. When I run it, unexpected crashes happen and I cannot tell what I did. As a help, I wanted to check the various compiler warnings. For the most part, from emacs, compile-mode has trouble finding the files. I think that it comes from a common structure used by many:

distclean:
	-@for a in $(SUBDIRS) packages; do \
	    if [ -d $$a ]; then \
	        (cd $$a; make $@) \
	    fi; \
	done
	-@rm -f config.cache config.log config.status configure Makefile
	-@rm -rf lib autom4te.cache
	-@rm -f include/config.h

The cd is not reported by make, so it leads to a problem for me as I try to find the sources.

I put in a pull request modifying (cd $$a; make $@) \ to ${MAKE} -C $$a $@; \.

distclean:
	-@for a in $(SUBDIRS) packages; do \
	    if [ -d $$a ]; then \
	        ${MAKE} -C $$a $@; \
	    fi; \
	done
	-@rm -f config.cache config.log config.status configure Makefile
	-@rm -rf lib autom4te.cache
	-@rm -f include/config.h

With that modification, emacs takes me to the correct source all the time.

#23

There were several place were the gcc -Wall complained about using an object after it is freed. They have all gone away.
That part is a mystery.

=====================

Parallelization of recursive jobs in GNU make sugests using the template:

SUBDIRS = a b c
default: all
$(SUBDIRS)::
    $(MAKE) -C $@ $(MAKECMDGOALS)
all clean : $(SUBDIRS)

or, if there are some dependancies use this template:

SUBDIRS = app lib doc

default: all

app: lib

.PHONY: $(SUBDIRS)

$(SUBDIRS):
    $(MAKE) -C $@ $(MAKECMDGOALS)

all clean install: $(SUBDIRS)

typo in icrn range in manual

It seems there is a typo in manual. It is written that 1.5mV < icrn < 1.9mV however in reality program gives the following error.
Or maybe I am doing smth wrong?

image

Building without GUI

Hello, I'm wondering whether it's possible to build WRSpice without a GUI? I realise that the GTK, etc, libraries are required per the build instructions. However, I noticed that there is an ASCII plot facility in the source code, and wondered whether it might be feasible? I'm interested in doing some optimisation on a SPICE engine, and I'd much prefer to work on C++ code without pulling in vast dependencies.
Thanks, Jacob

Pictures?

I think that it is VERY important to add pictures of the interface to the website, the project description and the manual. Not only because it helps persuade potential users, but it also helps when describing software functions etc.

Phase Nodes

Hi Steve,
Is there a way get the phase at every node in a circuit consisting of JJs and inductors? I can get the phase difference across a junction, and I can infer the phase difference across an inductor by multiplying the branch current by the inductance and dividing by the flux quantum, but I was wondering if WRSPICE just kept track of that for you somewhere. Does ground have a predefined phase in this case like 0 mod 2pi ? I'm debugging some AQFP circuits and am trying to reconcile some energy minimization algebra with Kirchoff's current law so keeping track of phases explicitly is useful. Thanks as always for your help.

Cheers,

Andrew

ubuntu

thanks for bringing this tool on ubuntu.. :)

Technology File for Examples

Hi,

I've gotten xic to build on nixos, but it's been difficult to assess if it's working fully because most of the more complex examples seem like they require a technology file. Is that file available anywhere so I can assess that my build is working correctly?

Thanks for sharing this as open source.

Startup failure on Debian

Manage to compile, create deb-packages and install xictools.

Then try to run:

export XIC_LIBRARY_PATH=/usr/local/xictools
/usr/local/xictools/xic/bin/xic.sh

Xic integrated circuit design system release 4.3.6, build 011419-170950
Copyright (C) Whiteley Research Inc., Sunnyvale, CA 2019
All Rights Reserved

Found true color visual, 24 planes.
Using Python (py27.so).
Reading technology file /usr/local/xictools/xic/startup/xic_tech.
Loading MRouter
Current directory: /home/svennb/work/prg/git/xictools

Fatal internal error: segmentation violation.
All logs retained in /tmp/xic.1105.
mail: cannot send message: Process exited with a non-zero status
File gdbout emailed to [email protected].
/usr/local/xictools/xic/bin/xic.sh: line 26: 1105 Killed /usr/local/xictools/xic/bin/xic $*

the gdbout file is included here

Xic-4.3.6 LinuxUnknown (xic-4-3-6)
Tue Jan 15 11:48:33 2019 Pid = 1105 DeathAddr = 0x55e6614bde4d
/usr/local/xictools/xic/bin/xic(_ZN8miscutil14dump_backtraceEPKcS1_S1_PKv+0x29d)[0x55e661b5907d]
/usr/local/xictools/xic/bin/xic(_ZN5cMain4ExitE8ExitType+0x191)[0x55e66149e383]
/usr/local/xictools/xic/bin/xic(+0x1bfccc)[0x55e6614cdccc]
/usr/local/xictools/xic/bin/xic(+0x1c001a)[0x55e6614ce01a]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12670)[0x7f0908670670]
/usr/local/xictools/xic/bin/xic(_ZN11ContextDesc5clearEv+0x9)[0x55e6614bde4d]
/usr/local/xictools/xic/bin/xic(_ZN8cPushPop12ClearContextEb+0x30)[0x55e6614bfe34]
/usr/local/xictools/xic/bin/xic(_ZN5cMain15ClearReferencesEbb+0x248)[0x55e66149b818]
/usr/local/xictools/xic/bin/xic(_ZN5cMain4LoadEP10WindowDescPKcPK11FIOreadPrmsS3_P4cCHD+0x738)[0x55e66149fc04]
/usr/local/xictools/xic/bin/xic(_ZN5cMain8EditCellEPKcbPK11FIOreadPrmsS1_P4cCHD+0x482)[0x55e6614a105e]
/usr/local/xictools/xic/bin/xic(+0x141b34)[0x55e66144fb34]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x158)[0x7f09087cecb8]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4e0a8)[0x7f09087cf0a8]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7f09087cf13c]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_main_iteration+0x21)[0x7f0908e83b01]
/usr/local/xictools/xic/bin/xic(_ZN6GTKpkg17CheckForInterruptEv+0x185)[0x55e661806ec7]
/usr/local/xictools/xic/bin/xic(_ZN5cMain12UpdateCursorEP10WindowDesc10CursorTypeb+0x9a7)[0x55e66177e9ff]
/usr/local/xictools/xic/bin/xic(+0x4f5ca3)[0x55e661803ca3]
/usr/local/xictools/xic/bin/xic(_ZN6GTKpkg10SetWorkingEb+0x6c)[0x55e661803d58]
/usr/local/xictools/xic/bin/xic(_ZN10WindowDesc10RunPendingEv+0xb9)[0x55e6618720f7]
/usr/local/xictools/xic/bin/xic(_ZN8cDisplay17RedisplayIdleProcEPv+0x14)[0x55e661872dda]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x158)[0x7f09087cecb8]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4e0a8)[0x7f09087cf0a8]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_loop_run+0xb2)[0x7f09087cf3a2]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_main+0xb7)[0x7f0908e838e7]
/usr/local/xictools/xic/bin/xic(_ZN9gtkinterf6GTKdev8MainLoopEb+0x19)[0x55e661b1dbb9]
/usr/local/xictools/xic/bin/xic(_ZN6GTKpkg7AppLoopEv+0x43)[0x55e66180765f]
/usr/local/xictools/xic/bin/xic(main+0x86b)[0x55e661454cf1]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)[0x7f0907e4509b]
/usr/local/xictools/xic/bin/xic(_start+0x2a)[0x55e66144fa3a]

Win10 XicTools-4.3 Failed DLL

I cannot install XicTools-4.3(.11) on Windows 10.

I followed the guide for Windows and used the wr_install script under MSYS2 MingGW x64's terminal to install xictools, wrspice, mrouter, and mozy. However, attempting to load xic or wrspice (via either winpty xic or xic) in the MingGW terminal gives a Failed to load the program DLL error (program -> WRspice for wrspice).

In Windows, Xic is registered as a program that points to C:\usr\local\xictools\xic.current\bin\xic.bat. Opening this gives an Entry Point Not Found error:

The procedure entry point _ZdaPv could not be located in the dynamic link library c:\usr\local\xictools\xic\bin\xic.dll.`

[Unexpected behavior] Vector yes is printed by default

Description

When using the print command in the control environment, the vector yes is printed by default to shell output.

Version

WRSpice Version 4.3.11
System Ubuntu 18.04

Steps to reproduce

Minimal example works in circuit file as well as in interactive shell

compose x values 0 1 2 3 4 5 6 7 8 9
print x

Output

Constant values
constants                                             Thu Jun  4 10:07:32 2020
--------------------------------------------------------------------------------
Index   yes             x               
--------------------------------------------------------------------------------
0       1.000000e+00    0.000000e+00    
1                       1.000000e+00    
2                       2.000000e+00    
3                       3.000000e+00    
4                       4.000000e+00    
5                       5.000000e+00    
6                       6.000000e+00    
7                       7.000000e+00    
8                       8.000000e+00    
9                       9.000000e+00    

Thanks and greetings

Xictools doesn't compile on M1

After getting a nice new M1 mac this Christmas it was time to install my favorite pieces of software which includes the Xictools circuit simulator toolkit. I'm installing on a Mac so the first step was to install the gtk bundle from macports. This step worked fine out of the box, /usr/local/gtk2-bundle-X11/bin is filled with POSIX scritpt executables and arm64 binaries that all seem to work, hurray! Now for the issues, when you run make all in the xictools project the following things happen,

  1. Weird shell script #! issue: The build is configured you see a lot of: ../../../vl/version:1:2: error: invalid preprocessing directive
    #! /bin/sh
    ^
    errors followed by numerous cascading errors. Somehow gcc is seeing a shell script command and attempting to parse it. Not sure how this crept up or in which file(s) its occurring.

  2. To arm or not to arm: The arch for darwin is hard coded as x86_64 in the config.in which is no longer a good assumption. In fact unless you changed your system arch to x86_64 when you made the gtk bundle you will be linking x86_64 against arm64 which won't work. I had to manually set the arch to arm64 to clear this set of errors. The config.in file should be updated to ask a Darwin user if they want to compile for x86 or arm.

  3. Related to 2, code that relies on intel SSE intrinsics won't work: In FastHenry we get a lot of /Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include/mmintrin.h:50:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    errors. Since FastHenry is a standalone program (which I don't need actually) it could be compiled as x86_64 and then run via Rosetta. Not sure how baked in the SSE intrinsics are to FastHenry and if they can switched over to a metal implementation for mac.

How to enable openaccess

I'm not sure if this is the appropriate place for this question; if not please redirect me to the correct venue.

I was very excited to see that Xic supports openaccess databases. I'm currently trying the pre-compiled xictools_xic-LinuxDebian10-4.3.10-x86_64.deb on Ubuntu 18.04

I'm trying to read an openaccess library (both layout and schematic) but can't seem to enable the OpenAccess Libs menu item in the File menu.

I've set these variables to the shared libraries

export LD_LIBRARY_PATH=/path/to/oaRun_22.50/lib/linux_rhel50_gcc44x_64/opt
export XIC_LIBRARY_PATH=/path/to/oaRun_22.50/lib/linux_rhel50_gcc44x_64/opt

Should there be an OA plugin in /usr/local/xictools/xic/plugins$ Here's the contents
-rw-r--r-- 1 root root 53K Jul 21 17:56 py27.so
-rw-r--r-- 1 root root 16K Jul 21 17:56 tcl.so
-rw-r--r-- 1 root root 16K Jul 21 17:56 tcltk.so

What am I doing wrong?

Thank you for your help.
Eric

libtiff v6 update

MacPorts now installs libtiff v6 by default, however xictools is still pointing to v5. This leads to an issue with dydl unable to point to the right library

(for Googlers, here is the specific issue):

dyld[6856]: Library not loaded: /usr/local/opt/libtiff/lib/libtiff.5.dylib
Referenced from: /usr/local/Cellar/sumo/1.17.0/bin/sumo
Reason: tried: '/usr/local/opt/libtiff/lib/libtiff.5.dylib' (no such file), ...

The issue occurs because libtiff.6.dylib is now installed, rather than 5.

Current Workaround

ln -s libtiff.6.dylib libtiff.5.dylib is sufficient to fix this, as the libraries are similar enough to at least get Xic to load. Without knowing what this library does for Xic, however, I can't further test if it is working as expected.

Issue Request

If it's possible to update XicTools to use libtiff v6, that would be great. Otherwise the Mac install instructions may require an additional note :)

wrcad.com instability, new xictools.com

Due to a transfer of VPS provider, wrcad.com was inaccessible for a couple of weeks at the end of 2022. The web site is now available on xictools.com, in addition to wrcad.com. Sorry for any difficulty the down period may have caused.

clang-format

Please could we adopt clang-format in the project? If you're unfamiliar with it, it automatically applies some code formatting rules, specified in a file named '.clang-format' in the project root. Lots of editors have built-in support. I'm attaching a rules file that I use in one of my own projects as an example (it'll need to be renamed).

Readability helps a lot with working on a large codebase, and consistency in formatting really makes a difference. I have a little shell script with a 'find' recipe to run it against all my source files (I also invoke dos2unix at the same time).

Advantages:

  • Consistency and improved readability of the source tree,
  • It's easy for people who dislike the project's .clang-format to substitute their own, reformat, edit, debug, etc, then reformat to the project style before committing the changes. It's a real headache otherwise, especially when you've already used it to make browsing through the code easier.

Disadvantages:

  • There is a single, large diff when formatting is applied the first time.

clang-format.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.