Using 'makepart'

Other sections of this tutorial have described the vendor-supplied methods for creating new symbols, cells, and parts. The subject of this section is a locally-developed shortcut known as 'makepart'. By using this shortcut it becomes quite easy to build a new part from scratch in a single step. If the required cell is not available in the central library it must first be made. In such cases part creation actually requires two steps.

The 'makepart' process associates an existing package footprint (i.e. a "cell") with a new user-specified symbol by reading an ASCII file with the file extension .mkpart. Everything needed for the makepart process is contained in this single input file. The output of makepart is an importable DXD symbol and an importable part specification. More detail on how to use these outputs later.

The makepart input syntax is described below. With the exception of comment lines (which start with a "#" character) the input consists of 6 header lines, an optional global net section, and an optional no-connect section, all followed by a set of pin declaration lines (this section begins with the SIGNALS keyword). The parts of the mkpart file (and their relative order) are depicted below.

   |   Header section
   |   Global Nets section (optional)
   |   No-connects section (optional)
   |SIGNALS    <--- keyword
   |   Pin declarations section
   <end of file>
We discuss each of these sections in the paragraphs that follow.

Header section

Global nets section [optional]

It is often desirable to specify a part's power and ground connections so that they get hooked up automatically (and invisibly). The format begins with the global net name followed by a colon (:), followed by a comma-separated list of pin identifiers. Each such global net specification must occur on a single line (even if it gets very very long!). An example global net specification is
which says that pins 5, 7, 14, and 15 are built-in connections to GND. They do not appear on the symbol and are therefore never seen on the schematic. Nevertheless, they are connected to the net named "GND" whenever the part is instantiated. Note that there may be zero or more global net specifications. If you choose to use this capability, be very careful to get it right. Invisible connections are a nice shortcut to make your schematics cleaner and simpler but remember that connections do get made due to these hidden built-in global nets. It is imperative, especially because they are power or ground connections, that you get these perfect!

No-connect section [optional]

As a cross-check to ensure correct symbol/cell mapping we require that all pins be mentioned somewhere within the .mkpart file. If a given cell pin is not to be part of the symbol and if it is also not on any of the built-in global net specifications then its ID must appear in a comma-separated list preceded by "NC:".

The SIGNALS section

The final and most important section of a makepart input file is the signals section. This section begins with a single line containing the keyword "SIGNALS". Following this keyword, each non-comment line must be of the form:
type side dir pinID label

An example mkpart file

The lines below show the content of a file named 74act11374.mkpart. This part is an octal D-type flip-flop with common clock and active-low output enable. The part has builtin 5V power connections on pin 18 and 19 (using the global netname P5V) and builtin ground connections on pins 5, 6, 7, and 8 (using the global netname GND). There are no unused pins and therefore no NC: section is required. The symbol, once imported, will be placed in the "SEB" partition under the symbol name 74ACT11374.

    # 74ACT11374DW --- Octal Latch
    6 9
    74ACT11374 octal latch with common CLK & active-low OE
    1 L IN 24 OE     // will have an inversion bubble and an overbar
    0 L IN 13 CLK
    2 L ----------
    0 L IN 23 D1
    0 L IN 22 D2
    0 L IN 21 D3
    0 L IN 20 D4
    0 L IN 17 D5
    0 L IN 16 D6
    0 L IN 15 D7
    0 L IN 14 D8
    2 R ----------
    2 R ----------
    2 R ----------
    0 R BI 1 Q1
    0 R BI 2 Q2
    0 R BI 3 Q3
    0 R BI 4 Q4
    0 R BI 9 Q5
    0 R BI 10 Q6
    0 R BI 11 Q7
    0 R BI 12 Q8

The created symbol looks like the graphic shown below. Note the bubble designating an active-low input on the OE pin (pin #24). The U? at the top of the symbol is the default reference designator. This is a changeable field that you will override with something like U101 when the part is instantiated. The order number and cell name attributes are visible at the bottom. Several of the other attributes (including the pin directions) are not visible by default. If you wish to change the visibility (either to turn off the order number and/or cell name attributes or to turn on some other attribute(s) ) then you would use the librarian's symbol editor. The symbol editor an also be used to re-size the box, move pins around, or make other simple edits to a symbol. We recommend, however, that you keep your .mkpart files up to date so that you can easily regenerate your symbols and parts if needed.

The referenced cell is a 20-pin "wide SOIC" (with custom cellname "S024W") that looks like the graphic depicted below. Note that the reference designator field will be replaced by whatever you override the U? with. The reference designator appears both on the silkscreen and assembly plot layers. As seen below, we typically want the silkscreen reference designator to appear outside the part's footprint so that it will be visible on the final assembled board. The reference designator that appears on the assembly plot, however, is normally positioned in the center of the part's footprint, i.e. under the part, since at the time of assembly the part will not yet be on the board. The assembly plot (a paper document) will be used by the assembler to locate the correct spot for soldering the part to the board.

Running the makepart program

Makepart is a console application. The executable resides on the \\smbdc\Classdocs partition under the folder named MPART. Running the program is easy. Just follow the steps below:

Importing your newly-created symbol

Once you have run makepart and have your new symbol and part files ready, the next step is to put them into your central library so that they can be used. This step is known as "importing" a symbol. You must always import the symbol before attempting to import the part description. Why? Because the part makes a correspondence between two things (a symbol and a cell) and that correspondence cannot occur until both the symbol and cell are known to the librarian. Let's first look at the steps required to import a new symbol.

Congratulations! If you successfully followed the above procedure then you have imported your first home-built symbol. Note that there is another shortcut way to do this process. Under the Librarian's File menu there is an Import Symbols... command that can accomplish the same import actions as above.

Importing a makepart-generated part description

Once you have used makepart to generate one or more new symbols and parts and once the new symbol(s) has been imported to the central library, it is time to import the new part description. The steps for running the Librarian to accomplish this task are below:

Upon completing the above procedure, your new part should be available. If there are problems then you will be directed to a specific log file to see the details. In such cases, you may need to seek help from the instructor or teaching assistant.