FreeCalypso > hg > ueda-linux
comparison ueda/doc/prelayout.txt @ 0:cd92449fdb51
initial import of ueda and ifctf-part-lib from ifctfvax CVS
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 20 Jul 2015 00:24:37 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cd92449fdb51 |
---|---|
1 Pre-layout in uEDA | |
2 | |
3 If one implements the common division of labor in which the conceptual/schematic | |
4 hardware design and the PCB layout are done by different people, in what form | |
5 is the design passed from the original designer to the PCB layout contractor? | |
6 | |
7 The common input to the PCB layout step is the netlist. However, the netlist is | |
8 actually not enough. The netlist specifies all interconnections among | |
9 components in the design, but what about the components themselves? In what | |
10 form is the list of components passed from design to layout? The answer depends | |
11 on exactly how the division of labor is implemented. | |
12 | |
13 In some organisations the designer may specify standard components by value or | |
14 device nomenclature and let the PCB layout person pick the footprints. Or the | |
15 designer may specify the footprints verbally ("this resistor is an 0805, this | |
16 tantalum cap is size C, this logic IC is SMT, that one is a DIP..."), but still | |
17 leave it to the layout person to actually draw the footprints in the PCB layout | |
18 package of his/her choice. | |
19 | |
20 However, if the hardware design is being done by a non-profit organisation like | |
21 the International Free Computing Task Force (the application scenario for which | |
22 uEDA is designed), it is often the case that the conceptual/schematic hardware | |
23 designer is a volunteer whereas the PCB layout labor has to be hired for money. | |
24 In this scenario it is advantageous to save cost by having the designer do as | |
25 much pre-layout work as possible, including the scripted generation of all PCB | |
26 land patterns, leaving only the actual layout (the placement of the supplied | |
27 footprints on the PCB and trace routing) to the costly hired labor. | |
28 | |
29 An additional consideration is that in order to keep our designs strictly free | |
30 and open source from start to finish, we don't want the layout to be done in | |
31 some proprietary package and we insist instead that it be done with the free | |
32 and open source PCB program (http://pcb.sourceforge.net/). Or more precisely, | |
33 we insist on the PCB layout file format. | |
34 | |
35 These two considerations combine to suggest that we generate the PCB footprints | |
36 for all components in the design in the PCB format and hand them to whoever we | |
37 hire to do the layout. This is what is called pre-layout in uEDA. | |
38 | |
39 Whereas PCB layout is inherently a graphical/visual task and thus seriously | |
40 incompatible with the world view of the uEDA author, the footprint generation | |
41 for PCB happens to be very compatible with the UNIX culture-based text-based | |
42 scripted flow embraced by uEDA. The PCB project's original footprint library | |
43 is actually M4 code that generates footprints algorithmically on the fly! | |
44 | |
45 The pre-layout function of uEDA requires the use of the IFCTF part library. | |
46 Among other things it contains a version of the M4 footprint library from PCB | |
47 ported from GNU M4 to the original UNIX M4. The IFCTF part library is | |
48 maintained in the IFCTF CVS repository and may be checked out with: | |
49 | |
50 $ cvs -d :pserver:anoncvs@ifctfvax.Harhan.ORG:/fs1/IFCTF-cvs co ifctf-part-lib | |
51 | |
52 uEDA expects it to be installed in /usr/local/eda/ifctf-part-lib | |
53 | |
54 The pre-layout function of uEDA works as follows: | |
55 | |
56 1. Each component needs to have a footprint= attribute defined in the MCL. | |
57 It works exactly like the footprint= attribute in gEDA with the gsch2pcb | |
58 flow. | |
59 | |
60 2. To generate the PCB footprints for your design, run the following pipeline: | |
61 | |
62 ueda-getfps | ueda-runm4 > elements.pcb | |
63 | |
64 ueda-getfps(1) reads the MCL and emits a set of M4 macro calls to generate all | |
65 of the footprints, and ueda-runm4(1) runs m4(1) on the IFCTF part library. | |
66 The output of the pipeline is a concatenated set of footprints for the board | |
67 with the name field (refdes) filled in correctly in each. If the -h option is | |
68 given to ueda-getfps, the concatenated set of footprints will be preceded by a | |
69 blank PCB template (the same one provided by PCB itself when starting a new | |
70 layout) and the resulting elements.pcb will be a valid layout PCB that can be | |
71 loaded into PCB to start the layout job. | |
72 | |
73 Alternatively, ueda-cutelements(1) may be used to cut the concatenated output | |
74 from ueda-getfps | ueda-runm4 into one file per element. It should be run in | |
75 an empty directory and the files thus produced are named after the component | |
76 reference designators. | |
77 | |
78 The uEDA footprint generation mechanism is designed so that the generation of | |
79 all footprints at once concatenated into a single PCB file is native whereas | |
80 producing single elements is secondary because the way PCB's M4 library is | |
81 designed makes this approach much more efficient, especially when using the | |
82 original UNIX M4 rather than GNU M4. | |
83 | |
84 File elements | |
85 | |
86 In addition to the M4-based original PCB footprint library which has been | |
87 incorporated into the IFCTF part library, there are other popular footprint | |
88 libraries which are simple collections of pregenerated elements, one per file. | |
89 They are called file element libraries, and there is a very popular and very | |
90 useful one maintained by John Luciani. | |
91 | |
92 uEDA supports file element libraries in addition to the main M4-based IFCTF | |
93 part library, but the process always goes through M4. | |
94 | |
95 ueda-getfps(1) normally generates a make_footprint() M4 macro call for every | |
96 component. This macro looks for the requested footprint in the M4 library and | |
97 if none is found, invokes the ueda-instfileelem(1) utility to try to find it in | |
98 the file element libraries and instantiate it from there. | |
99 See the ueda-instfileelem(1) man page for how to locate the file element | |
100 libraries. | |
101 | |
102 Some file element libraries (particularly John Luciani's) use footprint names | |
103 which would confuse M4. To get around this problem, the footprint= attribute | |
104 in the MCL may be specified as follows: | |
105 | |
106 footprint=file:Long-weird_footprint-name | |
107 | |
108 This syntax tells ueda-getfps(1) to generate a make_footprint_file() M4 macro | |
109 call instead of make_footprint(). The former invokes ueda-instfileelem(1) | |
110 immediately without trying to look in the M4 library first. |