1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"./style.css" />
6 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"./design.css" />
7 <link rel=
"stylesheet" media=
"print" type=
"text/css" href=
"./print.css" />
9 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
14 <em>Translations of this page are also available in the following languages:
</em> <a href=
"geda-format_translation.ru.html" class=
"wikilink1" title=
"geda-format_translation.ru.html">Русский
</a>.
17 <h1 class=
"sectionedit1" id=
"file_format_translation">File format translation
</h1>
21 We need a universal translator system that can translate in all directions between gEDA tools, possible future gEDA tools, and outside tools that are likely to be used with gEDA tools.
25 <!-- EDIT1 SECTION "File format translation" [121-345] -->
26 <h2 class=
"sectionedit2" id=
"scope">Scope
</h2>
30 Of course, everything to everything is not reasonable. So, set a limit of gEDA tools, possible future gEDA tools, and outside tools that are likely to be used with gEDA tools. Of course, tool formats where translation doesn
't make sense don
't need to be supported.
34 The idea is to have an intermediate format. First translate to the intermediate format, then translate out. The intermediate format should be sufficiently expressive that there can be a lossless round trip from any gEDA tool format to the intermediate format and back.
38 Lossless means that the resultant file is equivalent in how it works. It is not necessary to preserve formatting and other things that don
't matter.
42 All of the formats needing translation presently consist of lists of objects, with some kind of encapsulation. Each object has connections and attributes.
46 This suggests the possible of a standard netlist format as the intermediate format.
50 Further discussion related only to formats that fit this model.
54 If possible, the format chosen should have a history of use for at least part of this, and have a published specification that is externally controlled and freely available.
58 There needs to be a way to merge changes from any target/source without messing up other parts.
62 <!-- EDIT2 SECTION "Scope" [346-1634] -->
63 <h3 class=
"sectionedit3" id=
"tool_types_needing_support">Tool types needing support
</h3>
66 <li class=
"level1"><div class=
"li"> schematic
</div>
68 <li class=
"level1"><div class=
"li"> layout
</div>
70 <li class=
"level1"><div class=
"li"> simulation
</div>
75 <!-- EDIT3 SECTION "Tool types needing support" [1635-1712] -->
76 <h3 class=
"sectionedit4" id=
"geda_tools">gEDA tools
</h3>
80 Lossless round trip is required, so archival storage can use the intermediate format.
83 <li class=
"level1"><div class=
"li"> gschem
</div>
85 <li class=
"level1"><div class=
"li"> pcb
</div>
87 <li class=
"level1"><div class=
"li"> gnucap
</div>
89 <li class=
"level1"><div class=
"li"> Icarus Verilog
</div>
94 <!-- EDIT4 SECTION "gEDA tools" [1713-1869] -->
95 <h3 class=
"sectionedit5" id=
"other_free_tools_that_should_be_well_supported">Other free tools that should be well supported
</h3>
99 These tools are free, too. The standard needs to support them on an equal basis with gEDA.
102 <li class=
"level1"><div class=
"li"> NGspice
</div>
104 <li class=
"level1"><div class=
"li"> Qucs
</div>
106 <li class=
"level1"><div class=
"li"> Kicad
</div>
108 <li class=
"level1"><div class=
"li"> Magic
</div>
110 <li class=
"level1"><div class=
"li"> Electric
</div>
112 <li class=
"level1"><div class=
"li"> Xcircuit
</div>
114 <li class=
"level1"><div class=
"li"> Fritzing
</div>
119 <!-- EDIT5 SECTION "Other free tools that should be well supported" [1870-2100] -->
120 <h3 class=
"sectionedit6" id=
"non-free_import_and_export">Non-free import and export
</h3>
124 Support for these will allow gEDA tools to play nice with the commercial world. Basic functionality is needed, but it doesn
't need to be lossless. Lossless should be possible, but it is not a high priority to actually implement it.
127 <li class=
"level1"><div class=
"li"> Eagle
</div>
129 <li class=
"level1"><div class=
"li"> Orcad
</div>
131 <li class=
"level1"><div class=
"li"> LTspice
</div>
133 <li class=
"level1"><div class=
"li"> Pads
</div>
138 <!-- EDIT6 SECTION "Non-free import and export" [2101-2413] -->
139 <h3 class=
"sectionedit7" id=
"geda_missing_functionality">gEDA missing functionality
</h3>
143 Hopefully having a translator system will provide a seed so these can be done.
146 <li class=
"level1"><div class=
"li"> Back annotation from layout or simulation to schematic
</div>
148 <li class=
"level1"><div class=
"li"> Static timing analysis
</div>
150 <li class=
"level1"><div class=
"li"> Post-layout signal integrity simulation.
</div>
152 <li class=
"level1"><div class=
"li"> Layout - schematic comparison
</div>
154 <li class=
"level1"><div class=
"li"> Use of the same schematic for the whole project.
</div>
159 <!-- EDIT7 SECTION "gEDA missing functionality" [2414-2748] -->
160 <h3 class=
"sectionedit8" id=
"explicitly_not_supported">Explicitly not supported
</h3>
163 <li class=
"level1"><div class=
"li"> Plotting
</div>
165 <li class=
"level1"><div class=
"li"> Commands
</div>
167 <li class=
"level1"><div class=
"li"> Behavioral modeling
</div>
172 <!-- EDIT8 SECTION "Explicitly not supported" [2749-2834] -->
173 <h2 class=
"sectionedit9" id=
"concepts">Concepts
</h2>
177 All of these consist of lists of objects, with connections and attributes.
181 It is tradition that a netlist is used for interchange, but the traditional approach only goes one way, because information is lost in the translation.
185 The format must convey the meaning, not necessarily in the same way as the tool
's native format or internal storage.
189 It is not necessary to translate parts that are usually in libraries, and are tool specific, such as models, symbols, or footprints.
193 All contenders for possible formats must support a loss round-trip to any other.
197 <!-- EDIT9 SECTION "Concepts" [2835-3419] -->
198 <h3 class=
"sectionedit10" id=
"some_possible_formats">Some possible formats
</h3>
203 <h4 id=
"spice">Spice
</h4>
207 A popular netlist format. It has a history of use for interchange, but not yet for physical placement. Problems: irregular syntax, not sufficiently expressive. These problems have been a major hassle for years for developers. It is well accepted, but not by people who know it well.
212 <h4 id=
"verilog">Verilog
</h4>
216 The structural subset is a good netlist format. It is regular, sufficiently expressive, and has a published standard. It has a history of use for interchange, but not yet for physical placement.
221 <h4 id=
"vhdl">VHDL
</h4>
225 The structural subset is a good netlist format. It is regular, sufficiently expressive, and has a published standard. It has a history of use for interchange, but not yet for physical placement.
230 <h4 id=
"spectre">Spectre
</h4>
234 The structural subset is a good netlist format. It is regular, sufficiently expressive, but belongs to one company (Cadence), so rule it out. It has a history of use for simulation only.
239 <h4 id=
"xml">XML
</h4>
243 XML is not really a format but a syntax. A good format can easily be made based on XML, but has no history of use in a similar context. The syntax is well documented but there is no outside documentation of application in any related use.
247 <!-- EDIT10 SECTION "Some possible formats" [3420-4644] -->
248 <h3 class=
"sectionedit11" id=
"representation_of_physical_placement">Representation of physical placement
</h3>
252 This part is the only part where there is not a strong history of use for VHDL and Verilog.
259 <li class=
"level1"><div class=
"li"> Nets are also objects with connections and attributes. Nets have meaning in all contexts.
</div>
261 <li class=
"level1"><div class=
"li"> A place on a schematic can be considered to be an object, with connections and attributes.
</div>
263 <li class=
"level1"><div class=
"li"> Pads, connectors, thermals, vias .. are also objects, with connections and attributes.
</div>
265 <li class=
"level1"><div class=
"li"> Use `define (assuming Verilog format) to set aside sections that have meaning in one context but not another.
</div>
267 <li class=
"level1"><div class=
"li"> This is a high level description. Take a high level view across all. It
's not lines, boxes, and circles.
</div>
269 <li class=
"level1"><div class=
"li"> If you must, lines, boxes, and circles can be objects too, but not translatable because they have no meaning in other contexts.
</div>
271 <li class=
"level1"><div class=
"li"> Attributes that have no meaning are silently ignored. Attributes that have meaning in one context but not in another context are ignored where they have no meaning.
</div>
276 <!-- EDIT11 SECTION "Representation of physical placement" [4645-5602] -->
277 <h2 class=
"sectionedit12" id=
"applications">Applications
</h2>
281 Choosing the Verilog format as one possibility.
285 The unit of encapsulation is the “module”:
287 <pre class=
"code">module my-module(connections);
292 Each object in the list has a consistent syntax:
294 <pre class=
"code">type #(attributes) name (connections);
</pre>
299 <pre class=
"code">resistor #(.r(
1k)) r123 (a, b);
300 resistor #(.r(
1k)) r234 (.p(b), .n(c));
</pre>
303 “r” is the name of an attribute. “
1k” is the value (a string).
307 In the first example, connections are determined by order. In the second, they are mapped by name. Node “b” connects to pin “p” and node “c” connects to pin “n”.
311 A “net” is also an object.
315 In the above example, both connect to node b directly. In a schematic representation the connection would not be direct, but through a “net”
317 <pre class=
"code">resistor #(.r(
1k)) r123 (.p(a1), .n(b1));
318 resistor #(.r(
1k)) r125 (.p(b2), .n(c2));
319 net b (
.1(b1),
.2(b2));
</pre>
322 The name of the net is “b”. It has no attributes.
326 For schematic, you can now place the nodes:
328 <pre class=
"code">place #(.x(
1222), .y(
3438)) place11333 (b1);
329 place #(.x(
4334), .y(
8433)) place34894 (b2);
330 place #(.x(
9393), .y(
4232)) place49334 (a1);
331 place #(.x(
2932), .y(
2384)) place34983 (c2);
</pre>
334 Portions that apply in only certain contexts can be selectively included with
'ifdef:
336 <pre class=
"code">module my_circuit;
347 Complex nets can be encapsulated:
349 <pre class=
"code">module net23842 (
1,
2,
3);
358 <pre class=
"code">module net9393 (
1,
2);
359 net #(.color(blue), .thickness(thin)) n38423 (
1,
2);
363 <!-- EDIT12 SECTION "Applications" [5603-] --></body>