Node: Library File, Previous: Library Contents File, Up: File Formats



Library File Format

This section provides an overview about the existing m4 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.

The macro file entry:

     define(`Description_43256_dil', `SRAM 32Kx8')
     define(`Param1_43256_dil', 28)
     define(`Param2_43256_dil', 600)
     define(`PinList_43256_dil', ``pin1', `pin2', ...')
     

And the list file:

     43256_dil:N:43256:62256
     

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.

It is very important to select a unique identifier for each macro. In the example this would be 43256_dil which is also the templates name. It is required by some low-level macros that Description_, Param1_, Param2_ and PinList_ are perpended.

The list file uses a syntax:

     template:package:value[:more values]
     

This means that the shown example will create two element entries with the same package and pinout but with different names.

A number of packages are defined in common.m4. Included are:

     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
     

If you are going to start your own library please take care about m4 functions. Be aware of quoting and so on and, most important check your additional entry by calling the macro:

     CreateObject(`template', `value', `package suffix')
     

If quoting is incorrect an endless loop may occur (broken by a out-of-memory message).

The scripts in the lib directory handle the creation of libraries as well as of their contents files. Querying is also supported.

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.