\newpage
\section{The WOL PLA tools}

  A simple PLA generator has been built using WOLCOMP.  A textual
PLA personality file is written, and a PLA generated in a user-specified
technology.  Two interfaces are possible:  a simple precompiled program
that reads the {\tt .pla} file and generates a {\tt .CIF} file containing
the PLA, and a Pascal procedure interface for use in the user's own
WOLCOMP programs.

The PLAs generated have a simple form.  The AND-plane is on the left,
with inputs along the bottom.  Each literal is presented in uncomplemented
form (and is buffered and complemented in the PLA).  The OR-plane lies on
the right, with its uncomplemented outputs along the bottom.  The reader
is referred to documentation within the directory {\tt /LIB/WOLLIB/PLAGEN}
for specific details regarding the different PLA technologies (i.e. location
of power rails, clock requirements, etc.).

\subsection {The WOLCOMP interface to PLAGEN}

To access this module, your program must contain the following import text:

{\tt
\begin{verbatim}
import
   $search '/LIB/WOLLIB/WOLCOMP/WOLCOMP'$  wolcomplib,
   $search '/LIB/WOLLIB/WOLCOMP/WOLCOMPII'$  wolcompii,
   $search '/LIB/WOLLIB/PLAGEN/PLAGEN'$  plagen;
\end{verbatim}
}

The interface to the module is the following (for an example of the use
of these procedures, see the WOLPLA program below):

{\small  \tt
  \begin{verbatim}
EXPORT

const
      MAXPLAROWS = 50;   { maximum number of rows in pla }
      MAXPLACOLS = 50;   { max. number of cols. in and/or planes }

type
      pla_plane =  array [1..MaxPlaRows,1..MaxPlaCols] of char;

var
   num_pla_rows, or_width, and_width  :  integer;
   or_plane, and_plane :  pla_plane;

PROCEDURE load_placells (tech : strg);
   { load cells from directory /lib/wollib/plagen/<tech>  }

PROCEDURE make_pla (cellname, filename : strg);
   { read <filename> for PLA personality, generate cell <cellname> }

PROCEDURE read_pla_file (filename : strg; var and_plane, or_plane : pla_plane);
   { read PLA personality into 'and_plane' and 'or_plane', set
     global variables 'num_pla_rows', 'or_width', and 'and_width' }

PROCEDURE build_pla (cellname : strg; and_plane, or_plane : pla_plane);
   { use 'and_plane', 'or_plane', and global variables 'num_pla_rows',
     'or_width', and 'and_width' to generate PLA in cell <cellname> }
\end{verbatim}
}

\subsection {PLA personality file format}

A very simple file format is used to program the PLAs.  The first
line contains an integer representing the number of rows (implicants) in
the PLA.  A textual block then follows, one row per implicant, one column
per literal, to define the AND plane.  A ``1'' represents an uncomplemented
literal, a ``0'' a complemented literal, and an ``X'' a dont-care
(that literal does not appear in a particular implicant).  
A blank line separates the OR-plane specification, which is similar, but
only ``1'' and ``X'' are allowed.   Obviously, all rows in the 
AND-plane specification must contain the same number of characters, as
must all rows in the OR-plane specification.

As an example:
{\small \tt
  \begin{verbatim}
4
.001
0.11
10..
1.00

1..
.1.
..1
11.
\end{verbatim}}



\subsection {The WOLPLA program}

  This program is executed by typing {\tt /LIB/WOLLIB/PLA/WOLPLA} (you
may need to type {\tt USEWOLCOMP} first).  The user is prompted for
(i) the technology for the PLA, (ii) the programming file for the
PLA, and (iii) the cell name and CIF file name for the generated PLA.

The listing of the program follows:


{\small \tt
  \begin{verbatim}
   program wolpla(input,output);

   import
      $search '/LIB/WOLLIB/WOLCOMP/WOLCOMP'$  wolcomplib,
      $search '/LIB/WOLLIB/WOLCOMP/WOLCOMPII'$  wolcompii,
      $search '/LIB/WOLLIB/PLAGEN/PLAGEN'$  plagen;

   var
      tech_name,      { technology name for PLA }
      file_name,      { PLA personality file }
      cell_name       { cell name of generated PLA }
            : string[255];
      pla_lambda : integer;  { lambda in 1/100 micron }

   begin
      writeln ('WOLPLA Version 1.00');  writeln;
      write ('Enter technology name:  '); readln (tech_name);
      write ('Enter PLA personality file name:  '); readln (file_name);
      write ('Enter cell name of generated PLA:  '); readln (cell_name);
      write ('Enter lambda in 1/100 of microns:  '); readln (pla_lambda);

      wolcomp_init (pla_lambda);
      load_placells (tech_name);
      make_pla (cell_name, file_name);

   end.
\end{verbatim}
}


\subsection{Building a PLA cell library}

The user can supply their own cell library to PLAGEN for composition.
The {\tt load\_placells(tech);} procedure searches in the directory
{\tt /LIB/WOLLIB/PLAGEN/TECH} for the following files (each file
contains a single cell of the same name as the file):

\begin{tabular}{ll}
   p\_and &        if a literal appears uncomplemented in an implicant  \\
   p\_nand &       if a literal appears complemented in an implicant    \\
   p\_null &       if a literal does not appear in an implicant         \\
   p\_andend &     left-hand side of AND-plane                          \\
   p\_buffer &     input buffers on bottom of AND-plane                 \\
   p\_buss &       power jumper between bottom of AND- and OR-planes    \\
   p\_andcorner &  lower-left hand corner cell                          \\
   p\_or &         an implicant does appear in an output                \\
   p\_ornull &     an implicant does not appear in an output            \\
   p\_orcorner &   lower-right hand corner cell                         \\
   p\_orend &      right-hand side of OR-plane                          \\
   p\_pcinv &      cell between AND- and OR-planes                      \\
   p\_outinv &     output buffer along bottom of OR-plane
\end{tabular}

\subsection{The WOL Finite State Machine Compiler}

A powerful tool for compiling finite state machines into PLAs has been
developed, and is available.  Talk to Mass Sivilotti for more info.



