News & Commentary: 2004-12-28

Electronic CAD for Linux: Problems with GEDA and Comparison with Eagle CAD

I'm hoping that the Free Software world does get its act together and come up with a high quality CAD system. For the moment, I'm working with Eagle CAD but that might change. This covers my efforts at getting into geda, and this is certainly a criticism but might perhaps even be constructive. At any rate, I was asked to be specific about what I have issues with, and at least I have been able to point to some very specific concerns. Other people may disagree with my conclusions, as is their entitlement.

Here is the GEDA website for anyone who wants to check out what I am on about

I hadn't actually tried geda for some years, I got into Eagle CAD because I needed something that was readily available on both MS-Windows and Linux and had as short as possible time to get "up to speed". I also need something that does both schematics and PCB layout -- NB: the PCB layout is the most important bit for me.

Because I was prompted (and to show I care) I decided to have a go at installing a more recent geda.

Getting it Installed

It is not available in fedora-core so to install it I need to chase down the source. I found SRPM packages on http://www.geda.seul.org/binary.html and these are the most convenient format for me because I can easily keep track of what I have installed from outside the main distro.

First thing that I note is that nowhere on the website does it say, "how to get going" or "start here" or anything like that. I know a bit about it because I've done it before. I guess that most people can install RPM packages but then again, geda is a lot of packages and people don't want to have to puzzle something out, so I just download ALL the SRPM packages and start building.

Also, the geda website does not make it clear which features geda supports, which ones are soon to be supported, etc. Think from the perspective of someone choosing a tool, they are going to be visiting a lot of websites and not spend much time on each. They want to know what features they are getting and how to get up and running. It isn't even clear whether geda supports PCB layout... there is a small note in the FAQ that geda will support PCB layout in the future but that you should get a program called "pcb" in the meantime. Why not put a mirror of the latest pcb package in SRPM format along with the other SRPM files? At least then you can say that you do have PCB support and here is the program. Give a positive, firm answer rather than making the reader search for the answer and then when they do find it the answer is confusing.

Look at the cadsoft page, in the top left, first of the links is http://www.cadsoft.de/info.htm which gives a clear explanation of what you are getting including a list of modules and a list of features. Someone who is looking around for a tool and lands on the cadsoft page is up to speed within the first 5 minutes. The very next link on the cadsoft page is http://www.cadsoft.de/Tour/tour00.htm so you can go right through the program and understand what it does and how it looks in detail. You don't have to dig for the information, it is immediately presented, easy to get hold of and organised in the way that a newcomer to the site will find exactly what they are looking for.

Let me go back to my SRPM build process...

I use fedora-code-2 at the moment and the SRPM files didn't compile without modification:

----------------------------------------------------------------------
rpmbuild --rebuild libgeda-20040111-1.src.rpm

error: Installed (but unpackaged) file(s) found:
   /usr/share/info/dir

*** libgeda.spec        2004-01-14 10:07:26.000000000 +1100
--- libgeda.spec.fixed  2004-12-23 09:57:04.659932528 +1100
***************
*** 37,42 ****
--- 37,43 ----
  %install
  make install DESTDIR=$RPM_BUILD_ROOT
  ./libtool --finish $RPM_BUILD_ROOT%{_libdir}
+ /bin/rm $RPM_BUILD_ROOT%{_infodir}/dir
  
  strip $RPM_BUILD_ROOT%{_libdir}/libgeda.a
  strip $RPM_BUILD_ROOT%{_libdir}/libgeda.so.20.0.0
----------------------------------------------------------------------
rpmbuild --rebuild geda-gschem-20040111-1.src.rpm

error: Installed (but unpackaged) file(s) found:
   /usr/share/info/dir

*** geda-gschem.spec.orig       2004-01-14 10:41:16.000000000 +1100
--- geda-gschem.spec    2004-12-23 12:33:24.978907288 +1100
***************
*** 42,47 ****
--- 42,48 ----
  mv $RPM_BUILD_ROOT%{_datadir}/locale/de_DE $RPM_BUILD_ROOT%{_datadir}/locale/de
  mv $RPM_BUILD_ROOT%{_datadir}/locale/ja_JP $RPM_BUILD_ROOT%{_datadir}/locale/ja
  mv $RPM_BUILD_ROOT%{_datadir}/locale/nl_NL $RPM_BUILD_ROOT%{_datadir}/locale/nl
+ /bin/rm $RPM_BUILD_ROOT%{_infodir}/dir
  
  %post
  /sbin/install-info %{_infodir}/gschemdoc.info.gz %{_infodir}/dir
----------------------------------------------------------------------
OK, having that sorted, I remembered that you have to compile and install the libraries first before installing the other packages. So far so good.

Trying it Out

Now I have all the packages installed and once more there is no HOWTO or getting started documentation but I figure that running "gedasetup" might be a good place to start. Seems logical to me *shrug*.

gedasetup seems to need a file called "setup.cfg", I isn't in the geda-setup package so I run updatedb, wait for the system to get its act together with the newly installed files and I still can't find "setup.cfg". In desperation I even try "man gedasetup" (which fails) and I look at the file /usr/share/doc/geda-setup-20040111/README (which seems to be empty) and that suggests to me that gedasetup is not the best place to get started.

Next best place seems to be pointing a web browser at file:///usr/share/doc/geda-docs-20040111/gedadocs.html There is no manual that starts at the top (with geda itself) but there is a gschem user manual which tells me that I can test to see if everything is installed correctly by running:

    libgeda-config --version
    gesym-config --version

Neither of these work, what have I done wrong?

I don't know.

So I figure I might as well just run the top level "geda" program which should be smart enough to figure everything else out. It lets me create a new project and it offers me a PCB layout tool, which does not work because I only installed the packages that I found on the geda site (how silly of me). OK, I try the schematic editor and start slapping down some parts. I find the schematic editor in the "tools" menu so I run it from there (which seems sensible at the time, little do I know what to expect).

The schematic editor menu layout is good, easy to find stuff, everything has keyboard shortcuts, nery nice. The icon bar is nice and clean, just the useful icons, no junk... also very nice. I do think that the zoom-box and zoom-out commands should be available on the icon bar (with cute little magnifying glass icons) because new users are going to want those. You might also consider adding to the "view" menu a tickbox item that hides or shows the icon bar. Basically the icon bar is GOOD for new users but after a short while it just becomes a waste of screen space and the operator is going to switch over to the menus and the keyboard shortcuts.

Grids and Zoom

After slapping down a few parts at random I immediately notice that I can't see the parts because they are so very small. Seems like the default zoom mode is to display a giant sheet with microscopic parts. Do I start drawing in the middle of this giant sheet or in one of the corners? I'm just not familiar with working on a drafting sheet the size of a swimming pool. What I'm saying here is that being ABLE to work on a huge sheet can be a convenient feature BUT most people will WANT to work on something like an A3 landscape size, most of the time. There are even some Luddites out there who will have the unreasonable expectation that they want to print their work and have it come out in a sane format so putting feint page boundaries (see how xfig does it) into the background can also be nice.

My suggestion on the zoom and page scaling: take a close look at xfig... the default scale of 1:1 gives you about a page per screen. You can force it to zoom out or in from that starting point.

Next thing I notice after zooming in to what I would guess is about an A3 landscape page and slapping more parts down is that none of the parts have sizes that are sensible to the background grid. Nothing aligns neatly and when trying to get a neat layout you are better off ignoring the background grid because it is actively unhelpful. When I zoom right up close I get the minor grid (which is good but at this distance the major grid should still be marked by a special point every 10 items) and I find that a coil is 9 minor grid units long (the major grid is 10 minor grid units). A capacitor is 7 minor grid units long, a BJT is 10 minor grid units tall and the base is 6 units across, a MOSFET is 8 units tall and the gate is 5 units across, except for the MOSFETs with a circle round them and they are the same as the transistors. The logic gates have input pins with a gap of 4 or 3 or sometimes 5 units between pins, the logic gates with more imputs are also a longer gate (keeps the entire gate proportions intact) which makes a page full of gates look a bit strange when some gates are double the size of other gates.

I know that free software libraries are collected from bits and bobs where they happen to be available but the geda LOOKS like a motley collection. Even if you guys can't fix the entire library, at least publish a standards document and come up with some sensible choice of grids and make it clear what the "officially correct" layout for schematic components should be.

------------ Here's my grid suggestion -----------------------

* There are four levels of grid:
     Tiny Grid
     Pin Grid
     Component Grid
     Big Grid (T/P/C/B).

* Five Tiny Grid steps makes a Pin Grid

* Two Pin Grid steps makes a Component Grid

* Ten Component Grid steps makes a Big Grid

B...................................................................................................B
C.........C.........C.........C.........C.........C.........C.........C.........C.........C.........B
P....P....P....P....P....P....P....P....P....P....P....P....P....P....P....P....P....P....P....P....B
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

Layout rules for the library:

* All component box outlines (e.g. various logic devices) have corners
  that land on the Component Grid.

* All component circle outlines have both center and radius landing on
  the Component Grid.

* Gates (AND, OR, NOR, etc) have top and bottom edges landing on the
  Component Grid

* All pins of components land on the pin grid.

* Standard spacing of logic pins from each other is 2 pin grid steps.

* As many pins as convenient on each component should fall on the
  component grid.

* Text, attributes and labels fall on the Tiny Grid.

* Internal decoration within a component falls on the Tiny Grid.

Rules for display and normal editing:

* Background display should show the grid that fits the screen at the current
  level of zoom, and this should show as a semi-bright points. The points that
  fall on the next larger grid should be bright points. Because the multiples
  of the grids are all different, the user can intuitively feel what level of
  zoom they are working at.

* The snap of the mouse should change as you zoom in and out. When placing
  items or moving them, the snap of the placement is onto the smallest visible
  background grid. Thus you have to zoom close in order to be able to move a 
  component to a position off the component grid.

* If the operator wants to force the library component to a strange grid
  then they can.

* Wiring snap will jump to the current bacground grid normally or to a component
  pin if that component pin within one Pin Grid radius.


Typical usage:

You are mostly going to place components with the Component Grid as the
semi-bright background grid and the Big Grid as the bright background grid.
In this mode, components snap to the Component Grid which will always suit
the library components.

You do wiring one level closer with the Pin Grid as the semi-bright background
grid and the Component Grid as the bright background grid. At this time,
you might want to straighten up a wire by moving a component onto the pin
grid, this is OK. Most of the components will end up on the component grid
and the rest will still look decent. The background grid will be useful to
the operator because the wires will fall onto background grid points.

If you really want to do some tweaking, you can zoom right in to the tiny
grid level and make fine adjustments. This will not happen often.

--------------- end of grid suggestion ------------------

Organisation and Integration

Where was I, oh yeah I have a schematic now in the editor. I go to the file menu and choose the "save all" option and then quit. When I get back to the "geda" project manager my schematic is nowhere to be seen. I play around for a while and discover that the correct way to make it work is to select "new" from the "file" menu and then choose a schematic file and give it a name. Now the schematic file is in the list and I double-click on that file to get into the schematic editor. Just out of curiosity, I try and double-click on the same file while the schematic editor is already open on that file. Another schematic editor pops up. Under the same circumstance Eagle CAD just brings the EXISTING editor to the top of the window stack (and de-iconises the window if necessary) so obviously eagle is a bit more tightly integrated around its project manager.

Like most of my quibbles with geda, once you get the hang of the project manager, it isn't difficult to use. I'm just thinking that MOST people would expect that running the schematic editor from the "tools" menu would somehow automagically get the project manager to include the file that you have saved into the project. Eagle has a very simple methodology... all files in the project directory are part of the project and visible in the project manager. So simple yet so effective. On the other hand, geda tries to maintain a special project file with links to files which it doesn't do well.

One more issue, the geda project manager has "easy_spice" in it's list of tools, but I don't have easy_spice on my system, I have gnucap. Come to think of it... easy_spice is not even mentioned on the geda website, geda lists ngspice and gnucap. Is easy_spice some sort of alias, wrapper or symlink that I'm supposed to set up for myself? I can't find mention of it in the FAQ nor in the geda-doc package. This stuff has a sloppy feel to it. The integration is poor and the user-friendliness is low (even for a technical user like myself).

In comparison, the Eagle CAD light version is a single download package, install and run. The only small trick with Eagle is that the first time you use it you must run as root so it can get its license files sorted out. Other than that there are no tricks. Of course Eagle CAD Light does NOT come with a simulator, but then again, it does not pretend to either.

From looking at the Eagle website, they are providing some integration with the "B2 Spice v5" so I expect so see that in the professional version at some future time. Again, Cadsoft clearly tell you what IS supported and they don't mix that up with what MIGHT be supported in the future. It is so important to keep a clear distinction.

Scripting

I'm going to just make another comparison between Eagle CAD and geda and probably this one will hurt some people's delicate sensibility but I'm saying it because I believe it to be true and someone has to lay it on the line.

Get rid of guile.

Replace it with perl, python, or even ruby (my preference goes in that order). For a project like geda, guile is a boat anchor preventing you from moving forwards. Eagle CAD wrote their own scripting language but they came up with something that had many features from C and Java and thus is easy for C and Java programmers to learn. I perfectly understand the geda developers not wanting to get into the business of writing a scripting language but if they are going to link with an existing scripting language then choose wisely. This is on many levels and I'll list the ones that come to mind:

I'm not saying that the LISP/Scheme family of languages are bad or useless. They have a certain elegance to them. However, they have failed to catch on in the mainstream and there is a certain positive-feedback to language momentum. The C family of languages have so much momentum now that scheme would have to have substantial advantages in order to make a comeback in the long term -- quite frankly there isn't enough incentive for most people to switch over and there isn't enough incentive for new people to learn something that has only minor market impact.

I myself have written plenty of code in scheme, I am proud of my code, it works, it has structure, documentation, everything. When I tried to get people interested, they found the scheme syntax a major turnoff. These people were NOT even willing to invest ONE DAY in learning about scheme. I learnt a lot about people while working with scheme and the most important thing that I learnt is that people resist anything that is alien, weird or unusual. To some extent, all Free Software has this stigma (of being alien) anyway because of the licensing issues and because of differences in the business model (service oriented rather than sales oriented). If you base your scripting on guile you are muoltiplying up this stigma by at least an order of magnitude.

Conclusion

I guess my overall summary of geda is "getting there" but I was asked for specific points. In general, the main problems are ease of setup for a newbie user, documentation (especially documentation useful for a new user) and overall integration, "tightness" and polished details.

I don't want to discourage you guys but the competition out there is tough and products like Eagle CAD are pretty solid and remarkably cheap. Of course, Free Software will win in the end because Free Software keeps building and building. If geda can't make the grade then someone will rip geda down to basic subroutines and rebuild it, possibly merge the bits with other packages and the GPL lets that happen. Free Software is a long term strategy and I understand that.

In the short term though, geda still needs work.

Creative Commons License
This work is licensed under a Creative Commons License.

Back to News Commentary Index