[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gEDA: gschem pcb-mode and RC files



Hello,

I've been working on a "pcb mode" for gschem.  From the user point of 
view, the goal is for there to be a "PCB" menu in gschem where you can 
do things like run gsch2pcb and also launch pcb.  When you launch pcb 
via this menu you will be able to select an element in the schematic and 
have pcb select the corresponding layout element automatically.

I have the cross probing working and my next task is adding in the stuff 
to run gsch2pcb (and tell pcb to handle the results).  I think for this 
to work I need to have a project file that gschem can read.  Offhand the 
things which need to go in this project file are

- list of schematics
- output file name for the netlist
- name of the .pcb file
- name of the gsch2pcb project file
- any special flags to pass to gsch2pcb

For those of you familiar with gsch2pcb you'll see that this list has a 
lot of overlap with gsch2pcb.

So, how to proceed....  Some of the candidate options are:

1)  teach pcb-mode (what I'm calling the collection of routines which 
get loaded into gschem to make it interact specifically with pcb) how to 
read gsch2pcb project files and extend that file format to hold any 
extra information (if any) that might be needed by gschem.  Has the 
advantage of being able to work with an existing gsch2pcb project file 
that someone may have.

2)  use a scheme style RC file like the rest of gschem/gnetlist/gattrib 
and teach gsch2pcb to read those instead

3)  #2 and have pcb-mode generate the gsch2pcb project file 
automatically when the user asks pcb-mode to run gsch2pcb

4)  #2 and have a gsch2pcb file which is maintained seperately.  I 
dislike this enough that I probably won't do this one.


I'm leaning towards #1 or #3.  I'd like to avoid adding N file parsers 
for N different modes (I'm thinking gnucap-mode, cascade-mode, etc on 
down the road) which would suggest #3.

If I end up with any variants of #2, is there an existing guile function 
that sets a RC value and later reads it?  The things I saw in the 
system-*rc files seem to all directly call custom guile functions.  In 
other words to add to the component library, you use

   (component-library "somepath")

which is customized to that function instead of something like

   (append-rc-value 'component-library "somepath")

where append-rc-value (which doesn't exist yet I think) could be a 
generic function.  One of my rules with pcb-mode is anything pcb 
specific goes in pcb.scm (a single scheme file) and anything which gets 
written in C and compiled into gschem must be generic and not pcb specific.

Comments?  Suggestions?

Thanks

-Dan