gEDA-dev: Beginning the parts manager

Cory Cross crcross at mtu.edu
Tue Apr 24 04:35:04 EDT 2007


Hi all,
I've built a test environment to show off what I've been thinking for a 
parts manager. See 
http://www.gedasymbols.org/user/cory_cross/tools/partsmanager/ for the 
files I'll be talking about.

In test.sch, there are four devices: two triac drivers and two 
resistors. Instead of having two 2-terminal and two 6-terminal devices, 
I want to combine the resistors into a dual-pack DIP-4 and the triacs 
into a dual-pack DIP-12. The problem: the default components don't and 
can't simultaneously support dual- and single-pack components. In the 
future, a program will be written to detect when you define multiple 
components and automatically create a file like 'test_net_replace_file'. 
The python script uses that file to map the pins of the second triac 
(U101b) to their new locations. Load the new netlist in PCB and 
everything attaches where it should!

While I will need to explain how to use this better, it actually works 
/right now/.

Quick usage:
1. `gschem` -> test.sch, where, for example, only U101 contains the 
footprint attribute but there are also U101[a-z]

1a. When you add a second part of a component to gschem, add a mapping 
to test_net_add_file from each of its symbol pin #s (like "U101a-6") to 
the package's pin numbers ("U101-12") (notice no 'a' this time)

2. `gsch2pcb test.sch` -> (test.cmd, test.net, test.pcb) gives many 
errors about missing footprints. test.net contains many references to 
parts that don't exist in the PCB file.

3. `python pm_netlist_replace.py test_net_replace_file < test.net > 
test-modified.net` will replace "U101b-5" with "U101-8"; since U101 is 
an actual part in PCB, it works!

4. `pcb test.pcb` and load 'test-modified.net' Press O for optimize...

The next trick is to provide a configuration file for a part and write 
the appropriate program so 1a can be done automatically.

Cory Cross


More information about the geda-dev mailing list