Eec s 245 Ng Spice Mac Fixed

20
ngSpice Installation Instructions For: MS Windows (XP Pro, Windows Server 2003, Vista) Macintosh OS X (10.4, 10.5) Linux (All Distros)

description

study

Transcript of Eec s 245 Ng Spice Mac Fixed

  • ngSpice Installation InstructionsFor: MS Windows (XP Pro, Windows Server

    2003, Vista) Macintosh OS X (10.4, 10.5) Linux (All Distros)

  • MS Windows InstallationDownload the following files: Cygwin Setup.exe from

    http://www.cygwin.com NgSpice sources for rework 17 The test *.cir file from the course web page

  • MS Windows InstallationCygwin Setup

    Start Cygwins Setup.exe Select install from either Internet or Local Directory

  • MS Windows InstallationCygwin Setup

    Select to install for All Users and Unix / binary Choose a Root Directory that is on root layer (e.g. C:\cygwin)

  • MS Windows InstallationCygwin Setup

    Click Default by All until it reads Install

  • MS Windows InstallationCygwin Setup

    Click on Next and wait until the installcompletes, be sure to place Cygwin in the StartMenu.

    Vista Users Note: Make sure to kill the scripts (In the Task Manager [ctrl-alt-delete]

    under processes look for SH) that Cygwin starts inthe install program-- They will cause the installprogram to stall. Just rename the scripts to *.shand run them in Cygwin after the install completesfrom /etc/postinstall.

  • MS Windows InstallationngSpice

    Open a Cygwin Bash Terminal

  • MS Windows InstallationngSpice

    Locate ng-spice-rework-17.tar using the terminal. Hint: If it is located in the root file system on Windows

    (e.g. C:\) go to /cygdrive/c from the Cygwin command line Run tar -xvf ng-spice-rework-17.tar or tar -zxvf ng-

    spice-rework-17.tar.gz Change directories with cd ng-spice-rework-17 Run ./configure (This will take some time.) Once ./configurecompletes, run make The make process will take a few minutes depending on

    your processor speed. (Anywhere from 5-20 minutes) Finish the compile with the make install command

  • MS Windows InstallationngSpice

    Testing ngSpice: Check if there is an instance of the X server

    running. If there is a X in the bottom left corner ofthe screen, right click it and select Exit

    Run startx from the Cygwin Bash terminal Run the command ngspice amplifier.cir

  • MS Windows InstallationngSpice

    If the results look like the figure below, ngSpice isinstalled correctly.

  • Apple OS X InstallationngSpice

    Ensure that X11, X11 SDK, and Developer Toolsare installed on the Mac

    If X11 and/or Developer Tools are not installed,use the Apple OS X CD/DVD to install them

    Note: To check to see if X11 and X11 SDK areinstalled correctly-- use X11 and type cd/usr/X11R6/include (on 10.4) or cd/usr/X11/include (on 10.5) and see if there aremultiple files and directories there.

    Download ng-spice-rework-17 and the test *.cirfile

  • Apple OS X InstallationngSpice & Tiger (10.4)

    Double click ng-spice-rework-17.tar.gz,apple will expand it.

    If the file becomes a .tar, double click again. A folder will appear on the Desktop (if you

    downloaded ng-spice-rework-17.tar.gz to it)labeled ng-spice-rework-17

    Start X11 (it can be found underApplication/Utilities)

  • Apple OS X InstallationngSpice & Tiger (10.4)

    Once X11 starts, type after the $ cd Desktop/ng-spice-rework-17 Next type, ./configure --x-includes=/usr/X11R6/include --x-

    libraries=/usr/X11R6/lib After ./configure completes, run make Once make completes, enable the root account-- this is done by starting

    NetInfo Manager and going under Security in the menu bar and clickauthenticate. Once you type your password, go back under security and clickenable root user. Enter an non-trivial password in the dialog box.

    Go back to X11 and type su and enter your new non-trivial password at theprompt-- your command prompt ending will change from a $ to a # to signifyyour in root

    Then type make install on the command line Once the make install is complete type exit On your command line $ type xhost + (you will have to type this ever time

    you restart X11 and want to use ngspice) See the path slide to complete the install

  • Apple OS X InstallationngSpice & Leopard (10.5)

    Double click ng-spice-rework-17.tar.gz,apple will expand it.

    If the file becomes a .tar, double click again. A folder will appear on the Desktop (if you

    downloaded ng-spice-rework-17.tar.gz to it)labeled ng-spice-rework-17

    Start X11 (it can be found underApplication/Utilities)

  • Apple OS X InstallationngSpice & Leopard (10.5)

    Once X11 starts, type after the $ cd Desktop/ng-spice-rework-17 Next type, ./configure --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib After ./configure completes, run make Once make completes, enable the root account-- this is done by starting

    Directory Utility and clicking the lock to authenticate. Once you type yourpassword, go under edit and click enable root user. Enter an non-trivialpassword in the dialog box.

    Go back to X11 and type su and enter your new non-trivial password at theprompt-- your command prompt ending will change from a $ to a # to signifyyour in root

    Then type make install on the command line Once the make install is complete type exit See the path slide to complete the install

  • Apple OS X InstallationPath Correction

    In order to allow MacOSX to find ngspice when it is called from thecommand line, its installation directory must be in the command line shellsPATH.

    The best way to do this is to change the PATH variable in your environment asfollows:

    export PATH=/usr/local/bin:$PATH

    Otherwise, for a quick get started workaround, type the above commandfrom your command line once each time you restart your computer orcommand line shell. You can check to see the value of all your environmentvariables including PATH by typing export at the command prompt.

  • Linux InstallationngSpice

    Download ng-spice-rework-17.tar or ng-spice-rework-17.tar.gz and the test *.cir file

    Ensure that the system has gcc compilersand its libraries, and X11 and its libraries

    Verify that the account you are using is asudoer or root.

  • Linux InstallationngSpice

    On the terminal/shell of your choice, typetar -xvf ng-spice-rework-17.tar or tar -zxvf ng-spice-rework-17.tar.gz

    Change directories to ng-spice-rework-17and run ./configure

    Once the configure process is complete runmake (This may take 5-20 minutesdepending on your processor)

  • Linux InstallationngSpice

    When the make process completes runmake install as a sudoer or root

    Testing ngSpice: Ensure that the system is in runlevel 5 Run ngspice amplifier.cir

  • Linux InstallationngSpice

    If the results look like the figure below, ngSpice isinstalled correctly.