EDA in GNU/Linux


As I mentioned in my previous post, I will be posting a few tutorials on EDA in GNU/Linux. EDA, Electronic Design Automation, is basically a class of tools which make an electronics engineer’s life a lot easier. (Wikipedia article). These tools are used by every company or institute. Most of you would have heard of SPICE (known popularly as PSpice), a circuit simulation tool. Many similar tools exist for analog and digital circuits, VLSI design, embedded systems and PCB (printed circuit board) design. However, most of the well known proprietary tools are very costly for an individual to buy and use. In college, students end up using cracked (which is illegal and I discourage this) versions of software. Evaluation versions do not have most of the important features or are valid for just a few days. That’s how the EDA world is in most people’s perspective – filled with tools that no one can afford and that’s where this post comes in. What most people do not know is that there are tons of free and open source tools out there which can do everything you expect from the tools you have used till now. Yes there are missing features. But you can still work well enough with them. Wondering what kind of tools I’m talking about? Here is a tiny list:

  • Analog Circuit Simulation: ngspice, gnucap, gSpiceUI.
  • Hardware Description: Icarus Verilog, FreeHDL, GHDL.
  • VLSI Layout: Magic, Electric.

As I said, its a tiny list. A very tiny list. Now how do you get this software? Firstly I would suggest that you switch to a GNU/Linux distribution. This is for the simple reason that installing these in Windows can be a real pain. So if you can’t do without Windows (like me) have a dual boot setup (Windows + GNU/Linux on the same PC). Your best option would be to use Fedora. Fedora has a spin called Fedora Electronic Lab. It contains all the software you need for EDA. Here is a link: http://spins.fedoraproject.org/fel/

If you already have Fedora installed, just open the terminal and as root run the following command:

yum groupinstall ‘Electronic Lab’

Or you can install just Fedora and run the command above.

Alternatively you could use Ubuntu. Ubuntu is considered as the easiest to use GNU/Linux distribution. It also has a ton of EDA tools in its repository. Want to have a look at the list? Here you go:

If you are comfortable with some other distribution, you could just go to the tool’s website and download and install.

In my next post, I will post a beginners tutorial on analog circuit simulation using gEDA. The purpose of the tutorials on these is to get you to start using these tools. If you are someone with experience on GNU/Linux and EDA, you could just go through the documentation directly.

So stay tuned for tutorials on EDA in Linux 🙂

Update

I received a comment where I was told that using these tools on Ubuntu is not the same. Instead of telling you why (and possibly changing what he meant), here’s a part of the comment itself:

“FEL’s way of packaging opensource EDA software is not like that of Ubuntu. Even though the software are the same, the versions of the tools are not the same.

FEL’s try to follow every bug and update their tool whenever this particular tool is fixed. This leads to a more closer quality that one might except from commercial tools. While Ubuntu just waits for a new version and package it. Thereby the users need to wait 6months till the bug is fixed.

People working in FEL are people from the Semiconductor industry not software guys like ubuntu. Thus with FEL you will always hear “design flows”. Take for example ngspice, FEL’s ngspice is coupled with xcircuit to enhance designer’s experience. Even, their kicad version follows what real people want as features:
http://chitlesh.wordpress.com/2009/10/07/openmoko-hardware-development-on-fedora/

The only reason I recommended Ubuntu is because its a lot easier for beginners and most Linux users I know use it. So I would recommend using Fedora itself. And for those of you who are using GNU/Linux for the first time ever, I’d like to tell you that Fedora was the first distribution I used. Had a few tiny problems with it initially but in a few days I was good to go.

Thank you Robert for your valuable feedback! 🙂

Advertisements

7 Responses to EDA in GNU/Linux

  1. Nakul says:

    i hav a dell studio laptop, can i install fedora on it, i mean dual boot it?

    • Ashwith says:

      Sure you can :). Just create some free space on your hard-disk – make a partition out of it and then use that. You’ll need a minimum of 8GB I think. The FEL DVD is a live DVD so if nothing works, you can still boot and use the OS from the DVD itself.

  2. Robert says:

    Hello there,
    you are missing a very important point when recommending ubuntu.
    FEL’s way of packaging opensource EDA software is not like that of Ubuntu. Even though the software are the same, the versions of the tools are not the same.

    FEL’s try to follow every bug and update their tool whenever this particular tool is fixed. This leads to a more closer quality that one might except from commercial tools. While Ubuntu just waits for a new version and package it. Thereby the users need to wait 6months till the bug is fixed.

    People working in FEL are people from the Semiconductor industry not software guys like ubuntu. Thus with FEL you will always hear “design flows”. Take for example ngspice, FEL’s ngspice is coupled with xcircuit to enhance designer’s experience. Even, their kicad version follows what real people want as features:
    http://chitlesh.wordpress.com/2009/10/07/openmoko-hardware-development-on-fedora/

    Ubuntu is great for regular users, I don’t deny it. Fedora though it’s poised like Ubuntu with it’s short 6-months release cycle, FEL developers are currently thinking to rename “Fedora Electronic Lab” into “Free Electronic Lab” and provide support for CentOS 6.

    Your suggestion to opt either Fedora and Ubuntu doesn’t stand.
    I will recommend you to join the upcoming web conference where the developers will give an introduction to European engineers.
    http://www.veripool.org/news/show/108-Verilator-Verilator-Talk-at-DVClub-Bristol-20-Sep-2010

    • Ashwith says:

      I wasn’t aware of this. I’m a complete beginner myself. I just noticed the electronics package in the Ubuntu repository. Have never really used it myself. Thanks for pointing this out. :). Really appreciate you taking the time to explain everything in so much detail.
      It would be great if you could come back again with more suggestions in future posts (I’ve put one on gschem + gspiceUI) . I’m struggling to learn a few tools myself (Alliance is what I’m looking at currently).

  3. LESH says:

    Just starting digital signal simulation on ngspice. But I am getitng the following errors:
    gnetlist -g spice-sdb -o divider.cir divider.sch
    Command line passed = gnetlist -g spice-sdb -o divider.cir divider.sch
    Loading schematic [/home/lesh/spice/experiments/digital/divider.sch]
    Found duplicate net name, renaming [0] to [GND]
    Using SPICE backend by SDB — Version of 4.28.2007
    schematic-type = normal schematic
    Invalid wanted_pin passed to get-nets [unknown]
    Invalid wanted_pin passed to get-nets [unknown]
    Invalid wanted_pin passed to get-nets [unknown]
    Invalid wanted_pin passed to get-nets [unknown]

    I am using the TI SN7474 model and I created my own symbol:

    v 20110115 2
    L 300 650 375 600 3 0 0 0 -1 -1
    L 375 600 300 550 3 0 0 0 -1 -1
    B 300 300 1000 1600 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
    T -100 3400 5 10 0 0 0 0 1
    device=7474
    T 500 1100 5 10 0 0 0 0 1
    slot=1
    T -200 3200 5 10 0 0 0 0 1
    numslots=2
    T -200 3000 5 10 0 0 0 0 1
    slotdef=1:1,2,3,4,5,6
    T -200 2800 5 10 0 0 0 0 1
    slotdef=2:13,12,11,10,9,8
    P 300 600 0 600 1 0 1
    {
    T 200 650 5 8 1 1 0 6 1
    pinnumber=3
    T 200 550 5 8 0 0 0 8 1
    pinseq=3
    T 475 600 9 8 1 1 0 0 1
    pinlabel=CLK
    T -425 900 5 8 0 0 0 2 1
    pintype=clk
    }
    P 300 1600 0 1600 1 0 1
    {
    T 200 1650 5 8 1 1 0 6 1
    pinnumber=2
    T 200 1550 5 8 0 0 0 8 1
    pinseq=2
    T 350 1600 9 8 1 1 0 0 1
    pinlabel=D
    T 150 1800 5 8 0 0 180 2 1
    pintype=in
    }
    P 1600 1600 1300 1600 1 0 0
    {
    T 1400 1650 5 8 1 1 0 0 1
    pinnumber=5
    T 1600 1550 5 8 0 0 0 2 1
    pinseq=5
    T 1250 1600 9 8 1 1 0 6 1
    pinlabel=Q
    T 2250 1900 5 8 0 0 0 8 1
    pintype=out
    }
    P 800 2000 800 2200 1 0 1
    {
    T 850 2000 5 8 1 1 0 0 1
    pinnumber=1
    T 650 2400 5 8 0 0 0 2 1
    pinseq=1
    T 750 1700 9 8 1 1 90 5 1
    pinlabel=\_CLR\_
    T 900 2550 5 8 0 0 0 5 1
    pintype=in
    }
    P 800 0 800 200 1 0 0
    {
    T 850 100 5 8 1 1 0 0 1
    pinnumber=4
    T 650 0 5 8 0 0 0 2 1
    pinseq=4
    T 850 500 9 8 1 1 90 3 1
    pinlabel=\_PRE\_
    T 600 -300 5 10 0 0 0 0 1
    pintype=in
    }
    P 1400 900 1600 900 1 0 1
    {
    T 1400 950 5 8 1 1 0 0 1
    pinnumber=6
    T 1600 750 5 8 0 0 0 2 1
    pinseq=6
    T 1250 900 9 8 1 1 0 6 1
    pinlabel=\_Q\_
    T 2350 1100 5 8 0 0 0 8 1
    pintype=out
    }
    V 1350 900 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
    V 800 1950 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
    V 800 250 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
    T 1300 2000 8 10 1 1 0 6 1
    refdes=U?
    T -100 3800 5 10 0 0 0 0 1
    net=Vcc:14
    T -100 3600 5 10 0 0 0 0 1
    net=GND:7
    T 0 4400 5 10 0 0 0 0 1
    footprint=DIP14
    T 0 4200 5 10 0 0 0 0 1
    description=2 D-flip-flops with preset and clear
    T 600 1350 9 8 1 0 0 2 1
    7474
    T 0 4600 5 10 0 0 0 0 1
    file=/home/lME/gaf/SPICE/TI_spice/sn7474.cir
    T 0 4800 5 10 0 0 0 0 1
    model-name=7474

    I think the issue is with the power pins, which I do not have connected in the symbol, nor mentioned there.

    In the /sn7474.cir file the power pins are shown as:

    + optional: DPWR=$G_DPWR DGND=$G_DGND

    and there is a line:
    UFF1 dff(1) DPWR DGND
    + 1PREBAR 1CLRBAR 1CLK 1D 1Q 1QBAR
    + D_74 IO_STD MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
    .ends

    This is followed by:
    .model D_74 ueff ( model timing)

    Based upon this I think there is a U symbol that this .cir expects to be modeled, but here is no model in the .cir file for it.

    So I think I am missing an include file and possibly a means to connect the power.

    Based on this effort, I have searched and searched and cannot find a solution to why my simple 7474 divider circuit will not netlist with gnetlist. Please give us a simple digital circuit schematic, symbol explanation and spice circuit expalantaion. It would help me immensely.

    Regards,
    Les Howell

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: