Pietro La Spada
Pietro La Spada

Reputation: 897

Spice Simulation from Electric on OSX

I'm using Electric as design system. I want to simulate in LTSPICE the designed circuit. I've linked LT Spice and Electric (cmosedu) as the tutorial show (http://cmosedu.com/videos/electric/tutorial1/electric_tutorial_1.htm), but when I try to simulate from Electric, it doesn't open LT Spice. Any solution?

Upvotes: 1

Views: 1284

Answers (1)

giorgionocera
giorgionocera

Reputation: 6556

This is what I did. It works.

Setup parameters in electric-9.07.jar:

Run program: /Applications/LTspice.app/Contents/MacOS/script.sh
With args: ${FILENAME_NO_EXT} -r ${FILENAME_NO_EXT}.raw -o ${FILENAME_NO_EXT}.out

!!IMPORTANT!! First argument isn't "-i ${FILENAME}". IT'S "${FILENAME_NO_EXT}". I create "ELECTRIC" folder in Desktop and I use it for saving my *.spi files. To allow the script to work, you must insert your libraries inside this folder on desktop (ELECTRIC).

SCRIPT You need to create /Applications/LTspice.app/Contents/MacOS/script.sh

######START HERE######
    #!/bin/bash

                                # Get argument from electric

    args=("$@")

                                # Create *.net file for LTspice

    cd  ~/Desktop/ELECTRIC/             

    cp ${args[0]}.spi ${args[0]}.net

                                # Launch LTspice and pass it parameters.

    cd /Applications/LTspice.app/Contents/MacOS/

    ./LTSpice ~/Desktop/ELECTRIC/${args[0]}.net ${args[1]} ~/Desktop/ELECTRIC/${args[2]} ${args[3]} ~/Desktop/ELECTRIC/${args[4]}
######END HERE######

It needs execution privileges: sudo chmod +x /Applications/LTspice.app/Contents/MacOS/script.sh

Use Electric as tutorial says (http://cmosedu.com/videos/electric/tutorial1/electric_tutorial_1.htm). It will open a small window with a netlist. Click on run button to see the simulation. To close LTspice, you must exit from it.

INFO: If LTspice says you that you haven't its latest version, close the window and go on.

Upvotes: 3

Related Questions