.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "GENLIB" "1" "30 July 2004" "ASIM/LIP6" "Alliance - genlib User's Manual"
.SH NAME
genlib \- Procedural design language based upon C.
.SH "DESCRIPTION"
.PP
\fBgenlib\fR is a set of C functions dedicated to procedural
generation purposes. From a user point of view, genlib is a circuit's
description language that allows standard C programming flow control,
variable use, and specialized functions in order to handle vlsi
objects.
.PP
Based upon the \fBAlliance\fR \fBmbk\fR data structures, the \fBgenlib\fR
language gives the user the ability to describe both netlist
and layout views, thus allowing both standard cell and full custom
approachs.
.SS "NETLIST CAPTURE"
.PP
It is a hierachical structural description of a circuit in
terms of connectors (I/Os), signals (nets), and instances.
.PP
The function calls used to handle the netlist view are :
.TP 0.2i
\(bu
\fBGENLIB_DEF_LOFIG\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_SAVE_LOFIG\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_LOINS\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_LOCON\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_LOSIG\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_FLATTEN_LOFIG\fR(3)
Some facilities, in order to create vectors are also available :
.TP 0.2i
\(bu
\fBGENLIB_BUS\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_ELM\fR(3)
.SS "STANDARD CELL PLACEMENT"
.PP
The following functions allows to define a placement file
for a standard cell design. This file can be used by the standard
cell router \fBocr\fR(1) :
.TP 0.2i
\(bu
\fBGENLIB_DEF_PHSC\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_SAVE_PHSC\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_SC_PLACE\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_SC_RIGHT\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_SC_TOP\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_SC_LEFT\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_SC_BOTTOM\fR(3)
.SS "FULL CUSTOM SYMBOLIC LAYOUT"
.PP
Those functions are dedicated to optimized full custom
procedural layout. In order to provide some process independance,
\fBAlliance\fR uses a symbolic layout approach (fixed grid without
compaction).
.PP
The symbolic objects are segments (wires), vias (contacts),
connectors (I/Os), references and instances. For more informations,
see
\fBphseg\fR(1),
\fBphvia\fR(1),
\fBphcon\fR(1),
\fBphref\fR(1),
\fBphins\fR(1)
and \fBalc\fR(1)\&.
.TP 0.2i
\(bu
\fBGENLIB_DEF_PHFIG\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_SAVE_PHFIG\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_DEF_AB\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_DEF_PHINS\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PHCON\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_COPY_UP_CON\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_COPY_UP_CON_FACE\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_COPY_UP_ALL_CON\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PHSEG\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_COPY_UP_SEG\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_THRU_H\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_THRU_V\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_THRU_CON_H\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_THRU_CON_V\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_WIRE1\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_WIRE2\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_WIRE3\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PHVIA\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PLACE\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PLACE_RIGHT\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PLACE_TOP\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PLACE_LEFT\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PLACE_BOTTOM\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PLACE_ON\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PHREF\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_COPY_UP_REF\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_COPY_UP_ALL_REF\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PLACE_VIA_REF\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PLACE_CON_REF\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_PLACE_SEG_REF\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_FLATTEN_PHFIG\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_GET_REF_X\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_GET_REF_Y\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_GET_CON_X\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_GET_CON_Y\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_HEIGHT\fR(3)
.TP 0.2i
\(bu
\fBGENLIB_WIDTH\fR(3)
In order to have information about each of these functions, use
the online documentation with \fBman\fR(1), as in
\fIman function-name\fR\&.
.PP
It is strongly recommended to read some books on C
programming, in order to take full advantage of the C flow
control possibilities, as it may greatly reduce the size
of a \fBgenlib\fR source code.
.SH "ENVIRONMENT VARIABLES"
.PP
.TP 0.2i
\(bu
\fBMBK_IN_LO\fR(1),
default value : al
.TP 0.2i
\(bu
\fBMBK_OUT_LO\fR(1),
default value : al
.TP 0.2i
\(bu
\fBMBK_IN_PH\fR(1),
default value : ap
.TP 0.2i
\(bu
\fBMBK_OUT_LO\fR(1),
default value : ap
.TP 0.2i
\(bu
\fBMBK_CATA_LIB\fR(1),
default value : \&.
.TP 0.2i
\(bu
\fBMBK_WORK_LIB\fR(1),
default value : \&.
.TP 0.2i
\(bu
\fBMBK_CATAL_NAME\fR(1),
default value : CATAL
See the corresponding manual pages for further informations.
.PP
In order to compile and execute a \fBgenlib\fR file, one has to
call \fBgenlib\fR with one argument, that is the \fBgenlib\fR source file.
The source file must have a .c extension, but the extension should
not be mentionned on the command line.
.PP
The names used in genlib, as arguments to genlib functions,
should be alphanumerical, including the underscore. They also are not
case sensitive, so VDD is equivalent to vdd\&. Vectorized connectors
or signal can be declareds using the [n:m] construct.
.SH "SYNOPSIS"
\fBgenlib\fR [ \fB -cklmnv
\fR ] [ \fB--no-rm-core\fR ] [ \fB--keep-makefile\fR ] [ \fB--keep-exec\fR ] [ \fB--keep-log\fR ] [ \fB--no-exec\fR ] [ \fB--verbose\fR ] \fBprogram\fR [ \fB-e \fIprogram_args\fB\fR ]
.SS "OPTIONS"
.PP
.TP 0.2i
\(bu
: the name of the C file containing the
\fBgenlib\fR program, whitout extention. Mandatory argument.
.TP 0.2i
\(bu
[--no-rm-core|-c] : in case of core dump, do not remove
the generated core file. This option must be used with
[--keep-exec|-k]\&.
.TP 0.2i
\(bu
[--keep-makefile|-m] : do not erase the generated makefile
after execution.
.TP 0.2i
\(bu
[--keep-exec|-k] : keep the generated executable after the
\fBgenlib\fR run.
.TP 0.2i
\(bu
[--keep-log|-l] : do not erase the log file after a successfull
completion (the log is keeped after a faulty run).
.TP 0.2i
\(bu
[--no-exec|-n] : do not run the generated program. Should be
used with [--keep-exec|-k]\&.
.TP 0.2i
\(bu
[--no-verbose|-v] : self explanatory.
.TP 0.2i
\(bu
[-e] : all the following arguments are handled to the
compiled program.
.SH "EXAMPLES"
.PP
.PP
Compile and run a file \fIamd2901.c\fR :
.nf
genlib -v amd2901
.fi
.SH "SEE ALSO"
.PP
\fBmbk\fR(1),
.SH "DIAGNOSTIC"
.PP
Many errors may occur while executing the source file, so
refer to the proper genlib function manual for more. When an error
occur, \fBgenlib\fR left a log file \fI\&.grr\fR\&.
As \fI\&.c\fR is a C program, all
syntatic C error can occurs...
.PP
All genlib functions are listed below alphabetically sorted.