1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
<html lang="en">
<head>
<title>Pcb</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Pcb">
<meta name="generator" content="makeinfo 4.6">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
--></style>
</head>
<body>
<div class="node">
<p>
Node: <a name="Library%20File">Library File</a>,
Previous: <a rel="previous" accesskey="p" href="Library-Contents-File.html#Library%20Contents%20File">Library Contents File</a>,
Up: <a rel="up" accesskey="u" href="File-Formats.html#File%20Formats">File Formats</a>
<hr><br>
</div>
<h3 class="section">Library File Format</h3>
<p>This section provides an overview about the existing <code>m4</code> definitions
of the elements. There are basically two different types of files. One
to define element specific data like the pinout, package and so on, the
other to define the values. For example the static RAM circuits 43256 and
62256 are very similar. They therefore share a common definition in the
macro file but are defined with two different value labels.
<p>The macro file entry:
<pre class="example"> define(`Description_43256_dil', `SRAM 32Kx8')
define(`Param1_43256_dil', 28)
define(`Param2_43256_dil', 600)
define(`PinList_43256_dil', ``pin1', `pin2', ...')
</pre>
<p>And the list file:
<pre class="example"> 43256_dil:N:43256:62256
</pre>
<p>The macro must define a description, the pin list and up to two additional
parameters that are passed to the package definitions. The first one is
the number of pins whereas the second one defines for example the width
of a package.
<p>It is very important to select a unique identifier for each macro. In
the example this would be <em>43256_dil</em> which is also the templates name.
It is required by some low-level macros that
<em>Description_, Param1_, Param2_</em> and <em>PinList_</em> are perpended.
<p>The list file uses a syntax:
<pre class="example"> template:package:value[:more values]
</pre>
<p>This means that the shown example will create two element entries with the
same package and pinout but with different names.
<p>A number of packages are defined in <code>common.m4</code>. Included are:
<pre class="example"> DIL packages with suffix D, DW, J, JD, JG, N, NT, P
PLCC
TO3
generic connectors
DIN 41.612 connectors
zick-zack (SD suffix)
15 pin multiwatt
</pre>
<p>If you are going to start your own library please take care about <code>m4</code>
functions. Be aware of quoting and so on and, most important check your
additional entry by calling the macro:
<pre class="example"> CreateObject(`template', `value', `package suffix')
</pre>
<p>If quoting is incorrect an endless loop may occur (broken by a out-of-memory
message).
<p>The scripts in the <code>lib</code> directory handle the creation of libraries
as well as of their contents files. Querying is also supported.
<p>I know quite well that this description of the library implementation is
not what some out there expect. But in my opinion it's much more useful to
look at the comments and follow the macros step by step.
</body></html>
|