diff --git a/alliance/src/genlib/Makefile.am b/alliance/src/genlib/Makefile.am new file mode 100644 index 00000000..20db1515 --- /dev/null +++ b/alliance/src/genlib/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src man1 man3 diff --git a/alliance/src/genlib/configure.in b/alliance/src/genlib/configure.in new file mode 100644 index 00000000..747300f9 --- /dev/null +++ b/alliance/src/genlib/configure.in @@ -0,0 +1,64 @@ +dnl +dnl This file is part of the Alliance CAD System +dnl Copyright (C) Laboratoire LIP6 - Département ASIM +dnl Universite Pierre et Marie Curie +dnl +dnl Home page : http://www-asim.lip6.fr/alliance/ +dnl E-mail support : mailto:alliance-support@asim.lip6.fr +dnl +dnl This library is free software; you can redistribute it and/or modify it +dnl under the terms of the GNU Library General Public License as published +dnl by the Free Software Foundation; either version 2 of the License, or (at +dnl your option) any later version. +dnl +dnl Alliance VLSI CAD System is distributed in the hope that it will be +dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +dnl Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License along +dnl with the GNU C Library; see the file COPYING. If not, write to the Free +dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +dnl +dnl Purpose : Auto stuffing Alliance +dnl Almost ten years since I wrote this stuff, I just can't +dnl believe it +dnl Date : 01/02/2002 +dnl Author : Frederic Petrot +dnl $Id: configure.in,v 1.1 2002/03/08 14:08:09 fred Exp $ +dnl +dnl +AC_INIT(src/genlib.c) +AM_INIT_AUTOMAKE(genlib, 3.3) +AC_PROG_INSTALL +AC_PROG_CC +AC_HEADER_STDC +AC_CHECK_HEADERS(strings.h unistd.h) +AC_C_CONST +AC_TYPE_SIGNAL +AC_PROG_RANLIB +AC_CHECK_PROG(SED, sed, sed) + +changequote(,)dnl +if test -z $SED ; then + echo "Cannot find sed here! Quiting, ..." + exit 1 +fi +changequote([,])dnl + +dnl Setting pathes as necessary, using externally set shell variables +changequote(,)dnl +INCLUDES=-I${ALLIANCE_INCLUDE} +LDFLAGS=-L${ALLIANCE_LIB} +changequote([,])dnl + +AC_SUBST(INCLUDES) +AC_SUBST(LDFLAGS) + + +AC_OUTPUT([ +Makefile +src/Makefile +man1/Makefile +man3/Makefile +]) diff --git a/alliance/src/genlib/man1/Makefile.am b/alliance/src/genlib/man1/Makefile.am new file mode 100644 index 00000000..16e17fd7 --- /dev/null +++ b/alliance/src/genlib/man1/Makefile.am @@ -0,0 +1,59 @@ +man_MANS = genlib.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/alliance/src/genlib/man1/genlib.1 b/alliance/src/genlib/man1/genlib.1 new file mode 100644 index 00000000..e582a69b --- /dev/null +++ b/alliance/src/genlib/man1/genlib.1 @@ -0,0 +1,283 @@ +.\" $Id: genlib.1,v 1.1 2002/03/08 14:08:09 fred Exp $ +.\" @(#)Labo.l 0.0 90/22/08 UPMC; Author: Frederic Petrot +.TH GENLIB 1 "October 1, 1997" "ASIM/LIP6" "ALLIANCE USER COMMANDS" +.SH NAME +genlib \- Procedural design language based upon C. +.so man1/alc_origin.1 +.SH DESCRIPTION +\fBgenlib\fP is a set of \fIC\fP functions dedicated to procedural generation +purposes. +From a user point of view, \fBgenlib\fP is a circuit's description language +that allows standard \fIC\fP programming flow control, variable use, and +specialized functions in order to handle vlsi objects. +.br +Based upon the \fIAlliance\fP \fBmbk\fP data structures, the \fBgenlib\fP +language gives the user the ability to describe both netlist and +layout views, thus allowing both standard cell and full custom approachs. +.br +.TP 20 +Netlist capture : +\- it is a hierachical structural description of +a circuit in terms of connectors (I/Os), signals (nets), and instances. +.br +The function calls used to handle the netlist view are +.RS + GENLIB_DEF_LOFIG(3) +.br + GENLIB_SAVE_LOFIG(3) +.br + GENLIB_LOINS(3) +.br + GENLIB_LOCON(3) +.br + GENLIB_LOSIG(3) +.br + GENLIB_FLATTEN_LOFIG(3) +.br +Some facilities, in order to create vectors are also available : +.br + GENLIB_BUS(3) +.br + GENLIB_ELM(3) +.RE +.TP 20 +Standard cell placement +The following functions allows to define a placement file for a standard cell +design. +This file can be used by the standard cell router \fBscr\fP(1). +.RS + GENLIB_DEF_PHSC(3) +.br + GENLIB_SAVE_PHSC(3) +.br + GENLIB_SC_PLACE(3) +.br + GENLIB_SC_RIGHT(3) +.br + GENLIB_SC_TOP(3) +.br + GENLIB_SC_LEFT(3) +.br + GENLIB_SC_BOTTOM(3) +.br +.RE +.TP 20 +Full custom symbolic layout +Those functions are dedicated to optimized full custom procedural layout. +In order to provide some process independance, \fIAlliance\fP uses a +symbolic layout approach (fixed grid without compaction.) +.br +The symbolic objects are segments (wires), vias (contacts), connectors (I/Os), +references and instances. +For more informations, see \fBphseg\fP(1), \fBphvia\fP(1), \fBphcon\fP(1), +\fBphref\fP(1), \fBphins\fP(1), and \fBalc\fP(1). +.br + GENLIB_DEF_PHFIG(3) +.br + GENLIB_SAVE_PHFIG(3) +.br + GENLIB_DEF_AB(3) +.br + GENLIB_DEF_PHINS(3) +.br + GENLIB_PHCON(3) +.br + GENLIB_COPY_UP_CON(3) +.br + GENLIB_COPY_UP_CON_FACE(3) +.br + GENLIB_COPY_UP_ALL_CON(3) +.br + GENLIB_PHSEG(3) +.br + GENLIB_COPY_UP_SEG(3) +.br + GENLIB_THRU_H(3) +.br + GENLIB_THRU_V(3) +.br + GENLIB_THRU_CON_H(3) +.br + GENLIB_THRU_CON_V(3) +.br + GENLIB_WIRE1(3) +.br + GENLIB_WIRE2(3) +.br + GENLIB_WIRE3(3) +.br + GENLIB_PHVIA(3) +.br + GENLIB_PLACE(3) +.br + GENLIB_PLACE_RIGHT(3) +.br + GENLIB_PLACE_TOP(3) +.br + GENLIB_PLACE_LEFT(3) +.br + GENLIB_PLACE_BOTTOM(3) +.br + GENLIB_PLACE_ON(3) +.br + GENLIB_PHREF(3) +.br + GENLIB_COPY_UP_REF(3) +.br + GENLIB_COPY_UP_ALL_REF(3) +.br + GENLIB_PLACE_VIA_REF(3) +.br + GENLIB_PLACE_CON_REF(3) +.br + GENLIB_PLACE_SEG_REF(3) +.br + GENLIB_FLATTEN_PHFIG(3) +.br + GENLIB_GET_REF_X(3) +.br + GENLIB_GET_REF_Y(3) +.br + GENLIB_GET_CON_X(3) +.br + GENLIB_GET_CON_Y(3) +.br + GENLIB_HEIGHT(3) +.br + GENLIB_WIDTH(3) +.RE +.LP +In order to have information about each of these functions, use the online +documentation with \fBman\fP(1), as in ``man function-name''. +.br +.LP +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\fP source code. +.SH ENVIRONMENT VARIABLES +.TP 20 +the variables are : +.ta 25n +\fIname\fP \fIdefault value\fP +.br +MBK_IN_LO(1) al +.br +MBK_OUT_LO(1) al +.br +MBK_IN_PH(1) ap +.br +MBK_OUT_PH(1) ap +.br +MBK_CATA_LIB(1) . +.br +MBK_WORK_LIB(1) . +.br +MBK_CATAL_NAME(1) CATAL +.LP +see the corresponding manual pages for further informations. +.br +In order to compile and execute a genlib file, one has to call \fBgenlib\fP +with one argument, that is the \fBgenlib\fP 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 \fBVDD\fP is equivalent to \fBvdd\fP. +Vectorized connectors or signal can be declareds using the \fB[n:m]\fP +construct. +.SH OPTIONS +Two options can alter the behavior of \fBgenlib\fP : +.TP 20 +-v +displays everything that is to be done during the compilation and +execution process: verbose mode. +.TP +-k +keeps the executable along with the compilation Makefile after completion. +.SH EXAMPLES +\fBgenlib\fP -v amd2901 +.br +Compiles and runs a \fBgenlib\fP source file called amd2901.c +.SH SEE ALSO +.BR mbk (1). + +.SH DIAGNOSTICS +.RS +\fBCompilation aborted\fP +.RE +This indicates either a \fIC\fP syntaxic error, most likely, or a +misinstallation of the \fBmbk\fP package of the \fIAlliance\fP CAD system, +if the error is \fBcannot find file genlib.h\fB. +.RS +\fBLink aborted\fP +.RE +This indicates a +misinstallation of the \fBmbk\fP package of the \fIAlliance\fP CAD system, +see your system administrator for details. +.PP +Many errors may occur while executing the source file, so refer to the proper +genlib function manual for more. + +All genlib functions are listed below alphabetically sorted. + +.so man1/alc_bug_report.1 +.so ../man3/GENLIB_BUS.3 +.so ../man3/GENLIB_COPY_UP_ALL_CON.3 +.so ../man3/GENLIB_COPY_UP_ALL_REF.3 +.so ../man3/GENLIB_COPY_UP_CON.3 +.so ../man3/GENLIB_COPY_UP_CON_FACE.3 +.so ../man3/GENLIB_COPY_UP_REF.3 +.so ../man3/GENLIB_COPY_UP_SEG.3 +.so ../man3/GENLIB_DEF_AB.3 +.so ../man3/GENLIB_DEF_LOFIG.3 +.so ../man3/GENLIB_DEF_PHFIG.3 +.so ../man3/GENLIB_DEF_PHINS.3 +.so ../man3/GENLIB_DEF_PHSC.3 +.so ../man3/GENLIB_ELM.3 +.so ../man3/GENLIB_FLATTEN_ALL_LOINS.3 +.so ../man3/GENLIB_FLATTEN_ALL_PHINS.3 +.so ../man3/GENLIB_FLATTEN_LOFIG.3 +.so ../man3/GENLIB_FLATTEN_PHFIG.3 +.so ../man3/GENLIB_GET_CON_X.3 +.so ../man3/GENLIB_GET_CON_Y.3 +.so ../man3/GENLIB_GET_INS_X.3 +.so ../man3/GENLIB_GET_INS_Y.3 +.so ../man3/GENLIB_GET_REF_X.3 +.so ../man3/GENLIB_GET_REF_Y.3 +.so ../man3/GENLIB_HEIGHT.3 +.so ../man3/GENLIB_LOAD_LOFIG.3 +.so ../man3/GENLIB_LOAD_PHFIG.3 +.so ../man3/GENLIB_LOCON.3 +.so ../man3/GENLIB_LOINS.3 +.so ../man3/GENLIB_LOINSE.3 +.so ../man3/GENLIB_LOSIG.3 +.so ../man3/GENLIB_LOSIGMERGE.3 +.so ../man3/GENLIB_LOTRS.3 +.so ../man3/GENLIB_OUTLINE.3 +.so ../man3/GENLIB_PHCON.3 +.so ../man3/GENLIB_PHREF.3 +.so ../man3/GENLIB_PHSEG.3 +.so ../man3/GENLIB_PHVIA.3 +.so ../man3/GENLIB_PLACE.3 +.so ../man3/GENLIB_PLACE_BOTTOM.3 +.so ../man3/GENLIB_PLACE_CON_REF.3 +.so ../man3/GENLIB_PLACE_LEFT.3 +.so ../man3/GENLIB_PLACE_ON.3 +.so ../man3/GENLIB_PLACE_RIGHT.3 +.so ../man3/GENLIB_PLACE_SEG_REF.3 +.so ../man3/GENLIB_PLACE_TOP.3 +.so ../man3/GENLIB_PLACE_VIA_REF.3 +.so ../man3/GENLIB_REVERSE_PHCON.3 +.so ../man3/GENLIB_SAVE_LOFIG.3 +.so ../man3/GENLIB_SAVE_PHFIG.3 +.so ../man3/GENLIB_SAVE_PHSC.3 +.so ../man3/GENLIB_SC_BOTTOM.3 +.so ../man3/GENLIB_SC_LEFT.3 +.so ../man3/GENLIB_SC_PLACE.3 +.so ../man3/GENLIB_SC_RIGHT.3 +.so ../man3/GENLIB_SC_TOP.3 +.so ../man3/GENLIB_UNFLATTEN_LOFIG.3 +.so ../man3/GENLIB_WIRE1.3 +.so ../man3/GENLIB_WIRE2.3 +.so ../man3/GENLIB_WIRE3.3 diff --git a/alliance/src/genlib/man3/GENLIB_BUS.3 b/alliance/src/genlib/man3/GENLIB_BUS.3 new file mode 100644 index 00000000..bd458a59 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_BUS.3 @@ -0,0 +1,81 @@ +.\" $Id: GENLIB_BUS.3,v 1.1 2002/03/08 14:08:09 fred Exp $ +.\" @(#)GENLIB_BUS.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_BUS +.XE \} +.TH GENLIB_BUS.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_BUS \- Creates a bus name for netlist +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +char \(**GENLIB_BUS(busname, from, to); +char \(**busname; +long from, to; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIbusname\fP +Common signal name for a bus +.TP +\fIfrom\fP +Starting index of the set of signal, \fIfrom\fP included +.TP +\fIto\fP +Ending index of the set of signal, \fIto\fP included +.SH DESCRIPTION +\fIGENLIB_BUS\fP Creates a set of names, based upon a common name, valid for the +genlib netlist +functions that manipulate the signal, and/or connector, concept. +They are: +.RS +\fBLOINS\fP(3) +.br +\fBLOCON\fP(3) +.RE +The \fIfrom, to\fP arguments give the boundaries of the bus to be created, +both of them beeing included in the set. The function allows increasing or +decreasing order busses, as one could expect. +.br +This function has a constant equivalent, it means that if the \fIfrom, to\fP +values are known at compilation time, one should better use, +for readability purposes, the "[n:m]" construct. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ +int b = 0; +int e = 12; + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("mycell"); + /\(** define interface \(**/ + GENLIB_LOCON(GENLIB_BUS("i", b, e), INPUT, GENLIB_BUS("sig", b, e); + GENLIB_LOCON("o[2:0]", OUTPUT, "sigout[4:6]"); + /\(** Place an instance \(**/ + GENLIB_LOINS("model","instance", GENLIB_BUS("sig", e/2), "sigout[6]", EOL); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_ELM (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_COPY_UP_ALL_CON.3 b/alliance/src/genlib/man3/GENLIB_COPY_UP_ALL_CON.3 new file mode 100644 index 00000000..07827441 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_COPY_UP_ALL_CON.3 @@ -0,0 +1,122 @@ +.\" $Id: GENLIB_COPY_UP_ALL_CON.3,v 1.1 2002/03/08 14:08:09 fred Exp $ +.\" @(#)GENLIB_COPY_UP_ALL_CON.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_COPY_UP_ALL_CON +.XE \} +.TH GENLIB_COPY_UP_ALL_CON.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_COPY_UP_ALL_CON \- copy all physical connectors of an instance face in the +current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_COPY_UP_ALL_CON(face, insname, concatenate) +char face, concatenate; +char \(**insname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIface\fP +Face of the instance +.TP +\fIinsname\fP +Name of the instance the connector belongs to +.TP +\fIconcatenate\fP +Indicates wheter or not to concatenate instance connectors names with instance +name +.SH DESCRIPTION +\fBCOPY_UP_ALL_CON\fP copies all instance connectors of the face \fIface\fP of +the placed instance called \fIinsname\fP into the current layout. +The \fIconcatenate\fP argument may take two values: +.TP 20 +\fBYES\fP +then the resulting name of a connector in the current figure is the +concatenation of the \fIinsname\fP and the \fIconname\fP. +It warranties the unicity of name at the figure level, and is to be used +most of the time. +.TP +\fBNO\fP +implies a direct copy of the connector name. +The user must take care of the unicity of connector name by itself. +.br +Two behaviour are expected, depending on each of the instance connectors +location regarding the \fIabutment box\fP of the current figure. +.TP 20 +Connector on the \fIabutment box\fP +The figure connector is place right over the instance connector. The single +connector is duplicated. +.TP +Connector inside the \fIabutment box\fP +The instance connector face is computed in the figure, and then, the connector +is duplicated \fIon\fP the given face, at the right coordinates for this face. +Then a wire is drawn between the instance connector and the figure connector in +the connector layer. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_COPY_UP_ALL_CON impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a connector inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"*** genlib error *** GENLIB_COPY_UP_ALL_CON impossible : connector \fIconname\fP face +\fIface\fP of instance \fIinsname\fP, \fIcurrent\fP figure doesn't exist" +.ft R +.RS +No connector matches both the \fIconname\fP and the \fIface\fP arguments. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + . + . + GENLIB_PLACE_LEFT("gaer0_f", "insN", SYMXY); + . + . + GENLIB_DEF_AB(0L, 0L, 0L, 0L); + /\(** Copy all connectors \(**/ + GENLIB_COPY_UP_ALL_CON(NORTH, "insN", YES); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_COPY_UP_CON (3), +.BR GENLIB_COPY_UP_CON_FACE (3), +.BR GENLIB_PHCON (3), +.BR GENLIB_THRU_CON_H (3), +.BR GENLIB_THRU_CON_V (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_COPY_UP_ALL_REF.3 b/alliance/src/genlib/man3/GENLIB_COPY_UP_ALL_REF.3 new file mode 100644 index 00000000..6dc5f22f --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_COPY_UP_ALL_REF.3 @@ -0,0 +1,127 @@ +.\" $Id: GENLIB_COPY_UP_ALL_REF.3,v 1.1 2002/03/08 14:08:09 fred Exp $ +.\" @(#)GENLIB_COPY_UP_ALL_REF.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_COPY_UP_ALL_REF +.XE \} +.TH GENLIB_COPY_UP_ALL_REF.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_COPY_UP_ALL_REF \- copy a several physical reference from an instance +in the current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_COPY_UP_ALL_REF(reftype, insname, concatenate) +char \(**reftype, \(**insname; +char concatenate; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIreftype\fP +Type of the references to be duplicated +.TP +\fIinsname\fP +Name of the instance in the which the references is to be searched for +.TP +\fIconcatenate\fP +Indicates whether or not to concatenate the instance name to the references +names when copying +.SH DESCRIPTION +\fBCOPY_UP_ALL_REF\fP duplicates all the references of type \fIreftype\fP +of the instance called \fIinsname\fP into the current layout cell. +The main purpose of this function is to copy a set references in the upper +hierarchical level, so it can be used as \fIvirtual\fP connector, for +the data-path router. +See \fBdpr\fP(1) for details. +.br +The \fIreftype\fP argument can take two values: +.TP 20 +\fB"ref_con"\fP +for virtual connectors +.TP +\fB"ref_ref"\fP +for any other references +.LP +See the \fIleaf cells design for generators\fP document for details on +reference types and usage. +.br +The \fIconcatenate\fP argument can take two values: +.TP 20 +A\fBYES\fP +indicates that the name of the copied references is concatenated to the +instance name. +.TP +\fBNO\fP +implies a direct duplication of the reference name +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_COPY_UP_ALL_REF impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance \fIinsname\fP does not exist" +.ft R +.RS +The instance called \fIinsname\fP does not currently belong to the figure. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_COPY_UP_ALL_REF impossible : references of type \fIreftype\fP do not exist" +.ft R +.RS +No reference of type \fIreftype\fP exist in the model of the instance +\fIinsname\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("z2l_y", "r1", NOSYM, 23L, 54L); + /\(** Put a reference \(**/ + GENLIB_COPY_UP_ALL_REF("ref_con", "r1", NO); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR dpr (1), +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PHREF (3), +.BR GENLIB_COPY_UP_ALL_REF (3), +.BR GENLIB_PLACE_CON_REF (3), +.BR GENLIB_PLACE_SEG_REF (3), +.BR GENLIB_PLACE_VIA_REF (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_COPY_UP_CON.3 b/alliance/src/genlib/man3/GENLIB_COPY_UP_CON.3 new file mode 100644 index 00000000..bd921e78 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_COPY_UP_CON.3 @@ -0,0 +1,119 @@ +.\" $Id: GENLIB_COPY_UP_CON.3,v 1.1 2002/03/08 14:08:09 fred Exp $ +.\" @(#)GENLIB_COPY_UP_CON.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_COPY_UP_CON +.XE \} +.TH GENLIB_COPY_UP_CON.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_COPY_UP_CON \- copy a physical connector from an instance in the +current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_COPY_UP_CON(index, conname, insname, newname) +long index; +char \(**insname; +char \(**conname; +char \(**newname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIindex\fP +Connector index in the instance +.TP +\fIconname\fP +Name of the connector in the instance model +.TP +\fIinsname\fP +Name of the instance the connector belongs to +.TP +\fInewname\fP +Name to be given to the connector in the current figure +.SH DESCRIPTION +\fBCOPY_UP_CON\fP copies a instance connector into the current layout figure, +and gives to the new connector the name \fInewname\fP. The instance connector +is identified by its name, \fIconname\fP, and index, \fIindex\fP. +.br +Two behaviour are expected, depending on the instance connector location +regarding the \fIabutment box\fP of the current figure. +.TP 20 +Connector on the \fIabutment box\fP +The figure connector is place right over the instance connector. The single +connector is duplicated. +.TP +Connector inside the \fIabutment box\fP +The instance connector face is computed in the figure, and then, the connector +is duplicated \fIon\fP the given face, at the right coordinates for this face. +Then a wire is drawn between the instance connector and the figure connector in +the connector layer. +.LP +If \fInewname\fP is \fBNULL\fP, then not connector is copied up, on the segment +is drawn to the side of the \fIabutment\fP box. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_COPY_UP_CON impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a connector inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"*** genlib error *** GENLIB_COPY_UP_CON impossible : connector \fIconname\fP index +\fIindex\fP of instance \fIinsname\fP, \fIcurrent\fP figure doesn't exist" +.ft R +.RS +The given connector does not exist in the current figure. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + . + . + GENLIB_PLACE_LEFT("gaer0_f", "insN", SYMXY); + . + . + GENLIB_DEF_AB(0L, 0L, 0L, 0L); + /\(** Put a connector \(**/ + GENLIB_COPY_UP_CON("i0", 1, "insN", "inz0"); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_COPY_UP_ALL_CON (3), +.BR GENLIB_COPY_UP_CON_FACE (3), +.BR GENLIB_PHCON (3), +.BR GENLIB_THRU_CON_H (3), +.BR GENLIB_THRU_CON_V (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_COPY_UP_CON_FACE.3 b/alliance/src/genlib/man3/GENLIB_COPY_UP_CON_FACE.3 new file mode 100644 index 00000000..4825199c --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_COPY_UP_CON_FACE.3 @@ -0,0 +1,119 @@ +.\" $Id: GENLIB_COPY_UP_CON_FACE.3,v 1.1 2002/03/08 14:08:09 fred Exp $ +.\" @(#)GENLIB_COPY_UP_CON_FACE.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_COPY_UP_CON_FACE +.XE \} +.TH GENLIB_COPY_UP_CON_FACE.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_COPY_UP_CON_FACE \- copy a physical connector from an instance in the +current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_COPY_UP_CON_FACE(face, conname, insname, newname) +long index; +char \(**insname; +char \(**conname; +char \(**newname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIface\fP +Connector face in the instance +.TP +\fIconname\fP +Name of the connector in the instance model +.TP +\fIinsname\fP +Name of the instance the connector belongs to +.TP +\fInewname\fP +Name to be given to the connector in the current figure +.SH DESCRIPTION +\fBCOPY_UP_CON_FACE\fP copies a instance connector into the current layout +figure, and gives to the new connector the name \fInewname\fP. +The \fIface\fP and \fIconname\fP arguments are not suffiscient for non +ambiguiously identify a single connector. +So, if more than one connector matches these arguments, the behaviour described +below is applied on all of them. +.br +Two behaviour are expected, depending on the instance connector location +regarding the \fIabutment box\fP of the current figure. +.TP 20 +Connector on the \fIabutment box\fP +The figure connector is place right over the instance connector. The single +connector is duplicated. +.TP +Connector inside the \fIabutment box\fP +The instance connector face is computed in the figure, and then, the connector +is duplicated \fIon\fP the given face, at the right coordinates for this face. +Then a wire is drawn between the instance connector and the figure connector in +the connector layer. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_COPY_UP_CON_FACE impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a connector inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"*** genlib error *** GENLIB_COPY_UP_CON_FACE impossible : connector \fIconname\fP face +\fIface\fP of instance \fIinsname\fP, \fIcurrent\fP figure doesn't exist" +.ft R +.RS +No connector matches both the \fIconname\fP and the \fIface\fP arguments. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + . + . + GENLIB_PLACE_LEFT("gaer0_f", "insN", SYMXY); + . + . + GENLIB_DEF_AB(0L, 0L, 0L, 0L); + /\(** Put a connector \(**/ + GENLIB_COPY_UP_CON_FACE("i0", 1, "insN", "inz0"); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_COPY_UP_ALL_CON (3), +.BR GENLIB_COPY_UP_CON (3), +.BR GENLIB_PHCON (3), +.BR GENLIB_THRU_CON_H (3), +.BR GENLIB_THRU_CON_V (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_COPY_UP_REF.3 b/alliance/src/genlib/man3/GENLIB_COPY_UP_REF.3 new file mode 100644 index 00000000..019afa63 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_COPY_UP_REF.3 @@ -0,0 +1,110 @@ +.\" $Id: GENLIB_COPY_UP_REF.3,v 1.1 2002/03/08 14:08:09 fred Exp $ +.\" @(#)GENLIB_COPY_UP_REF.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_COPY_UP_REF +.XE \} +.TH GENLIB_COPY_UP_REF.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_COPY_UP_REF \- copy a physical reference from an instance in the current +figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_COPY_UP_REF(refname, insname, newname) +char \(**refname, \(**insname, \(**newname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIrefname\fP +Name of the reference in the instance +.TP +\fIinsname\fP +Name of the instance in the which the reference is to be searched for +.TP +\fInewname\fP +Name to be given to the reference in the current figure +.SH DESCRIPTION +\fBCOPY_UP_REF\fP adds a reference in the current layout cell. +All the reference's attributes are copied from the first found reference +called \fIrefname\fP in the instance \fIinsname\fP. +The designer should avoid to give to several refences the same name if +he plans to use this function. +The new reference is given the name \fInewname\fP. +The main purpose of this function is to copy a reference in the upper +hierarchical level, so it can be used as \fIvirtual\fP connector, for +the data-path router. +See \fBdpr\fP(1) for details. +layout. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_COPY_UP_REF impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance \fIinsname\fP does not exist" +.ft R +.RS +The instance called \fIinsname\fP does not currently belong to the figure. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_COPY_UP_REF impossible : reference \fIrefname\fP does not exist" +.ft R +.RS +The reference \fIrefname\fP does not exist in the model of the instance +\fIinsname\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("z2l_y", "r1", NOSYM, 23L, 54L); + /\(** Put a reference \(**/ + GENLIB_COPY_UP_REF("mux0_s", "r1", "out_s"); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR dpr (1), +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PHREF (3), +.BR GENLIB_COPY_UP_ALL_REF (3), +.BR GENLIB_PLACE_CON_REF (3), +.BR GENLIB_PLACE_SEG_REF (3), +.BR GENLIB_PLACE_VIA_REF (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_COPY_UP_SEG.3 b/alliance/src/genlib/man3/GENLIB_COPY_UP_SEG.3 new file mode 100644 index 00000000..5379d873 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_COPY_UP_SEG.3 @@ -0,0 +1,107 @@ +.\" $Id: GENLIB_COPY_UP_SEG.3,v 1.1 2002/03/08 14:08:09 fred Exp $ +.\" @(#)GENLIB_COPY_UP_SEG.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_COPY_UP_SEG +.XE \} +.TH GENLIB_COPY_UP_SEG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_COPY_UP_SEG \- copy a physical segment from an instance in the current +figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_COPY_UP_SEG(oldname, insname, newname) +char \(**oldname, \(**insname, \(**newname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIoldname\fP +Name of the segment in the instance +.TP +\fIinsname\fP +Name of the instance in the which the segment is to be searched for +.TP +\fInewname\fP +Name to be given to the segment in the current figure +.SH DESCRIPTION +\fBCOPY_UP_SEG\fP adds a segment in the current layout cell. +All the segment's attributes are copied from the first found segment called +\fIoldname\fP in the instance \fIinsname\fP. +The new segment is given the name \fInewname\fP. The main purpose of this +function is to rename a segment, so it can be used later, when extracting a +layout. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_COPY_UP_SEG impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a segment inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance \fIinsname\fP does not exist" +.ft R +.RS +The instance called \fIinsname\fP does not currently belong to the figure. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_COPY_UP_SEG impossible : segment \fIsegname\fP does not exist" +.ft R +.RS +The segment \fIsegname\fP does not exist in the model of the instance +\fIinsname\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("z2l_y", "r1", NOSYM, 23L, 54L); + /\(** Put a segment \(**/ + GENLIB_COPY_UP_SEG("mux0_s", "r1", "out_s"); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PHSEG (3), +.BR GENLIB_THRU_H (3), +.BR GENLIB_THRU_CON_H (3), +.BR GENLIB_THRU_V (3), +.BR GENLIB_THRU_CON_V (3), +.BR GENLIB_WIRE1 (3), +.BR GENLIB_WIRE2 (3), +.BR GENLIB_WIRE3 (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_DEF_AB.3 b/alliance/src/genlib/man3/GENLIB_DEF_AB.3 new file mode 100644 index 00000000..d448f85b --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_DEF_AB.3 @@ -0,0 +1,84 @@ +.\" $Id: GENLIB_DEF_AB.3,v 1.1 2002/03/08 14:08:09 fred Exp $ +.\" @(#)GENLIB_DEF_AB.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_DEF_AB +.XE \} +.TH GENLIB_DEF_AB.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_DEF_AB \- define a new \fIabutment box\fP to the current layout cell +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_DEF_AB(dx1, dy1, dx2, dy2); +long dx1, dy1, dx2, dy2; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIdx1, dy1\fP +Values to be added to the lower left corner of the previous \fIabutment box\fP +.TP +\fIdx2, dy2\fP +Values to be added to the upper right corner of the previous \fIabutment box\fP +.SH DESCRIPTION +\fBDEF_AB\fP give a new \fIabutment box\fP to the current physical cell. +The coordinates of +the \fIabutment box\fP are the coordinates of the envelop of the \fIabutment boxes\fP of +each instance plus the delta values given as argument. The \fI(dx1, dy1)\fP +values are added to the (x1, y1) coordinates of the bottom left corner of the +\fI"standard abutment box"\fP (the envelop), and the \fI(dx2, dy2)\fP +are added to the top right ones. +You have to call this function before saving, otherwise the figure will not +have an \fIabutment box\fP. Since it's regarding the \fIabutment box\fP +of its model that an instance is placed, any futher use of this figure +will be incorrect if \fBDEF_AB\fP isn't called, or properly defined. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_DEF_AB impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to give it a size. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + /\(** Place an instance \(**/ + GENLIB_PLACE("model","i1", NOSYM,0L,0L); + GENLIB_PLACE("model","i2", NOSYM,120L,40L); + GENLIB_DEF_PHINS("i1"); + GENLIB_PLACE_TOP("model2", "i3", NOSYM); + /\(** define the new abutment box as the standard envelop \(**/ + GENLIB_DEF_AB(0, 0, 0, 0); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_SAVE_PHFIG (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_DEF_LOFIG.3 b/alliance/src/genlib/man3/GENLIB_DEF_LOFIG.3 new file mode 100644 index 00000000..34993432 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_DEF_LOFIG.3 @@ -0,0 +1,62 @@ +.\" $Id: GENLIB_DEF_LOFIG.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_DEF_LOFIG.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_DEF_LOFIG +.XE \} +.TH GENLIB_DEF_LOFIG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_DEF_LOFIG \- open a netlist model as current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_DEF_LOFIG(cellname) +char \(**cellname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIcellname\fP +Name of the cell which all futher calls to genlib logical functions will work on +.SH DESCRIPTION +\fBDEF_LOFIG\fP defines the current working structural figure by it's name, +the \fIcellname\fP argument. It can be use anywhere in the \fBgenlib\fP +program, but must appear at least once at the top of it, since it also +initalize the user's preferences through environment variables. +.br +If the figure called cellname doesn't exists in memory, it is created. +If it already exists in memory, it makes it the current working figure. +\fBDEF_LOFIG\fP doesn't look on disk for the figure \fIcellname\fP, +so be careful not to overwrite an existing file while saving later on. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("cell"); + /\(** Place an instance \(**/ + GENLIB_LOINS("model","instance", "sig1", "sig2", "sig3", "vdd", "vss", EOL); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_SAVE_LOFIG (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_DEF_PHFIG.3 b/alliance/src/genlib/man3/GENLIB_DEF_PHFIG.3 new file mode 100644 index 00000000..f5f9afbd --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_DEF_PHFIG.3 @@ -0,0 +1,62 @@ +.\" $Id: GENLIB_DEF_PHFIG.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_DEF_PHFIG.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_DEF_PHFIG +.XE \} +.TH GENLIB_DEF_PHFIG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_DEF_PHFIG \- open a layout model as current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_DEF_PHFIG(cellname) +char \(**cellname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIcellname\fP +Name of the cell which all futher calls to genlib physical functions will work on +.SH DESCRIPTION +\fBDEF_PHFIG\fP defines the current physical working figure by it's name, +the \fIcellname\fP argument. It can be use anywhere in the \fBgenlib\fP +program, but must appear at least once at the top of it, since it also +initalize the user's preferences through environment variables. +.br +If the figure called cellname doesn't exists in memory, it is created. +If it already exists in memory, it makes it the current working figure. +\fBDEF_PHFIG\fP doesn't look on disk for the figure \fIcellname\fP, +so be careful not to overwrite an existing file while saving later on. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("mycell"); + /\(** Place an instance \(**/ + GENLIB_PLACE("mymodel","firstinstance", NOSYM,0L,0L); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHSC (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_DEF_PHINS.3 b/alliance/src/genlib/man3/GENLIB_DEF_PHINS.3 new file mode 100644 index 00000000..398e2e6b --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_DEF_PHINS.3 @@ -0,0 +1,94 @@ +.\" $Id: GENLIB_DEF_PHINS.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_DEF_PHINS.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_DEF_PHINS +.XE \} +.TH GENLIB_DEF_PHINS.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_DEF_PHINS \- define a new reference instance +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_DEF_PHINS(instancename); +char \(**instancename; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinstancename\fP +Defines the instance called \fIinstancename\fP as the new "reference instance" +.SH DESCRIPTION +\fBDEF_PHINS\fP define the new "reference instance", used as starting point +in the relative placement functions of genlib. It's regarding the \fBabutment +box\fP of the instance \fIinstancename\fP that the next instance is going to be +placed, if using the appropriate functions. Notice that the more recently +placed instance becomes automaticaly the "reference instance", if +\fBDEF_PHINS\fP isn't called. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_DEF_PHINS impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to refer to an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"instance instancename doesn't exist in current figure" +.ft R +.RS +The instance \fIinstancename\fP hasn't currently been placed in the figure, +so it's impossible do to any placement from it. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + /\(** Place an instance \(**/ + GENLIB_PLACE("model","i1", NOSYM,0L,0L); + GENLIB_PLACE("model","i2", NOSYM,120L,40L); + GENLIB_DEF_PHINS("i1"); + GENLIB_PLACE_TOP("model2", "i3", NOSYM); + GENLIB_DEF_AB(0, 0, 0, 0); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_PLACE (3), +.BR GENLIB_PLACE_TOP (3), +.BR GENLIB_PLACE_RIGHT (3), +.BR GENLIB_PLACE_LEFT (3), +.BR GENLIB_PLACE_BOTTOM (3), +.BR GENLIB_SC_PLACE (3), +.BR GENLIB_SC_TOP (3), +.BR GENLIB_SC_RIGHT (3), +.BR GENLIB_SC_LEFT (3), +.BR GENLIB_SC_BOTTOM (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_DEF_PHSC.3 b/alliance/src/genlib/man3/GENLIB_DEF_PHSC.3 new file mode 100644 index 00000000..b5b18c3b --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_DEF_PHSC.3 @@ -0,0 +1,78 @@ +.\" $Id: GENLIB_DEF_PHSC.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_DEF_PHSC.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_DEF_PHSC +.XE \} +.TH GENLIB_DEF_PHSC.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_DEF_PHSC \- load a netlist and open a layout model as current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_DEF_PHSC(cellname) +char \(**cellname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIcellname\fP +Name of the netlist figure to be looked for in memory or on disk, for +futher physical placement. +.SH DESCRIPTION +\fBDEF_PHSC\fP defines the current working figure by it's name, +the \fIcellname\fP argument, for layout and netlist operations. +It can be use anywhere in the \fBgenlib\fP +program, but must appear at least once at the top of it, since it also +initalize the user's preferences through environment variables. +.br +\fBDEF_PHSC\fP looks for the netlist figure \fIcellname\fP in memory, and if +not found, on disk. If it fails, an error occurs and the process terminates. +.br +The main issue of this function is to allow the netlist and physical +descriptions of a circuit in two separate files, +for standard cell approach. So there is +no need to recreate the netlist view each time the placement changes. +.br +If the physical figure called \fIcellname\fP doesn't exists in memory, +it is created. +If it already exists in memory, it makes it the current working figure. +\fBDEF_PHSC\fP doesn't look on disk for the figure \fIcellname\fP, +so be careful not to overwrite an existing file while saving later on. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHSC("mycell"); + /\(** Place an instance \(**/ + GENLIB_SC_PLACE("instance", NOSYM,0L,0L); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHSC(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_SAVE_PHSC (3), +.BR GENLIB_SC_PLACE (3), +.BR GENLIB_SC_TOP (3), +.BR GENLIB_SC_BOTTOM (3), +.BR GENLIB_SC_LEFT (3), +.BR GENLIB_SC_RIGHT (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_ELM.3 b/alliance/src/genlib/man3/GENLIB_ELM.3 new file mode 100644 index 00000000..74d3e76c --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_ELM.3 @@ -0,0 +1,75 @@ +.\" $Id: GENLIB_ELM.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_ELM.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_ELM +.XE \} +.TH GENLIB_ELM.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_ELM \- Creates a single element bus name for netlist +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +char \(**GENLIB_ELM(busname, index); +char \(**busname; +long index; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIbusname\fP +Common signal name for a bus +.TP 20 +\fIindex\fP +Index of the demanded signal belonging to the bus +.SH DESCRIPTION +\fIELM\fP Creates a single element bus names valid for the genlib netlist +functions that manipulate the signal, and/or connector, concept. +They are: +.RS +\fBLOINS\fP(3) +.br +\fBLOCON\fP(3) +.RE +The \fIindex\fP argument gives the index of the name to be created. +.br +This function has a constant equivalent, it means that if the \fIindex\fP +value is known at compilation time, one should better use, +for readability purposes, the "[n]" construct. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ +int b = 0; +int e = 12; + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("mycell"); + /\(** define interface \(**/ + GENLIB_LOCON(GENLIB_BUS("i", b, e), INPUT, BUS("sig", b, e); + GENLIB_LOCON("o[2:0]", OUTPUT, "sigout[4:6]"); + /\(** Place an instance \(**/ + GENLIB_LOINS("model","instance", GENLIB_ELM("sig", e/2), "sigout[6]", EOL); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_BUS (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_FLATTEN_ALL_LOINS.3 b/alliance/src/genlib/man3/GENLIB_FLATTEN_ALL_LOINS.3 new file mode 100644 index 00000000..9a5ee24f --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_FLATTEN_ALL_LOINS.3 @@ -0,0 +1,76 @@ +.\" $Id: GENLIB_FLATTEN_ALL_LOINS.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_FLATTEN_ALL_LOINS.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_FLATTEN_ALL_LOINS +.XE \} +.TH GENLIB_FLATTEN_ALL_LOINS.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_FLATTEN_ALL_LOINS \- flatten all instances in the current netlist figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_FLATTEN_ALL_LOINS(concat) +char concat; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETER +.TP 20 +\fIconcat\fP +Indicate whether or not to concatenate instance name to instance' objects name +.SH DESCRIPTION +\fBFLATTEN_ALL_LOINS\fP inserts the contents of all the instances of the +current figure in the current figure. +All these instances are destroyed during the process, and therefore cannot be +refered to later in the netlist description. +.br +The \fIconcat\fP parameter may take two values: +.TP +\fBYES\fP +to concatenate object name with instance names. +.TP +\fBNO\fP +to copy object names. +.LP +In most case, the \fIconcat\fP value must be \fBYES\fP, in order to warranty +the unicity of names in the figure. +It may otherwise fail, because the function would try to add in the current +figure some object with an already existing name. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("mycell"); + . + . + . + /\(** Place an instance \(**/ + GENLIB_LOINS("model","instance", "sig1", "sig2", EOL); + /\(** flatten all figure instance \(**/ + GENLIB_FLATTEN_ALL_LOINS(YES); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_LOINS (3) +.BR GENLIB_FLATTEN_LOFIG (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_FLATTEN_ALL_PHINS.3 b/alliance/src/genlib/man3/GENLIB_FLATTEN_ALL_PHINS.3 new file mode 100644 index 00000000..9822fa24 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_FLATTEN_ALL_PHINS.3 @@ -0,0 +1,93 @@ +.\" $Id: GENLIB_FLATTEN_ALL_PHINS.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_FLATTEN_ALL_PHINS.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_FLATTEN_ALL_PHINS +.XE \} +.TH GENLIB_FLATTEN_ALL_PHINS.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_FLATTEN_ALL_PHINS \- flatten all instances in the current layout figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_FLATTEN_ALL_PHINS(concat, catal) +char concat, catal; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETER +.TP 20 +\fIconcat\fP +Indicate whether or not to concatenate instance name to instance' objects name +.TP 20 +\fIconcat\fP +Indicate whether or not to look in the catalog file before flattening a cell +.SH DESCRIPTION +\fBFLATTEN_ALL_PHINS\fP inserts the contents of all the instances of the +current figure in the current figure. +All these instances are destroyed during the process, and therefore cannot be +refered to later in the layout description. +.br +The \fIconcat\fP parameter may take two values: +.TP +\fBYES\fP +to concatenate object name with instance names. +.TP +\fBNO\fP +to copy object names. +.LP +In most case, the \fIconcat\fP value must be \fBYES\fP, in order to warranty +the unicity of names in the figure. +It may otherwise fail, because the function would try to add in the current +figure some object with an already existing name. +.br +The \fIcatal\fP parameter may also take two values: +.TP +\fBYES\fP +to check the catalog file to see if the model of an instance is in it. +If the model belong to the catalog, then it is \fInot\fR flattened. +.TP +\fBNO\fP +in this case, no checks are done, and every instance is flattened. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("mycell"); + . + . + . + /\(** Place an instance \(**/ + PHINS("model","instance", "sig1", "sig2", EOL); + /\(** flatten all figure instance \(**/ + GENLIB_FLATTEN_ALL_PHINS(YES, YES); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_PLACE (3), +.BR GENLIB_PLACE_LEFT (3), +.BR GENLIB_PLACE_RIGHT (3), +.BR GENLIB_PLACE_TOP (3), +.BR GENLIB_PLACE_BOTTOM (3), +.BR GENLIB_PLACE_ON (3), +.BR GENLIB_FLATTEN_PHFIG (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_FLATTEN_LOFIG.3 b/alliance/src/genlib/man3/GENLIB_FLATTEN_LOFIG.3 new file mode 100644 index 00000000..9d5bcd3f --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_FLATTEN_LOFIG.3 @@ -0,0 +1,78 @@ +.\" $Id: GENLIB_FLATTEN_LOFIG.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_FLATTEN_LOFIG.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_FLATTEN_LOFIG +.XE \} +.TH GENLIB_FLATTEN_LOFIG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_FLATTEN_LOFIG \- flatten an instance in the current netlist figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_FLATTEN_LOFIG(insname,concat) +char \(**insname; +char concat; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name of the instance to be flattened +.TP +\fIconcat\fP +Indicate whether or not to concatenate instance name to instance' objects name +.SH DESCRIPTION +\fBFLATTEN_LOFIG\fP inserts the contents of an instance, but its connectors, +in the current figure, and then destroys the instance. +.br +The \fIconcat\fP parameter may take two values: +.TP +\fBYES\fP +to concatenate object name with instance names. +.TP +\fBNO\fP +to copy object names. +.LP +In most case, the \fIconcat\fP value must be \fBYES\fP, in order to warranty +the unicity of names in the figure. +It may otherwise fail, because the function would try to add in the current +figure some object with an already existing name. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("mycell"); + . + . + . + /\(** Place an instance \(**/ + GENLIB_LOINS("model","instance", "sig1", "sig2", EOL); + /\(** flatten an instance \(**/ + GENLIB_FLATTEN_LOFIG("instance", YES); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_UNFLATTEN_LOFIG (3). +.BR GENLIB_LOINS (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_FLATTEN_PHFIG.3 b/alliance/src/genlib/man3/GENLIB_FLATTEN_PHFIG.3 new file mode 100644 index 00000000..3b14cea5 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_FLATTEN_PHFIG.3 @@ -0,0 +1,77 @@ +.\" $Id: GENLIB_FLATTEN_PHFIG.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_FLATTEN_PHFIG.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_FLATTEN_PHFIG +.XE \} +.TH GENLIB_FLATTEN_PHFIG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_FLATTEN_PHFIG \- flatten an instance in the current layout figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_FLATTEN_PHFIG(insname,concat) +char \(**insname; +char concat; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name of the instance to be flattened +.TP +\fIconcat\fP +Indicate whether or not to concatenate instance name to instance' objects name +.SH DESCRIPTION +\fBFLATTEN_PHFIG\fP inserts the contents of an instance, but its connectors, +in the current figure, and then destroys the instance. +.br +The \fIconcat\fP parameter may take two values: +.TP 20 +\fBYES\fP +to concatenate object name with instance names. +.TP +\fBNO\fP +to copy object names. +.LP +In most case, the \fIconcat\fP value must be \fBYES\fP, in order to warranty +the unicity of names in the figure. +It may otherwise fail, because the function would try to add in the current +figure some object with an already existing name. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("mycell"); + . + . + . + /\(** Place an instance \(**/ + GENLIB_PLACE("model","instance", SYM_X, 0, 0); + /\(** flatten an instance \(**/ + GENLIB_FLATTEN_PHFIG("instance", YES); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_LOINS (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_GET_CON_X.3 b/alliance/src/genlib/man3/GENLIB_GET_CON_X.3 new file mode 100644 index 00000000..c48c9ea6 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_GET_CON_X.3 @@ -0,0 +1,110 @@ +.\" $Id: GENLIB_GET_CON_X.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_GET_CON_X.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_GET_CON_X +.XE \} +.TH GENLIB_GET_CON_X.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_GET_CON_X \- retrieve the x coordinate of an instance connector +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +long GENLIB_GET_CON_X(insname, conname, index) +char \(**insname, \(**conname; +long index; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name of the instance in the which the connector is to be searched for +.TP +\fIconname\fP +Name of the connector +.TP +\fIindex\fP +Connector index +.SH DESCRIPTION +\fBGET_CON_X\fP looks for +the connector, \fIconname\fP, in the instance called \fIinsname\fP. +Then it computes its absolute coordinates in the figure, and gives back the +x coordinate. +.SH RETURN VALUE +The function returns a long int beeing the x position of the connector +in the current figure +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_GET_CON_X impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a connector inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance called \fIinsname\fP does not exist" +.ft R +.RS +No instance called \fIinsname\fP exists in the current figure. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphcon : connectors \fIconname\fP, index \fIindex\fP does not exist" +.ft R +.RS +No connector called \fIconname\fP exists in the model of the instance +\fIinsname\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ +long x, y; + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r1", NOSYM, 23L, 54L); + /\(** Get a connector \(**/ + x = GENLIB_GET_CON_X("r1", "a", 1); + . + . + GENLIB_PHVIA(x, y, CONT_VIA); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PHCON (3), +.BR GENLIB_PHSEG (3), +.BR GENLIB_COPY_UP_CON (3), +.BR GENLIB_COPY_UP_ALL_CON (3), +.BR GENLIB_GET_CON_Y (3), +.BR GENLIB_GET_REF_X (3), +.BR GENLIB_GET_REF_Y (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_GET_CON_Y.3 b/alliance/src/genlib/man3/GENLIB_GET_CON_Y.3 new file mode 100644 index 00000000..1920be5d --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_GET_CON_Y.3 @@ -0,0 +1,110 @@ +.\" $Id: GENLIB_GET_CON_Y.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_GET_CON_Y.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_GET_CON_Y +.XE \} +.TH GENLIB_GET_CON_Y.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_GET_CON_Y \- retrieve the x coordinate of an instance connector +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +long GENLIB_GET_CON_Y(insname, conname, index) +char \(**insname, \(**conname; +long index; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name of the instance in the which the connector is to be searched for +.TP +\fIconname\fP +Name of the connector +.TP +\fIindex\fP +Connector index +.SH DESCRIPTION +\fBGET_CON_Y\fP looks for +the connector, \fIconname\fP, in the instance called \fIinsname\fP. +Then it computes its absolute coordinates in the figure, and gives back the +y coordinate. +.SH RETURN VALUE +The function returns a long int beeing the y position of the connector +in the current figure +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_GET_CON_Y impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a connector inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance called \fIinsname\fP does not exist" +.ft R +.RS +No instance called \fIinsname\fP exists in the current figure. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphcon : connectors \fIconname\fP, index \fIindex\fP does not exist" +.ft R +.RS +No connector called \fIconname\fP exists in the model of the instance +\fIinsname\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ +long x, y; + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r1", NOSYM, 23L, 54L); + /\(** Get a connector \(**/ + y = GENLIB_GET_CON_Y("r1", "a", 1); + . + . + GENLIB_PHVIA(x, y, CONT_VIA); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PHCON (3), +.BR GENLIB_PHSEG (3), +.BR GENLIB_COPY_UP_CON (3), +.BR GENLIB_COPY_UP_ALL_CON (3), +.BR GENLIB_GET_CON_X (3), +.BR GENLIB_GET_REF_X (3), +.BR GENLIB_GET_REF_Y (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_GET_INS_X.3 b/alliance/src/genlib/man3/GENLIB_GET_INS_X.3 new file mode 100644 index 00000000..373f3b90 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_GET_INS_X.3 @@ -0,0 +1,94 @@ +.\" $Id: GENLIB_GET_INS_X.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_GET_INS_X.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_GET_INS_X +.XE \} +.TH GENLIB_GET_INS_X.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_GET_INS_X \- retrieve the x coordinate of an instance +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +long GENLIB_GET_INS_X(insname) +char \(**insname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETER +.TP 20 +\fIinsname\fP +Name of the instance which x coordinate is to be given back +.SH DESCRIPTION +\fBGET_INS_X\fP looks for +the instance called \fIinsname\fP in the current figure. +Then it computes its absolute coordinates in the figure, and gives back its +x coordinate. +.SH RETURN VALUE +The function returns a long int beeing the x position of the instance +in the current figure +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_GET_INS_X impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a connector inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance called \fIinsname\fP does not exist" +.ft R +.RS +No instance called \fIinsname\fP exists in the current figure. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ +long x, y; + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r1", NOSYM, 23L, 54L); + GENLIB_PLACE_TOP("gaci0_b", "r2", SYM_X); + GENLIB_PLACE_RIGHT("gaci0_b", "r3", SYM_Y); + /\(** Get a connector \(**/ + x = GENLIB_GET_INS_X("r3"); + y = GENLIB_GET_INS_Y("r3"); + . + . + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR PHINS (3), +.BR GENLIB_GET_INS_Y (3), +.BR GENLIB_GET_CON_X (3), +.BR GENLIB_GET_CON_Y (3). +.BR GENLIB_GET_REF_X (3), +.BR GENLIB_GET_REF_Y (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_GET_INS_Y.3 b/alliance/src/genlib/man3/GENLIB_GET_INS_Y.3 new file mode 100644 index 00000000..dbdb5608 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_GET_INS_Y.3 @@ -0,0 +1,94 @@ +.\" $Id: GENLIB_GET_INS_Y.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_GET_INS_Y.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_GET_INS_Y +.XE \} +.TH GENLIB_GET_INS_Y.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_GET_INS_Y \- retrieve the y coordinate of an instance +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +long GENLIB_GET_INS_Y(insname) +char \(**insname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETER +.TP 20 +\fIinsname\fP +Name of the instance which y coordinate is to be given back +.SH DESCRIPTION +\fBGET_INS_Y\fP looks for +the instance called \fIinsname\fP in the current figure. +Then it computes its absolute coordinates in the figure, and gives back its +y coordinate. +.SH RETURN VALUE +The function returns a long int beeing the y position of the instance +in the current figure +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_GET_INS_Y impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a connector inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance called \fIinsname\fP does not exist" +.ft R +.RS +No instance called \fIinsname\fP exists in the current figure. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ +long x, y; + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r1", NOSYM, 23L, 54L); + GENLIB_PLACE_TOP("gaci0_b", "r2", SYM_Y); + GENLIB_PLACE_RIGHT("gaci0_b", "r3", SYM_Y); + /\(** Get a connector \(**/ + x = GENLIB_GET_INS_X("r3"); + y = GENLIB_GET_INS_Y("r3"); + . + . + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR PHINS (3), +.BR GENLIB_GET_INS_X (3), +.BR GENLIB_GET_CON_X (3), +.BR GENLIB_GET_CON_Y (3). +.BR GENLIB_GET_REF_X (3), +.BR GENLIB_GET_REF_Y (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_GET_REF_X.3 b/alliance/src/genlib/man3/GENLIB_GET_REF_X.3 new file mode 100644 index 00000000..e274b98f --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_GET_REF_X.3 @@ -0,0 +1,130 @@ +.\" $Id: GENLIB_GET_REF_X.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_GET_REF_X.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_GET_REF_X +.XE \} +.TH GENLIB_GET_REF_X.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_GET_REF_X \- retrieve the x coordinate of an instance reference +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +long GENLIB_GET_REF_X(insname, refname) +char \(**insname, \(**refname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name of the instance in the which the reference is to be searched for +.TP +\fIrefname\fP +Name of the reference +SH DESCRIPTION +\fBGET_REF_X\fP looks for +the reference, \fIrefname\fP, in the instance called \fIinsname\fP. +.SH RETURN VALUE +The function returns a long int beeing the x position of the reference +in the current figure +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_GET_REF_X impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_GET_REF_X impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_GET_REF_X impossible : no abutment box" +.ft R +.RS +The current figure does not have an \fIabutment box\fI. Use \fIDEF_AB\fP(3) +before this function. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal GENLIB_GET_REF_X : orientation is XX" +.ft R +.RS +The \fIface\fP parameter does not have a legal value, but \fIXX\fP. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance called \fIinsname\fP does not exist" +.ft R +.RS +No instance called \fIinsname\fP exists in the current figure +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphref : references called \fIrefname\fP does not exist" +.ft R +.RS +No reference called \fIrefname\fP exists in the model of the instance +\fIinsname\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r1", NOSYM, 23L, 54L); + /\(** Put a reference \(**/ + GENLIB_GET_REF_X("r1", "a_0", ALU2, 2, NORTH); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PHREF (3), +.BR GENLIB_PHSEG (3), +.BR GENLIB_COPY_UP_REF (3), +.BR GENLIB_COPY_UP_ALL_REF (3), +.BR GENLIB_GET_REF_X (3), +.BR GENLIB_GET_REF_X (3), +.BR GENLIB_GET_REF_X (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_GET_REF_Y.3 b/alliance/src/genlib/man3/GENLIB_GET_REF_Y.3 new file mode 100644 index 00000000..bfd43d65 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_GET_REF_Y.3 @@ -0,0 +1,106 @@ +.\" $Id: GENLIB_GET_REF_Y.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_GET_REF_Y.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_GET_REF_Y +.XE \} +.TH GENLIB_GET_REF_Y.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_GET_REF_Y \- retrieve the y coordinate of an instance reference +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +long GENLIB_GET_REF_Y(insname, refname) +char \(**insname, \(**refname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name of the instance in the which the reference is to be searched for +.TP +\fIrefname\fP +Name of the reference +.SH DESCRIPTION +\fBGET_REF_Y\fP looks for +the reference, \fIrefname\fP, in the instance called \fIinsname\fP. +Then it computes its absolute coordinates in the figure, and gives back the +y coordinate. +.SH RETURN VALUE +The function returns a long int beeing the y position of the reference +in the current figure +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_GET_REF_Y impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance called \fIinsname\fP does not exist" +.ft R +.RS +No instance called \fIinsname\fP exists in the current figure. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphref : references called \fIrefname\fP does not exist" +.ft R +.RS +No reference called \fIrefname\fP exists in the model of the instance +\fIinsname\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ +long x, y; + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r1", NOSYM, 23L, 54L); + /\(** Get a reference \(**/ + y = GENLIB_GET_REF_Y("r1", "a_0"); + . + . + GENLIB_PHVIA(x, y, CONT_VIA); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PHREF (3), +.BR GENLIB_PHSEG (3), +.BR GENLIB_COPY_UP_REF (3), +.BR GENLIB_COPY_UP_ALL_REF (3), +.BR GENLIB_GET_CON_X (3), +.BR GENLIB_GET_CON_Y (3), +.BR GENLIB_GET_REF_X (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_HEIGHT.3 b/alliance/src/genlib/man3/GENLIB_HEIGHT.3 new file mode 100644 index 00000000..3af692b6 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_HEIGHT.3 @@ -0,0 +1,59 @@ +.\" $Id: GENLIB_HEIGHT.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_HEIGHT.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_HEIGHT +.XE \} +.TH GENLIB_HEIGHT.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_HEIGHT \- compute the height of a model +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +long GENLIB_HEIGHT(cellname) +char \(**cellname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIcellname\fP +Name of the cell which height is needed +.SH DESCRIPTION +\fBHEIGHT\fP looks for the figure called \fIcellname\fP on memory, and then on +disk. When found, the figure \fIabutment box\fP height is calculated, and +returned. +.SH RETURN VALUE +\fIHEIGHT\fP returns a long int beeing the cell \fIabutment box\fP height. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +long cellHeight; +main() +{ + cellHeight = GENLIB_HEIGHT("mycell"); + GENLIB_DEF_PHFIG("grumf_z"); + GENLIB_PLACE("na2_y","ins1", NOSYM, 3 * cellHeight, 0L); + /\(** Save all that on disk \(**/ + GENLIB_DEF_AB(0L, 0L, 0L, 0L); + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_WIDTH (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_LOAD_LOFIG.3 b/alliance/src/genlib/man3/GENLIB_LOAD_LOFIG.3 new file mode 100644 index 00000000..8bcaec0f --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_LOAD_LOFIG.3 @@ -0,0 +1,59 @@ +.\" $Id: GENLIB_LOAD_LOFIG.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_LOAD_LOFIG.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_LOAD_LOFIG +.XE \} +.TH GENLIB_LOAD_LOFIG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_LOAD_LOFIG \- loads a netlist form disk and opens it as current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_LOAD_LOFIG(cellname) +char \(**cellname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIcellname\fP +Name of the cell which all futher calls to genlib logical functions will +work on +.SH DESCRIPTION +\fBLOAD_LOFIG\fP loads a netlist from disk and defines it as current working +structural figure. +This overrides the working figure initialized by \fBDEF_LOFIG\fP(3), if any. +So the next call to \fBSAVE_LOFIG\fP will save the cell called \fIcellname\fP. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Loads the figure to work on \(**/ + GENLIB_LOAD_LOFIG("cell"); + /\(** Add an instance in cell \(**/ + GENLIB_LOINS("model","instance", "sig1", "sig2", "sig3", "vdd", "vss", EOL); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_LOFIG (3). +.BR GENLIB_SAVE_LOFIG (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_LOAD_PHFIG.3 b/alliance/src/genlib/man3/GENLIB_LOAD_PHFIG.3 new file mode 100644 index 00000000..a4f6872c --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_LOAD_PHFIG.3 @@ -0,0 +1,59 @@ +.\" $Id: GENLIB_LOAD_PHFIG.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_LOAD_PHFIG.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_LOAD_PHFIG +.XE \} +.TH GENLIB_LOAD_PHFIG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +\fBPHAD_PHFIG\fP \- loads a layout form disk and opens it as current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_LOAD_PHFIG(cellname) +char \(**cellname; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIcellname\fP +Name of the cell which all futher calls to genlib layout functions will +work on +.SH DESCRIPTION +\fBPHAD_PHFIG\fP loads a physical view from disk and defines it as current +working layout figure. +This overrides the working figure initialized by \fBDEF_PHFIG\fP(3), if any. +So the next call to \fBSAVE_PHFIG\fP will save the cell called \fIcellname\fP. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Loads the figure to work on \(**/ + GENLIB_LOAD_PHFIG("cell"); + /\(** Add an instance in cell \(**/ + GENLIB_PLACE("model","instance", NOSYM, 200, 600); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3). +.BR GENLIB_SAVE_PHFIG (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_LOCON.3 b/alliance/src/genlib/man3/GENLIB_LOCON.3 new file mode 100644 index 00000000..8ce05616 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_LOCON.3 @@ -0,0 +1,146 @@ +.\" $Id: GENLIB_LOCON.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_LOCON.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_LOCON +.XE \} +.TH GENLIB_LOCON.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_LOCON \- adds a logical connector to the current netlist figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_LOCON(connector, direction, signal); +char \(**connector, \(**signal; +char direction; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIconnector\fP +Name of the connector to be created in the current figure +.TP +\fIdirection\fP +Indicates the connector behaviour regarding signals propagation +.TP +\fIsignal\fP +Name of the signal on which the connector is linked +.SH DESCRIPTION +\fBLOCON\fP add a logical connector to the interface of the actual +working figure. This connector is logicaly linked to the signal \fIsignal\fP. +The \fIdirection\fP attribut may take the following values: +.TP +\fBIN\fP +as input. +.TP +\fBOUT\fP +as output. +.TP +\fBINOUT\fP +as input/output, like supplies or clock for example. +.TP +\fBUNKNOWN\fP +if one doesn't know what it is. +.TP +\fBTRISTATE\fP +as high impedance output. +.TP +\fBTRANSV\fP +as transciever. That means \fBTRISTATE\fP input plus output. +.SH ERROR +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_LOCON impossible : missing GENLIB_DEF_LOFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_LOFIG\fP. So it isn't +possible to add anything. you must call \fBDEF_LOFIG\fP before any other +netlist call. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_LOCON : Bad signal or connector bus name" +.ft R +.RS +A signal or connector, described under a bus form, has an illegal syntax. +.RE +.TP +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_LOCON : All LOCON should be defined befor any GENLIB_LOINS" +.ft R +.RS +A connector is added after instances. This is a methodological error. +Only move your \fBLOCON\fP before the first \fBLOINS\fP in your code. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_LOCON : different number of signals and connectors" +.ft R +.RS +A bussed form of signal and connector has been used, but the width of +the busses are not equal. This is an obvious error, check it. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Illegal addlocon. Connector connector already exist in figure figname" +.ft R +.RS +A connector name must be unique in a given figure at a given hierachy level. +.RE +.SH DIAGNOSTICS +Due to the \fBvti\fP file format, the direction of connectors is lost if +one uses it as starting point of a netlist desciption. All the connectors +have then the \fBUNKNOWN\fP direction. +.br +Alliance and edif file format know only about \fBIN\fP, \fBOUT\fP, and +\fBUNKNOWN\fP. +Only vhdl format fully supports the whole thing. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("mycell"); + /\(** define interface \(**/ + GENLIB_LOCON("i", INPUT, "sig1"); + GENLIB_LOCON("o", OUTPUT, "sig2"); + /\(** Place an instance \(**/ + GENLIB_LOINS("model","instance", "sig1", "sig2", EOL); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_BUS (3), +.BR GENLIB_ELM (3), +.BR GENLIB_LOSIG (3), +.BR GENLIB_LOINS (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_LOINS.3 b/alliance/src/genlib/man3/GENLIB_LOINS.3 new file mode 100644 index 00000000..5a3381de --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_LOINS.3 @@ -0,0 +1,152 @@ +.\" $Id: GENLIB_LOINS.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_LOINS.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_LOINS +.XE \} +.TH GENLIB_LOINS.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_LOINS \- add a logical instance to the current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_LOINS(model, instance, sig1, sig2, ..., sign, EOL); +char \(**model, \(**instance; +char \(**sig1, \(**sig2, ..., \(**sign; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fImodel\fP +Name of the model to be logically instanciated +.TP +\fIinstance\fP +Name to be given to the new instance +.TP +\fIsig1, sig2, ..., sign\fP +List of signals to be linked to the implicit connector list of the instance +.SH DESCRIPTION +\fBLOINS\fP add a logical instance in the actual working figure. +\fBLOINS\fP uses environment variables to +choose the file format and the path to the file. +.br +\fBMBK_IN_LO\fP set up the input file format, the valid ones beeing : +.RS +.br +\fBhns +.br +fne +.br +al +.br +alx\fP +.RE +\fBMBK_WORK_LIB\fP set up the output file path. Any valid unix path is +ok. +\fBLOINS\fP look in memory and then, if not found, on disk for the +figure \fImodelname\fP. This is due to the need to ensure consistency +between the model and its ascociated instances. +.br +The instance is added with the name \fIinstance\fP, and each of the +signals are connected to an instance connector. The connectors are +implicitly matched from the order of the signal on the list. +This order is the one given +in the netlist file, \fBhns\fP or \fBal\fP, or in the \fIsclib\fP +documentation, for standard cell circuits. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_LOINS impossible : missing GENLIB_DEF_LOFIG" +.ft R +.br +.RS +No figure has been yet specified by a call to \fBDEF_LOFIG\fP. So it isn't +possible to add anything. you must call \fBDEF_LOFIG\fP before any other +netlist call. +.RE +.br +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_LOINS : Bad signal bus name" +.ft R +.br +.RS +A signal, described under a bus form, has an illegal syntax. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Illegal addloins. Instance insname already exist in figure figname" +.ft R +.br +.RS +An instance name must be unique in a given figure at a given hierachy level. +.RE +.br +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Illegal addloins. Instance model is the figure figname itself" +.ft R +.br +.RS +A figure cannot be included in itself. Be careful, the check is only +made at current hierarchy level. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +.br +"Illegal addloins. Connector number discrepancy between +figure modelname and instance insname in figure figname" +.ft R +.br +.RS +The number of connector in the model is not equal to the number of signals +describing the connectivity during the \fBLOINS\fP call. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("mycell"); + /\(** define interface \(**/ + GENLIB_LOCON("i", INPUT, "sig1"); + GENLIB_LOCON("o", OUTPUT, "sig2"); + /\(** Place an instance \(**/ + GENLIB_LOINS("model","instance", "sig1", "sig2", EOL); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_LOFIG (3), +.BR MBK_IN_LO (1), +.BR MBK_CATA_LIB (1), +.BR MBK_WORK_LIB (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_LOINSE.3 b/alliance/src/genlib/man3/GENLIB_LOINSE.3 new file mode 100644 index 00000000..2803801d --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_LOINSE.3 @@ -0,0 +1,159 @@ +.\" $Id: GENLIB_LOINSE.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_LOINSE.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_LOINSE +.XE \} +.TH GENLIB_LOINSE.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_LOINSE \- add a logical instance to the current figure, with explicit connections +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_LOINSE(model, instance, couple1, couple2, ..., couplen, EOL); +char \(**model, \(**instance; +char \(**couple1, \(**couple2, ..., \(**couplen; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fImodel\fP +Name of the model to be logically instanciated +.TP +\fIinstance\fP +Name to be given to the new instance +.TP +\fIcouple1, couple2, ..., couplen\fP +Explicit list of connections between connectors and signals. +.SH DESCRIPTION +\fBLOINSE\fP add a logical instance in the actual working figure. +\fBLOINSE\fP uses environment variables to +choose the file format and the path to the file. +.br +\fBMBK_IN_LO\fP set up the input file format, the valid ones beeing : +.RS +.br +\fBhns +.br +fne +.br +al +.br +alx\fP +.RE +\fBMBK_WORK_LIB\fP set up the output file path. Any valid unix path is +ok. +\fBLOINSE\fP look in memory and then, if not found, on disk for the +figure \fImodelname\fP. This is due to the need to ensure consistency +between the model and its ascociated instances. +.br +The instance is added with the name \fIinstance\fP, and each of the +signals are connected to an instance connector. +The connector signal link is explicit, and described in the \fBcouple\fRs +arguments. +The \fBcouple\fRs arguments are supposed to have the form: +.nf +\fBconector => signal\fP +.br +or +\fBconector[a:b] => signal[n:m]\fP +where \fIa - b\fP equals, in absolute value, \fIn - m\fR. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_LOINSE impossible : missing GENLIB_DEF_LOFIG" +.ft R +.br +.RS +No figure has been yet specified by a call to \fBDEF_LOFIG\fP. So it isn't +possible to add anything. you must call \fBDEF_LOFIG\fP before any other +netlist call. +.RE +.br +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_LOINSE : Bad signal bus name" +.ft R +.br +.RS +A signal, described under a bus form, has an illegal syntax. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Illegal addloins. Instance insname already exist in figure figname" +.ft R +.br +.RS +An instance name must be unique in a given figure at a given hierachy level. +.RE +.br +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Illegal addloins. Instance model is the figure figname itself" +.ft R +.br +.RS +A figure cannot be included in itself. Be careful, the check is only +made at current hierarchy level. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +.br +"Illegal addloins. Connector number discrepancy between +figure modelname and instance insname in figure figname" +.ft R +.br +.RS +The number of connector in the model is not equal to the number of signals +describing the connectivity during the \fBLOINSE\fP call. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("mycell"); + /\(** define interface \(**/ + GENLIB_LOCON("i", INPUT, "sig1"); + GENLIB_LOCON("o", OUTPUT, "sig2"); + /\(** Place an instance \(**/ + GENLIB_LOINSE("model","instance", "con1 => sig1", "con2 => sig2", 0L); + GENLIB_LOINSE("stuff","shirt", "i[31:0] => out[32:63]", "j[2] => sig2", 0L); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_LOFIG (3), +.BR GENLIB_LOINS (3), +.BR MBK_IN_LO (1), +.BR MBK_CATA_LIB (1), +.BR MBK_WORK_LIB (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_LOSIG.3 b/alliance/src/genlib/man3/GENLIB_LOSIG.3 new file mode 100644 index 00000000..91ef2f93 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_LOSIG.3 @@ -0,0 +1,79 @@ +.\" $Id: GENLIB_LOSIG.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_LOSIG.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_LOSIG +.XE \} +.TH GENLIB_LOSIG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_LOSIG \- declare an internal logical signal, or a vector of internal +logical signals +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_LOSIG(name) +char \(**name; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIname\fP +Name of a signal to be declared +.SH DESCRIPTION +\fBLOSIG\fP creates the internal signal, or the set of internal signals +coresponding to a vector description, represented by \fIname\fP. +See \fBBUS(3)\fP and \fBELM(3)\fP for more details on vectors. +.br +The need for declaring signal is mostly felt when one wants to create a +consistent vector declaration, for file formats that do not allow partial or +multiple declarations, like \fIvhdl\fP. +This way, a user can create a vector and access its member the way he wants, +but still having an internal consistent form. +.TP 20 +Warning +If a signal is declared with \fBLOSIG\fP, but not used, the resulting file +will have an internal node floating. +This is not an error from a genlib point of view, so the user must be aware +of it. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("cell"); + /\(** Define interface \(** + GENLIB_LOCON(... + /\(** declare buses \(**/ + GENLIB_LOSIG("grum[23:0]"); + GENLIB_LOSIG("iconection[0:7]"); + /\(** Place an instance \(**/ + GENLIB_LOINS("no2_y" ,"no3" ,"grum[12]" ,"a9_s" ,"new_no3_s" ,"vdd" ,"vss" ,0); + GENLIB_LOINS("no2_y" ,"no4" ,"a12_s" ,"grum[6]" ,"no4_s" ,"vdd" ,"vss" ,0); + GENLIB_LOINS("a2_y" ,"a22" ,"no3_s" ,"grum[15]" ,"a22_s" ,"vdd" ,"vss" ,0); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_LOINS (3), +.BR GENLIB_LOCON (3), +.BR GENLIB_BUS (3), +.BR GENLIB_ELM (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_LOSIGMERGE.3 b/alliance/src/genlib/man3/GENLIB_LOSIGMERGE.3 new file mode 100644 index 00000000..d76e86c0 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_LOSIGMERGE.3 @@ -0,0 +1,95 @@ +.\" $Id: GENLIB_LOSIGMERGE.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_LOSIGMERGE.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_LOSIGMERGE +.XE \} +.TH GENLIB_LOSIGMERGE.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_LOSIGMERGE \- merge two logical signals +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_LOSIGMERGE(signal1, signal2) +char \(**signal1, \(**signal2; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIsignal1\fP +Name of a signal to be merged +.TP 20 +\fIsignal2\fP +Name of a signal to be merged +.SH DESCRIPTION +\fBLOSIGMERGE\fP merges the two signals, \fIsignal1\fP and \fIsignal2\fP. +This function can be used anywhere in the \fBgenlib\fP program, but its +resultings actions must be known by the user. +.TP 10 +1) +If \fIsignal1\fP and \fIsignal2\fP have not been used yet, then the +corresponding signal can be later accessed through any of these aliases. +.TP 10 +2) +If one of \fIsignal1\fP or \fIsignal2\fP has not been used yet, then all +further reference to the not defined name will be made on the same signal than +the defined signal. +.TP 10 +3) +If both signals exist, then they are merged, and both can be used for reference +to the same signal later on. +.LP +Since most of the file formats do not allow multiple name for a +single signal, the choice is made to keep for disk usage the name that appears +in the cell interface, if any. +Otherwise, the choice is randomly made by \fBLOSIGMERGE\fP. +.TP 10 +Warning +This function allows the user to internally connect two external connectors. +This is \fInot\fP a valid disk representation for netlist generated by +\fBgenlib\fP. +The \fBSAVE_LOFIG\fP function will exit if encountering such a situation. +.br +In order to avoid it, either take care not to link such signals, or build +all your hierarchy in memory, make sure your block does not have such signals, +and call \fPFLATTEN_LOFIG\fP(3) just before saving. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("cell"); + /\(** Define interface \(** + GENLIB_LOCON(... + /\(** Place an instance \(**/ + GENLIB_LOINS("no2_y" ,"no3" ,"a8_s" ,"a9_s" ,"new_no3_s" ,"vdd" ,"vss" ,0); + GENLIB_LOINS("no2_y" ,"no4" ,"a12_s" ,"a15_s" ,"no4_s" ,"vdd" ,"vss" ,0); + GENLIB_LOINS("a2_y" ,"a22" ,"no3_s" ,"no4_s" ,"a22_s" ,"vdd" ,"vss" ,0); + GENLIB_LOSIGMERGE("new_no3_s", "no3_s"); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_LOINS (3), +.BR GENLIB_LOCON (3), +.BR GENLIB_FLATTEN_LOFIG (3), +.BR GENLIB_SAVE_PHFIG (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_LOTRS.3 b/alliance/src/genlib/man3/GENLIB_LOTRS.3 new file mode 100644 index 00000000..2c94a679 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_LOTRS.3 @@ -0,0 +1,92 @@ +.\" $Id: GENLIB_LOTRS.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_LOTRS.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_LOTRS +.XE \} +.TH GENLIB_LOTRS.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_LOTRS \- adds a logical transistor to the current netlist figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_LOTRS(type,width,length,grid,source,drain) +char type; +long width, length; +char \(**grid, \(**source, \(**drain; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fItype\fP +Type of the transistor to be created in the current figure +.TP +\fIwidth, length\fP +Size of the transistor +.TP +\fIgrid, source, drain\fP +Name of the signals on which the given transitor connector are to be linked +.SH DESCRIPTION +\fBLOTRS\fP add a logical transistor to the current +working figure. This transitor has each of its pin logicaly linked to the signal +adequat signal given as parameter. +The \fItype\fP attribut may take the following values: +.TP +\fBTRANSN\fP +for a N type mos transistor. +.TP +\fBTRANSP\fP +for a P type mos transistor. +.SH ERROR +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_LOTRS impossible : missing GENLIB_DEF_LOFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_LOFIG\fP. So it isn't +possible to add anything. you must call \fBDEF_LOFIG\fP before any other +netlist call. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on, an inverter \(**/ + GENLIB_DEF_LOFIG("n1"); + /\(** define interface \(**/ + GENLIB_LOCON("i", IN, "input"); + GENLIB_LOCON("f", OUT, "output"); + GENLIB_LOCON("vdd", IN, "vdd"); + GENLIB_LOCON("vss", IN, "vss"); + /\(** Place transistors \(**/ + GENLIB_LOTRS(TRANSP, 5, 4, "input", "vdd", "output"); + GENLIB_LOTRS(TRANSN, 2, 4, "input", "vss", "output"); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_BUS (3), +.BR GENLIB_ELM (3), +.BR GENLIB_LOINS (3), +.BR GENLIB_LOCON (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_OUTLINE.3 b/alliance/src/genlib/man3/GENLIB_OUTLINE.3 new file mode 100644 index 00000000..d005ef17 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_OUTLINE.3 @@ -0,0 +1,56 @@ +.\" $Id: GENLIB_OUTLINE.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_OUTLINE.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_OUTLINE +.XE \} +.TH GENLIB_OUTLINE.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_OUTLINE \- build an outline from the current layout cell +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_OUTLINE(); +.ft R +.fi +.so man1/alc_origin.1 +.SH DESCRIPTION +\fBOUTLINE\fP build a black box from a layout. +After a call to \fBOUTLINE\fP, the figure has only its abutment box, +its connectors, references and feed through. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + /\(** Place an instance \(**/ + GENLIB_PLACE("model","i1", NOSYM,0L,0L); + GENLIB_PLACE("model","i2", NOSYM,120L,40L); + GENLIB_DEF_PHINS("i1"); + GENLIB_PLACE_TOP("model2", "i3", NOSYM); + /\(** define the new abutment box as the standard envelop \(**/ + GENLIB_DEF_AB(0, 0, 0, 0); + GENLIB_OUTLINE(); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PHCON.3 b/alliance/src/genlib/man3/GENLIB_PHCON.3 new file mode 100644 index 00000000..09e880c9 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PHCON.3 @@ -0,0 +1,174 @@ +.\" $Id: GENLIB_PHCON.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PHCON.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PHCON +.XE \} +.TH GENLIB_PHCON.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PHCON \- place a physical connector in the current figure at absolute coordinates +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PHCON(layer, width, name, orient, x, y) +char layer; +long width; +char \(**name, orient; +long x, y; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIlayer\fP +Layout layer of the connector +.TP +\fIwidth\fP +Width of the connector +.TP +\fIname\fP +Name to be given to the connector +.TP +\fIorient\fP +Face of the cell on witch the connector belongs +.TP +\fIx, y\fP +Absolute coordinates of the connector +.SH DESCRIPTION +\fBPHCON\fP adds a connector in the current layout cell, at the specified +coordinates, with the given attributs. +The \fIlayer\fP argument can take the following legal values: +.RS +.TP +\fBNWELL\fP +.TP +\fBPWELL\fP +.TP +\fBNTIE\fP +.TP +\fBPTIE\fP +.TP +\fBNDIF\fP +.TP +\fBPDIF\fP +.TP +\fBNTRANS\fP +.TP +\fBPTRANS\fP +.TP +\fBPOLY\fP +.TP +\fBALU1\fP +.TP +\fBALU2\fP +.TP +\fBALU3\fP +.TP +\fBTPOLY\fP +.TP +\fBTALU1\fP +.TP +\fBTALU2\fP +.TP +\fBTALU3\fP +.RE +.LP +The name argument is not enough of an information to non ambigiously identify +a connector. +In order to be able to do so, an \fIindex\fP is computed for each connector +that has an already existing name, following a topological order. +Each time a connector is created, the \fIindex\fP is updated, regarding the +name of the connector. +Since someone writting a tiler needs to know exactly what connector to access, +the indexation algorithm must be known by the user. +.TP 20 +Connectors with a unique name: +Such connectors have the index \fB0\fP +.TP 20 +Connectors with a name apearing many times: +The indexes are computed from left to right, and then from bottom to top, +starting at \fB0\fP. +If two connectors are on the same location, with the same name, then the +\fIlayer\fP decides which one is has the greater number, from lower level, +\fBNWELL\fP to upper level, \fBALU3\fP. +.LP +The \fIorient\fP paramater may take the following values: +.TP 20 +\fBNORTH\fP +for a connector placed on the top of the cell. +.TP +\fBSOUTH\fP +for a connector placed on the bottom of the cell. +.TP +\fBEAST\fP +for a connector placed on the right side of the cell. +.TP +\fBWEST\fP +for a connector placed on the left side of the cell. +.TP +Remark: +Connectors placed on corners of leaf cells are given the \fBEAST\fP orientation +if on top/right or bottom/right corner, and \fBWEST\fP if top/left or +bottom/left. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PHCON impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a connector inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphcon : orientation is XX in \fIname\fP" +.ft R +.RS +The \fIorient\fP parameter does not have a legal value, but \fIXX\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + . + . + . + GENLIB_DEF_AB(0L, 0L, 0L, 0L); + /\(** Put a connector \(**/ + GENLIB_PHCON(ALU1, 1, "cin", SOUTH, 12L, 0L); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_COPY_UP_ALL_CON (3), +.BR GENLIB_COPY_UP_CON (3), +.BR GENLIB_COPY_UP_CON_FACE (3), +.BR GENLIB_THRU_CON_H (3), +.BR GENLIB_THRU_CON_V (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PHREF.3 b/alliance/src/genlib/man3/GENLIB_PHREF.3 new file mode 100644 index 00000000..3b7b734b --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PHREF.3 @@ -0,0 +1,96 @@ +.\" $Id: GENLIB_PHREF.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PHREF.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PHREF +.XE \} +.TH GENLIB_PHREF.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PHREF \- place a physical reference in the current figure at absolute +coordinates +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PHREF(type, name, x, y) +char \(**type, \(**name; +long x, y; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fItype\fP +Type of the reference to be added +.TP +\fIname\fP +Name of the reference +.TP +\fIx, y\fP +Absolute coordinates of the reference +.SH DESCRIPTION +\fBPHREF\fP adds a reference in the current layout cell, at the specified +coordinates. +A reference is an object that allows to symbolicaly name a point for +futur use by the designer. +They have been mainly used in the past to \fIprogram\fP decoders, in order +to obtain many cells from a unique cell. +.LP +The \fItype\fP argument may take the two following legal values: +.TP 20 +\fBref_con\fP +for virtual connectors, see \fBdpr\fP(1) for details. +.TP +\fBref_ref\fP +for any other need from the designer. +.LP +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PHREF impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + . + /\(** Put a reference \(**/ + GENLIB_PHREF("ref_con", "in_a[0]", 102L, 10L); + . + . + GENLIB_DEF_AB(0L, 0L, 0L, 0L); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PLACE_CON_REF (3), +.BR GENLIB_PLACE_SEG_REF (3), +.BR GENLIB_PLACE_VIA_REF (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PHSEG.3 b/alliance/src/genlib/man3/GENLIB_PHSEG.3 new file mode 100644 index 00000000..02604742 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PHSEG.3 @@ -0,0 +1,137 @@ +.\" $Id: GENLIB_PHSEG.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PHSEG.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PHSEG +.XE \} +.TH GENLIB_PHSEG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PHSEG \- place a physical segment in the current figure at absolute coordinates +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PHSEG(layer, width, name, x1, y1, x2, y2) +char layer; +long width; +char \(**name; +long x1, y1, x2, y2; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIlayer\fP +Layout layer of the segment +.TP +\fIwidth\fP +Width of the segment +.TP +\fIname\fP +Name to be given to the segment +.TP +\fIx1, y1, x2, y2\fP +Coordinates of the segment's end points in the current figure +.SH DESCRIPTION +\fBPHSEG\fP adds a segment in the current layout cell, at the specified +coordinates, with the given attributs. +The \fIlayer\fP argument can take the following legal values : +.RS +.TP +\fBNWELL\fP +.TP +\fBPWELL\fP +.TP +\fBNTIE\fP +.TP +\fBPTIE\fP +.TP +\fBNDIF\fP +.TP +\fBPDIF\fP +.TP +\fBNTRANS\fP +.TP +\fBPTRANS\fP +.TP +\fBPOLY\fP +.TP +\fBALU1\fP +.TP +\fBALU2\fP +.TP +\fBALU3\fP +.TP +\fBTPOLY\fP +.TP +\fBTALU1\fP +.TP +\fBTALU2\fP +.TP +\fBTALU3\fP +.RE +.LP +The name argument needs not to be specified, since one usually doesn't need to +give a segment a name. To do so, just type "" as name. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PHSEG impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphseg : x1, y1, x2, y2" +.ft R +.RS +A symbolic segment must be either vertical or horizontal, so either +\fIx1 = x2\fP, or \fIy1 = y2\fP. +.RE +.br +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + /\(** Put a segment \(**/ + GENLIB_PHSEG(ALU1, 1, "", 0L, 0L, 12L, 0L); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_COPY_UP_SEG (3), +.BR GENLIB_THRU_H (3), +.BR GENLIB_THRU_CON_H (3), +.BR GENLIB_THRU_V (3), +.BR GENLIB_THRU_CON_V (3), +.BR GENLIB_WIRE1 (3), +.BR GENLIB_WIRE2 (3), +.BR GENLIB_WIRE3 (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PHVIA.3 b/alliance/src/genlib/man3/GENLIB_PHVIA.3 new file mode 100644 index 00000000..5c0c9347 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PHVIA.3 @@ -0,0 +1,114 @@ +.\" $Id: GENLIB_PHVIA.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PHVIA.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PHVIA +.XE \} +.TH GENLIB_PHVIA.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PHVIA \- place a physical via in the current figure at absolute coordinates +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PHVIA(type, x, y) +char type; +long x, y; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fItype\fP +Type of the contact to be made +.TP +\fIx, y\fP +Absolute coordinates of the via +.SH DESCRIPTION +\fBPHVIA\fP adds a via in the current layout cell, at the specified +coordinates. +The \fItype\fP argument may take the following legal values: +.TP 20 +\fBCONT_POLY\fP +links \fBPOLY\fP and \fBALU1\fP +.TP +\fBCONT_DIF_N\fP +links \fBNDIF\fP and \fBALU1\fP +.TP +\fBCONT_DIF_P\fP +links \fBPDIF\fP and \fBALU1\fP +.TP +\fBCONT_BODY_N\fP +links \fBNTIE\fP and \fBALU1\fP +.TP +\fBCONT_BODY_P\fP +links \fBPTIE\fP and \fBALU1\fP +.TP +\fBCONT_VIA\fP +links \fBALU1\fP and \fBALU2\fP +.TP +\fBCONT_VIA2\fP +links \fBALU2\fP and \fBALU3\fP +.TP +\fBC_X_N\fP +corner for L-shaped (and S-shaped) N transistor +.TP +\fBC_X_P\fP +corner for L-shaped (and S-shaped) P transistor +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PHVIA impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a via inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphvia : type is XX at \fIx, y\fP" +.ft R +.RS +The \fItype\fP parameter does not have a legal value, but \fIXX\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + . + /\(** Put a via \(**/ + GENLIB_PHVIA(CONT_VIA, 12L, 10L); + . + . + GENLIB_DEF_AB(0L, 0L, 0L, 0L); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PLACE_VIA_REF (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PLACE.3 b/alliance/src/genlib/man3/GENLIB_PLACE.3 new file mode 100644 index 00000000..134df9b9 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PLACE.3 @@ -0,0 +1,137 @@ +.\" $Id: GENLIB_PLACE.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PLACE.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PLACE +.XE \} +.TH GENLIB_PLACE.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PLACE \- place a physical instance in the current figure at absolute coordinates +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PLACE(modelname, insname, symetry, x, y) +char \(**modelname, \(**insname; +char symetry; +long x,y; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fImodelname\fP +Name of the layout figure to be instanciated +.TP +\fIinsname\fP +Name to be given to the instance on the model +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.TP +\fIx, y\fP +Coordinates of the lower left corner of the abutment box on the instance in +the current figure +.SH DESCRIPTION +\fBPLACE\fP add an instance in the current layout cell. The bottom left corner +of the instance of the model \fImodelname\fP is placed, after beeing +symetrized and/or rotated, at \fI(x, y)\fP coordinates. +The placed instance becomes the new "reference instance", used in +the relative placement functions. +.br +The \fIinsname\fP is the name given to the instance and must be unique at +a given hierarchy level. +.br +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +Y becomes -Y, and then a negative 90 degrees rotation take place +.PP +The model of the figure to be placed must be available, on disk or in memory. +The path to the library is specified in the \fBMBK_CATA_LIB\fP (1) and +\fBMBK_WORK_LIB\fP (1) environment +variables, and its format is given by the \fBMBK_IN_PH\fP (1) environment +variable. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.br +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + /\(** Place two instances \(**/ + GENLIB_PLACE("gapg0_b","ins1", NOSYM, 0L, 0L); + GENLIB_PLACE("gapg8_b","ins2", SYM_X, 80L, 100L); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PLACE_TOP (3), +.BR GENLIB_PLACE_BOTTOM (3), +.BR GENLIB_PLACE_LEFT (3), +.BR GENLIB_PLACE_RIGHT (3), +.BR MBK_CATA_LIB (1), +.BR MBK_WORK_LIB (1), +.BR MBK_IN_PH (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PLACE_BOTTOM.3 b/alliance/src/genlib/man3/GENLIB_PLACE_BOTTOM.3 new file mode 100644 index 00000000..645b7f59 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PLACE_BOTTOM.3 @@ -0,0 +1,146 @@ +.\" $Id: GENLIB_PLACE_BOTTOM.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PLACE_BOTTOM.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PLACE_BOTTOM +.XE \} +.TH GENLIB_PLACE_BOTTOM.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PLACE_BOTTOM \- place a physical instance in the current figure under +the "reference instance" +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PLACE_BOTTOM(modelname, insname, symetry) +char \(**modelname, \(**insname; +char symetry; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fImodelname\fP +Name of the layout figure to be instanciated +.TP +\fIinsname\fP +Name to be given to the instance on the model +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.SH DESCRIPTION +\fBPLACE_BOTTOM\fP add a instance of model \fImodelname\fP +in the current layout cell. +The bottom left corner +of the abutment box of the instance is placed, after beeing symetrized +and/or rotated, +toward the bottom left corner of the abutment box of the +"reference instance". The newly +placed instance becomes the "reference instance". +.br +The \fIinsname\fP is the name given to the instance and must be unique at +a given hierarchy level. +.br +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +Y becomes -Y, and then a negative 90 degrees rotation take place +.PP +The model of the figure to be placed must be available, on disk or in memory. +The path to the library is specified in the \fBMBK_CATA_LIB\fP (1) and +\fBMBK_WORK_LIB\fP (1) environment +variables, and its format is given by the \fBMBK_IN_PH\fP (1) environment +variable. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_BOTTOM impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_BOTTOM impossible : No previous instance" +.ft R +.RS +There are no instances placed in the current layout cell, so it's +impossible to know where to place from. Use a \fBPLACE\fP call before. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.br +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHSC("cell"); + /\(** Place two instances \(**/ + PLACE_PLACE("grbos", "ins1", SYMXY, -3L, 0L); + GENLIB_PLACE_BOTTOM("gln", "ins2", NOSYM); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHSC(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PLACE (3), +.BR GENLIB_PLACE_TOP (3), +.BR GENLIB_PLACE_RIGHT (3), +.BR GENLIB_PLACE_LEFT (3), +.BR MBK_CATA_LIB (1), +.BR MBK_WORK_LIB (1), +.BR MBK_IN_PH (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PLACE_CON_REF.3 b/alliance/src/genlib/man3/GENLIB_PLACE_CON_REF.3 new file mode 100644 index 00000000..768eb65e --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PLACE_CON_REF.3 @@ -0,0 +1,173 @@ +.\" $Id: GENLIB_PLACE_CON_REF.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PLACE_CON_REF.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PLACE_CON_REF +.XE \} +.TH GENLIB_PLACE_CON_REF.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PLACE_CON_REF \- put a connector on top of a reference belonging an +instance in the current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PLACE_CON_REF(insname, refname, conname, layer, width, face) +char \(**insname, \(**refname, \(**conname; +char layer, face; +long width; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name of the instance in the which the reference is to be searched for +.TP +\fIrefname\fP +Name of the reference to be used for the connector placement +.TP +\fIconname\fP +Name of the connector to be placed +.TP +\fIlayer\fP +Physical layer of the connector +.TP +\fIwidth\fP +Width of the connector +.TP +\fIface\fP +Face of the figure on which the connector is to be placed +.SH DESCRIPTION +\fBPLACE_CON_REF\fP places a connector called \fIconname\fP ragarding the +position of the reference, \fIrefname\fP, in the instance called \fIinsname\fP. +The connector coordinates are computed from the reference coordinates and +the face given as argument. +.br +Two behaviours are expected, regarding the reference coordinates: +.TP 20 +the reference is on the given face of the \fIabutment box\fP +a connector called \fIconname\fP is added on top of the reference, with +the given \fIlayer\fP and \fIwidth\fP. +.TP +the reference is anywhere else +a connector called \fIconname\fP is added on the given face, \fIface\fP, of the +\fIabutment box\fP, at the y coordinates of the reference if the \fIface\fP +is \fBEAST\fP or \fBWEST\fP, or x one if the \fIface\fP is \fBNORTH\fP or +\fBSOUTH\fP. Then a segment is drawn between the reference and the connector. +All drawn objects are given \fIlayer\fP and \fIwidth\fP as caracteristics. +.br +The \fIface\fP argument is meant in the placed instance, and can take any of +the following values: +.TP 20 +\fBNORTH\fP +for a connector placed on the top of the cell. +.TP +\fBSOUTH\fP +for a connector placed on the bottom of the cell. +.TP +\fBEAST\fP +for a connector placed on the right side of the cell. +.TP +\fBWEST\fP +for a connector placed on the left side of the cell. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_CON_REF impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_CON_REF impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_CON_REF impossible : no abutment box" +.ft R +.RS +The current figure does not have an \fIabutment box\fI. Use \fIDEF_AB\fP(3) +before this function. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal GENLIB_PLACE_CON_REF : orientation is XX" +.ft R +.RS +The \fIface\fP parameter does not have a legal value, but \fIXX\fP. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance called \fIinsname\fP does not exist" +.ft R +.RS +No instance called \fIinsname\fP exists in the current figure +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphref : references called \fIrefname\fP does not exist" +.ft R +.RS +No reference called \fIrefname\fP exists in the model of the instance +\fIinsname\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r1", NOSYM, 23L, 54L); + /\(** Put a reference \(**/ + GENLIB_PLACE_CON_REF("r1", "a_0", ALU2, 2, NORTH); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PHREF (3), +.BR GENLIB_PHCON (3), +.BR GENLIB_COPY_UP_REF (3), +.BR GENLIB_COPY_UP_ALL_REF (3), +.BR GENLIB_PLACE_CON_REF (3), +.BR GENLIB_PLACE_SEG_REF (3), +.BR GENLIB_PLACE_CON_REF (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PLACE_LEFT.3 b/alliance/src/genlib/man3/GENLIB_PLACE_LEFT.3 new file mode 100644 index 00000000..823c0539 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PLACE_LEFT.3 @@ -0,0 +1,146 @@ +.\" $Id: GENLIB_PLACE_LEFT.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PLACE_LEFT.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PLACE_LEFT +.XE \} +.TH GENLIB_PLACE_LEFT.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PLACE_LEFT \- place a physical instance in the current figure at the left of the +"reference instance" +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PLACE_LEFT(modelname, insname, symetry) +char \(**modelname, \(**insname; +char symetry; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fImodelname\fP +Name of the layout figure to be instanciated +.TP +\fIinsname\fP +Name to be given to the instance on the model +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.SH DESCRIPTION +\fBPLACE_LEFT\fP add an instance of model \fImodelname\fP +in the current layout cell. +The bottom right corner +of the abutment box of the instance is placed, after beeing symetrized +and/or rotated, +toward the bottom left corner of the abutment box of the +"reference instance". The newly +placed instance becomes the "reference instance". +.br +The \fIinsname\fP is the name given to the instance and must be unique at +a given hierarchy level. +.br +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +Y becomes -Y, and then a negative 90 degrees rotation take place +.PP +The model of the figure to be placed must be available, on disk or in memory. +The path to the library is specified in the \fBMBK_CATA_LIB\fP (1) and +\fBMBK_WORK_LIB\fP (1) environment +variables, and its format is given by the \fBMBK_IN_PH\fP (1) environment +variable. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_LEFT impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_LEFT impossible : No previous instance" +.ft R +.RS +There are no instances placed in the current layout cell, so it's +impossible to know where to place from. Use a \fBPLACE\fP call before. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + /\(** Place two instances \(**/ + GENLIB_PLACE("grbdo_3","ins1", NOSYM, 0L, 0L); + /\(** negative placement values are allowed \(**/ + GENLIB_PLACE_LEFT("grxwh_k","ins2", SYMXY); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PLACE (3), +.BR GENLIB_PLACE_TOP (3), +.BR GENLIB_PLACE_BOTTOM (3), +.BR GENLIB_PLACE_RIGHT (3), +.BR MBK_CATA_LIB (1), +.BR MBK_WORK_LIB (1), +.BR MBK_IN_PH (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PLACE_ON.3 b/alliance/src/genlib/man3/GENLIB_PLACE_ON.3 new file mode 100644 index 00000000..05064ca8 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PLACE_ON.3 @@ -0,0 +1,152 @@ +.\" $Id: GENLIB_PLACE_ON.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PLACE_ON.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PLACE_ON +.XE \} +.TH GENLIB_PLACE_ON.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PLACE_ON \- place a physical instance in the current figure matching +connectors +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PLACE_ON(figname,ins1,con1,index1,symetry,ins2,con2,index2) +char \(**figname, \(**ins1, \(**con1, \(**ins2, \(**con2; +char symetry; +long index1, index2; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIfigname\fP +Name of the layout figure to be instanciated +.TP +\fIins1\fP +Name to be given to the instance in the model +.TP +\fIcon1\fP +Name of the connector of the instance to be used for placement +.TP +\fIindex1\fP +Index of the connector, or reference, \fIcon1\fP of the model to be used +for placement +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.TP +\fIins2\fP +Name of the instance to be used for relative placement +.TP +\fIcon2\fP +Name of the connector of the instance \fIins2\fP on which the placement will +take place +.TP +\fIindex2\fP +Index of the connector \fIcon2\fP of the instance to be used for relative +placement +.SH DESCRIPTION +\fBPLACE_ON\fP add an instance in the current layout cell. The bottom left corner +of the instance of the model \fImodelname\fP is placed, after beeing +symetrized and/or rotated, at \fI(x, y)\fP coordinates. +The placed instance becomes the new "reference instance", used in +the relative placement functions. +.br +The \fIinsname\fP is the name given to the instance and must be unique at +a given hierarchy level. +.br +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +Y becomes -Y, and then a negative 90 degrees rotation take place +.PP +The model of the figure to be placed must be available, on disk or in memory. +The path to the library is specified in the \fBMBK_CATA_LIB\fP (1) and +\fBMBK_WORK_LIB\fP (1) environment +variables, and its format is given by the \fBMBK_IN_PH\fP (1) environment +variable. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_ON impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.br +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + /\(** Place two instances \(**/ + GENLIB_PLACE_ON("gapg0_b","ins1", NOSYM, 0L, 0L); + GENLIB_PLACE_ON("gapg8_b","ins2", SYM_X, 80L, 100L); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PLACE_TOP (3), +.BR GENLIB_PLACE_BOTTOM (3), +.BR GENLIB_PLACE_LEFT (3), +.BR GENLIB_PLACE_RIGHT (3), +.BR MBK_CATA_LIB (1), +.BR MBK_WORK_LIB (1), +.BR MBK_IN_PH (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PLACE_RIGHT.3 b/alliance/src/genlib/man3/GENLIB_PLACE_RIGHT.3 new file mode 100644 index 00000000..f49c2942 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PLACE_RIGHT.3 @@ -0,0 +1,145 @@ +.\" $Id: GENLIB_PLACE_RIGHT.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PLACE_RIGHT.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PLACE_RIGHT +.XE \} +.TH GENLIB_PLACE_RIGHT.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PLACE_RIGHT \- place a physical instance in the current figure at +the right of the "reference instance" +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PLACE_RIGHT(modelname, insname, symetry) +char \(**modelname, \(**insname; +char symetry; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fImodelname\fP +Name of the layout figure to be instanciated +.TP +\fIinsname\fP +Name to be given to the instance on the model +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.SH DESCRIPTION +\fBPLACE_RIGHT\fP add an instance of model \fImodelname\fP +in the current layout cell. +The bottom left corner +of the abutment box of the instance is placed, after beeing symetrized +and/or rotated, +toward the bottom right corner of the abutment box of the +"reference instance". The newly +placed instance becomes the "reference instance". +.br +The \fIinsname\fP is the name given to the instance and must be unique at +a given hierarchy level. +.br +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +Y becomes -Y, and then a negative 90 degrees rotation take place +.PP +The model of the figure to be placed must be available, on disk or in memory. +The path to the library is specified in the \fBMBK_CATA_LIB\fP (1) and +\fBMBK_WORK_LIB\fP (1) environment +variables, and its format is given by the \fBMBK_IN_PH\fP (1) environment +variable. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_RIGHT impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_RIGHT impossible : No previous instance" +.ft R +.RS +There are no instances placed in the current layout cell, so it's +impossible to know where to place from. Use a \fBPLACE\fP call before. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + /\(** Place two instances \(**/ + GENLIB_PLACE("rsa16","ins1", ROT_P, -5L, 5L); + GENLIB_PLACE_RIGHT("gnr32x16", "ins2", SYM_X); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PLACE (3), +.BR GENLIB_PLACE_TOP (3), +.BR GENLIB_PLACE_BOTTOM (3), +.BR GENLIB_PLACE_LEFT (3), +.BR MBK_CATA_LIB (1), +.BR MBK_WORK_LIB (1), +.BR MBK_IN_PH (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PLACE_SEG_REF.3 b/alliance/src/genlib/man3/GENLIB_PLACE_SEG_REF.3 new file mode 100644 index 00000000..676f8844 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PLACE_SEG_REF.3 @@ -0,0 +1,175 @@ +.\" $Id: GENLIB_PLACE_SEG_REF.3,v 1.1 2002/03/08 14:08:10 fred Exp $ +.\" @(#)GENLIB_PLACE_SEG_REF.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PLACE_SEG_REF +.XE \} +.TH GENLIB_PLACE_SEG_REF.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PLACE_SEG_REF \- put a segment on a reference belonging an +instance in the current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PLACE_SEG_REF(insname, refname, layer, width, face) +char \(**insname, \(**refname; +char layer, face; +long width; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name of the instance in the which the reference is to be searched for +.TP +\fIrefname\fP +Name of the reference to be used for the segment placement +.TP +\fIlayer\fP +Physical layer of the segment +.TP +\fIwidth\fP +Width of the segment +.TP +\fIface\fP +Face of the figure on which the segment is to be placed +.SH DESCRIPTION +\fBPLACE_SEG_REF\fP places a segment regarding the position +of the reference, \fIrefname\fP, in the instance called \fIinsname\fP. +The segment coordinates are computed from the reference coordinates and +the face given as argument. +.br +Two behaviours are expected, regarding the reference coordinates: +.TP 20 +the reference is on the given face of the \fIabutment box\fP +the segment is not added, since it would have zero as length +.TP +the reference is anywhere else +A segment is drawn between the reference and the \fIabutment box\fP, and is +given \fIlayer\fP and \fIwidth\fP as attributs. +One of its endpoint is given by the reference coordinates, the other one +comes from the \fIface\fP. +The \fIface\fP argument is meant in the placed instance, and can take any of +the following values: +.TP 20 +\fBNORTH\fP +the other endpoint has, for absissa, the x coordinate of the top of the +\fIabutment box\fP of the cell, and for ordinate, the y coordinate of +the reference. +.TP +\fBSOUTH\fP +the other endpoint has, for absissa, the x coordinate of the bottom of the +\fIabutment box\fP of the cell, and for ordinate, the y coordinate of +the reference. +.TP +\fBEAST\fP +the other endpoint has, for absissa, the x coordinate of the reference and +for ordinate, the y coordinate of the right of the \fIabutment box\fP of the +cell. +.TP +\fBWEST\fP +the other endpoint has, for absissa, the x coordinate of the reference and +for ordinate, the y coordinate of the left of the \fIabutment box\fP of the +cell. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_SEG_REF impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_SEG_REF impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_SEG_REF impossible : no abutment box" +.ft R +.RS +The current figure does not have an \fIabutment box\fI. Use \fIDEF_AB\fP(3) +before this function. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal GENLIB_PLACE_SEG_REF : orientation is XX" +.ft R +.RS +The \fIface\fP parameter does not have a legal value, but \fIXX\fP. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance called \fIinsname\fP does not exist" +.ft R +.RS +No instance called \fIinsname\fP exists in the current figure +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphref : references called \fIrefname\fP does not exist" +.ft R +.RS +No reference called \fIrefname\fP exists in the model of the instance +\fIinsname\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r1", NOSYM, 23L, 54L); + /\(** Put a reference \(**/ + GENLIB_PLACE_SEG_REF("r1", "a_0", ALU2, 2, NORTH); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PHREF (3), +.BR GENLIB_PHSEG (3), +.BR GENLIB_COPY_UP_REF (3), +.BR GENLIB_COPY_UP_ALL_REF (3), +.BR GENLIB_PLACE_SEG_REF (3), +.BR GENLIB_PLACE_SEG_REF (3), +.BR GENLIB_PLACE_SEG_REF (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PLACE_TOP.3 b/alliance/src/genlib/man3/GENLIB_PLACE_TOP.3 new file mode 100644 index 00000000..f4892866 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PLACE_TOP.3 @@ -0,0 +1,146 @@ +.\" $Id: GENLIB_PLACE_TOP.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_PLACE_TOP.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PLACE_TOP +.XE \} +.TH GENLIB_PLACE_TOP.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PLACE_TOP \- place a physical instance in the current figure on the top of the +"reference instance" +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PLACE_TOP(modelname, insname, symetry) +char \(**modelname, \(**insname; +char symetry; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fImodelname\fP +Name of the layout figure to be instanciated +.TP +\fIinsname\fP +Name to be given to the instance on the model +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.SH DESCRIPTION +\fBPLACE_TOP\fP add an instance of model \fImodelname\fP +in the current layout cell. +The bottom left corner +of the abutment box of the instance is placed, after beeing symetrized +and/or rotated, +toward the top left corner of the abutment box of the +"reference instance". The newly +placed instance becomes the "reference instance". +.br +The \fIinsname\fP is the name given to the instance and must be unique at +a given hierarchy level. +.br +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +becomes -Y, and then a negative 90 degrees rotation take place +.PP +The model of the figure to be placed must be available, on disk or in memory. +The path to the library is specified in the \fBMBK_CATA_LIB\fP (1) and +\fBMBK_WORK_LIB\fP (1) environment +variables, and its format is given by the \fBMBK_IN_PH\fP (1) environment +variable. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_TOP impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_TOP impossible : No previous instance" +.ft R +.RS +There are no instances placed in the current layout cell, so it's +impossible to know where to place from. Use a \fBPLACE\fP call before. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.br +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + /\(** Place two instances \(**/ + GENLIB_PLACE("dgl", "ins1", ROT_P, 0L, 0L); + GENLIB_PLACE_TOP("idv", "ins2", SY_RP); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PLACE (3), +.BR GENLIB_PLACE_RIGHT (3), +.BR GENLIB_PLACE_BOTTOM (3), +.BR GENLIB_PLACE_LEFT (3), +.BR MBK_CATA_LIB (1), +.BR MBK_WORK_LIB (1), +.BR MBK_IN_PH (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_PLACE_VIA_REF.3 b/alliance/src/genlib/man3/GENLIB_PLACE_VIA_REF.3 new file mode 100644 index 00000000..3a69c3e0 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_PLACE_VIA_REF.3 @@ -0,0 +1,130 @@ +.\" $Id: GENLIB_PLACE_VIA_REF.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_PLACE_VIA_REF.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_PLACE_VIA_REF +.XE \} +.TH GENLIB_PLACE_VIA_REF.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_PLACE_VIA_REF \- put a via on top of a reference belonging to an instance +in the current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_PLACE_VIA_REF(insname, refname, viatype) +char \(**insname, \(**refname; +char viatype; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name of the instance in the which the reference is to be searched for +.TP +\fIrefname\fP +Name of the reference to be used as target point +.TP +\fIviatype\fP +Type of via to be placed +.SH DESCRIPTION +\fBPLACE_VIA_REF\fP places a via of type \fIviatype\fP on top of the specified +reference, \fIrefname\fP, in the instance called \fIinsname\fP. +This function may be used to generate many cells from a single one, in order +to "program" decoders for example, or in conjuction with \fBPLACE_SEG_REF\fP(3) +or \fBPLACE_CON_REF\fP(3) to translate virtual connectors into fixed ones. +.br +The \fIviatype\fP argument may take the following legal values: +.TP 20 +\fBCONT_POLY\fP +links \fBPOLY\fP and \fBALU1\fP +.TP +\fBCONT_DIF_N\fP +links \fBNDIF\fP and \fBALU1\fP +.TP +\fBCONT_DIF_P\fP +links \fBPDIF\fP and \fBALU1\fP +.TP +\fBCONT_BODY_N\fP +links \fBNTIE\fP and \fBALU1\fP +.TP +\fBCONT_BODY_P\fP +links \fBPTIE\fP and \fBALU1\fP +.TP +\fBCONT_VIA\fP +links \fBALU1\fP and \fBALU2\fP +.TP +\fBCONT_VIA2\fP +links \fBALU2\fP and \fBALU3\fP +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_PLACE_VIA_REF impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place a reference inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance \fIinsname\fP does not exist" +.ft R +.RS +The instance called \fIinsname\fP does not currently belong to the figure. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphref : references called \fIrefname\fP does not exist" +.ft R +.RS +No reference called \fIrefname\fP exists in the model of the instance +\fIinsname\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r1", NOSYM, 23L, 54L); + /\(** Put a reference \(**/ + GENLIB_PLACE_VIA_REF("a_0", "r1", CONT_VIA); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR dpr (1), +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_PHREF (3), +.BR GENLIB_PHVIA (3), +.BR GENLIB_COPY_UP_REF (3), +.BR GENLIB_COPY_UP_ALL_REF (3), +.BR GENLIB_PLACE_CON_REF (3), +.BR GENLIB_PLACE_SEG_REF (3), +.BR GENLIB_PLACE_VIA_REF (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_REVERSE_PHCON.3 b/alliance/src/genlib/man3/GENLIB_REVERSE_PHCON.3 new file mode 100644 index 00000000..3f281cde --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_REVERSE_PHCON.3 @@ -0,0 +1,71 @@ +.\" $Id: GENLIB_REVERSE_PHCON.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_REVERSE_PHCON.3 2.11 93/09/03 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_REVERSE_PHCON +.XE \} +.TH GENLIB_REVERSE_PHCON.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_REVERSE_PHCON \- reverse the order of physical connectors on a bus. +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_REVERSE_PHCON(basename) +char \(**basename; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIbasename\fP +Radical of the vector to be reversed. +.SH DESCRIPTION +\fBREVERSE_PHCON\fP will change the indexes of the vector called +\fIbasename\fP, making the greatest values the smallest and so on. +Both hard connectors, created by \fBPHCON\fR(3) like functions and +virtual ones, done with \fBPHREF\fR(3), will be taken into account for +the reverse operation. +This function is mainly useful to implement the \fBmsb0\fR options of +the \fBAlliance\fR CAD system module generators, as the whole design can +be done with the designer choosen bit ordering, and modified on user +demand only before saving. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + GENLIB_DEF_PHFIG("rom"); + /\(** Create a figure to work on \(**/ + . + . + . + /\(** Reverse the bit ordering if needed \(**/ + if (msb0) + GENLIB_REVERSE_PHCON("adr"); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_PHCON (3), +.BR GENLIB_PHREF (3), +.BR GENLIB_COPY_UP_CON (3), +.BR GENLIB_COPY_UP_ALL_CON (3), +.BR GENLIB_COPY_UP_CON_FACE (3), +.BR GENLIB_COPY_UP_REF (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_SAVE_LOFIG.3 b/alliance/src/genlib/man3/GENLIB_SAVE_LOFIG.3 new file mode 100644 index 00000000..9f085bf9 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_SAVE_LOFIG.3 @@ -0,0 +1,92 @@ +.\" $Id: GENLIB_SAVE_LOFIG.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)SAVE_LOFIOG.3 2.11 01/92; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_SAVE_LOFIG +.XE \} +.TH GENLIB_SAVE_LOFIG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_SAVE_LOFIG \- save a netlist on disk +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_SAVE_LOFIG(); +.ft R +.fi +.so man1/alc_origin.1 +.SH DESCRIPTION +\fBSAVE_LOFIG\fP saves the current working figure previously definded by +a \fBDEF_LOFIG\fP call. \fBSAVE_LOFIG\fP uses environment variables to +choose the file format and the path to the file. +\fBMBK_OUT_LO\fP set up the output file format, the valid ones beeing : +.RS +\fBhns +.br +fne +.br +al +.br +alx\fP +.RE +you could for example do : +.br +.RS +\fBsetenv MBK_OUT_LO al\fP +.RE +\fBMBK_WORK_LIB\fP set up the output file path. Any valid unix path is +ok. +.br +for example : +.RS +\fBsetenv MBK_WORK_LIB ~fred/booth/genlib\fP +.RE +\fBSAVE_LOFIG\fP doesn't look on disk for the figure \fIcellname\fP, +so be careful not to overwrite an existing file while saving. +.SH ERROR +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SAVE_LOFIG impossible : missing GENLIB_DEF_LOFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_LOFIG\fP. So it isn't +possible to save anything. you must call \fBDEF_LOFIG\fP before any other +netlist call. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("mycell"); + /\(** define interface \(**/ + GENLIB_LOCON("i", INPUT, "sig1"); + GENLIB_LOCON("o", OUTPUT, "sig2"); + /\(** Place an instance \(**/ + GENLIB_LOINS("model","instance", "sig1", "sig2", EOL); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_LOFIG.3), +.BR MBK_OUT_LO (1), +.BR MBK_WORK_LIB (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_SAVE_PHFIG.3 b/alliance/src/genlib/man3/GENLIB_SAVE_PHFIG.3 new file mode 100644 index 00000000..83efde91 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_SAVE_PHFIG.3 @@ -0,0 +1,85 @@ +.\" $Id: GENLIB_SAVE_PHFIG.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_SAVE_PHFIG.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_SAVE_PHFIG +.XE \} +.TH GENLIB_SAVE_PHFIG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_SAVE_PHFIG \- save a layout on disk +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_SAVE_PHFIG(); +.ft R +.fi +.so man1/alc_origin.1 +.SH DESCRIPTION +\fBSAVE_PHFIG\fP saves the current working figure previously definded by +a \fBDEF_PHFIG\fP call. \fBSAVE_PHFIG\fP uses environment variables to +choose the file format and the path to the file. +.br +\fBMBK_OUT_PH\fP set up the output file format, the valid ones beeing : +.RS +\fBcp +.br +ap\fP +.RE +you could for example do : +.RS +\fBsetenv MBK_OUT_PH ap\fP +.RE +\fBMBK_WORK_LIB\fP set up the output file path. Any valid unix path is +ok. +.br +for example : +.RS + \fBsetenv MBK_WORK_LIB ~fred/booth/genlib\fP +.RE +\fBSAVE_PHFIG\fP doesn't look on disk for the figure \fIcellname\fP, +so be careful not to overwrite an existing file while saving. +.SH ERROR +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SAVE_PHFIG impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to save anything. you must call \fBDEF_PHFIG\fP before any other +layout action. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("mycell"); + /\(** Place an instance \(**/ + GENLIB_PLACE("mymodel","firstinstance", NOSYM,0L,0L); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_SAVE_PHSC (3), +.BR MBK_OUT_PH (1), +.BR MBK_WORK_LIB (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_SAVE_PHSC.3 b/alliance/src/genlib/man3/GENLIB_SAVE_PHSC.3 new file mode 100644 index 00000000..4cdae332 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_SAVE_PHSC.3 @@ -0,0 +1,72 @@ +.\" $Id: GENLIB_SAVE_PHSC.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_SAVE_PHSC.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_SAVE_PHSC +.XE \} +.TH GENLIB_SAVE_PHSC.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_SAVE_PHSC \- save a layout on disk +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_SAVE_PHSC(); +.ft R +.fi +.so man1/alc_origin.1 +.SH DESCRIPTION +\fBSAVE_PHSC\fP saves the current working figure previously definded by +a \fBDEF_PHFIG\fP or \fBDEF_PHSC\fP call, and performs a +\fBDEF_AB(0L, 0L, 0L, 0L)\fP just before saving the figure, in order to give +it the appropriate size for standard cell blocks. +\fBSAVE_PHSC\fP uses environment variables to choose the file format and +the path to the file. +.br +No check is made to see if a file with the same name already exists on disk, so +be careful not to overwrite some precious data. +.SH ERROR +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SAVE_PHSC impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP or +\fBDEF_PHSC\fB. So it isn't +possible to save anything. you must call \fBDEF_PHFIG\fP before any other +layout action. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a physical figure to work on \(**/ + GENLIB_DEF_PHSC("cell"); + /\(** Place an instance \(**/ + GENLIB_SC_PLACE("finst", NOSYM,0L,0L); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHSC(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHSC (3), +.BR MBK_OUT_PH (1), +.BR MBK_WORK_LIB (1). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_SC_BOTTOM.3 b/alliance/src/genlib/man3/GENLIB_SC_BOTTOM.3 new file mode 100644 index 00000000..c95d3986 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_SC_BOTTOM.3 @@ -0,0 +1,148 @@ +.\" $Id: GENLIB_SC_BOTTOM.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_SC_BOTTOM.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_SC_BOTTOM +.XE \} +.TH GENLIB_SC_BOTTOM.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_SC_BOTTOM \- place an instance in the current figure at the right of the +"reference instance" +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_SC_BOTTOM(insname, symetry) +char \(**insname; +char symetry; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name to be given to the instance on the model +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.SH DESCRIPTION +\fBSC_BOTTOM\fP add an instance in the current cell. The bottom left corner +of the abutment box of the instance is placed, after beeing symetrized +and/or rotated, +toward the bottom left corner of the abutment box of the +"reference instance". The newly +placed instance becomes the "reference instance". +The placement takes place only if the netlist is up to day, +because the model of the instance is seeked there, in order to ensure +consistency. +.LP +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +Y becomes -Y, and then a negative 90 degrees rotation take place +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_BOTTOM impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_BOTTOM impossible : missing GENLIB_DEF_LOFIG" +.ft R +.RS +The current netlist figure is not define, so \fBSC_BOTTOM\fP doesn't know +where to pick up the model. A \fBDEF_LOFIG\fP or a \fBDEF_PHSC\fP +is to be performed to avoid this error. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_BOTTOM impossible : no logical instance insname" +.ft R +.RS +The instance \fIinsname\fP does not exist in the netlist representation +of the cell. It may lead us to believe that there is a consistency +problem between the two representation of this cell. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.br +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHSC("cell"); + /\(** Place two instances \(**/ + GENLIB_SC_PLACE("ins1", NOSYM, 0L, 0L); + GENLIB_SC_BOTTOM("ins2", SYMXY); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHSC(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHSC (3), +.BR GENLIB_SAVE_PHSC (3), +.BR GENLIB_SC_PLACE (3), +.BR GENLIB_SC_TOP (3), +.BR GENLIB_SC_RIGHT (3), +.BR GENLIB_SC_LEFT (3), +.BR GENLIB_DEF_PHINS (3), +.BR GENLIB_FLATTEN_PHFIG (3), +.BR GENLIB_FLATTEN_ALL_PHINS (3), +.BR GENLIB_LOINS (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_SC_LEFT.3 b/alliance/src/genlib/man3/GENLIB_SC_LEFT.3 new file mode 100644 index 00000000..7e41829b --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_SC_LEFT.3 @@ -0,0 +1,149 @@ +.\" $Id: GENLIB_SC_LEFT.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_SC_LEFT.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_SC_LEFT +.XE \} +.TH GENLIB_SC_LEFT.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_SC_LEFT \- place an instance in the current figure at the right of the +"reference instance" +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_SC_LEFT(insname, symetry) +char \(**insname; +char symetry; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name to be given to the instance on the model +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.SH DESCRIPTION +\fBSC_LEFT\fP add an instance in the current cell. The bottom right corner +of the abutment box of the instance is placed, after beeing symetrized +and/or rotated, +toward the bottom left corner of the abutment box of the +"reference instance". The newly +placed instance becomes the "reference instance". +The placement takes place only if the netlist is up to day, +because the model of the instance is seeked there, in order to ensure +consistency. +.LP +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +Y becomes -Y, and then a negative 90 degrees rotation take place +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_LEFT impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_LEFT impossible : missing GENLIB_DEF_LOFIG" +.ft R +.RS +The current netlist figure is not define, so \fISC_LEFT\fP doesn't know +where to pick up the model. A \fIDEF_LOFIG\fP or a \fIDEF_PHSC\fP +is to be performed to avoid this error. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_LEFT impossible : no logical instance insname" +.ft R +.RS +The instance \fIinsname\fP does not exist in the netlist representation +of the cell. It may lead us to believe that there is a consistency +problem between the two representation of this cell. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.br +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHSC("cell"); + /\(** Place two instances \(**/ + GENLIB_SC_PLACE("ins1", NOSYM, 0L, 0L); + /\(** negative placement values are allowed \(**/ + GENLIB_SC_LEFT("ins2", SYM_Y); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHSC(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib(1), +.BR GENLIB_DEF_PHSC.3), +.BR GENLIB_SAVE_PHSC.3), +.BR GENLIB_SC_PLACE.3), +.BR GENLIB_SC_TOP.3), +.BR GENLIB_SC_BOTTOM.3), +.BR GENLIB_SC_RIGHT.3), +.BR GENLIB_DEF_PHINS (3), +.BR GENLIB_FLATTEN_PHFIG (3), +.BR GENLIB_FLATTEN_ALL_PHINS (3), +.BR GENLIB_LOINS.3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_SC_PLACE.3 b/alliance/src/genlib/man3/GENLIB_SC_PLACE.3 new file mode 100644 index 00000000..edf581c2 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_SC_PLACE.3 @@ -0,0 +1,150 @@ +.\" $Id: GENLIB_SC_PLACE.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_SC_PLACE.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_SC_PLACE +.XE \} +.TH GENLIB_SC_PLACE.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_SC_PLACE \- place an instance in the current figure at absolute coordinates +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_SC_PLACE(insname, symetry, x, y) +char \(**insname; +char symetry; +long x,y; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name to be given to the instance on the model +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.TP +\fIx, y\fP +Coordinates of the lower left corner of the abutment box of the model in +the current figure +.SH DESCRIPTION +\fISC_PLACE\fP add an instance in the current cell. The bottom left corner +of the instance is placed, after beeing symetrized and/or rotated, +at \fI(x, y)\fP +coordinates. The placement takes place only if the netlist is up to day, +because the model of the instance is seeked there, in order to ensure +consistency. +The placed instance becomes the new "reference instance", used in +the relative placement functions. +.br +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +Y becomes -Y, and then a negative 90 degrees rotation take place +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_PLACE impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_PLACE impossible : missing GENLIB_DEF_LOFIG" +.ft R +.RS +The current netlist figure is not define, so \fBSC_PLACE\fP doesn't know +where to pick up the model. A \fBDEF_LOFIG\fP or a \fBDEF_PHSC\fP +is to be performed to avoid this error. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_PLACE impossible : no logical instance insname" +.ft R +.RS +The instance \fIinsname\fP does not exist in the netlist representation +of the cell. It may lead us to believe that there is a consistency +problem between the two representation of this cell. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHSC("cell"); + /\(** Place two instances \(**/ + GENLIB_SC_PLACE("ins1", NOSYM, 0L, 0L); + GENLIB_SC_PLACE("ins2", NOSYM, 80L, 100L); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHSC(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHSC (3), +.BR GENLIB_SAVE_PHSC (3), +.BR GENLIB_SC_TOP (3), +.BR GENLIB_SC_BOTTOM (3), +.BR GENLIB_SC_LEFT (3), +.BR GENLIB_SC_RIGHT (3), +.BR GENLIB_DEF_PHINS (3), +.BR GENLIB_FLATTEN_PHFIG (3), +.BR GENLIB_FLATTEN_ALL_PHINS (3), +.BR GENLIB_LOINS (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_SC_RIGHT.3 b/alliance/src/genlib/man3/GENLIB_SC_RIGHT.3 new file mode 100644 index 00000000..ab1955ca --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_SC_RIGHT.3 @@ -0,0 +1,147 @@ +.\" $Id: GENLIB_SC_RIGHT.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_SC_RIGHT.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_SC_RIGHT +.XE \} +.TH GENLIB_SC_RIGHT.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_SC_RIGHT \- place an instance in the current figure at the right of the +"reference instance" +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_SC_RIGHT(insname, symetry) +char \(**insname; +char symetry; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name to be given to the instance on the model +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.SH DESCRIPTION +\fBSC_RIGHT\fP add an instance in the current cell. The bottom left corner +of the abutment box of the instance is placed, after beeing symetrized +and/or rotated, +toward the bottom right corner of the abutment box of the +"reference instance". The newly +placed instance becomes the "reference instance". +The placement takes place only if the netlist is up to day, +because the model of the instance is seeked there, in order to ensure +consistency. +.LP +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +Y becomes -Y, and then a negative 90 degrees rotation take place +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_RIGHT impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_RIGHT impossible : missing GENLIB_DEF_LOFIG" +.ft R +.RS +The current netlist figure is not define, so \fBSC_RIGHT\fP doesn't know +where to pick up the model. A \fBDEF_LOFIG\fP or a \fBDEF_PHSC\fP +is to be performed to avoid this error. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_RIGHT impossible : no logical instance insname" +.ft R +.RS +The instance \fIinsname\fP does not exist in the netlist representation +of the cell. It may lead us to believe that there is a consistency +problem between the two representation of this cell. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHSC("cell"); + /\(** Place two instances \(**/ + GENLIB_SC_PLACE("ins1", NOSYM, 0L, 0L); + GENLIB_SC_RIGHT("ins2", SYM_X); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHSC(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib(1), +.BR GENLIB_DEF_PHSC.3), +.BR GENLIB_SAVE_PHSC.3), +.BR GENLIB_SC_PLACE.3), +.BR GENLIB_SC_TOP.3), +.BR GENLIB_SC_BOTTOM.3), +.BR GENLIB_SC_LEFT.3), +.BR GENLIB_DEF_PHINS (3), +.BR GENLIB_FLATTEN_PHFIG (3), +.BR GENLIB_FLATTEN_ALL_PHINS (3), +.BR GENLIB_LOINS.3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_SC_TOP.3 b/alliance/src/genlib/man3/GENLIB_SC_TOP.3 new file mode 100644 index 00000000..34bba8d0 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_SC_TOP.3 @@ -0,0 +1,148 @@ +.\" $Id: GENLIB_SC_TOP.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_SC_TOP.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_SC_TOP +.XE \} +.TH GENLIB_SC_TOP.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_SC_TOP \- place an instance in the current figure at the right of the +"reference instance" +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_SC_TOP(insname, symetry) +char \(**insname; +char symetry; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIinsname\fP +Name to be given to the instance on the model +.TP +\fIsymetry\fP +Geometrical operation to be performed on the instance before beeing placed +.SH DESCRIPTION +\fBSC_TOP\fP add an instance in the current cell. The bottom left corner +of the abutment box of the instance is placed, after beeing symetrized +and/or rotated, +toward the top left corner of the abutment box of the +"reference instance". The newly +placed instance becomes the "reference instance". +The placement takes place only if the netlist is up to day, +because the model of the instance is seeked there, in order to ensure +consistency. +.LP +The \fIsymetry\fP argument can take eight legal values : +.TP 20 +\fBNOSYM\fP +no geometrical operation is performed +.TP +\fBSYM_Y\fP +Y becomes -Y, that means toward X axe symetry +.TP +\fBSYM_X\fP +X becomes -X, that means toward Y axe symetry +.TP +\fBSYMXY\fP +X becomes -X, Y becomes -Y +.TP +\fBROT_P\fP +a positive 90 degrees rotation take place +.TP +\fBROT_M\fP +a negative 90 degrees rotation take place +.TP +\fBSY_RP\fP +Y becomes -Y, and then a positive 90 degrees rotation take place +.TP +\fBSY_RM\fP +Y becomes -Y, and then a negative 90 degrees rotation take place +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_TOP impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_TOP impossible : missing GENLIB_DEF_LOFIG" +.ft R +.RS +The current netlist figure is not define, so \fBSC_TOP\fP doesn't know +where to pick up the model. A \fBDEF_LOFIG\fP or a \fBDEF_PHSC\fP +is to be performed to avoid this error. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_SC_TOP impossible : no logical instance insname" +.ft R +.RS +The instance \fIinsname\fP does not exist in the netlist representation +of the cell. It may lead us to believe that there is a consistency +problem between the two representation of this cell. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphins : transformation is x in insname" +.ft R +.RS +The \fIsymetry\fP parameter is not one of the define given, but has the +integer value \fBx\fP. +.RE +.br +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHSC("cell"); + /\(** Place two instances \(**/ + GENLIB_SC_PLACE("ins1", NOSYM, 0L, 0L); + GENLIB_SC_TOP("ins2", SYM_X); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_PHSC(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHSC (3), +.BR GENLIB_SAVE_PHSC (3), +.BR GENLIB_SC_PLACE (3), +.BR GENLIB_SC_RIGHT (3), +.BR GENLIB_SC_BOTTOM (3), +.BR GENLIB_SC_LEFT (3), +.BR GENLIB_DEF_PHINS (3), +.BR GENLIB_FLATTEN_PHFIG (3), +.BR GENLIB_FLATTEN_ALL_PHINS (3), +.BR GENLIB_LOINS (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_UNFLATTEN_LOFIG.3 b/alliance/src/genlib/man3/GENLIB_UNFLATTEN_LOFIG.3 new file mode 100644 index 00000000..5373a91a --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_UNFLATTEN_LOFIG.3 @@ -0,0 +1,72 @@ +.\" $Id: GENLIB_UNFLATTEN_LOFIG.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_UNFLATTEN_LOFIG.3 2.11 91/08/22; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_UNFLATTEN_LOFIG +.XE \} +.TH GENLIB_UNFLATTEN_LOFIG.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +\fBUNFLATTEN_LOFIG\fP \- creates a hierarchy level from instances in the current logical figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_UNFLATTEN_LOFIG(figurename, instancename, list_of_instances, 0) +char \(**figurename; +char \(**instancename; +char \(**list_of_instances; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIfigurename\fP +Name of the figure of the new hierarchy to be created +.TP +\fIinstancename\fP +Name to be given at the instanciation of \fIfigurename\fP into the current +structual figure +.TP +\fIlist_of_instances\fP +List of strings representing the instances to be inserted into the new figure +.SH DESCRIPTION +\fBUNFLATTEN_LOFIG\fP creates a new level of hierarchy, whose model name will +be \fIfigurename\fP, and instanciate it under the name \fIinstancename\fP in +the current figure. +The instances whose name belong to the \fIlist_of_instances\fP parameters are +added in the new figure, and destroyed from the current figure. +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_LOFIG("mycell"); + . + . + . + /\(** Place an instance \(**/ + GENLIB_LOINS("model","instance", "sig1", "sig2", EOL); + /\(** flatten an instance \(**/ + GENLIB_UNFLATTEN_LOFIG("newfig", "newins", "instance", ..., 0); + /\(** Save all that on disk \(**/ + GENLIB_SAVE_LOFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_FLATTEN_LOFIG (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_WIRE1.3 b/alliance/src/genlib/man3/GENLIB_WIRE1.3 new file mode 100644 index 00000000..755c3cf8 --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_WIRE1.3 @@ -0,0 +1,175 @@ +.\" $Id: GENLIB_WIRE1.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_WIRE1.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_WIRE1 +.XE \} +.TH GENLIB_WIRE1.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_WIRE1 \- place a physical segment in the current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_WIRE1(layer, width, ins1, con1, index1, ins2, con2, index2) +char layer; +long width; +char \(**ins1, \(**con1, \(**ins2, \(**con2; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIlayer\fP +Layout layer of the segment +.TP +\fIwidth\fP +Width of the segment +.TP +\fIins1\fP +Name of the instance in which the connector \fIcon1\fP is to be looked for +.TP +\fIcon1\fP +Name of a connector, or reference, used as first endpoint of the wire +.TP +\fIins2\fP +Name of the instance in which the connector \fIcon2\fP is to be looked for +.TP +\fIcon2\fP +Name of a connector, or reference, used as last endpoint of the wire +.SH DESCRIPTION +\fBWIRE1\fP adds a segment made of the \fIlayer\fP level in the current +layout cell, the starting point +beeing the connector, or reference, \fIcon1\fP of the instance \fIins1\fP, and +the ending point beeing the connector, or reference, \fIcon2\fP of the instance +\fIins1\fP. The segment is drawn between the coordinates of \fIcon1\fP in +the current figure and the +coordinates of \fIcon2\fP in the current figure. +.LP +If the endpoints are connectors, the indexes \fIindex1\fP and \fIindex2\fP must +respectivly refer to \fIcon1\fP and \fIcon2\fP. +If they are references, then they are not taked care of. +One shall notice that connectors and references of a given model should not +share names if \fBWIRE1\fP is to be used. +.LP +The \fIlayer\fP argument can take the following legal values : +.RS +.TP +\fBNWELL\fP +.TP +\fBPWELL\fP +.TP +\fBNTIE\fP +.TP +\fBPTIE\fP +.TP +\fBNDIF\fP +.TP +\fBPDIF\fP +.TP +\fBNTRANS\fP +.TP +\fBPTRANS\fP +.TP +\fBPOLY\fP +.TP +\fBALU1\fP +.TP +\fBALU2\fP +.TP +\fBALU3\fP +.TP +\fBTPOLY\fP +.TP +\fBTALU1\fP +.TP +\fBTALU2\fP +.TP +\fBTALU3\fP +.RE +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_WIRE1 impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphseg : x1, y1, x2, y2" +.ft R +.RS +A symbolic segment must be either vertical or horizontal, so either +\fIx1 = x2\fP, or \fIy1 = y2\fP. Since \fBWIRE1\fP creates a segment from +relative coordinates, care must be taken to follow the previous rule. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_WIRE1 impossible : same name \fIconX\fP, for connector and reference in +\fIinsX\fP" +.ft R +.RS +The model of the instance \fIinsX\fP has both a connector and a reference +that matches the \fIconX\fP name. This is not legal since genlib doesn't know +which one to choose as point. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance \fIinsX\fP does not exist" +.ft R +.RS +The instance called \fIinsX\fP does not currently belong to the figure. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r_addin_1", NOSYM, 0, 0); + GENLIB_PLACE_RIGHT("gapgn_b", "pg", NOSYM); + GENLIB_PLACE_RIGHT("gacin_b", "r_addin_2", NOSYM); + /\(** Draw a segment \(**/ + GENLIB_WIRE1(ALU1, 1, "r_addin_1", "out", 0L, "r_addin_2", "in", 1L); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_COPY_UP_SEG (3), +.BR GENLIB_PHSEG (3), +.BR GENLIB_THRU_H (3), +.BR GENLIB_THRU_CON_H (3), +.BR GENLIB_THRU_V (3), +.BR GENLIB_THRU_CON_V (3), +.BR GENLIB_WIRE2 (3), +.BR GENLIB_WIRE3 (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_WIRE2.3 b/alliance/src/genlib/man3/GENLIB_WIRE2.3 new file mode 100644 index 00000000..68e7de7b --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_WIRE2.3 @@ -0,0 +1,181 @@ +.\" $Id: GENLIB_WIRE2.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_WIRE2.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_WIRE2 +.XE \} +.TH GENLIB_WIRE2.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_WIRE2 \- place two physical segments in the current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_WIRE2(layer, width, ins1, con1, index1, ins2, con2, index2, x, y) +char layer; +long width; +char \(**ins1, \(**con1, \(**ins2, \(**con2; +long x, y; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIlayer\fP +Layout layer of the segment +.TP +\fIwidth\fP +Width of the segment +.TP +\fIins1\fP +Name of the instance in which the connector \fIcon1\fP is to be looked for +.TP +\fIcon1\fP +Name of a connector, or reference, used as first endpoint of the wire +.TP +\fIins2\fP +Name of the instance in which the connector \fIcon2\fP is to be looked for +.TP +\fIcon2\fP +Name of a connector, or reference, used as last endpoint of the wire +.TP +\fIx, y\fP +Coordinates of the segment's elbow in the current figure +.SH DESCRIPTION +\fBWIRE2\fP adds two segments made of the \fIlayer\fP level in the current +layout cell, the starting point +beeing the connector, or reference, \fIcon1\fP of the instance \fIins1\fP, and +the ending point beeing the connector, or reference, \fIcon2\fP of the instance +\fIins1\fP. The first segment is drawn between the coordinates of \fIcon1\fP in +the current figure and \fIx, y\fP, and the second one between \fIx, y\fP and the +coordinates of \fIcon2\fP in the current figure. +.LP +If the endpoints are connectors, the indexes \fIindex1\fP and \fIindex2\fP must +respectivly refer to \fIcon1\fP and \fIcon2\fP. +If they are references, then they are not taked care of. +One shall notice that connectors and references of a given model should not +share names if \fBWIRE2\fP is to be used. +.LP +The \fIlayer\fP argument can take the following legal values : +.RS +.TP +\fBNWELL\fP +.TP +\fBPWELL\fP +.TP +\fBNTIE\fP +.TP +\fBPTIE\fP +.TP +\fBNDIF\fP +.TP +\fBPDIF\fP +.TP +\fBNTRANS\fP +.TP +\fBPTRANS\fP +.TP +\fBPOLY\fP +.TP +\fBALU1\fP +.TP +\fBALU2\fP +.TP +\fBALU3\fP +.TP +\fBTPOLY\fP +.TP +\fBTALU1\fP +.TP +\fBTALU2\fP +.TP +\fBTALU3\fP +.RE +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_WIRE2 impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphseg : x1, y1, x2, y2" +.ft R +.RS +A symbolic segment must be either vertical or horizontal, so either +\fIx1 = x2\fP, or \fIy1 = y2\fP. Since \fBWIRE2\fP creates segments from +relative coordinates, care must be taken to follow the previous rule. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_WIRE2 impossible : same name \fIconX\fP, for connector and reference in +\fIinsX\fP" +.ft R +.RS +The model of the instance \fIinsX\fP has both a connector and a reference +that matches the \fIconX\fP name. This is not legal since genlib doesn't know +which one to choose as point. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance \fIinsX\fP does not exist" +.ft R +.RS +The instance called \fIinsX\fP does not currently belong to the figure. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +main() +{ + /\(** Create a figure to work on \(**/ + GENLIB_DEF_PHFIG("cell"); + GENLIB_PLACE("gaci0_b", "r_addin_1", NOSYM, 0, 0); + GENLIB_PLACE_TOP("gacin_b", "r_addin_2", NOSYM); + GENLIB_PLACE_RIGHT("gapgn_b", "pg", NOSYM); + /\(** Draw a segment \(**/ + GENLIB_WIRE2(ALU1, 1, "r_addin_1", "out", 0L, "pg", "g", 1L, + GENLIB_GET_CON_X("pg", "g", 1L), + GENLIB_GET_CON_Y("r_addin_1", "out", 0L)); + /\(** Save that on disk \(**/ + GENLIB_SAVE_PHFIG(); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_COPY_UP_SEG (3), +.BR GENLIB_PHSEG (3), +.BR GENLIB_THRU_H (3), +.BR GENLIB_THRU_CON_H (3), +.BR GENLIB_THRU_V (3), +.BR GENLIB_THRU_CON_V (3), +.BR GENLIB_WIRE1 (3), +.BR GENLIB_WIRE3 (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/GENLIB_WIRE3.3 b/alliance/src/genlib/man3/GENLIB_WIRE3.3 new file mode 100644 index 00000000..554089cc --- /dev/null +++ b/alliance/src/genlib/man3/GENLIB_WIRE3.3 @@ -0,0 +1,184 @@ +.\" $Id: GENLIB_WIRE3.3,v 1.1 2002/03/08 14:08:11 fred Exp $ +.\" @(#)GENLIB_WIRE3.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +GENLIB_WIRE3 +.XE \} +.TH GENLIB_WIRE3.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE" +.SH NAME +GENLIB_WIRE3 \- place three physical segments in the current figure +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +void GENLIB_WIRE3(layer, width, ins1, con1, index1, ins2, con2, index2, x1, y1, x2, y2) +char layer; +long width; +char \(**ins1, \(**con1, \(**ins2, \(**con2; +long x1, y1, x2, y2; +.ft R +.fi +.so man1/alc_origin.1 +.SH PARAMETERS +.TP 20 +\fIlayer\fP +Layout layer of the segment +.TP +\fIwidth\fP +Width of the segment +.TP +\fIins1\fP +Name of the instance in which the connector \fIcon1\fP is to be looked for +.TP +\fIcon1\fP +Name of a connector, or reference, used as first endpoint of the wire +.TP +\fIins2\fP +Name of the instance in which the connector \fIcon2\fP is to be looked for +.TP +\fIcon2\fP +Name of a connector, or reference, used as last endpoint of the wire +.TP +\fIx1, y1\fP +Coordinates of the segment's first elbow endpoint in the current figure +.TP +\fIx2, y2\fP +Coordinates of the segment's second elbow endpoint in the current figure +.SH DESCRIPTION +\fBWIRE3\fP adds three segments made of the \fIlayer\fP level in the current +layout cell, the starting point +beeing the connector, or reference, \fIcon1\fP of the instance \fIins1\fP, and +the ending point beeing the connector, or reference, \fIcon2\fP of the instance +\fIins1\fP. The first segment is drawn between the coordinates of \fIcon1\fP in +the current figure and \fIx1, y1\fP. The second one between \fIx1, y1\fP and +\fIx2, y2\fP, and the last, but not the least, between \fIx2, y2\fP and the +coordinates of \fIcon2\fP in the current figure. +.LP +If the endpoints are connectors, the indexes \fIindex1\fP and \fIindex2\fP must +respectivly refer to \fIcon1\fP and \fIcon2\fP. +If they are references, then they are not taked care of. +One shall notice that connectors and references of a given model should not +share names if \fBWIRE3\fP is to be used. +.LP +The \fIlayer\fP argument can take the following legal values : +.RS +.TP +\fBNWELL\fP +.TP +\fBPWELL\fP +.TP +\fBNTIE\fP +.TP +\fBPTIE\fP +.TP +\fBNDIF\fP +.TP +\fBPDIF\fP +.TP +\fBNTRANS\fP +.TP +\fBPTRANS\fP +.TP +\fBPOLY\fP +.TP +\fBALU1\fP +.TP +\fBALU2\fP +.TP +\fBALU3\fP +.TP +\fBTPOLY\fP +.TP +\fBTALU1\fP +.TP +\fBTALU2\fP +.TP +\fBTALU3\fP +.RE +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_WIRE3 impossible : missing GENLIB_DEF_PHFIG" +.ft R +.RS +No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't +possible to place an instance inside it. +you must call \fBDEF_PHFIG\fP before any other layout action. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal addphseg : x1, y1, x2, y2" +.ft R +.RS +A symbolic segment must be either vertical or horizontal, so either +\fIx1 = x2\fP, or \fIy1 = y2\fP. Since \fBWIRE3\fP creates segments from +relative coordinates, care must be taken to follow the previous rule. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"GENLIB_WIRE3 impossible : same name \fIconX\fP, for connector and reference in +\fIinsX\fP" +.ft R +.RS +The model of the instance \fIinsX\fP has both a connector and a reference +that matches the \fIconX\fP name. This is not legal since genlib doesn't know +which one to choose as point. +.RE +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"illegal getphins : instance \fIinsX\fP does not exist" +.ft R +.RS +The instance called \fIinsX\fP does not currently belong to the figure. +.RE +.SH EXAMPLE +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include +draw_wire(cellHeight) +long cellHeight; +{ + /* draw a wire made of 1, 2, or 3 segments, given from and to connectors + or reference, and the x and y coordinates of each elbow points */ + GENLIB_WIRE1(ALU1,1,"lastpg2","g2",1,"cabl31","sg",2); + GENLIB_WIRE3(ALU1,1,"cabl31","sp",2, "celout2", "cin", 1, + GENLIB_GET_CON_X("cabl31","sp",2), + GENLIB_GET_CON_Y("cabl31","sp",2) + cellHeight / 2, + GENLIB_GET_CON_X("celout2", "cin", 1), + GENLIB_GET_CON_Y("cabl31","sp",2) + cellHeight / 2); + GENLIB_WIRE1(POLY,1,"celout3","g",1,"celout2","co",0); +} +.ft R +.fi +.SH SEE ALSO +.BR genlib (1), +.BR GENLIB_DEF_PHFIG (3), +.BR GENLIB_SAVE_PHFIG (3), +.BR GENLIB_COPY_UP_SEG (3), +.BR GENLIB_PHSEG (3), +.BR GENLIB_THRU_H (3), +.BR GENLIB_THRU_CON_H (3), +.BR GENLIB_THRU_V (3), +.BR GENLIB_THRU_CON_V (3), +.BR GENLIB_WIRE1 (3), +.BR GENLIB_WIRE2 (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/genlib/man3/Makefile.am b/alliance/src/genlib/man3/Makefile.am new file mode 100644 index 00000000..f5a044a2 --- /dev/null +++ b/alliance/src/genlib/man3/Makefile.am @@ -0,0 +1,59 @@ +man_MANS = GENLIB_BUS.3 \ + GENLIB_COPY_UP_ALL_CON.3 \ + GENLIB_COPY_UP_ALL_REF.3 \ + GENLIB_COPY_UP_CON.3 \ + GENLIB_COPY_UP_CON_FACE.3 \ + GENLIB_COPY_UP_REF.3 \ + GENLIB_COPY_UP_SEG.3 \ + GENLIB_DEF_AB.3 \ + GENLIB_DEF_LOFIG.3 \ + GENLIB_DEF_PHFIG.3 \ + GENLIB_DEF_PHINS.3 \ + GENLIB_DEF_PHSC.3 \ + GENLIB_ELM.3 \ + GENLIB_FLATTEN_ALL_LOINS.3 \ + GENLIB_FLATTEN_ALL_PHINS.3 \ + GENLIB_FLATTEN_LOFIG.3 \ + GENLIB_FLATTEN_PHFIG.3 \ + GENLIB_GET_CON_X.3 \ + GENLIB_GET_CON_Y.3 \ + GENLIB_GET_INS_X.3 \ + GENLIB_GET_INS_Y.3 \ + GENLIB_GET_REF_X.3 \ + GENLIB_GET_REF_Y.3 \ + GENLIB_HEIGHT.3 \ + GENLIB_LOAD_LOFIG.3 \ + GENLIB_LOAD_PHFIG.3 \ + GENLIB_LOCON.3 \ + GENLIB_LOINS.3 \ + GENLIB_LOINSE.3 \ + GENLIB_LOSIG.3 \ + GENLIB_LOSIGMERGE.3 \ + GENLIB_LOTRS.3 \ + GENLIB_OUTLINE.3 \ + GENLIB_PHCON.3 \ + GENLIB_PHREF.3 \ + GENLIB_PHSEG.3 \ + GENLIB_PHVIA.3 \ + GENLIB_PLACE.3 \ + GENLIB_PLACE_BOTTOM.3 \ + GENLIB_PLACE_CON_REF.3 \ + GENLIB_PLACE_LEFT.3 \ + GENLIB_PLACE_ON.3 \ + GENLIB_PLACE_RIGHT.3 \ + GENLIB_PLACE_SEG_REF.3 \ + GENLIB_PLACE_TOP.3 \ + GENLIB_PLACE_VIA_REF.3 \ + GENLIB_REVERSE_PHCON.3 \ + GENLIB_SAVE_LOFIG.3 \ + GENLIB_SAVE_PHFIG.3 \ + GENLIB_SAVE_PHSC.3 \ + GENLIB_SC_BOTTOM.3 \ + GENLIB_SC_LEFT.3 \ + GENLIB_SC_PLACE.3 \ + GENLIB_SC_RIGHT.3 \ + GENLIB_SC_TOP.3 \ + GENLIB_UNFLATTEN_LOFIG.3 \ + GENLIB_WIRE1.3 \ + GENLIB_WIRE2.3 \ + GENLIB_WIRE3.3 diff --git a/alliance/src/genlib/src/Makefile.am b/alliance/src/genlib/src/Makefile.am new file mode 100644 index 00000000..e2f64064 --- /dev/null +++ b/alliance/src/genlib/src/Makefile.am @@ -0,0 +1,9 @@ +lib_LIBRARIES = libMgn.a +include_HEADERS = mgn.h mbkgen.h +libMgn_a_SOURCES = genlib.c +bin_SCRIPTS = genlib +CLEANFILES = genlib + +genlib : ${srcdir}/genlib.sh + ${SED} 's,__ALLIANCE_INSTALL_DIR__,$(ALLIANCE_INSTALL_DIR),' $< > $@ + chmod a+x $@ diff --git a/alliance/src/genlib/src/genlib.c b/alliance/src/genlib/src/genlib.c new file mode 100644 index 00000000..d03aaf26 --- /dev/null +++ b/alliance/src/genlib/src/genlib.c @@ -0,0 +1,4112 @@ +/* + * This file is part of the Alliance CAD System + * Copyright (C) Laboratoire LIP6 - Département ASIM + * Universite Pierre et Marie Curie + * + * Home page : http://www-asim.lip6.fr/alliance/ + * E-mail support : mailto:alliance-support@asim.lip6.fr + * + * This progam is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * Alliance VLSI CAD System is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with the GNU C Library; see the file COPYING. If not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/******************************************************************************* +* mbk : user functions known as genlib * +* * +* author : Frederic Petrot * +* version : 3.21 * +* date : 03/09/93 * +* version : 3.26 +* date : 10/06/97 : it's been a while since I got there, ... +* version : 3.28 +* date : 08/06/98 : One year ago, things are going better and better, ... +* version : 3.30 +* date : 02/02/02 : Survived the turn of the century, unexpectedly! +*******************************************************************************/ +/* 3.26 is a major, and probably the last, modification that I'm going + * to introduce into genlib. + * Its goal is to provide a consistent interface with genview + * regarding the way to pass the created objects. + * Up to version 3.21, this was custom and done on a function per + * function basis, as I was also mastering genview. + * From now on, some other stuffs are build on top of genlib, so I + * must provide a consistent interface for all functions. + + It is a follows: each function that returns objects returns a + ptype list of possible types MBK_INSTANCE, MBK_SEGMENT, + MBK_CONNECTOR, MBK_REFERENCE and MBK_VIA. + The current figure and the current instances are still pointed to + with the global variables. + If a ptype list with such a type exists, then its DATA pointer is + not NULL, and points to a chain_list whose NEXT pointer points to + the next element of the type, and whose DATA pointer points to an + mbk object of the given type. + The problem is that the program that uses these functions should + deallocate the various lists. + + Note: I haven't put genlib under RCS in the files themselves, as I + do so few modifications that I really don't care. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "mbkgen.h" +#define __GENLIB__ +#include "mgn.h" +static char rcsid[] = "$Id"; + +/******************************************************************************* +* global variables used in genlib * +*******************************************************************************/ +phins_list *WORK_PHINS; /* physical work figure */ +phfig_list *WORK_PHFIG; /* physical work instance */ +lofig_list *WORK_LOFIG; /* logical work instance */ + +/* Name of the special unconnected signal that skips connections */ +#define UNCONNECTED "_/_" + +static chain_list *phlist; +static chain_list *lolist; + +static char *checkname(); +static void toolong(); +static int hassep(); +int is_bus(); +int bus_decod(); + +/******************************************************************************* +* physical user functions * +*******************************************************************************/ + +static chain_list *g_addphvia(p, type, x, y, dx, dy, name) +phfig_list *p; +char type, *name; +long x, y, dx, dy; +{ +chain_list *c = NULL; + + if (name) + name = checkname(name); + + switch(type) { + case CONT_VIA13: + c = addchain(c, addphvia(p, CONT_VIA , x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + break; + case CONT_VIA14: + c = addchain(c, addphvia(p, CONT_VIA , x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + break; + case CONT_VIA15: + c = addchain(c, addphvia(p, CONT_VIA , x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + break; + case CONT_VIA16: + c = addchain(c, addphvia(p, CONT_VIA , x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + break; + case CONT_VIA17: + c = addchain(c, addphvia(p, CONT_VIA , x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + break; + case CONT_VIA18: + c = addchain(c, addphvia(p, CONT_VIA , x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + break; + case CONT_VIA19: + c = addchain(c, addphvia(p, CONT_VIA , x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA8, x, y, dx, dy, name)); + break; + case CONT_VIA24: + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + break; + case CONT_VIA25: + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + break; + case CONT_VIA26: + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + break; + case CONT_VIA27: + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + break; + case CONT_VIA28: + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + break; + case CONT_VIA29: + c = addchain(c, addphvia(p, CONT_VIA2, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA8, x, y, dx, dy, name)); + break; + case CONT_VIA35: + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + break; + case CONT_VIA36: + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + break; + case CONT_VIA37: + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + break; + case CONT_VIA38: + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + break; + case CONT_VIA39: + c = addchain(c, addphvia(p, CONT_VIA3, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA8, x, y, dx, dy, name)); + break; + case CONT_VIA46: + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + break; + case CONT_VIA47: + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + break; + case CONT_VIA48: + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + break; + case CONT_VIA49: + c = addchain(c, addphvia(p, CONT_VIA4, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA8, x, y, dx, dy, name)); + break; + case CONT_VIA57: + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + break; + case CONT_VIA58: + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + break; + case CONT_VIA59: + c = addchain(c, addphvia(p, CONT_VIA5, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA8, x, y, dx, dy, name)); + break; + case CONT_VIA68: + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + break; + case CONT_VIA69: + c = addchain(c, addphvia(p, CONT_VIA6, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA8, x, y, dx, dy, name)); + break; + case CONT_VIA79: + c = addchain(c, addphvia(p, CONT_VIA7, x, y, dx, dy, name)); + c = addchain(c, addphvia(p, CONT_VIA8, x, y, dx, dy, name)); + break; + default: + c = addchain(NULL, addphvia(p, type, x, y, dx, dy, name)); + } + return c; +} + +/******************************************************************************* +* function DEF_PHFIG * +*******************************************************************************/ +void genDEF_PHFIG(name) +char *name; +{ +phfig_list *ptfig; +char *s; + + if (!CATA_LIB || !WORK_LIB) + mbkenv(); + s = namealloc(name); /* Must be performed after mbkenv() */ + for (ptfig = HEAD_PHFIG; ptfig; ptfig = ptfig->NEXT) + if (ptfig->NAME == s) + break; + if (ptfig == NULL) + WORK_PHFIG = addphfig(s); + else + WORK_PHFIG = ptfig; + phlist = addchain(phlist, WORK_PHFIG); +} + +/******************************************************************************* +* function LOAD_PHFIG * +*******************************************************************************/ +void genLOAD_PHFIG(name) +char *name; +{ + if (!CATA_LIB || !WORK_LIB) + mbkenv(); + WORK_PHFIG = getphfig(name, 'A'); + phlist = addchain(phlist, WORK_PHFIG); +} + +/******************************************************************************* +* function SAVE_PHFIG * +*******************************************************************************/ +void genSAVE_PHFIG() +{ + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SAVE_PHFIG impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + savephfig(WORK_PHFIG); + phlist = delchain(phlist, phlist); + if (phlist) + WORK_PHFIG = (phfig_list *)phlist->DATA; + else + WORK_PHFIG = NULL; +} + +/******************************************************************************* +* function DEF_AB * +*******************************************************************************/ +void genDEF_AB(dx1, dy1, dx2, dy2) +long dx1, dy1, dx2, dy2; +{ +phfig_list *ptfig; +phins_list *ptins; +ptype_list *ptype; +long x1, y1, x2, y2; +long insx1, insx2, insy1, insy2; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("DEF_AB impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_PHFIG->PHINS == NULL) + x1 = x2 = y1 = y2 = 0; + else { + x2 = x1 = WORK_PHFIG->PHINS->XINS; + y2 = y1 = WORK_PHFIG->PHINS->YINS; + } + for (ptins = WORK_PHFIG->PHINS; ptins; ptins = ptins->NEXT) { + ptype = getptype(ptins->USER, (long)PLACEABOX); + /* This has been commented out as it should never ever occur, since + * all instances are placed using genlib. */ +#if 0 + if (ptype == NULL) { +#endif + ptfig = getphfig(ptins->FIGNAME, 'P'); + if (ptins->TRANSF == ROT_P || ptins->TRANSF == ROT_M + || ptins->TRANSF == SY_RM || ptins->TRANSF == SY_RP) { + insx1 = ptins->XINS; + insy1 = ptins->YINS; + insx2 = ptins->XINS + ptfig->YAB2 - ptfig->YAB1; + insy2 = ptins->YINS + ptfig->XAB2 - ptfig->XAB1; + } else { + insx1 = ptins->XINS; + insy1 = ptins->YINS; + insx2 = ptins->XINS + ptfig->XAB2 - ptfig->XAB1; + insy2 = ptins->YINS + ptfig->YAB2 - ptfig->YAB1; + } +#if 0 + } else { + ptnum = (num_list *)(ptype->DATA); + /* No need to check for rotation here, as the PLACEABOX field + contains the expected value, if I ain't mistaking... */ + insx1 = ptins->XINS; + insy1 = ptins->YINS; + insx2 = ptnum->DATA; + insy2 = ptnum->NEXT->DATA; + } +#endif + + if (x1 > insx1) + x1 = insx1; + if (y1 > insy1) + y1 = insy1; + if (x2 < insx2) + x2 = insx2; + if (y2 < insy2) + y2 = insy2; + } + defab(WORK_PHFIG, x1 + dx1, y1 + dy1, x2 + dx2, y2 + dy2); +} + +/******************************************************************************* +* function DEF_PHINS * +*******************************************************************************/ +void genDEF_PHINS(name) +char *name; +{ + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("DEF_PHINS impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + WORK_PHINS = getphins(WORK_PHFIG, name); +} + +/******************************************************************************* +* function PHCON * +*******************************************************************************/ +ptype_list *genPHCON(layer, width, name, orient, x, y) +char orient; +char *name; +long x, y, width; +char layer; +{ + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PHCON impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + return addptype(NULL, MBK_CONNECTOR, + addphcon(WORK_PHFIG, orient, checkname(name), x, y, layer, width)); +} + +/******************************************************************************* +* function COPY_UP_CON * +*******************************************************************************/ +ptype_list *genCOPY_UP_CON(index, locname, insname, newname) +long index; +char *insname; +char *locname; +char *newname; +{ +phfig_list *ptnewfig; +phins_list *ptins; +phcon_list *ptcon, *con = NULL; /* To make -Wall happy */ +phseg_list *seg = NULL; +long xcon, ycon; +long width; +char layer; +char orient; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("COPY_UP_CON impossible :", stderr); + (void)fputs(" missing DEF_PHFIG\n", stderr); + EXIT(1); + } + + ptins = getphins(WORK_PHFIG, insname); + ptnewfig = getphfig(ptins->FIGNAME, 'P'); + + /* looking for a connector(locname, index) */ + locname = namealloc(checkname(locname)); + for (ptcon = ptnewfig->PHCON; ptcon; ptcon = ptcon->NEXT) + if (locname == ptcon->NAME && index == ptcon->INDEX) + break; /* the only one is found here, since(name, index) is unique */ + + if (ptcon != NULL) { + xyflat(&xcon, &ycon, ptcon->XCON, ptcon->YCON, ptins->XINS, + ptins->YINS, ptnewfig->XAB1, ptnewfig->YAB1, ptnewfig->XAB2, + ptnewfig->YAB2, ptins->TRANSF); + + width = ptcon->WIDTH; + layer = ptcon->LAYER; + orient = instanceface(ptcon->ORIENT, ptins->TRANSF); + + /* create connector and segment, now UNIQUE */ + switch (orient) { + case WEST : + if (newname) + con = addphcon(WORK_PHFIG, WEST, checkname(newname), + WORK_PHFIG->XAB1, ycon, layer, width); + if (xcon > WORK_PHFIG->XAB1) + seg = addphseg(WORK_PHFIG, layer, width, + WORK_PHFIG->XAB1,ycon, xcon, ycon, (char *)NULL); + break; + case EAST : + if (newname) + con = addphcon(WORK_PHFIG, EAST, checkname(newname), + WORK_PHFIG->XAB2, ycon, layer, width); + if (xcon < WORK_PHFIG->XAB2) + seg = addphseg(WORK_PHFIG, layer, width, + xcon, ycon, WORK_PHFIG->XAB2, ycon, (char *)NULL); + break; + case SOUTH : + if (newname) + con = addphcon(WORK_PHFIG, SOUTH, checkname(newname), xcon, + WORK_PHFIG->YAB1, layer, width); + if (ycon > WORK_PHFIG->YAB1) + seg = addphseg(WORK_PHFIG, layer, width, + xcon, WORK_PHFIG->YAB1, xcon, ycon, (char *)NULL); + break; + case NORTH : + if (newname) + con = addphcon(WORK_PHFIG, NORTH, checkname(newname), xcon, + WORK_PHFIG->YAB2, layer, width); + if (ycon < WORK_PHFIG->YAB2) + seg = addphseg(WORK_PHFIG, layer, width, + xcon, ycon, xcon, WORK_PHFIG->YAB2, (char *)NULL); + break; + } + return addptype( + addptype(NULL, MBK_SEGMENT, addchain(NULL, seg)), + MBK_CONNECTOR, + addchain(NULL, con)); + } + + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("COPY_UP_CON impossible : ", stderr); + (void)fprintf(stderr, "connector %s index %ld of instance %s, figure %s,", + locname, index, insname, WORK_PHFIG->NAME); + (void)fputs(" doesn't exist\n", stderr); + EXIT(1); + return NULL; /* Never reached */ +} + +/******************************************************************************* +* function COPY_UP_CON_FACE * +*******************************************************************************/ +ptype_list *genCOPY_UP_CON_FACE(orient, locname, insname, newname) +char orient; +char *insname; +char *locname; +char *newname; +{ +phfig_list *ptnewfig; +phins_list *ptins; +phcon_list *ptcon, *ptscan; +chain_list *cons = NULL, *segs = NULL; +long xcon, ycon; +long width; +char layer; +int found = 0; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("COPY_UP_CON_FACE impossible missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (orient != NORTH && orient != SOUTH && orient != EAST && orient != WEST) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "illegal COPY_UP_CON_FACE : orientation is %ld\n", + (long)orient); + EXIT(1); + } + + ptins = getphins(WORK_PHFIG, insname); + ptnewfig = getphfig(ptins->FIGNAME, 'P'); + + /* recherche et remontee de tous les connecteurs (locname) */ + locname = namealloc(checkname(locname)); + newname = namealloc(checkname(newname)); + for (ptscan = ptnewfig->PHCON; ptscan; ptscan = ptscan->NEXT) { + ptcon = NULL; + switch (orient) { + case WEST : + if (ptins->TRANSF == NOSYM || ptins->TRANSF == SYM_Y) { + if (locname == ptscan->NAME && ptscan->ORIENT == WEST) + ptcon = ptscan; + } else if (ptins->TRANSF == SYMXY || ptins->TRANSF == SYM_X) { + if (locname == ptscan->NAME && ptscan->ORIENT == EAST) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_P || ptins->TRANSF == SY_RP) { + if (locname == ptscan->NAME && ptscan->ORIENT == NORTH) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_M || ptins->TRANSF == SY_RM) { + if (locname == ptscan->NAME && ptscan->ORIENT == SOUTH) + ptcon = ptscan; + } + break; + case EAST : + if (ptins->TRANSF == NOSYM || ptins->TRANSF == SYM_Y) { + if (locname == ptscan->NAME && ptscan->ORIENT == EAST) + ptcon = ptscan; + } else if (ptins->TRANSF == SYMXY || ptins->TRANSF == SYM_X) { + if (locname == ptscan->NAME && ptscan->ORIENT == WEST) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_P || ptins->TRANSF == SY_RP) { + if (locname == ptscan->NAME && ptscan->ORIENT == SOUTH) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_M || ptins->TRANSF == SY_RM) { + if (locname == ptscan->NAME && ptscan->ORIENT == NORTH) + ptcon = ptscan; + } + break; + case NORTH : + if (ptins->TRANSF == NOSYM || ptins->TRANSF == SYM_X) { + if (locname == ptscan->NAME && ptscan->ORIENT == NORTH) + ptcon = ptscan; + } else if (ptins->TRANSF == SYMXY || ptins->TRANSF == SYM_Y) { + if (locname == ptscan->NAME && ptscan->ORIENT == SOUTH) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_P || ptins->TRANSF == SY_RM) { + if (locname == ptscan->NAME && ptscan->ORIENT == EAST) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_M || ptins->TRANSF == SY_RP) { + if (locname == ptscan->NAME && ptscan->ORIENT == WEST) + ptcon = ptscan; + } + break; + case SOUTH : + if (ptins->TRANSF == NOSYM || ptins->TRANSF == SYM_X) { + if (locname == ptscan->NAME && ptscan->ORIENT == SOUTH) + ptcon = ptscan; + } else if (ptins->TRANSF == SYMXY || ptins->TRANSF == SYM_Y) { + if (locname == ptscan->NAME && ptscan->ORIENT == NORTH) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_P || ptins->TRANSF == SY_RM) { + if (locname == ptscan->NAME && ptscan->ORIENT == WEST) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_M || ptins->TRANSF == SY_RP) { + if (locname == ptscan->NAME && ptscan->ORIENT == EAST) + ptcon = ptscan; + } + break; + } + if (ptcon != NULL) { + found++; + xyflat(&xcon, &ycon, ptcon->XCON, ptcon->YCON, + ptins->XINS, ptins->YINS, ptnewfig->XAB1, ptnewfig->YAB1, + ptnewfig->XAB2, ptnewfig->YAB2, ptins->TRANSF); + width = ptcon->WIDTH; + layer = ptcon->LAYER; + + /* create connector and segment */ + switch (orient) { + case WEST : + cons = addchain(cons, (void *)addphcon(WORK_PHFIG, WEST, newname, + WORK_PHFIG->XAB1, ycon, layer, width)); + if (xcon > WORK_PHFIG->XAB1) + segs = addchain(segs, (void *)addphseg(WORK_PHFIG, layer, + width, WORK_PHFIG->XAB1, ycon, xcon, ycon, (char *)NULL)); + break; + case EAST : + cons = addchain(cons, (void *)addphcon(WORK_PHFIG, EAST, newname, + WORK_PHFIG->XAB2, ycon, layer, width)); + if (xcon < WORK_PHFIG->XAB2) + segs = addchain(segs, (void *)addphseg(WORK_PHFIG, layer, + width, xcon, ycon, WORK_PHFIG->XAB2, ycon, (char *)NULL)); + break; + case SOUTH : + cons = addchain(cons, (void *)addphcon(WORK_PHFIG, + SOUTH, newname, + xcon, WORK_PHFIG->YAB1, layer, width)); + if (ycon > WORK_PHFIG->YAB1) + segs = addchain(segs, (void *)addphseg(WORK_PHFIG, layer, + width, xcon, WORK_PHFIG->YAB1, xcon, ycon, (char *)NULL)); + break; + case NORTH : + cons = addchain(cons, (void *)addphcon(WORK_PHFIG, NORTH, newname, + xcon, WORK_PHFIG->YAB2, layer, width)); + if (ycon < WORK_PHFIG->YAB2) + segs = addchain(segs, (void *)addphseg(WORK_PHFIG, layer, + width, xcon, ycon, xcon, WORK_PHFIG->YAB2, (char *)NULL)); + break; + } + } + } + + if (!found) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("COPY_UP_CON_FACE impossible :\n", stderr); + (void)fprintf(stderr, "connector %s of instance %s", locname, insname); + (void)fprintf(stderr, ", figure %s, doesn't exist\n", WORK_PHFIG->NAME); + EXIT(1); + } + return addptype(addptype(NULL, MBK_SEGMENT, segs), MBK_CONNECTOR, cons); +} + +/******************************************************************************* +* function COPY_UP_ALL_CON * +*******************************************************************************/ +ptype_list *genCOPY_UP_ALL_CON(orient, insname, cheminom) +char orient; +char *insname; +char cheminom; +{ +phfig_list *ptnewfig; +phins_list *ptins; +phcon_list *ptcon, *ptscan; +chain_list *cons = NULL, *segs = NULL; +long xcon, ycon, width; +char layer; +int found = 0; +char *newname; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("COPY_UP_ALL_CON impossible missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (orient != NORTH && orient != SOUTH && orient != EAST && orient != WEST) { + (void)fflush(stdout); + (void)fputs("\n*** genlib error ***\n", stderr); + (void)fprintf(stderr, "illegal COPY_UP_ALL_CON : orientation is %ld", + (long)orient); + (void)fprintf(stderr, "on instance %s of figure %s\n", + insname, WORK_PHFIG->NAME); + EXIT(1); + } + + ptins = getphins(WORK_PHFIG, insname); + ptnewfig = getphfig(ptins->FIGNAME, 'P'); + + /* recherche et remontee de tous les connecteurs */ + for (ptscan = ptnewfig->PHCON; ptscan; ptscan = ptscan->NEXT) { + ptcon = NULL; + switch (orient) { + case WEST : + if (ptins->TRANSF == NOSYM || ptins->TRANSF == SYM_Y) { + if (ptscan->ORIENT == WEST) + ptcon = ptscan; + } else if (ptins->TRANSF == SYMXY || ptins->TRANSF == SYM_X) { + if (ptscan->ORIENT == EAST) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_P || ptins->TRANSF == SY_RP) { + if (ptscan->ORIENT == NORTH) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_M || ptins->TRANSF == SY_RM) { + if (ptscan->ORIENT == SOUTH) + ptcon = ptscan; + } + break; + case EAST : + if (ptins->TRANSF == NOSYM || ptins->TRANSF == SYM_Y) { + if (ptscan->ORIENT == EAST) + ptcon = ptscan; + } else if (ptins->TRANSF == SYMXY || ptins->TRANSF == SYM_X) { + if (ptscan->ORIENT == WEST) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_P || ptins->TRANSF == SY_RP) { + if (ptscan->ORIENT == SOUTH) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_M || ptins->TRANSF == SY_RM) { + if (ptscan->ORIENT == NORTH) + ptcon = ptscan; + } + break; + case NORTH : + if (ptins->TRANSF == NOSYM || ptins->TRANSF == SYM_X) { + if (ptscan->ORIENT == NORTH) + ptcon = ptscan; + } else if (ptins->TRANSF == SYMXY || ptins->TRANSF == SYM_Y) { + if (ptscan->ORIENT == SOUTH) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_P || ptins->TRANSF == SY_RM) { + if (ptscan->ORIENT == EAST) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_M || ptins->TRANSF == SY_RP) { + if (ptscan->ORIENT == WEST) + ptcon = ptscan; + } + break; + case SOUTH : + if (ptins->TRANSF == NOSYM || ptins->TRANSF == SYM_X) { + if (ptscan->ORIENT == SOUTH) + ptcon = ptscan; + } else if (ptins->TRANSF == SYMXY || ptins->TRANSF == SYM_Y) { + if (ptscan->ORIENT == NORTH) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_P || ptins->TRANSF == SY_RM) { + if (ptscan->ORIENT == WEST) + ptcon = ptscan; + } else if (ptins->TRANSF == ROT_M || ptins->TRANSF == SY_RP) { + if (ptscan->ORIENT == EAST) + ptcon = ptscan; + } + break; + } + if (ptcon != NULL) { + found++; + xyflat(&xcon, &ycon, ptcon->XCON, ptcon->YCON, + ptins->XINS, ptins->YINS, ptnewfig->XAB1, ptnewfig->YAB1, + ptnewfig->XAB2, ptnewfig->YAB2, ptins->TRANSF); + width = ptcon->WIDTH; + layer = ptcon->LAYER; + newname = cheminom == 'Y' ? concatname(insname, ptcon->NAME) + : ptcon->NAME; + + /* create connector and segment */ + switch (orient) { + case WEST : + cons = addchain(cons, (void *)addphcon(WORK_PHFIG, WEST, newname, + WORK_PHFIG->XAB1, ycon, layer, width)); + if (xcon > WORK_PHFIG->XAB1) + segs = addchain(segs, (void *)addphseg(WORK_PHFIG, layer, + width, WORK_PHFIG->XAB1, ycon, + xcon, ycon, (char *)NULL)); + break; + case EAST : + cons = addchain(cons, (void *)addphcon(WORK_PHFIG, EAST, newname, + WORK_PHFIG->XAB2, ycon, layer, width)); + if (xcon < WORK_PHFIG->XAB2) + segs = addchain(segs, (void *)addphseg(WORK_PHFIG, layer, + width, xcon, ycon, WORK_PHFIG->XAB2, + ycon, (char *)NULL)); + break; + case SOUTH : + cons = addchain(cons, (void *)addphcon(WORK_PHFIG, SOUTH, newname, + xcon, WORK_PHFIG->YAB1, layer, width)); + if (ycon > WORK_PHFIG->YAB1) + segs = addchain(segs, (void *)addphseg(WORK_PHFIG, layer, + width, xcon, WORK_PHFIG->YAB1, + xcon, ycon, (char *)NULL)); + break; + case NORTH : + cons = addchain(cons, (void *)addphcon(WORK_PHFIG, NORTH, newname, + xcon, WORK_PHFIG->YAB2, layer, width)); + if (ycon < WORK_PHFIG->YAB2) + segs = addchain(segs, (void *)addphseg(WORK_PHFIG, layer, + width, xcon, ycon, xcon, WORK_PHFIG->YAB2, + (char *)NULL)); + break; + } + } + } + + if (!found) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal COPY_UP_ALL_CON : ", stderr); + (void)fprintf(stderr, "instance %s, figure %s, has no connectors\n", + insname, WORK_PHFIG->NAME); + EXIT(1); + } + + return addptype(addptype(NULL, MBK_SEGMENT, segs), MBK_CONNECTOR, cons); +} + +/******************************************************************************* +* function GET_CON_X * +*******************************************************************************/ +long genGET_CON_X(insname, conname, index) +char *insname, *conname; +long index; +{ +phfig_list *ptfig; /* pointer on model of instance called insname */ +phins_list *ptins; /* pointer on instance called insname */ +phcon_list *ptcon; /* pointer on the conname called con inside ptins */ +long x_con, y_con; /* return values, y_con here for beauty */ + + ptins = getphins(WORK_PHFIG, insname); + ptfig = getphfig(ptins->FIGNAME, 'P'); + ptcon = getphcon(ptfig, checkname(conname), index); + + xyflat(&x_con, &y_con, ptcon->XCON, ptcon->YCON, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + return x_con; +} + +/******************************************************************************* +* function GET_CON_Y * +*******************************************************************************/ +long genGET_CON_Y(insname, conname, index) +char *insname, *conname; +long index; +{ +phfig_list *ptfig; /* pointer on model of instance called insname */ +phins_list *ptins; /* pointer on instance called insname */ +phcon_list *ptcon; /* pointer on the conname called con inside ptins */ +long x_con, y_con; /* return values, x_con here for beauty */ + + ptins = getphins(WORK_PHFIG, insname); + ptfig = getphfig(ptins->FIGNAME, 'P'); + ptcon = getphcon(ptfig, checkname(conname), index); + + xyflat(&x_con, &y_con, ptcon->XCON, ptcon->YCON, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + return y_con; +} + +/******************************************************************************* +* function GET_CON_LAYER * +*******************************************************************************/ +char genGET_CON_LAYER(insname, conname, index) +char *insname, *conname; +long index; +{ +phfig_list *ptfig; /* pointer on model of instance called insname */ +phins_list *ptins; /* pointer on instance called insname */ +phcon_list *ptcon; /* pointer on the conname called con inside ptins */ + + ptins = getphins(WORK_PHFIG, insname); + ptfig = getphfig(ptins->FIGNAME, 'P'); + ptcon = getphcon(ptfig, checkname(conname), index); + + return ptcon->LAYER; +} + +/******************************************************************************* +* function PHSEG * +*******************************************************************************/ +ptype_list *genPHSEG(layer, width, name, x1, y1, x2, y2) +char *name; +long x1, y1, x2, y2, width; +char layer; +{ + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PHSEG impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + return addptype(NULL, MBK_SEGMENT, + addchain(NULL, + addphseg(WORK_PHFIG, layer, width, x1, y1, x2, y2, + checkname(name)))); +} + +/******************************************************************************* +* function COPY_UP_SEG * +*******************************************************************************/ +ptype_list *genCOPY_UP_SEG(locname, insname, newname) +char *insname; +char *locname; +char *newname; +{ +phfig_list *ptnewfig; +phins_list *ptins; +phseg_list *ptseg; +long x1, x2, y1, y2; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("COPY_UP_SEG impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + ptins = getphins(WORK_PHFIG, insname); + ptnewfig = getphfig(ptins->FIGNAME, 'A'); + locname = namealloc(checkname(locname)); + + for (ptseg = ptnewfig->PHSEG; ptseg; ptseg = ptseg->NEXT) { + if (ptseg->NAME == locname) + break; + } + if (ptseg == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nCOPY_UP_SEG impossible :", stderr); + (void)fprintf(stderr, " segment %s doesn't exist in instance %s\n", + locname, insname); + EXIT(1); + } + + /* create segment */ + xyflat(&x1, &y1, ptseg->X1, ptseg->Y1, ptins->XINS, ptins->YINS, + ptnewfig->XAB1, ptnewfig->YAB1, ptnewfig->XAB2, ptnewfig->YAB2, + ptins->TRANSF); + xyflat(&x2, &y2, ptseg->X2, ptseg->Y2, ptins->XINS, ptins->YINS, + ptnewfig->XAB1, ptnewfig->YAB1, ptnewfig->XAB2, ptnewfig->YAB2, + ptins->TRANSF); + return addptype(NULL, MBK_SEGMENT, + addchain(NULL, + addphseg(WORK_PHFIG, ptseg->LAYER, ptseg->WIDTH, + x1, y1, x2, y2, checkname(newname)))); +} + +/******************************************************************************* +* function THRU_H * +*******************************************************************************/ +ptype_list *genTHRU_H(layer, width, y) +char layer; +long width, y; +{ +long x1, x2; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("THRU_H impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + x1 = WORK_PHFIG->XAB1; + x2 = WORK_PHFIG->XAB2; + if (x1 == 0 && WORK_PHFIG->YAB1 == 0 && x2 == 0 && WORK_PHFIG->YAB2 == 0) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("THRU_H impossible : missing DEF_AB\n", stderr); + EXIT(1); + } + return addptype(NULL, MBK_SEGMENT, + addchain(NULL, + addphseg(WORK_PHFIG, layer, width, x1, y, x2, y, NULL))); +} + +/******************************************************************************* +* function THRU_V * +*******************************************************************************/ +ptype_list *genTHRU_V(layer, width, x) +char layer; +long width, x; +{ +long y1, y2; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("THRU_V impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + y1 = WORK_PHFIG->YAB1; + y2 = WORK_PHFIG->YAB2; + if (y1 == 0 && WORK_PHFIG->XAB1 == 0 && y2 == 0 && WORK_PHFIG->XAB2 == 0) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("THRU_V impossible : missing DEF_AB\n", stderr); + EXIT(1); + } + return addptype(NULL, MBK_SEGMENT, + addchain(NULL, + addphseg(WORK_PHFIG, layer, width, x, y1, x, y2, NULL))); +} + +/******************************************************************************* +* function THRU_CON_H * +*******************************************************************************/ +ptype_list *genTHRU_CON_H(layer, width , name, y) +char layer; +char *name; +long width, y; +{ +long x1, x2; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("THRU_CON_H impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + x1 = WORK_PHFIG->XAB1; + x2 = WORK_PHFIG->XAB2; + if (x1 == 0 && WORK_PHFIG->YAB1 == 0 && x2 == 0 && WORK_PHFIG->YAB2 == 0) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("THRU_CON_H impossible : missing DEF_AB\n", stderr); + EXIT(1); + } + return addptype( + addptype(NULL, MBK_CONNECTOR, + addchain( + addchain(NULL, + addphcon(WORK_PHFIG, WEST, checkname(name), + x1, y, layer, width)), + addphcon(WORK_PHFIG, EAST, checkname(name), + x2, y, layer, width))), + MBK_SEGMENT, + addchain(NULL, + addphseg(WORK_PHFIG, layer, width, + x1, y, x2, y, checkname(name)))); +} + +/******************************************************************************* +* function THRU_CON_V * +*******************************************************************************/ +ptype_list *genTHRU_CON_V(layer, width, name, x) +char layer; +char *name; +long width, x; +{ +long y1, y2; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("THRU_CON_V impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + y1 = WORK_PHFIG->YAB1; + y2 = WORK_PHFIG->YAB2; + if (y1 == 0 && WORK_PHFIG->XAB1 == 0 && y2 == 0 && WORK_PHFIG->XAB2 == 0) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("THRU_CON_V impossible : missing DEF_AB\n", stderr); + EXIT(1); + } + return addptype( + addptype(NULL, MBK_CONNECTOR, + addchain( + addchain(NULL, + addphcon(WORK_PHFIG, SOUTH, checkname(name), + x, y1, layer, width)), + addphcon(WORK_PHFIG, NORTH, checkname(name), + x, y2, layer, width))), + MBK_SEGMENT, + addchain(NULL, + addphseg(WORK_PHFIG, layer, width, + x, y1, x, y2, checkname(name)))); +} + +/******************************************************************************* +* function WIRE1 * +*******************************************************************************/ +ptype_list *genWIRE1(layer, width, ins1, con1, index1, ins2, con2, index2) +char layer; +long width; +char *ins1, *ins2, *con1, *con2; +long index1, index2; +{ +long xcon1,ycon1, xcon2, ycon2; /* connexion coordinates */ +phcon_list *ptcon; /* scanning cons since getphcon exits if not present */ +phref_list *ptref; /* scanning refs since getphref exits if not present */ +phins_list *ptins; +phfig_list *ptfig; + + con1 = namealloc(checkname(con1)); + ptins = getphins(WORK_PHFIG, ins1); + ptfig = getphfig(ptins->FIGNAME, 'P'); + for (ptcon = ptfig->PHCON; ptcon != NULL; ptcon = ptcon->NEXT) + if (ptcon->NAME == con1 && ptcon->INDEX == index1) { + xcon1 = ptcon->XCON; + ycon1 = ptcon->YCON; + break; + } + for (ptref = ptfig->PHREF; ptref != NULL; ptref = ptref->NEXT) + if (ptref->NAME == con1) { + xcon1 = ptref->XREF; + ycon1 = ptref->YREF; + break; + } + if (ptref != NULL && ptcon != NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("WIRE1 same name for reference and", stderr); + (void)fprintf(stderr, " connector '%s' in figure '%s'\n", + ptcon->NAME, ptfig->NAME); + EXIT(1); + } + if (ptref == NULL && ptcon == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nWIRE1 reference or", stderr); + (void)fprintf(stderr, " connector '%s' does not exist in figure '%s'\n", + con1, ptfig->NAME); + EXIT(1); + } + xyflat(&xcon1, &ycon1, xcon1, ycon1, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + con2 = namealloc(checkname(con2)); + ptins = getphins(WORK_PHFIG, ins2); + ptfig = getphfig(ptins->FIGNAME, 'P'); + for (ptcon = ptfig->PHCON; ptcon != NULL; ptcon = ptcon->NEXT) + if (ptcon->NAME == con2 && ptcon->INDEX == index2) { + xcon2 = ptcon->XCON; + ycon2 = ptcon->YCON; + break; + } + for (ptref = ptfig->PHREF; ptref != NULL; ptref = ptref->NEXT) + if (ptref->NAME == con2) { + xcon2 = ptref->XREF; + ycon2 = ptref->YREF; + break; + } + if (ptref != NULL && ptcon != NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("WIRE1 same name for reference and", stderr); + (void)fprintf(stderr, " connector '%s' in figure '%s'\n", + ptcon->NAME, ptfig->NAME); + EXIT(1); + } + if (ptref == NULL && ptcon == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nWIRE1 reference or", stderr); + (void)fprintf(stderr, " connector '%s' does not exist in figure '%s'\n", + con2, ptfig->NAME); + EXIT(1); + } + xyflat(&xcon2, &ycon2, xcon2, ycon2, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + + return addptype(NULL, MBK_SEGMENT, + addchain(NULL, + addphseg(WORK_PHFIG, layer, width, + xcon1, ycon1, xcon2, ycon2, NULL))); +} + +/******************************************************************************* +* function WIRE2 * +*******************************************************************************/ +ptype_list *genWIRE2(layer, width, ins1, con1, index1, ins2, con2, index2, + x, y) +char layer; +long width, x, y; +char *ins1, *ins2, *con1, *con2; +long index1, index2; +{ +long xcon1, ycon1, xcon2, ycon2; /* connexion coordinates */ +phcon_list *ptcon; /* scanning cons since getphcon exits if not present */ +phref_list *ptref; /* scanning refs since getphref exits if not present */ +phins_list *ptins; +phfig_list *ptfig; + + con1 = namealloc(checkname(con1)); + ptins = getphins(WORK_PHFIG, ins1); + ptfig = getphfig(ptins->FIGNAME, 'P'); + for (ptcon = ptfig->PHCON; ptcon != NULL; ptcon = ptcon->NEXT) + if (ptcon->NAME == con1 && ptcon->INDEX == index1) { + xcon1 = ptcon->XCON; + ycon1 = ptcon->YCON; + break; + } + for (ptref = ptfig->PHREF; ptref != NULL; ptref = ptref->NEXT) + if (ptref->NAME == con1) { + xcon1 = ptref->XREF; + ycon1 = ptref->YREF; + break; + } + if (ptref != NULL && ptcon != NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("WIRE2 same name for reference and", stderr); + (void)fprintf(stderr, " connector '%s' in figure '%s'\n", + ptcon->NAME, ptfig->NAME); + EXIT(1); + } + if (ptref == NULL && ptcon == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nWIRE2 reference or", stderr); + (void)fprintf(stderr, " connector '%s' does not exist in figure '%s'\n", + con1, ptfig->NAME); + EXIT(1); + } + xyflat(&xcon1, &ycon1, xcon1, ycon1, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + con2 = namealloc(checkname(con2)); + ptins = getphins(WORK_PHFIG, ins2); + ptfig = getphfig(ptins->FIGNAME, 'P'); + for (ptcon = ptfig->PHCON; ptcon != NULL; ptcon = ptcon->NEXT) + if (ptcon->NAME == con2 && ptcon->INDEX == index2) { + xcon2 = ptcon->XCON; + ycon2 = ptcon->YCON; + break; + } + for (ptref = ptfig->PHREF; ptref != NULL; ptref = ptref->NEXT) + if (ptref->NAME == con2) { + xcon2 = ptref->XREF; + ycon2 = ptref->YREF; + break; + } + if (ptref != NULL && ptcon != NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("WIRE2 same name for reference and", stderr); + (void)fprintf(stderr, " connector '%s' in figure '%s'\n", + ptcon->NAME, ptfig->NAME); + EXIT(1); + } + if (ptref == NULL && ptcon == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nWIRE2 reference or", stderr); + (void)fprintf(stderr, " connector '%s' does not exist in figure '%s'\n", + con2, ptfig->NAME); + EXIT(1); + } + xyflat(&xcon2, &ycon2, xcon2, ycon2, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + + return addptype(NULL, MBK_SEGMENT, + addchain( + addchain(NULL, + addphseg(WORK_PHFIG, layer, width, + xcon1, ycon1, x, y, (char *)NULL)), + addphseg(WORK_PHFIG, layer, width, + xcon2, ycon2, x, y, (char *)NULL))); +} + +/******************************************************************************* +* function WIRE3 * +*******************************************************************************/ +ptype_list *genWIRE3(layer, width, ins1, con1, index1, ins2, con2, index2, +x1, y1, x2, y2) +char layer; +long width, x1, y1, x2, y2; +char *ins1, *ins2, *con1, *con2; +long index1, index2; +{ +long xcon1, ycon1, xcon2, ycon2; /* connexion coordinates */ +phcon_list *ptcon; /* scanning cons since getphcon exits if not present */ +phref_list *ptref; /* scanning refs since getphref exits if not present */ +phins_list *ptins; +phfig_list *ptfig; + + con1 = namealloc(checkname(con1)); + ptins = getphins(WORK_PHFIG, ins1); + ptfig = getphfig(ptins->FIGNAME, 'P'); + for (ptcon = ptfig->PHCON; ptcon != NULL; ptcon = ptcon->NEXT) + if (ptcon->NAME == con1 && ptcon->INDEX == index1) { + xcon1 = ptcon->XCON; + ycon1 = ptcon->YCON; + break; + } + for (ptref = ptfig->PHREF; ptref != NULL; ptref = ptref->NEXT) + if (ptref->NAME == con1) { + xcon1 = ptref->XREF; + ycon1 = ptref->YREF; + break; + } + if (ptref != NULL && ptcon != NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("WIRE3 same name for reference and", stderr); + (void)fprintf(stderr, " connector '%s' in figure '%s'\n", + ptcon->NAME, ptfig->NAME); + EXIT(1); + } + if (ptref == NULL && ptcon == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nWIRE3 reference or", stderr); + (void)fprintf(stderr, " connector '%s' does not exist in figure '%s'\n", + con1, ptfig->NAME); + EXIT(1); + } + xyflat(&xcon1, &ycon1, xcon1, ycon1, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + con2 = namealloc(checkname(con2)); + ptins = getphins(WORK_PHFIG, ins2); + ptfig = getphfig(ptins->FIGNAME, 'P'); + for (ptcon = ptfig->PHCON; ptcon != NULL; ptcon = ptcon->NEXT) + if (ptcon->NAME == con2 && ptcon->INDEX == index2) { + xcon2 = ptcon->XCON; + ycon2 = ptcon->YCON; + break; + } + for (ptref = ptfig->PHREF; ptref != NULL; ptref = ptref->NEXT) + if (ptref->NAME == con2) { + xcon2 = ptref->XREF; + ycon2 = ptref->YREF; + break; + } + if (ptref != NULL && ptcon != NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("WIRE3 same name for reference and", stderr); + (void)fprintf(stderr, " connector '%s' in figure '%s'\n", + ptcon->NAME, ptfig->NAME); + EXIT(1); + } + if (ptref == NULL && ptcon == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nWIRE3 reference or", stderr); + (void)fprintf(stderr, " connector '%s' does not exist in figure '%s'\n", + con2, ptfig->NAME); + EXIT(1); + } + xyflat(&xcon2, &ycon2, xcon2, ycon2, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + return addptype(NULL, MBK_SEGMENT, + addchain( + addchain( + addchain(NULL, addphseg(WORK_PHFIG, layer, width, + xcon1, ycon1, x1, y1, NULL)), + addphseg(WORK_PHFIG, layer, width, x2, y2, x1, y1, NULL)), + addphseg(WORK_PHFIG, layer, width, xcon2, ycon2, x2, y2, NULL))); + +} + +/******************************************************************************* +* function PHVIA * +*******************************************************************************/ +ptype_list *genPHVIA(type, x, y) +char type; +long x, y; +{ + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PHVIA impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + return addptype(NULL, MBK_VIA, g_addphvia(WORK_PHFIG, type, x, y, 0, 0, NULL)); +} + +/******************************************************************************* +* function PHBIGVIA * +*******************************************************************************/ +ptype_list *genPHBIGVIA(type, x, y, dx, dy, name) +char type, *name; +long x, y, dx, dy; +{ + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PHVIA impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + return addptype(NULL, MBK_VIA, g_addphvia(WORK_PHFIG, type, x, y, dx, dy, name)); +} + +/******************************************************************************* +* function PLACE * +*******************************************************************************/ +ptype_list *genPLACE(figname, insname, sym, x, y) +char *figname; +char *insname; +int sym; +long x, y; +{ +phfig_list *ptfig; +long deltax = 0, deltay = 0; /* To make -Wall happy */ +num_list *ptnum; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (hassep(insname)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nIllegal PLACE : the ", stderr); + (void)fprintf(stderr, + "instance name `%s' contains an illegal character\n", + insname); + EXIT(1); + } + WORK_PHINS = addphins(WORK_PHFIG, figname, insname, sym, x, y); + ptfig = getphfig(figname, 'P'); + if (sym == NOSYM || sym == SYM_X || sym == SYM_Y || sym == SYMXY) { + deltax = x + ptfig->XAB2 - ptfig->XAB1; + deltay = y + ptfig->YAB2 - ptfig->YAB1; + } + if (sym == ROT_P || sym == ROT_M || sym == SY_RP || sym == SY_RM) { + deltax = x + ptfig->YAB2 - ptfig->YAB1; + deltay = y + ptfig->XAB2 - ptfig->XAB1; + } + ptnum = addnum((num_list *)NULL, deltay); + ptnum = addnum(ptnum, deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + return addptype(NULL, MBK_INSTANCE, addchain(NULL, WORK_PHINS)); +} + +/******************************************************************************* +* function PLACE_RIGHT * +*******************************************************************************/ +ptype_list *genPLACE_RIGHT(figname, insname, sym) +char *figname; +char *insname; +int sym; +{ +long x, y; +long deltax = 0, deltay = 0; /* To make -Wall happy */ +char trsf; +phfig_list *ptfig = NULL; +ptype_list *ptype = NULL; +num_list *ptnum = NULL; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_RIGHT impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_PHINS == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_RIGHT impossible : no previous instance ", stderr); + (void)fprintf(stderr, "in figure %s\n", WORK_PHFIG->NAME); + EXIT(1); + } + if (hassep(insname)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nIllegal PLACE_RIGHT : the ", stderr); + (void)fprintf(stderr, + "instance name `%s' contains an illegal character\n", + insname); + EXIT(1); + } + ptype = getptype(WORK_PHINS->USER, (long)PLACEABOX); + if (ptype == NULL) { + ptfig = getphfig(WORK_PHINS->FIGNAME, 'P'); + trsf = WORK_PHINS->TRANSF; + if (trsf == NOSYM || trsf == SYM_X || trsf == SYM_Y || trsf == SYMXY) { + deltax = WORK_PHINS->XINS + ptfig->XAB2 - ptfig->XAB1; + deltay = WORK_PHINS->YINS + ptfig->YAB2 - ptfig->YAB1; + } + if (trsf == ROT_P || trsf == ROT_M || trsf == SY_RP || trsf == SY_RM) { + deltax = WORK_PHINS->XINS + ptfig->YAB2 - ptfig->YAB1; + deltay = WORK_PHINS->YINS + ptfig->XAB2 - ptfig->XAB1; + } + ptnum = addnum((num_list *)NULL, deltay); + ptnum = addnum(ptnum, deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + ptype = WORK_PHINS->USER; + } + x = ((num_list *)(ptype->DATA))->DATA; + y = WORK_PHINS->YINS; + + WORK_PHINS = addphins(WORK_PHFIG, figname, insname, sym, x, y); + ptfig = getphfig(figname, 'P'); + if (sym == NOSYM || sym == SYM_X || sym == SYM_Y || sym == SYMXY) { + deltax = x + ptfig->XAB2 - ptfig->XAB1; + deltay = y + ptfig->YAB2 - ptfig->YAB1; + } + if (sym == ROT_P || sym == ROT_M || sym == SY_RP || sym == SY_RM) { + deltax = x + ptfig->YAB2 - ptfig->YAB1; + deltay = y + ptfig->XAB2 - ptfig->XAB1; + } + ptnum = addnum((num_list *)NULL, deltay); + ptnum = addnum(ptnum, deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + return addptype(NULL, MBK_INSTANCE, addchain(NULL, WORK_PHINS)); +} + +/******************************************************************************* +* function PLACE_TOP * +*******************************************************************************/ +ptype_list *genPLACE_TOP(figname, insname, sym) +char *figname; +char *insname; +int sym; +{ +long x, y; +long deltax = 0, deltay = 0; /* To make -Wall happy */ +char trsf; +phfig_list *ptfig = NULL; +ptype_list *ptype = NULL; +num_list *ptnum = NULL; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_TOP impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_PHINS == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_TOP impossible : no previous instance ", stderr); + (void)fprintf(stderr, "in figure %s\n", WORK_PHFIG->NAME); + EXIT(1); + } + if (hassep(insname)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nIllegal PLACE_TOP : the ", stderr); + (void)fprintf(stderr, + "instance name `%s' contains an illegal character\n", + insname); + EXIT(1); + } + ptype = getptype(WORK_PHINS->USER, (long)PLACEABOX); + if (ptype == NULL) { + ptfig = getphfig(WORK_PHINS->FIGNAME, 'P'); + trsf = WORK_PHINS->TRANSF; + if (trsf == NOSYM || trsf == SYM_X || trsf == SYM_Y || trsf == SYMXY) { + deltax = WORK_PHINS->XINS + ptfig->XAB2 - ptfig->XAB1; + deltay = WORK_PHINS->YINS + ptfig->YAB2 - ptfig->YAB1; + } + if (trsf == ROT_P || trsf == ROT_M || trsf == SY_RP || trsf == SY_RM) { + deltax = WORK_PHINS->XINS + ptfig->YAB2 - ptfig->YAB1; + deltay = WORK_PHINS->YINS + ptfig->XAB2 - ptfig->XAB1; + } + ptnum = addnum((num_list *)NULL, deltay); + ptnum = addnum(ptnum, deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + ptype = WORK_PHINS->USER; + } + y = ((num_list *)(ptype->DATA))->NEXT->DATA; + x = WORK_PHINS->XINS; + WORK_PHINS = addphins(WORK_PHFIG, figname, insname, sym, x, y); + + ptfig = getphfig(figname, 'P'); + if (sym == NOSYM || sym == SYM_X || sym == SYM_Y || sym == SYMXY) { + deltax = x + ptfig->XAB2 - ptfig->XAB1; + deltay = y + ptfig->YAB2 - ptfig->YAB1; + } + if (sym == ROT_P || sym == ROT_M || sym == SY_RP || sym == SY_RM) { + deltax = x + ptfig->YAB2 - ptfig->YAB1; + deltay = y + ptfig->XAB2 - ptfig->XAB1; + } + ptnum = addnum((num_list *)NULL, deltay); + ptnum = addnum(ptnum, deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + return addptype(NULL, MBK_INSTANCE, addchain(NULL, WORK_PHINS)); +} + +/******************************************************************************* +* function PLACE_LEFT * +*******************************************************************************/ +ptype_list *genPLACE_LEFT(figname, insname, sym) +char *figname; +char *insname; +int sym; +{ +long x, y; +long deltax = 0, deltay = 0; /* To make -Wall happy */ +char trsf; +phfig_list *ptfig = NULL; +ptype_list *ptype = NULL; +num_list *ptnum = NULL; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_LEFT impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_PHINS == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_LEFT impossible : no previous instance ", stderr); + (void)fprintf(stderr, "in figure %s\n", WORK_PHFIG->NAME); + EXIT(1); + } + if (hassep(insname)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nIllegal PLACE_LEFT : the ", stderr); + (void)fprintf(stderr, + "instance name `%s' contains an illegal character\n", + insname); + EXIT(1); + } + ptype = getptype(WORK_PHINS->USER, (long)PLACEABOX); + if (ptype == NULL) { + ptfig = getphfig(WORK_PHINS->FIGNAME, 'P'); + trsf = WORK_PHINS->TRANSF; + if (trsf == NOSYM || trsf == SYM_X || trsf == SYM_Y || trsf == SYMXY) { + deltax = WORK_PHINS->XINS + ptfig->XAB2 - ptfig->XAB1; + deltay = WORK_PHINS->YINS + ptfig->YAB2 - ptfig->YAB1; + } + if (trsf == ROT_P || trsf == ROT_M || trsf == SY_RP || trsf == SY_RM) { + deltax = WORK_PHINS->XINS + ptfig->YAB2 - ptfig->YAB1; + deltay = WORK_PHINS->YINS + ptfig->XAB2 - ptfig->XAB1; + } + ptnum = addnum((num_list *)NULL, deltay); + ptnum = addnum(ptnum, deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + } + ptfig = getphfig(figname, 'P'); + if (sym == NOSYM || sym == SYM_X || sym == SYM_Y || sym == SYMXY) { + deltax = ptfig->XAB2 - ptfig->XAB1; + deltay = ptfig->YAB2 - ptfig->YAB1; + } + if (sym == ROT_P || sym == ROT_M || sym == SY_RP || sym == SY_RM) { + deltax = ptfig->YAB2 - ptfig->YAB1; + deltay = ptfig->XAB2 - ptfig->XAB1; + } + x = WORK_PHINS->XINS - deltax; + y = WORK_PHINS->YINS; + WORK_PHINS = addphins(WORK_PHFIG, figname, insname, sym, x, y); + ptnum = addnum((num_list *)NULL, y + deltay); + ptnum = addnum(ptnum, x + deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + return addptype(NULL, MBK_INSTANCE, addchain(NULL, WORK_PHINS)); +} + +/******************************************************************************* +* function PLACE_BOTTOM * +*******************************************************************************/ +ptype_list *genPLACE_BOTTOM(figname, insname, sym) +char *figname; +char *insname; +int sym; +{ +long x, y; +long deltax = 0, deltay = 0; /* To make -Wall happy */ +char trsf; +phfig_list *ptfig = NULL; +ptype_list *ptype = NULL; +num_list *ptnum = NULL; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_BOTTOM impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_PHINS == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_BOTTOM impossible : no previous instance ", stderr); + (void)fprintf(stderr, "in figure %s\n", WORK_PHFIG->NAME); + EXIT(1); + } + if (hassep(insname)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nIllegal PLACE_BOTTOM : the ", stderr); + (void)fprintf(stderr, + "instance name `%s' contains an illegal character\n", + insname); + EXIT(1); + } + ptype = getptype(WORK_PHINS->USER, (long)PLACEABOX); + if (ptype == NULL) { + ptfig = getphfig(WORK_PHINS->FIGNAME, 'P'); + trsf = WORK_PHINS->TRANSF; + if (trsf == NOSYM || trsf == SYM_X || trsf == SYM_Y || trsf == SYMXY) { + deltax = WORK_PHINS->XINS + ptfig->XAB2 - ptfig->XAB1; + deltay = WORK_PHINS->YINS + ptfig->YAB2 - ptfig->YAB1; + } + if (trsf == ROT_P || trsf == ROT_M || trsf == SY_RP || trsf == SY_RM) { + deltax = WORK_PHINS->XINS + ptfig->YAB2 - ptfig->YAB1; + deltay = WORK_PHINS->YINS + ptfig->XAB2 - ptfig->XAB1; + } + ptnum = addnum((num_list *)NULL, deltay); + ptnum = addnum(ptnum, deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + } + ptfig = getphfig(figname, 'P'); + if (sym == NOSYM || sym == SYM_X || sym == SYM_Y || sym == SYMXY) { + deltax = ptfig->XAB2 - ptfig->XAB1; + deltay = ptfig->YAB2 - ptfig->YAB1; + } + if (sym == ROT_P || sym == ROT_M || sym == SY_RP || sym == SY_RM) { + deltax = ptfig->YAB2 - ptfig->YAB1; + deltay = ptfig->XAB2 - ptfig->XAB1; + } + x = WORK_PHINS->XINS; + y = WORK_PHINS->YINS - deltay; + WORK_PHINS = addphins(WORK_PHFIG, figname, insname, sym, x, y); + ptnum = addnum((num_list *)NULL, y + deltay); + ptnum = addnum(ptnum, x + deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + return addptype(NULL, MBK_INSTANCE, addchain(NULL, WORK_PHINS)); +} + +/******************************************************************************* +* function PLACE_REF * +*******************************************************************************/ +ptype_list *genPLACE_REF(figname, insname, sym, insref, refname) +char *figname; +char *insname; +char *insref; +char *refname; +int sym; +{ +long x, y; +long deltax = 0, deltay = 0; /* To make -Wall happy */ +char trsf; +phfig_list *ptfig = NULL; +phins_list *ptins = NULL; +phref_list *ptref = NULL; +ptype_list *ptype = NULL; +num_list *ptnum = NULL; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_REF impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_PHINS == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_REF impossible : no previous instance ", stderr); + (void)fprintf(stderr, "in figure %s\n", WORK_PHFIG->NAME); + EXIT(1); + } + if (hassep(insname)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nIllegal PLACE_REF : the ", stderr); + (void)fprintf(stderr, + "instance name `%s' contains an illegal character\n", + insname); + EXIT(1); + } + ptype = getptype(WORK_PHINS->USER, (long)PLACEABOX); + if (ptype == NULL) { + ptfig = getphfig(WORK_PHINS->FIGNAME, 'P'); + trsf = WORK_PHINS->TRANSF; + if (trsf == NOSYM || trsf == SYM_X || trsf == SYM_Y || trsf == SYMXY) { + deltax = WORK_PHINS->XINS + ptfig->XAB2 - ptfig->XAB1; + deltay = WORK_PHINS->YINS + ptfig->YAB2 - ptfig->YAB1; + } + if (trsf == ROT_P || trsf == ROT_M || trsf == SY_RP || trsf == SY_RM) { + deltax = WORK_PHINS->XINS + ptfig->YAB2 - ptfig->YAB1; + deltay = WORK_PHINS->YINS + ptfig->XAB2 - ptfig->XAB1; + } + ptnum = addnum((num_list *)NULL, deltay); + ptnum = addnum(ptnum, deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + } + ptins = getphins(WORK_PHFIG, insref); + ptfig = getphfig(ptins->FIGNAME, 'A'); + ptref = getphref(ptfig, checkname(refname)); + xyflat(&x, &y, ptref->XREF, ptref->YREF, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + WORK_PHINS = addphins(WORK_PHFIG, figname, insname, sym, x, y); + + ptfig = getphfig(figname, 'P'); + if (sym == NOSYM || sym == SYM_X || sym == SYM_Y || sym == SYMXY) { + deltax = x + ptfig->XAB2 - ptfig->XAB1; + deltay = y + ptfig->YAB2 - ptfig->YAB1; + } + if (sym == ROT_P || sym == ROT_M || sym == SY_RP || sym == SY_RM) { + deltax = x + ptfig->YAB2 - ptfig->YAB1; + deltay = y + ptfig->XAB2 - ptfig->XAB1; + } + ptnum = addnum((num_list *)NULL, deltay); + ptnum = addnum(ptnum, deltax); + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + return addptype(NULL, MBK_INSTANCE, addchain(NULL, WORK_PHINS)); +} + +/******************************************************************************* +* function PLACE_ON * +*******************************************************************************/ +ptype_list *genPLACE_ON(figname, insname1, con1, index1, sym, insname2, con2, +index2) +char *figname; +char *insname1, *insname2, *con1, *con2; +int sym; +long index1, index2; +{ +long x, y, x1, y1, x2, y2; +long xrc1 = 0, yrc1 = 0, xrc2 = 0, yrc2 = 0; /* To make -Wall happy */ +long deltax = 0, deltay = 0; /* To make -Wall happy */ +char trsf; +phfig_list *ptfig = NULL; +ptype_list *ptype = NULL; +num_list *ptnum = NULL; +phins_list *ptins; +phcon_list *ptcon; +phref_list *ptref; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_ON impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_PHINS == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_ON impossible : no previous instance ", stderr); + (void)fprintf(stderr, "in figure %s\n", WORK_PHFIG->NAME); + EXIT(1); + } + if (hassep(insname1)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nIllegal PLACE_ON : the ", stderr); + (void)fprintf(stderr, + "instance name `%s' contains an illegal character\n", + insname1); + EXIT(1); + } + ptins = getphins(WORK_PHFIG, insname2); + ptype = getptype(ptins->USER, (long)PLACEABOX); + if (ptype == NULL) { + ptfig = getphfig(ptins->FIGNAME, 'P'); + trsf = ptins->TRANSF; + if (trsf == NOSYM || trsf == SYM_X || trsf == SYM_Y || trsf == SYMXY) { + deltax = ptins->XINS + ptfig->XAB2 - ptfig->XAB1; + deltay = ptins->YINS + ptfig->YAB2 - ptfig->YAB1; + } + if (trsf == ROT_P || trsf == ROT_M || trsf == SY_RP || trsf == SY_RM) { + deltax = ptins->XINS + ptfig->YAB2 - ptfig->YAB1; + deltay = ptins->YINS + ptfig->XAB2 - ptfig->XAB1; + } + ptnum = addnum((num_list *)NULL, deltay); + ptnum = addnum(ptnum, deltax); + ptins->USER = addptype(ptins->USER, (long)PLACEABOX, (void *)ptnum); + ptype = ptins->USER; + } + + ptfig = getphfig(ptins->FIGNAME, 'P'); + con2 = namealloc(checkname(con2)); + for (ptcon = ptfig->PHCON; ptcon != NULL; ptcon = ptcon->NEXT) + if (ptcon->NAME == con2 && ptcon->INDEX == index2) { + xrc2 = ptcon->XCON; + yrc2 = ptcon->YCON; + break; + } + for (ptref = ptfig->PHREF; ptref != NULL; ptref = ptref->NEXT) + if (ptref->NAME == con2) { + xrc2 = ptref->XREF; + yrc2 = ptref->YREF; + break; + } + if (ptref != NULL && ptcon != NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nPLACE_ON : same name for ", stderr); + (void)fprintf(stderr, "reference and connector '%s' in figure '%s'\n", + con2, ptfig->NAME); + EXIT(1); + } + if (ptref == NULL && ptcon == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nPLACE_ON : reference or", stderr); + (void)fprintf(stderr, " connector '%s' does not exist in figure '%s'\n", + con2, ptfig->NAME); + EXIT(1); + } + xyflat(&x2, &y2, xrc2, yrc2, ptins->XINS, ptins->YINS, ptfig->XAB1, + ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + ptfig = getphfig(figname, 'P'); + con1 = namealloc(checkname(con1)); + for (ptcon = ptfig->PHCON; ptcon != NULL; ptcon = ptcon->NEXT) + if (ptcon->NAME == con1 && ptcon->INDEX == index1) { + xrc1 = ptcon->XCON; + yrc1 = ptcon->YCON; + break; + } + for (ptref = ptfig->PHREF; ptref != NULL; ptref = ptref->NEXT) + if (ptref->NAME == con1) { + xrc1 = ptref->XREF; + yrc1 = ptref->YREF; + break; + } + if (ptref != NULL && ptcon != NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nPLACE_ON : same name for ", stderr); + (void)fprintf(stderr, "reference and connector '%s' in figure '%s'\n", + con1, ptfig->NAME); + EXIT(1); + } + if (ptref == NULL && ptcon == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nPLACE_ON : reference or", stderr); + (void)fprintf(stderr, " connector '%s' does not exist in figure '%s'\n", + con1, ptfig->NAME); + EXIT(1); + } + xyflat(&x1, &y1, xrc1, yrc1, 0L, 0L, ptfig->XAB1, ptfig->YAB1, + ptfig->XAB2, ptfig->YAB2, sym); + + if (sym == NOSYM || sym == SYM_X || sym == SYM_Y || sym == SYMXY) { + deltax = ptfig->XAB2 - ptfig->XAB1; + deltay = ptfig->YAB2 - ptfig->YAB1; + } + if (sym == ROT_P || sym == ROT_M || sym == SY_RP || sym == SY_RM) { + deltax = ptfig->YAB2 - ptfig->YAB1; + deltay = ptfig->XAB2 - ptfig->XAB1; + } + + x = x2 - x1; + y = y2 - y1; + + ptnum = addnum((num_list *)NULL, y + deltay); + ptnum = addnum(ptnum, x + deltax); + + WORK_PHINS = addphins(WORK_PHFIG, figname, insname1, sym, x, y); + + WORK_PHINS->USER = addptype(WORK_PHINS->USER, (long)PLACEABOX, + (void *)ptnum); + return addptype(NULL, MBK_INSTANCE, addchain(NULL, WORK_PHINS)); +} + +/******************************************************************************* +* function HEIGHT * +*******************************************************************************/ +long genHEIGHT(cellName) +char *cellName; +{ +phfig_list *pf; + + pf = getphfig(cellName, 'P'); + return pf->YAB2 - pf->YAB1; +} + +/******************************************************************************* +* function WIDTH * +*******************************************************************************/ +long genWIDTH(cellName) +char *cellName; +{ +phfig_list *pf; + + pf = getphfig(cellName, 'P'); + return pf->XAB2 - pf->XAB1; +} + +/******************************************************************************* +* function GET_INS_X * +*******************************************************************************/ +long genGET_INS_X(insname) +char *insname; +{ + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("Illegal GET_INS_X : No DEF_PHFIG\n", stderr); + EXIT(1); + } + + return getphins(WORK_PHFIG, insname)->XINS; +} + +/******************************************************************************* +* function GET_INS_Y * +*******************************************************************************/ +long genGET_INS_Y(insname) +char *insname; +{ + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("Illegal GET_INS_X : No DEF_PHFIG\n", stderr); + EXIT(1); + } + + return getphins(WORK_PHFIG, insname)->YINS; +} + +/******************************************************************************* +* function FLATTEN_PHFIG * +*******************************************************************************/ +void genFLATTEN_PHFIG(insname, concat) +char *insname; +char concat; +{ + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("FLATTEN_PHFIG impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + flattenphfig(WORK_PHFIG, insname, concat); +} + +/******************************************************************************* +* function FLATTEN_ALL_PHINS * +*******************************************************************************/ +void genFLATTEN_ALL_PHINS(concat, catal) +char concat, catal; +{ +chain_list *c, *namelist = NULL; +phins_list *l; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("Illegal FLATTEN_ALL_PHINS : No DEF_PHFIG\n", stderr); + EXIT(1); + } + + for (l = WORK_PHFIG->PHINS; l; l = l->NEXT) + if (catal == NO || !incatalog(l->FIGNAME)) + namelist = addchain(namelist, (void *)l->INSNAME); + + for (c = namelist; c; c = c->NEXT) + flattenphfig(WORK_PHFIG, (char *)c->DATA, concat); + + freechain(namelist); +} + +/******************************************************************************* +* function PHREF * +*******************************************************************************/ +ptype_list *genPHREF(type, name, x, y) +char *type; +char *name; +long x, y; +{ + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PHREF impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + return addptype(NULL, MBK_REFERENCE, + addchain(NULL, addphref(WORK_PHFIG, type, checkname(name), x, y))); +} + +void genDEL_PHREF(type, pattern) +char *type; +char *pattern; +{ +char *s; +int n; +phref_list *r, *rr; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("DEL_PHREF impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (pattern == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("DEL_PHREF impossible : null pattern not allowed\n", stderr); + EXIT(1); + } + + s = strchr(pattern, '*'); + if (s == NULL) + n = strlen(pattern); + else + n = s - pattern; + + for (r = WORK_PHFIG->PHREF; r; r = rr) { + rr = r->NEXT; + if (!strcmp(r->FIGNAME, type) && !strncmp(r->NAME, pattern, n)) + delphref(WORK_PHFIG, r); + } +} + +/******************************************************************************* +* function COPY_UP_REF * +*******************************************************************************/ +ptype_list *genCOPY_UP_REF(refname, insname, newname) +char *refname; +char *insname; +char *newname; +{ +phfig_list *ptnewfig; +phins_list *ptins; +phref_list *ptref; +long x, y; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("COPY_UP_REF impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + ptins = getphins(WORK_PHFIG, insname); + ptnewfig = getphfig(ptins->FIGNAME, 'A'); + ptref = getphref(ptnewfig, checkname(refname)); + + /* create reference */ + xyflat(&x, &y, ptref->XREF, ptref->YREF, ptins->XINS, ptins->YINS, + ptnewfig->XAB1, ptnewfig->YAB1, ptnewfig->XAB2, ptnewfig->YAB2, + ptins->TRANSF); + + return addptype(NULL, MBK_REFERENCE, + addchain(NULL, + addphref(WORK_PHFIG, ptref->FIGNAME, + checkname(newname), x, y))); +} + +/******************************************************************************* +* function COPY_UP_ALL_REF * +*******************************************************************************/ +ptype_list *genCOPY_UP_ALL_REF(reftype, insname, cheminom) +char *reftype; +char *insname; +char cheminom; +{ +phfig_list *newfig; +phins_list *ins; +phref_list *ref; +chain_list *refs = NULL; +long x, y; +char *ref_; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("COPY_UP_ALL_REF impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if ((WORK_PHFIG->XAB1 | WORK_PHFIG->YAB1 | WORK_PHFIG->XAB2 + | WORK_PHFIG->YAB2) == 0) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs(" COPY_UP_ALL_REF impossible : missing DEF_AB ", stderr); + (void)fprintf(stderr, "on figure %s\n", WORK_PHFIG->NAME); + EXIT(1); + } + + ins = getphins(WORK_PHFIG, insname); + newfig = getphfig(ins->FIGNAME, 'P'); + reftype = namealloc(reftype); + + for (ref = newfig->PHREF; ref != NULL; ref = ref->NEXT) { + ref_ = ref->FIGNAME; + if (ref_ != reftype) + continue; + xyflat(&x, &y, ref->XREF, ref->YREF, ins->XINS, ins->YINS, + newfig->XAB1, newfig->YAB1, newfig->XAB2, newfig->YAB2, + ins->TRANSF); + refs = addchain(refs, (void *)addphref(WORK_PHFIG, ref_, + cheminom == 'Y' ? concatname(insname, ref->NAME) : + ref->NAME, x, y)); + } + /* Absolutly needed for GenView */ + return addptype(NULL, MBK_REFERENCE, refs); +} + +/******************************************************************************* +* function PLACE_VIA_REF * +*******************************************************************************/ +ptype_list *genPLACE_VIA_REF(insname, refname, type) +char *insname; +char *refname; +char type; +{ +phfig_list *ptnewfig; +phins_list *ptins; +phref_list *ptref; +long x, y; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_VIA_REF impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + ptins = getphins(WORK_PHFIG, insname); + ptnewfig = getphfig(ptins->FIGNAME, 'P'); + ptref = getphref(ptnewfig, checkname(refname)); + + xyflat(&x, &y, ptref->XREF, ptref->YREF, ptins->XINS, ptins->YINS, + ptnewfig->XAB1, ptnewfig->YAB1, ptnewfig->XAB2, ptnewfig->YAB2, + ptins->TRANSF); + + return addptype(NULL, MBK_VIA, g_addphvia(WORK_PHFIG, type, x, y, 0, 0, NULL)); +} + +/******************************************************************************* +* function PLACE_CON_REF * +*******************************************************************************/ +ptype_list *genPLACE_CON_REF(insname, refname, conname, layer, width, face) +char *insname; +char *refname; +char *conname; +char layer; +long width; +char face; +{ +phfig_list *newfig; +phins_list *ins; +phcon_list *con = NULL; /* To make -Wall happy */ +phseg_list *seg = NULL; /* may not be overwritten */ +phref_list *ref; +chain_list *chain = NULL; +long x, y; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_CON_REF impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (!(WORK_PHFIG->XAB1 | WORK_PHFIG->YAB1 | WORK_PHFIG->XAB2 + | WORK_PHFIG->YAB2)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_CON_REF impossible : missing DEF_AB ", stderr); + (void)fprintf(stderr, "on figure %s\n", WORK_PHFIG->NAME); + EXIT(1); + } + + ins = getphins(WORK_PHFIG, insname); + newfig = getphfig(ins->FIGNAME, 'P'); + ref = getphref(newfig, checkname(refname)); + + xyflat(&x, &y, ref->XREF, ref->YREF, ins->XINS, ins->YINS, newfig->XAB1, + newfig->YAB1, newfig->XAB2, newfig->YAB2, ins->TRANSF); + + switch (face) { + case WEST : + con = addphcon(WORK_PHFIG, face, checkname(conname), + WORK_PHFIG->XAB1, y, layer, width); + if (x > WORK_PHFIG->XAB1) + seg = addphseg(WORK_PHFIG, layer, width, WORK_PHFIG->XAB1, + y, x, y, (char *)NULL); + break; + case EAST : + con = addphcon(WORK_PHFIG, face, checkname(conname), WORK_PHFIG->XAB2, + y, layer, width); + if (x < WORK_PHFIG->XAB2) + seg = addphseg(WORK_PHFIG, layer, width, x, y, + WORK_PHFIG->XAB2, y, (char *)NULL); + break; + case NORTH : + con = addphcon(WORK_PHFIG, face, checkname(conname), x, + WORK_PHFIG->YAB2, layer, width); + if (y < WORK_PHFIG->YAB2) + seg = addphseg(WORK_PHFIG, layer, width, x, y, x, + WORK_PHFIG->YAB2, (char *)NULL); + break; + case SOUTH : + con = addphcon(WORK_PHFIG, face, checkname(conname), x, + WORK_PHFIG->YAB1, layer, width); + if (y > WORK_PHFIG->YAB1) + seg = addphseg(WORK_PHFIG, layer, width, x, y, x, + WORK_PHFIG->YAB1, (char *)NULL); + break; + } + + /* Absolutly needed for GenView */ + if (seg) + chain = addchain(chain, (void *)seg); + return addptype( + seg ? addptype(NULL, MBK_SEGMENT, addchain(NULL, seg)) : NULL, + MBK_CONNECTOR, + addchain(NULL, con)); +} + +/******************************************************************************* +* function PLACE_SEG_REF * +*******************************************************************************/ +ptype_list *genPLACE_SEG_REF(insname, refname, layer, width, face) +char *insname; +char *refname; +char layer; +long width; +char face; +{ +phfig_list *newfig; +phins_list *ins; +phseg_list *seg = NULL; +phref_list *ref; +long x, y; + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_SEG_REF impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (!(WORK_PHFIG->XAB1 | WORK_PHFIG->YAB1 | WORK_PHFIG->XAB2 + | WORK_PHFIG->YAB2)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("PLACE_SEG_REF impossible : missing DEF_AB ", stderr); + (void)fprintf(stderr, "on figure %s\n", WORK_PHFIG->NAME); + EXIT(1); + } + + ins = getphins(WORK_PHFIG, insname); + newfig = getphfig(ins->FIGNAME, 'P'); + ref = getphref(newfig, checkname(refname)); + + xyflat(&x, &y, ref->XREF, ref->YREF, ins->XINS, ins->YINS, newfig->XAB1, + newfig->YAB1, newfig->XAB2, newfig->YAB2, ins->TRANSF); + + switch (face) { + case WEST : + if (x > WORK_PHFIG->XAB1) + seg = addphseg(WORK_PHFIG, layer, width, WORK_PHFIG->XAB1, + y, x, y, (char *)NULL); + break; + case EAST : + if (x < WORK_PHFIG->XAB2) + seg = addphseg(WORK_PHFIG, layer, width, x, y, + WORK_PHFIG->XAB2, y, (char *)NULL); + break; + case NORTH : + if (y < WORK_PHFIG->YAB2) + seg = addphseg(WORK_PHFIG, layer, width, x, y, + WORK_PHFIG->YAB2, y, (char *)NULL); + break; + case SOUTH : + if (y < WORK_PHFIG->YAB1) + seg = addphseg(WORK_PHFIG, layer, width, x, y, + WORK_PHFIG->YAB1, y, (char *)NULL); + break; + } + return addptype(NULL, MBK_SEGMENT, addchain(NULL, seg)); +} + +/******************************************************************************* +* function GET_REF_X * +*******************************************************************************/ +long genGET_PHFIG_REF_X(refname) +char *refname; +{ +phref_list *ptref; + + ptref = getphref(WORK_PHFIG, checkname(refname)); + return ptref->XREF; +} + +/******************************************************************************* +* function GET_REF_Y * +*******************************************************************************/ +long genGET_PHFIG_REF_Y(refname) +char *refname; +{ +phref_list *ptref; + + ptref = getphref(WORK_PHFIG, checkname(refname)); + return ptref->YREF; +} + +/******************************************************************************* +* function GET_REF_X * +*******************************************************************************/ +long genGET_REF_X(insname, refname) +char *insname, *refname; +{ +phfig_list *ptfig; /* pointer on model of instance called insname */ +phins_list *ptins; /* pointer on instance called insname */ +phref_list *ptref; /* pointer on the refname called ref inside ptins */ +long x_ref, y_ref; /* return values, y_ref here for beauty */ + + ptins = getphins(WORK_PHFIG, insname); + ptfig = getphfig(ptins->FIGNAME, 'P'); + ptref = getphref(ptfig, checkname(refname)); + + xyflat(&x_ref, &y_ref, ptref->XREF, ptref->YREF, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + return x_ref; +} + +/******************************************************************************* +* function GET_REF_Y * +*******************************************************************************/ +long genGET_REF_Y(insname, refname) +char *insname, *refname; +{ +phfig_list *ptfig; /* pointer on model of instance called insname */ +phins_list *ptins; /* pointer on instance called insname */ +phref_list *ptref; /* pointer on the refname called ref inside ptins */ +long x_ref, y_ref; /* return values, x_ref here for beauty */ + + ptins = getphins(WORK_PHFIG, insname); + ptfig = getphfig(ptins->FIGNAME, 'P'); + ptref = getphref(ptfig, checkname(refname)); + + xyflat(&x_ref, &y_ref, ptref->XREF, ptref->YREF, ptins->XINS, ptins->YINS, + ptfig->XAB1, ptfig->YAB1, ptfig->XAB2, ptfig->YAB2, ptins->TRANSF); + return y_ref; +} + +/******************************************************************************* +* set of functions to reverse the `logical' ordering of a set of connectors +* This quite weird function is required by the custom block generators +* so to be able easilly to provide big and little endian bit ordering: +* an option usually called -msb0 +*******************************************************************************/ +#define HARD_CONNECTOR 'H' +#define VIRTUAL_CONNECTOR 'V' +/* connector name : + since connectors may be either hard, mbk phcon, or virtual, mbk phref, + we need to do some tricky businness when working on the overall + connector list. */ +#define HVNAME(c) (*((c)->TYPE == HARD_CONNECTOR \ + ? &((phcon_list *)((c)->DATA))->NAME \ + : &((phref_list *)((c)->DATA))->NAME)) + +static int hvconnectorcmp(flc, slc) +ptype_list **flc, **slc; +{ + return naturalstrcmp(HVNAME(*slc), HVNAME(*flc)); +} + +static ptype_list *sorthvcon(connectors, cmp) +ptype_list *connectors; +int (*cmp)(); +{ +long n, i; +ptype_list *phc, **tc; + + if (!connectors) + return NULL; + + /* first : + count connectors. */ + for (n = 0, phc = connectors; phc; phc = phc->NEXT) + n++; + tc = (ptype_list **)mbkalloc(n * sizeof(ptype_list *)); + for (n = 0, phc = connectors; phc; phc = phc->NEXT) + tc[n++] = phc; + /* second : + sort them. */ + qsort((void *)tc, n, sizeof(ptype_list *), cmp); + /* tables : + the last element of the table is t[n - 1]. + relink the list in the sorted order. */ + n--; + connectors = tc[0]; + for (i = 0; i < n; i++) + tc[i]->NEXT = tc[i + 1]; + tc[n]->NEXT = (ptype_list *)NULL; + mbkfree((void *)tc); + return connectors; +} + +void genREVERSE_PHCON(conname) +char *conname; +{ +ptype_list *c = NULL, *cstart, *cend = NULL; /* To make -Wall happy */ +char *s = namealloc("ref_con"); /* only for a short time, to build the list */ +long i, j, k, sign; +void *hvc; /* hard and virtual connectors */ + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("REVERSE_PHCON impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + + /* first : + create a list containing typed connectors. + virtual connectors are known as "ref_con", and s is initialized + to this nameallocated value. */ + for (hvc = (void *)WORK_PHFIG->PHCON; hvc; + hvc = (void *)((phcon_list *)hvc)->NEXT) + c = addptype(c, HARD_CONNECTOR, hvc); + for (hvc = (void *)WORK_PHFIG->PHREF; hvc; + hvc = (void *)((phref_list *)hvc)->NEXT) + if (((phref_list *)hvc)->FIGNAME == s) + c = addptype(c, VIRTUAL_CONNECTOR, hvc); + + hvc = (void *)sorthvcon(c, hvconnectorcmp); + k = strlen(conname); + for (cstart = (ptype_list *)hvc; cstart; cstart = cstart->NEXT) { + /* not a vector : + If the connector doesn't belong to a vector, nobody cares. */ + if ((s = strchr(HVNAME(cstart), ' ')) == NULL) + continue; + if (!strcmp(vectorradical(HVNAME(cstart)), conname)) { + cend = cstart; + /* simple : + Only one connector s'got this name. */ + if ((c = cstart->NEXT) == NULL) + return; + while (c && !strcmp(vectorradical(HVNAME(c)), conname)) { + cend = c; + c = c->NEXT; + } + break; + } + } + if (!cstart) + return; + i = vectorindex(HVNAME(cstart)); + j = vectorindex(HVNAME(cend)); + /* hypothesys : + since I assume the vectorized values are correct from a mbk point of + view, the algorithm is quit simple. + Given a first vector number and its growing direction, the number of + elements of the list supplies the range. */ + sign = j > i ? 1 : -1; + /* delta : + I need only the delta value between the vector borders. */ + j -= i; + k = vectorindex(HVNAME(cstart)); + for (c = cstart; c != cend->NEXT; c = c->NEXT) { + if (k != vectorindex(HVNAME(c))) { + j -= sign; + k = vectorindex(HVNAME(c)); + } + /* Since for obscure reasons the datapath compiler needs virtual + connector indexing as `name index_track', I have to take care + of that s**t. + If I get that to change in the futur, then only the following + line will be needed : + HVNAME(c) = vectorize(conname, i + j); + */ + if (c->TYPE == HARD_CONNECTOR) + HVNAME(c) = vectorize(conname, i + j); + else { + if ((s = strrchr(HVNAME(c), '_')) != NULL) { + char buffer[256]; /* I don't want to malloc here */ + (void)sprintf(buffer, "%s %ld%s", conname, i + j, s); + HVNAME(c) = namealloc(buffer); + } else + HVNAME(c) = vectorize(conname, i + j); + } + } +} + +/******************************************************************************* +* OUTLINE * +*******************************************************************************/ +void genOUTLINE() +{ +void **now, *next; + + /* delete instances and vias */ + for (now = (void *)&WORK_PHFIG->PHINS; *now;) { + next = (void *)(*(phins_list **)now)->NEXT; + mbkfree(*now); + *now = next; + } + for (now = (void *)&WORK_PHFIG->PHVIA; *now;) { + next = (void *)(*(phvia_list **)now)->NEXT; + mbkfree(*now); + *now = next; + } + /* delete the segments other than feed through */ + for (now = (void *)&WORK_PHFIG->PHSEG; *now;) { + if ((*(phseg_list **)now)->LAYER == TPOLY || + (*(phseg_list **)now)->LAYER == TALU1 || + (*(phseg_list **)now)->LAYER == TALU2 || + (*(phseg_list **)now)->LAYER == TALU3) + now = (void **)&(*(phseg_list **)now)->NEXT; + else { + next = (void *)(*(phseg_list **)now)->NEXT; + mbkfree(*now); + *now = next; + } + } +} + + +/******************************************************************************* +* logical user functions * +*******************************************************************************/ +#include + +long num_index = 0; + +/******************************************************************************* +* function DEF_LOFIG * +*******************************************************************************/ +void genDEF_LOFIG(name) +char *name; +{ +char *s; +lofig_list *ptfig; + + if (!CATA_LIB || !WORK_LIB) + mbkenv(); + s = namealloc(name); + + for (ptfig = HEAD_LOFIG; ptfig; ptfig = ptfig->NEXT) + if (ptfig->NAME == s) + break; + if (ptfig == NULL) + WORK_LOFIG = addlofig(s); + else + WORK_LOFIG = ptfig; + + lolist = addchain(lolist, WORK_LOFIG); +} + +/******************************************************************************* +* function LOAD_LOFIG * +*******************************************************************************/ +void genLOAD_LOFIG(name) +char *name; +{ + if (!CATA_LIB || !WORK_LIB) + mbkenv(); + WORK_LOFIG = getlofig(name, 'A'); + lolist = addchain(lolist, WORK_LOFIG); +} + +/******************************************************************************* +* function SAVE_LOFIG * +*******************************************************************************/ +void genSAVE_LOFIG() +{ +losig_list *s; +locon_list *c; +chain_list *l; +ptype_list *t; +int external; /* more that one external connector on the same net? */ + + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SAVE_LOFIG impossible : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + /* sets correct signal type : + the use of some genlib function may create figures with badly typed + external signal. */ + for (c = WORK_LOFIG->LOCON; c; c = c->NEXT) + c->SIG->TYPE = EXTERNAL; + lofigchain(WORK_LOFIG); /* builds up a list of connectors on each signals */ + for (s = WORK_LOFIG->LOSIG; s; s = s->NEXT) { + external = 0; /* no external connector */ + t = getptype(s->USER, (long)LOFIGCHAIN); + for (l = (chain_list *)t->DATA; l; l = l->NEXT) { + c = (locon_list *)l->DATA; + if (c->TYPE == EXTERNAL) + external++; + } + if (external > 1) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("The following external connectors are", stderr); + (void)fputs(" on the same signal: \n", stderr); + for (l = (chain_list *)t->DATA; l; l = l->NEXT) { + c = (locon_list *)l->DATA; + if (c->TYPE == EXTERNAL) + (void)fprintf(stderr, "\t%s\n", c->NAME); + } + (void)fprintf(stderr, "\ton signal %s\n", getsigname(c->SIG)); + EXIT(1); + } + } + checkloconorder(WORK_LOFIG->LOCON); + sortlosig(&WORK_LOFIG->LOSIG); + savelofig(WORK_LOFIG); + lolist = delchain(lolist, lolist); + if (lolist) + WORK_LOFIG = (lofig_list *)lolist->DATA; + else + WORK_LOFIG = NULL; +} +/******************************************************************************* +* function LOINS * +*******************************************************************************/ +void genLOINS(va_alist) +va_dcl +{ +losig_list *ptsig; +chain_list *ptchain = NULL, *ptchain1, *ptchain2 = NULL , *ptchain3; +va_list arg; +char *figname, *insname, *signame; +lofig_list *ptfig; + + va_start(arg); + figname = namealloc(va_arg(arg, char *)); + insname = va_arg(arg, char *); + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "Illegal LOINS %s : ", insname); + (void)fputs("missing DEF_LOFIG\n", stderr); + EXIT(1); + } + + ptfig = getlofig(figname, 'P'); + if (hassep(insname)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nIllegal LOINS : the ", stderr); + (void)fprintf(stderr, + "instance name `%s' contains an illegal character\n", + insname); + EXIT(1); + } + /* expanding the bus names */ + while ((signame = va_arg(arg, char *)) != NULL) { + if (!is_bus(signame)) { /* normal signal */ + if (!strcmp(vectorradical(checkname(signame)), UNCONNECTED)) + continue; /* Skip this signal */ + ptchain2 = addchain(ptchain2, (void *)namealloc(checkname(signame))); + } else { /* it's a bus */ + long i, from, to; + char *zig, *newzig; + chain_list *ptchain4 = NULL; + + zig = (char *)mbkalloc((unsigned int)(strlen(signame) + 1)); + if (!bus_decod(signame, zig, &from, &to)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "Bad signal bus name %s\n", signame); + EXIT(1); + } + /* Do not add these signals to the list if they are not + * required: skip them and handle the next ones */ + if (!strcmp(zig, UNCONNECTED)) { + mbkfree(zig); + continue; + } + newzig = (char *)mbkalloc((unsigned int)(strlen(signame) + 1)); + if (from > to) + for (i = from; i >= to; i--) { + (void)sprintf(newzig, "%s %ld", zig, i); + ptchain4 = addchain(ptchain4, (void *)namealloc(newzig)); + } + else + for (i = from; i <= to; i++) { + (void)sprintf(newzig, "%s %ld", zig, i); + ptchain4 = addchain(ptchain4, (void *)namealloc(newzig)); + } + for (ptchain1 = ptchain4; ptchain1->NEXT != NULL; + ptchain1 = ptchain1->NEXT); + ptchain1->NEXT = ptchain2; + ptchain2 = ptchain4; + + mbkfree(zig); + mbkfree(newzig); + } + } + ptchain2 = (chain_list *)reverse(ptchain2); + + /* adding the signals if needed */ + for (ptchain3 = ptchain2; ptchain3 != NULL; ptchain3 = ptchain3->NEXT) { + signame = namealloc((char *)ptchain3->DATA); + for (ptsig = WORK_LOFIG->LOSIG; ptsig != NULL; ptsig = ptsig->NEXT) { + for (ptchain1 = ptsig->NAMECHAIN; ptchain1; ptchain1 = ptchain1->NEXT) + if (ptchain1->DATA == (void *)signame) + break; + if (ptchain1 != NULL) + break; + } + if (ptsig == NULL) { + num_index++; + ptsig = addlosig(WORK_LOFIG, num_index, + addchain((chain_list *)NULL, (void *)signame), + INTERNAL); + } + ptchain = addchain(ptchain, (void *)ptsig); + } + (void)addloins(WORK_LOFIG, insname, ptfig, ptchain); + va_end(arg); +} + +/******************************************************************************* +* function LOINSA * + Aceepts an array to pass the signal values instead of a va_list +*******************************************************************************/ +#define MAX_ARRAY_SIGS 1024 +/* Put that outside of the LOINSA function in order to minimize the + * stack frame required, and we don't need to be reentrant */ +static char *_[MAX_ARRAY_SIGS]; /* Accepts only that many signals, I hope it is + enough for one level of hierarchy */ +void genLOINSA(char *model, char *instance, char *signals[]) +{ + int ns; + + for (ns = 0; + signals[ns]; + ns++); + if (ns > MAX_ARRAY_SIGS) { + fprintf(stderr, "LOINSA: Too many signals in array\n"); + exit(1); + } + /* And now a very nice call, to be presented in programmation + * booklets as an exemple */ + memset(_, 0, (ns + 1) * sizeof(*_)); + memcpy(_, signals, ns * sizeof(*_)); + genLOINS(model, instance, + _[0], _[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], _[93], _[94], _[95], _[96], _[97], _[98], _[99], _[100], _[101], + _[102], _[103], _[104], _[105], _[106], _[107], _[108], _[109], _[110], _[111], + _[112], _[113], _[114], _[115], _[116], _[117], _[118], _[119], _[120], _[121], + _[122], _[123], _[124], _[125], _[126], _[127], _[128], _[129], _[130], _[131], + _[132], _[133], _[134], _[135], _[136], _[137], _[138], _[139], _[140], _[141], + _[142], _[143], _[144], _[145], _[146], _[147], _[148], _[149], _[150], _[151], + _[152], _[153], _[154], _[155], _[156], _[157], _[158], _[159], _[160], _[161], + _[162], _[163], _[164], _[165], _[166], _[167], _[168], _[169], _[170], _[171], + _[172], _[173], _[174], _[175], _[176], _[177], _[178], _[179], _[180], _[181], + _[182], _[183], _[184], _[185], _[186], _[187], _[188], _[189], _[190], _[191], + _[192], _[193], _[194], _[195], _[196], _[197], _[198], _[199], _[200], _[201], + _[202], _[203], _[204], _[205], _[206], _[207], _[208], _[209], _[210], _[211], + _[212], _[213], _[214], _[215], _[216], _[217], _[218], _[219], _[220], _[221], + _[222], _[223], _[224], _[225], _[226], _[227], _[228], _[229], _[230], _[231], + _[232], _[233], _[234], _[235], _[236], _[237], _[238], _[239], _[240], _[241], + _[242], _[243], _[244], _[245], _[246], _[247], _[248], _[249], _[250], _[251], + _[252], _[253], _[254], _[255], _[256], _[257], _[258], _[259], _[260], _[261], + _[262], _[263], _[264], _[265], _[266], _[267], _[268], _[269], _[270], _[271], + _[272], _[273], _[274], _[275], _[276], _[277], _[278], _[279], _[280], _[281], + _[282], _[283], _[284], _[285], _[286], _[287], _[288], _[289], _[290], _[291], + _[292], _[293], _[294], _[295], _[296], _[297], _[298], _[299], _[300], _[301], + _[302], _[303], _[304], _[305], _[306], _[307], _[308], _[309], _[310], _[311], + _[312], _[313], _[314], _[315], _[316], _[317], _[318], _[319], _[320], _[321], + _[322], _[323], _[324], _[325], _[326], _[327], _[328], _[329], _[330], _[331], + _[332], _[333], _[334], _[335], _[336], _[337], _[338], _[339], _[340], _[341], + _[342], _[343], _[344], _[345], _[346], _[347], _[348], _[349], _[350], _[351], + _[352], _[353], _[354], _[355], _[356], _[357], _[358], _[359], _[360], _[361], + _[362], _[363], _[364], _[365], _[366], _[367], _[368], _[369], _[370], _[371], + _[372], _[373], _[374], _[375], _[376], _[377], _[378], _[379], _[380], _[381], + _[382], _[383], _[384], _[385], _[386], _[387], _[388], _[389], _[390], _[391], + _[392], _[393], _[394], _[395], _[396], _[397], _[398], _[399], _[400], _[401], + _[402], _[403], _[404], _[405], _[406], _[407], _[408], _[409], _[410], _[411], + _[412], _[413], _[414], _[415], _[416], _[417], _[418], _[419], _[420], _[421], + _[422], _[423], _[424], _[425], _[426], _[427], _[428], _[429], _[430], _[431], + _[432], _[433], _[434], _[435], _[436], _[437], _[438], _[439], _[440], _[441], + _[442], _[443], _[444], _[445], _[446], _[447], _[448], _[449], _[450], _[451], + _[452], _[453], _[454], _[455], _[456], _[457], _[458], _[459], _[460], _[461], + _[462], _[463], _[464], _[465], _[466], _[467], _[468], _[469], _[470], _[471], + _[472], _[473], _[474], _[475], _[476], _[477], _[478], _[479], _[480], _[481], + _[482], _[483], _[484], _[485], _[486], _[487], _[488], _[489], _[490], _[491], + _[492], _[493], _[494], _[495], _[496], _[497], _[498], _[499], _[500], _[501], + _[502], _[503], _[504], _[505], _[506], _[507], _[508], _[509], _[510], _[511], + _[512], _[513], _[514], _[515], _[516], _[517], _[518], _[519], _[520], _[521], + _[522], _[523], _[524], _[525], _[526], _[527], _[528], _[529], _[530], _[531], + _[532], _[533], _[534], _[535], _[536], _[537], _[538], _[539], _[540], _[541], + _[542], _[543], _[544], _[545], _[546], _[547], _[548], _[549], _[550], _[551], + _[552], _[553], _[554], _[555], _[556], _[557], _[558], _[559], _[560], _[561], + _[562], _[563], _[564], _[565], _[566], _[567], _[568], _[569], _[570], _[571], + _[572], _[573], _[574], _[575], _[576], _[577], _[578], _[579], _[580], _[581], + _[582], _[583], _[584], _[585], _[586], _[587], _[588], _[589], _[590], _[591], + _[592], _[593], _[594], _[595], _[596], _[597], _[598], _[599], _[600], _[601], + _[602], _[603], _[604], _[605], _[606], _[607], _[608], _[609], _[610], _[611], + _[612], _[613], _[614], _[615], _[616], _[617], _[618], _[619], _[620], _[621], + _[622], _[623], _[624], _[625], _[626], _[627], _[628], _[629], _[630], _[631], + _[632], _[633], _[634], _[635], _[636], _[637], _[638], _[639], _[640], _[641], + _[642], _[643], _[644], _[645], _[646], _[647], _[648], _[649], _[650], _[651], + _[652], _[653], _[654], _[655], _[656], _[657], _[658], _[659], _[660], _[661], + _[662], _[663], _[664], _[665], _[666], _[667], _[668], _[669], _[670], _[671], + _[672], _[673], _[674], _[675], _[676], _[677], _[678], _[679], _[680], _[681], + _[682], _[683], _[684], _[685], _[686], _[687], _[688], _[689], _[690], _[691], + _[692], _[693], _[694], _[695], _[696], _[697], _[698], _[699], _[700], _[701], + _[702], _[703], _[704], _[705], _[706], _[707], _[708], _[709], _[710], _[711], + _[712], _[713], _[714], _[715], _[716], _[717], _[718], _[719], _[720], _[721], + _[722], _[723], _[724], _[725], _[726], _[727], _[728], _[729], _[730], _[731], + _[732], _[733], _[734], _[735], _[736], _[737], _[738], _[739], _[740], _[741], + _[742], _[743], _[744], _[745], _[746], _[747], _[748], _[749], _[750], _[751], + _[752], _[753], _[754], _[755], _[756], _[757], _[758], _[759], _[760], _[761], + _[762], _[763], _[764], _[765], _[766], _[767], _[768], _[769], _[770], _[771], + _[772], _[773], _[774], _[775], _[776], _[777], _[778], _[779], _[780], _[781], + _[782], _[783], _[784], _[785], _[786], _[787], _[788], _[789], _[790], _[791], + _[792], _[793], _[794], _[795], _[796], _[797], _[798], _[799], _[800], _[801], + _[802], _[803], _[804], _[805], _[806], _[807], _[808], _[809], _[810], _[811], + _[812], _[813], _[814], _[815], _[816], _[817], _[818], _[819], _[820], _[821], + _[822], _[823], _[824], _[825], _[826], _[827], _[828], _[829], _[830], _[831], + _[832], _[833], _[834], _[835], _[836], _[837], _[838], _[839], _[840], _[841], + _[842], _[843], _[844], _[845], _[846], _[847], _[848], _[849], _[850], _[851], + _[852], _[853], _[854], _[855], _[856], _[857], _[858], _[859], _[860], _[861], + _[862], _[863], _[864], _[865], _[866], _[867], _[868], _[869], _[870], _[871], + _[872], _[873], _[874], _[875], _[876], _[877], _[878], _[879], _[880], _[881], + _[882], _[883], _[884], _[885], _[886], _[887], _[888], _[889], _[890], _[891], + _[892], _[893], _[894], _[895], _[896], _[897], _[898], _[899], _[900], _[901], + _[902], _[903], _[904], _[905], _[906], _[907], _[908], _[909], _[910], _[911], + _[912], _[913], _[914], _[915], _[916], _[917], _[918], _[919], _[920], _[921], + _[922], _[923], _[924], _[925], _[926], _[927], _[928], _[929], _[930], _[931], + _[932], _[933], _[934], _[935], _[936], _[937], _[938], _[939], _[940], _[941], + _[942], _[943], _[944], _[945], _[946], _[947], _[948], _[949], _[950], _[951], + _[952], _[953], _[954], _[955], _[956], _[957], _[958], _[959], _[960], _[961], + _[962], _[963], _[964], _[965], _[966], _[967], _[968], _[969], _[970], _[971], + _[972], _[973], _[974], _[975], _[976], _[977], _[978], _[979], _[980], _[981], + _[982], _[983], _[984], _[985], _[986], _[987], _[988], _[989], _[990], _[991], + _[992], _[993], _[994], _[995], _[996], _[997], _[998], _[999], _[1000], _[1001], + _[1002], _[1003], _[1004], _[1005], _[1006], _[1007], _[1008], _[1009], _[1010], _[1011], + _[1012], _[1013], _[1014], _[1015], _[1016], _[1017], _[1018], _[1019], _[1020], _[1021], + _[1022], _[1023]); +} + +/******************************************************************************* +* function LOINSE * +*******************************************************************************/ +void genLOINSE(va_alist) +va_dcl +{ +va_list arg; +char *figname, *insname, *signame; +lofig_list *ptfig; +char con[100], sig[100]; +int icon, jcon, isig, jsig; +int inc, ins, nb, nbs; +ptype_list *consiglist = NULL, *pcon; +locon_list *locon; +chain_list *sigchain = NULL, *chain; +losig_list *ptsig; +chain_list *ptchain = NULL; + + + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal LOINSE : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + + va_start(arg); + figname = namealloc(va_arg(arg, char *)); + ptfig = getlofig(figname, 'P'); + insname = va_arg(arg, char *); + if (hassep(insname)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nIllegal LOINSE : the ", stderr); + (void)fprintf(stderr, + "instance name `%s' contains an illegal character\n", + insname); + EXIT(1); + } + + while ((signame = va_arg(arg, char *)) != NULL) { + char *s, *buffer = mbkstrdup(signame); /* I shall not alter user strings */ + + signame = buffer; + for (s = signame; *s != '\0'; s++) + if (*s == ':') { + for (s = signame; *s != '\0'; s++) + if (*s == '[' || *s == ']') + *s = ' '; + break; + } + if (sscanf(signame, " %s %d:%d => %s %d:%d ", con, &icon, &jcon, sig, &isig, &jsig) == 6) { + if (abs(icon - jcon) != abs(isig - jsig) || icon == jcon) { + + fprintf(stderr, "Not a valid range : %s[%d:%d] => %s[%d:%d]\n", + con, icon, jcon, sig, isig, jsig); + EXIT(1); + } + inc = (icon > jcon) ? -1 : 1; + ins = (isig > jsig) ? -1 : 1; + for (nb = icon, nbs = isig; nb != (jcon + inc); nbs += ins, nb += inc) + consiglist = addptype(consiglist, + (long)vectorize(con, nb), + vectorize(sig, nbs)); + } else if (sscanf(signame, " %s => %s ", con, sig) == 2) + consiglist = addptype(consiglist, (long)namealloc(checkname(con)), + namealloc(checkname(sig))); + else { + fprintf(stderr, "Illegal signal affectation syntax : %s\n", signame); + EXIT(1); + } + mbkfree(signame); + } + + /* Put sigs and cons in dictionnary */ + for (pcon = consiglist; pcon; pcon = pcon->NEXT) { + pcon->TYPE = (long)namealloc((char *)pcon->TYPE); + pcon->DATA = (void *)namealloc((char *)pcon->DATA); + } + + /* Check Connectors name consistency */ + for (locon = ptfig->LOCON; locon; locon = locon->NEXT) { + for (pcon = consiglist; pcon; pcon = pcon->NEXT) + if (locon->NAME == (char *)pcon->TYPE) { + sigchain = addchain(sigchain, pcon->DATA); + pcon->TYPE = 0L; + break; + } + if (pcon == NULL) { + fprintf(stderr, "No model connector %s for instance %s\n", + locon->NAME, insname); + EXIT(1); + } + } + + for (pcon = consiglist; pcon; pcon = pcon->NEXT) + if (pcon->TYPE != 0L) { + fprintf(stderr, "Connector %s in instance %s do not exist in model", + (char *)pcon->TYPE, insname); + fprintf(stderr, " in model %s\n", figname); + EXIT(1); + } + + /* adding the signals if needed */ + for (chain = sigchain; chain; chain = chain->NEXT) { + signame = (char *)chain->DATA; + for (ptsig = WORK_LOFIG->LOSIG; ptsig; ptsig = ptsig->NEXT) { + for (sigchain = ptsig->NAMECHAIN; sigchain; sigchain = sigchain->NEXT) + if (sigchain->DATA == (void *)signame) + break; + if (sigchain != NULL) + break; + } + if (ptsig == NULL) + ptsig = addlosig(WORK_LOFIG, ++num_index, + addchain((chain_list *)NULL, (void *)signame), 'I'); + ptchain = addchain(ptchain, (void *)ptsig); + } + (void)addloins(WORK_LOFIG, insname, ptfig, ptchain); + va_end(arg); +} + +/******************************************************************************* +* function LOSIG * +*******************************************************************************/ +void genLOSIG(signame) +char *signame; +{ +losig_list *ptsig; +chain_list *ptchain, *ptchain1 = NULL; +char *s; + + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal LOSIG : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + + if (!is_bus(signame)) { + s = namealloc(checkname(signame)); + for (ptsig = WORK_LOFIG->LOSIG; ptsig; ptsig = ptsig->NEXT) { + for (ptchain = ptsig->NAMECHAIN; ptchain != NULL; + ptchain = ptchain->NEXT) + if (ptchain->DATA == (void *)s) + break; + if (ptchain != NULL) + break; + } + if (ptsig == NULL) { + num_index++; + ptsig = addlosig(WORK_LOFIG, num_index, + addchain((chain_list *)NULL, (void *)s), + INTERNAL); + } + } else { /* expanding signal names */ + long from, to, i; + char *zig, *newzig; + + s = (char *)mbkalloc((unsigned int)(strlen(signame) + 1)); + (void)strcpy(s, signame); + + /* expanding signal names */ + zig = (char *)mbkalloc((unsigned int)(strlen(signame) + 1)); + newzig = (char *)mbkalloc((unsigned int)(strlen(signame) + 1)); + + if (!bus_decod(s, zig, &from, &to)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "LOSIG : Bad signal bus name %s\n", s); + EXIT(1); + } + mbkfree((void *)s); + if (from > to) { + for (i = from; i >= to; i--) { + (void)sprintf(newzig, "%s %ld", zig, i); + ptchain1 = addchain(ptchain1, (void *)namealloc(newzig)); + } + } else { + for (i = from; i <= to; i++) { + (void)sprintf(newzig, "%s %ld", zig, i); + ptchain1 = addchain(ptchain1, (void *)namealloc(newzig)); + } + } + mbkfree((void *)zig); + mbkfree((void *)newzig); + while (ptchain1 != NULL) { + s = (char *)ptchain1->DATA; + for (ptsig = WORK_LOFIG->LOSIG; ptsig; ptsig = ptsig->NEXT) { + for (ptchain = ptsig->NAMECHAIN; ptchain + != NULL; ptchain = ptchain->NEXT) + if (ptchain->DATA == (void *)s) + break; + if (ptchain != NULL) + break; + } + if (ptsig == NULL) { + num_index++; + ptsig = addlosig(WORK_LOFIG, num_index, + addchain((chain_list *)NULL, (void *)s), + INTERNAL); + } + ptchain1 = ptchain1->NEXT; + } + ptchain1 = (chain_list *)reverse(ptchain1); + } +} + +/******************************************************************************* +* function LOCON * +*******************************************************************************/ +void genLOCON(conname, direction, signame) +char *conname, direction, *signame; +{ +losig_list * ptsig; +chain_list * ptchain, *ptchain1 = NULL, *ptchain2 = NULL; +char *s = NULL; /* To make -Wall happy */ + + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal LOCON : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + /* one shall not deeclare connectors after instances */ + if (WORK_LOFIG->LOINS != NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal LOCON : ", stderr); + (void)fputs("all LOCON must be defined before any LOINS\n", stderr); + EXIT(1); + } + + if (!is_bus(signame)) { + s = namealloc(checkname(signame)); + + /* Skip this connector and signal if it shall not be connected */ + if (!strcmp(s, UNCONNECTED)) { + if (is_bus(checkname(conname))) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "Illegal LOCON %s: different ", conname); + (void)fprintf(stderr, "number of connectors and signals %s\n", + signame); + EXIT(1); + } + return; + } + + for (ptsig = WORK_LOFIG->LOSIG; ptsig; ptsig = ptsig->NEXT) { + for (ptchain = ptsig->NAMECHAIN; ptchain != NULL; + ptchain = ptchain->NEXT) + if (ptchain->DATA == (void *)s) + break; + if (ptchain != NULL) + break; + } + if (ptsig == NULL) { + num_index++; + ptsig = addlosig(WORK_LOFIG, num_index, + addchain((chain_list *)NULL, (void *)s), + EXTERNAL); + } + (void)addlocon(WORK_LOFIG, checkname(conname), ptsig, direction); + } else { /* expanding connector names */ + long from, to, dc, ds, i; + char *gon, *newgon; + char *zig, *newzig; + + gon = (char *)mbkalloc((unsigned int)(strlen(conname) + 1)); + if (!bus_decod(conname, gon, &from, &to)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "LOCON : the connector is the alone whereas the signals are many %s\n", conname); + EXIT(1); + } + /* Skip the unconnected connectors: shall I also check the + * signals in order to ensure consistency of size ? + * Probably, ... */ + if (!strcmp(gon, UNCONNECTED)) { + mbkfree(gon); + dc = from > to ? from - to : to - from; + zig = (char *)mbkalloc((unsigned int)(strlen(signame) + 1)); + if (!bus_decod(signame, zig, &from, &to)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "LOCON %s : Bad signal bus name %s\n", + conname, signame); + EXIT(1); + } + ds = from > to ? from - to : to - from; + if (dc != ds) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "Illegal LOCON %s: different ", conname); + (void)fprintf(stderr, "number of connectors and signals %s\n", + signame); + EXIT(1); + } + return; + } + newgon = (char *)mbkalloc((unsigned int)(strlen(conname) + 1)); + if (from > to) { + dc = from - to; + for (i = from; i >= to; i--) { + (void)sprintf(newgon, "%s %ld", gon, i); + ptchain1 = addchain(ptchain1, (void *)namealloc(newgon)); + } + } else { + dc = to - from; + for (i = from; i <= to; i++) { + (void)sprintf(newgon, "%s %ld", gon, i); + ptchain1 = addchain(ptchain1, (void *)namealloc(newgon)); + } + } + mbkfree((void *)gon); + mbkfree((void *)newgon); + /* expanding signal names */ + zig = (char *)mbkalloc((unsigned int)(strlen(signame) + 1)); + newzig = (char *)mbkalloc((unsigned int)(strlen(signame) + 1)); + + if (!bus_decod(signame, zig, &from, &to)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "LOCON : Bad signal bus name %s\n", s); + EXIT(1); + } + if (from > to) { + ds = from - to; + for (i = from; i >= to; i--) { + (void)sprintf(newzig, "%s %ld", zig, i); + ptchain2 = addchain(ptchain2, (void *)namealloc(newzig)); + } + } else { + ds = to - from; + for (i = from; i <= to; i++) { + (void)sprintf(newzig, "%s %ld", zig, i); + ptchain2 = addchain(ptchain2, (void *)namealloc(newzig)); + } + } + mbkfree((void *)zig); + mbkfree((void *)newzig); + if (dc != ds) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs( + "Illegal LOCON : different number of signals and connectors\n", + stderr); + EXIT(1); + } + ptchain1 = (chain_list *)reverse(ptchain1); + ptchain2 = (chain_list *)reverse(ptchain2); + + while (ptchain1 != NULL) { + gon = (char *)ptchain1->DATA; + s = (char *)ptchain2->DATA; + for (ptsig = WORK_LOFIG->LOSIG; ptsig; ptsig = ptsig->NEXT) { + for (ptchain = ptsig->NAMECHAIN; ptchain + != NULL; ptchain = ptchain->NEXT) + if (ptchain->DATA == (void *)s) + break; + if (ptchain != NULL) + break; + } + if (ptsig == NULL) { + num_index++; + ptsig = addlosig(WORK_LOFIG, num_index, + addchain((chain_list *)NULL, (void *)s), + EXTERNAL); + } + (void)addlocon(WORK_LOFIG, gon, ptsig, direction); + ptchain1 = ptchain1->NEXT; + ptchain2 = ptchain2->NEXT; + } + } +} + +/******************************************************************************* +* function LOTRS * +*******************************************************************************/ +void genLOTRS(type, width, length, grid, source, drain) +char type; +unsigned short width, length; +char *grid, *source, *drain; +{ +int i = 0; +losig_list *s_grid = NULL, *s_source = NULL, *s_drain = NULL, *ptsig = NULL; +chain_list *ptchain; +char *signame = NULL; /* To make -Wall happy */ + + for (i = 0; i < 3; i++) { + switch (i) { + case 0 : + signame = namealloc(checkname(grid)); + break; + case 1 : + signame = namealloc(checkname(source)); + break; + case 2 : + signame = namealloc(checkname(drain)); + break; + } + for (ptsig = WORK_LOFIG->LOSIG; ptsig; ptsig = ptsig->NEXT) { + for (ptchain = ptsig->NAMECHAIN; ptchain; ptchain = ptchain->NEXT) + if (ptchain->DATA == (void *)signame) + break; + if (ptchain) + break; + } + if (!ptsig) { + num_index++; + ptsig = addlosig(WORK_LOFIG, num_index, + addchain((chain_list *)NULL, (void *)signame), + INTERNAL); + } + switch (i) { + case 0 : + s_grid = ptsig; + break; + case 1 : + s_source = ptsig; + break; + case 2 : + s_drain = ptsig; + break; + } + } + (void)addlotrs(WORK_LOFIG, type, 0L, 0L, width, length, 0, 0, 0, 0, + s_grid, s_source, s_drain, NULL, NULL); +} + +/******************************************************************************* +* function LOSIGMERGE * +*******************************************************************************/ +void genLOSIGMERGE(sig1, sig2) +char *sig1, *sig2; +{ +losig_list *ls0, *ls1, *ls2; +locon_list *c; +loins_list *i; +lotrs_list *t; +chain_list *chain; + + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal LOMERGE : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + sig1 = namealloc(checkname(sig1)); + sig2 = namealloc(checkname(sig2)); + for (ls1 = WORK_LOFIG->LOSIG; ls1; ls1 = ls1->NEXT) { + for (chain = ls1->NAMECHAIN; chain; chain = chain->NEXT) + if (chain->DATA == (void *)sig1) + break; + if (chain) + break; + } + for (ls2 = WORK_LOFIG->LOSIG; ls2; ls2 = ls2->NEXT) { + for (chain = ls2->NAMECHAIN; chain; chain = chain->NEXT) + if (chain->DATA == (void *)sig2) + break; + if (chain) + break; + } + if (ls1 == NULL && ls2 == NULL) { /* none of them exists ! */ + num_index++; + chain = addchain((chain_list *)NULL, (void *)sig1); + chain = addchain(chain, (void *)sig2); + (void)addlosig(WORK_LOFIG, num_index, chain, INTERNAL); + return; + } + if (ls1 == ls2) /* already joined!, just return */ + return; + if (ls1 == NULL || ls2 == NULL) { /* one of them exists ! */ + if (ls1 == NULL) + ls2->NAMECHAIN = addchain(ls2->NAMECHAIN, (void *)sig1); + else + ls1->NAMECHAIN = addchain(ls1->NAMECHAIN, (void *)sig2); + return; + } + /* if both exists */ + if (ls2->TYPE == EXTERNAL) { /* delete ls1 */ + ls0 = ls2; /* swap ls1 and ls2 for deleting purpose */ + ls2 = ls1; + ls1 = ls0; + } + for (chain = ls2->NAMECHAIN; chain; chain = chain->NEXT) + ls1->NAMECHAIN = addchain(ls1->NAMECHAIN, chain->DATA); + + /* delete ls2, why not */ + for (c = WORK_LOFIG->LOCON; c; c = c->NEXT) + if (c->SIG == ls2) + c->SIG = ls1; + for (i = WORK_LOFIG->LOINS; i; i = i->NEXT) + for (c = i->LOCON; c; c = c->NEXT) + if (c->SIG == ls2) + c->SIG = ls1; + for (t = WORK_LOFIG->LOTRS; t; t = t->NEXT) { + if (t->GRID->SIG == ls2) + t->GRID->SIG = ls1; + if (t->DRAIN->SIG == ls2) + t->DRAIN->SIG = ls1; + if (t->SOURCE->SIG == ls2) + t->SOURCE->SIG = ls1; + } +#if 0 + if (ls2->PRCN) { + if (!ls1->PRCN) + addlorcnet(ls1); + (void)addcapa(ls1, getcapa(ls2)); + } +#endif + (void)dellosig(WORK_LOFIG, ls2->INDEX); +} + +/******************************************************************************* +* function FLATTEN_LOFIG * +*******************************************************************************/ +void genFLATTEN_LOFIG(insname, concat) +char *insname; +char concat; +{ +long i = 0; +losig_list *s; + + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal FLATTEN_LOFIG : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + flattenlofig(WORK_LOFIG, insname, concat); + /* flattenlofig will create many signals, and genlib should be kept + up to date with the last used index.*/ + for (s = WORK_LOFIG->LOSIG; s; s = s->NEXT) + if (s->INDEX > i) + i = s->INDEX; + num_index = ++i; +} + +/******************************************************************************* +* flattens FLATTEN_ALL_LOINS * +*******************************************************************************/ +void genFLATTEN_ALL_LOINS(concat, catal) +char concat, catal; +{ +chain_list *c, *namelist = NULL; +loins_list *l; +long i = 0; +losig_list *s; + + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal FLATTEN_ALL_LOINS : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + + for (l = WORK_LOFIG->LOINS; l; l = l->NEXT) + if (catal == NO || !incatalog(l->FIGNAME)) + namelist = addchain(namelist, (void *)l->INSNAME); + + for (c = namelist; c; c = c->NEXT) + flattenlofig(WORK_LOFIG, (char *)c->DATA, concat); + + freechain(namelist); + /* flattenlofig will create many signals, and genlib should be kept + up to date with the last used index.*/ + for (s = WORK_LOFIG->LOSIG; s; s = s->NEXT) + if (s->INDEX > i) + i = s->INDEX; + num_index = ++i; +} + +/******************************************************************************* +* function UNFLATTEN_LOFIG * +*******************************************************************************/ +void genUNFLATTEN_LOFIG(va_alist) +va_dcl +{ +va_list instancelist; +char *modelname, *instancename, *iname; +chain_list *ilist = NULL; + + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal UNFLATTEN_LOFIG : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + va_start(instancelist); + if ((modelname = va_arg(instancelist, char *)) == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal UNFLATTEN_LOFIG : missing arguments\n", stderr); + EXIT(1); + }; + if ((instancename = va_arg(instancelist, char *)) == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal UNFLATTEN_LOFIG : only one arguments\n", stderr); + EXIT(1); + }; + while ((iname = va_arg(instancelist, char *)) != NULL) + ilist = addchain(ilist, (void *)getloins(WORK_LOFIG, iname)); + /* this new hierachy level needs to be saved */ + savelofig(unflattenlofig(WORK_LOFIG, modelname, instancename, ilist)); + freechain(ilist); + va_end(instancelist); +} + +/******************************************************************************* +* standard-cell user functions * +*******************************************************************************/ + +/******************************************************************************* +* function SC_PLACE * +*******************************************************************************/ +void genSC_PLACE(insname, sym, x, y) +char *insname; +int sym; +long x, y; +{ +loins_list * ptins; +char *s = namealloc(insname); + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_PLACE impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_PLACE impossible : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + for (ptins = WORK_LOFIG->LOINS; ptins != NULL; ptins = ptins->NEXT) + if (ptins->INSNAME == s) + break; + if (ptins == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, + "SC_PLACE impossible : no logical instance %s in figure %s\n", + insname, WORK_LOFIG->NAME); + EXIT(1); + } + genPLACE(ptins->FIGNAME, s, sym, x, y); +} + +/******************************************************************************* +* function SC_RIGHT * +*******************************************************************************/ +void genSC_RIGHT(insname, sym) +char *insname; +int sym; +{ +loins_list * ptins; +char *s = namealloc(insname); + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_RIGHT impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_RIGHT impossible : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + for (ptins = WORK_LOFIG->LOINS; ptins != NULL; ptins = ptins->NEXT) + if (ptins->INSNAME == s) + break; + if (ptins == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, + "SC_RIGHT impossible : no logical instance %s in figure %s\n", + insname, WORK_LOFIG->NAME); + EXIT(1); + } + genPLACE_RIGHT(ptins->FIGNAME, s, sym); +} + +/******************************************************************************* +* function SC_LEFT * +*******************************************************************************/ +void genSC_LEFT(insname, sym) +char *insname; +int sym; +{ +loins_list *ptins; +char *s = namealloc(insname); + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_LEFT impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_LEFT impossible : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + for (ptins = WORK_LOFIG->LOINS; ptins != NULL; ptins = ptins->NEXT) + if (ptins->INSNAME == s) + break; + if (ptins == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "SC_LEFT impossible : no logical instance %s in figure %s\n", insname, WORK_LOFIG->NAME); + EXIT(1); + } + genPLACE_LEFT(ptins->FIGNAME, s, sym); +} + +/******************************************************************************* +* function SC_TOP * +*******************************************************************************/ +void genSC_TOP(insname, sym) +char *insname; +int sym; +{ +loins_list *ptins; +char *s = namealloc(insname); + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_TOP impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_TOP impossible : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + for (ptins = WORK_LOFIG->LOINS; ptins != NULL; ptins = ptins->NEXT) + if (ptins->INSNAME == s) + break; + if (ptins == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "SC_TOP impossible : no logical instance %s in figure %s\n", insname, WORK_LOFIG->NAME); + EXIT(1); + } + genPLACE_TOP(ptins->FIGNAME, s, sym); +} + +/******************************************************************************* +* function SC_BOTTOM * +*******************************************************************************/ +void genSC_BOTTOM(insname, sym) +char *insname; +int sym; +{ +loins_list *ptins; +char *s = namealloc(insname); + + if (WORK_PHFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_BOTTOM impossible : missing DEF_PHFIG\n", stderr); + EXIT(1); + } + if (WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_BOTTOM impossible : missing DEF_LOFIG\n", stderr); + EXIT(1); + } + for (ptins = WORK_LOFIG->LOINS; ptins != NULL; ptins = ptins->NEXT) + if (ptins->INSNAME == s) + break; + if (ptins == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("SC_BOTTOM impossible : no logical instance ", stderr); + (void)fprintf(stderr, "%s in figure %s\n", insname, WORK_LOFIG->NAME); + EXIT(1); + } + genPLACE_BOTTOM(ptins->FIGNAME, s, sym); +} + +/******************************************************************************* +* BUS allows the definition of a bus for logical operations * +*******************************************************************************/ +char *genBUS(signame, from, to) +char *signame; +long from, to; +{ +char sigid[100]; + + if (signame == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nBUS with NULL signal name", stderr); + (void)fprintf(stderr, ", indexes [%ld:%ld]\n", from, to); + EXIT(-1); + } + (void)sprintf(sigid, "%s[%ld:%ld]", signame, from, to); + return mbkstrdup(sigid); /* must allocate memory for that */ +} + +/******************************************************************************* +* ELM allows the definition of a bus element for logical operations * +*******************************************************************************/ +char *genELM(signame, number) +char *signame; +long number; +{ +char sigid[100]; + + if (signame == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nELM with NULL signal name", stderr); + (void)fprintf(stderr, ", index [%ld]\n", number); + EXIT(-1); + } + (void)sprintf(sigid, "%s[%ld]", signame, number); + return mbkstrdup(sigid); /* here also, allocation needed */ +} +/* Build up a fake name that will be used to check if a signal is to + * be connected or not. + * Do not forget to free a vectorized string that comes out from this + * function ! */ + +char *genUSED(s, c) + char *s; + int c; + /* Czo */ +{ +char *t, *u; + + if ((t = strchr(s, '[')) == NULL) + u = UNCONNECTED; + else { + u = malloc((strlen(UNCONNECTED) + strlen(t) + 1) * sizeof(char)); + sprintf(u, "%s%s", UNCONNECTED, t); + } + return c ? s : u; +} + +/******************************************************************************* +* function DEF_PHSC * +* loads the net-list description of a cell and create what's necessary to * +* physically describe it * +*******************************************************************************/ +void genDEF_PHSC(name) +char *name; +{ +lofig_list *ptlofig; + + if (!CATA_LIB || !WORK_LIB) + mbkenv(); + name = namealloc(name); + for (ptlofig = HEAD_LOFIG; ptlofig; ptlofig = ptlofig->NEXT) + if (ptlofig->NAME == name) + break; + if (ptlofig == NULL) + WORK_LOFIG = getlofig(name, 'A'); + else + WORK_LOFIG = ptlofig; + + lolist = addchain(lolist, WORK_LOFIG); + + genDEF_PHFIG(name); +} + +/******************************************************************************* +* function SAVE_PHSC * +*******************************************************************************/ +void genSAVE_PHSC() +{ +loins_list *ptloins; +phins_list *ptphins; +chain_list *c, *loname = NULL, *phname = NULL; + + + if (WORK_PHFIG == NULL || WORK_LOFIG == NULL) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fputs("Illegal SAVE_PHSC : missing DEF_PHSC\n", stderr); + EXIT(1); + } + + for (ptloins = WORK_LOFIG->LOINS; ptloins; ptloins = ptloins->NEXT) { + for (ptphins = WORK_PHFIG->PHINS; ptphins; ptphins = ptphins->NEXT) + if (ptloins->INSNAME == ptphins->INSNAME) { + ptphins->USER = addptype(ptphins->USER, (long)CHECKFEED, (void *)0); + break; + } + if(!ptphins) /* error : no physical instance called ptloins->INSNAME */ + loname = addchain(loname, (void *)ptloins->INSNAME); + } + + for (ptphins = WORK_PHFIG->PHINS; ptphins; ptphins = ptphins->NEXT) + if (!getptype(ptphins->USER, (long)CHECKFEED)) + if (!incatalogfeed(ptphins->FIGNAME)) /* error, not a feeding cell */ + phname = addchain(phname, (void *)ptphins->INSNAME); + + if (loname) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "Logical instance%s :\n", loname->NEXT ? "s" : ""); + for (c = loname; c; c = c->NEXT) + (void)fprintf(stderr, " `%s'\n", (char *)c->DATA); + (void)fprintf(stderr, "%s not physicaly placed\n", + loname->NEXT ? "are" : "is"); + } + + if (phname) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "Physical instance%s :\n", phname->NEXT ? "s" : ""); + for (c = phname; c; c = c->NEXT) + (void)fprintf(stderr, " `%s'\n", (char *)c->DATA); + (void)fprintf(stderr, "%s no logical equivalent and %s not %sfeed%s\n", + phname->NEXT ? "have" : "has", + phname->NEXT ? "are" : "is", + phname->NEXT ? "" : "a ", + phname->NEXT ? "s" : ""); + } + + if (loname || phname) { /* free before quiting */ + if (loname) + freechain(loname); + if (phname) + freechain(phname); + EXIT(1); + } + + genDEF_AB(0L, 0L, 0L, 0L); + savephfig(WORK_PHFIG); + + lolist = delchain(lolist, lolist); + if (lolist) + WORK_LOFIG = (lofig_list *)lolist->DATA; + else + WORK_LOFIG = NULL; +} + +/******************************************************************************* +* function NAME * +*******************************************************************************/ +char *genNAME(va_alist) +va_dcl +{ +va_list stack; +char *ret, *res, *p; +long strsize = 0; +char piece[BUFSIZ], *s; +long d; + + va_start(stack); + p = va_arg(stack, char *); + ret = res = (char *)mbkalloc(BUFSIZ); + while (*p != '\0') { + if (*p != '%') { + toolong(strsize ++); + *res++ = *p++; + continue; + } + switch (*++p) { + case 'l': + if (*++p != 'd') { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "NAME : bad argument %%l%c\n", *p); + EXIT(1); + } + + case 'd': + d = va_arg(stack, long); + (void)sprintf(piece, "%ld", d); + s = piece; + while ((*res++ = *s++)) + toolong(strsize ++); + res--; + p++; + break; + + case 'x': + d = va_arg(stack, long); + (void)sprintf(piece, "%lx", d); + s = piece; + while ((*res++ = *s++)) + toolong(strsize ++); + res--; + p++; + break; + + case 's': + s = va_arg(stack, char *); + while ((*res++ = *s++)) + toolong(strsize ++); + res--; + p++; + break; + + case 'c': + *res++ = va_arg(stack, int); + p++; + break; + + default : + (void)fflush(stdout); + (void)fputs("*** genlib error ***\nNAME allows", stderr); + (void)fprintf(stderr, " only %%d, %%c, %%x & %%s typed args\n"); + EXIT(1); + } + } + *res = '\0'; + va_end(stack); + return ret; +} + +/******************************************************************************* +* internal use functions * +*******************************************************************************/ +/******************************************************************************* +* function is_bus * +* check the validity of the syntax of a bussed signal * +* a bus is "abdc[123]" or "abcd[12:34]" * +* something like "abcd[efgh]" will exit on a syntax error * +* return 1 if "abcd[23:45]" 0 if "abcd" or "abdc[12]" * +*******************************************************************************/ +int is_bus(signame) +char *signame; +{ +char *t = signame, c; +char is_a_bus = 0, flag = 0; +char i, where = 0; /* used to say exactly where */ + + while ((c = *t++)) { + where++; /* increment the position to know where if an error occurs */ + if (c == '[') { /* To make -Wall happy */ + if (!flag) { + flag = 1; + continue; /* do not treat '[' as a part of the bus */ + } else { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "signal name %s is not legal\n", signame); + for (i = 0; i < where + strlen("signal name"); i++) + (void)fputs("_", stderr); + (void)fputs("?\n", stderr); + EXIT(1); + } + } + if ((c == ':' || c == ']') && !flag) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "signal name %s is not legal\n", signame); + for (i = 0; i < where + strlen("signal name"); i++) + (void)fputs("_", stderr); + (void)fputs("?\n", stderr); + EXIT(1); + } + if (flag) { + if (c == ':') { + is_a_bus = 1; /* that's a bus, not an element */ + continue; /* do not read the dots but still check for digit */ + } + if (c == ']') { + flag = 0; /* do not check for digit anymore */ + continue; + } + if (!isdigit(c)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "signal name %s is not legal\n", signame); + for (i = 0; i < where + strlen("signal name"); i++) + (void)fputs("_", stderr); + (void)fputs("?\n", stderr); + EXIT(1); + } + } + } + return is_a_bus; +} + +/******************************************************************************* +* function bus_decod * +* decods the bus name so buses can be used in LOINS & LOCON * +*******************************************************************************/ +int bus_decod(busname, signame, first, last) +char *busname, *signame; +long *first, *last; +{ +char *space; +char *buffer = mbkstrdup(busname); + + if (!(space = strchr(buffer, '['))) + return 0; + *space = ' '; + if (!(space = strchr(buffer, ':'))) + return 0; + *space = ' '; + if (!(space = strchr(buffer, ']'))) + return 0; + *space = ' '; + (void)sscanf(buffer, "%s %ld %ld", signame, first, last); + mbkfree(buffer); + return 1; +} + +/******************************************************************************* +* function toolong * +* cheks the validity of the lentgh of a string * +*******************************************************************************/ +static void toolong(length) +long length; +{ + if (length > BUFSIZ) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "NAME string too long(%d)\n", (int)BUFSIZ); + EXIT(1); + } +} + +/******************************************************************************* +* checkname : check for busses with single index * +*******************************************************************************/ +static char *checkname(name) +char *name; +{ +static char str[256]; +char *s, *t; + + strcpy(str, name); /* do not alter user strings */ + s = t = str; + while (*t) { + if (isspace(*t)) { + (void)fflush(stdout); + (void)fputs("*** genlib error ***\n", stderr); + (void)fprintf(stderr, "checkname failed : space detected in '%s'\n", + name); + EXIT(1); + } + if (*t == '[') + *t = ' '; + else if (*t == ']') { /* To make -Wall happy */ + if (*(++t) == '\0') /* ok, it's finished */ + goto end; + else if (*t == '[') /* multiple array */ + continue; + } + *s++ = *t++; + } +end: + *s = '\0'; + return str; +} + +/******************************************************************************* +* hassep : check for legal instance names * +*******************************************************************************/ +static int hassep(s) +char *s; +{ + for (; *s != '\0'; s++) + if (*s == '[' || *s == ']' || + *s == '(' || *s == ')' || + *s == '.' || *s == ' ') + return 1; + return 0; +} diff --git a/alliance/src/genlib/src/genlib.sh b/alliance/src/genlib/src/genlib.sh new file mode 100755 index 00000000..836ed954 --- /dev/null +++ b/alliance/src/genlib/src/genlib.sh @@ -0,0 +1,143 @@ +#!/bin/sh +# +# This file is part of the Alliance CAD System +# Copyright (C) Laboratoire LIP6 - Département ASIM +# Universite Pierre et Marie Curie +# +# Home page : http://www-asim.lip6.fr/alliance/ +# E-mail support : mailto:alliance-support@asim.lip6.fr +# +# This progam is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# Alliance VLSI CAD System is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with the GNU C Library; see the file COPYING. If not, write to the Free +# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# $Id: genlib.sh,v 1.1 2002/03/08 14:08:11 fred Exp $ + +help() { + echo "Syntax: `basename $0` [-vk] source-file (without extension)" + echo " -v : verbose mode" + echo " -k : keeps the executable (whith debugging" + echo " informations) along with the" + echo " compilation Makefile after completion" + exit 1 +} + + + if [ $# -lt 1 -o $# -gt 6 ] ; then + echo "Syntax: `basename $0` [-vk] source-file (without extension)" + exit 1 + fi + + talk=0 + devel=0 + keep=0 + debug= + lib="" + libpath="" + name="" + while [ $# -gt 0 ] + do + case $1 in + -v) talk=1;; + -d) devel=1;; + -k) keep=1;debug=-g;; + -vk) keep=1;debug=-g; talk=1;; + -kv) keep=1;debug=-g; talk=1;; + -l*) lib=$1;; + -L*) libpath=$1;; + *) if [ -z "$name" ]; then + name=$1; + else + help + fi + esac + shift + done + trap "rm -f ./*.$$; exit 1" 1 2 3 6 + + alcbanner "GenLib" "3.3" "Procedural Generation Language" "1991" + + if [ -z "$name" ] ; then + help + fi + if [ ! -f $name.c ] ; then + echo "There seems no to be a file called $name.c" + help + fi + + if [ $talk -eq 1 ]; then + echo "Generating the Makefile"; + fi + +# see genpat for another way of creating Makefile ;-) Czo... + +# -------------------------------------------------------------------- +# Development hacks. + + if [ $devel -eq 1 ]; then + ALLIANCE_INSTALL_DIR="__ALLIANCE_INSTALL_DIR__" + ALLIANCE_DEVEL_INCLUDE="-I${ALLIANCE_INSTALL_DIR}/include" + ALLIANCE_DEVEL_LIB="-L${ALLIANCE_INSTALL_DIR}/lib" + ALLIANCE_LIB=${ALLIANCE_TOP}/lib + ALLIANCE_INCLUDE=${ALLIANCE_TOP}/include + fi + + + makefile="Makefile.$$" + echo 'include $(ALLIANCE_TOP)/etc/libraries.mk' > $makefile + echo 'include $(ALLIANCE_TOP)/etc/$(ALLIANCE_OS).mk' >> $makefile + echo 'ALLIANCE_LIBRARY = '${ALLIANCE_DEVEL_LIB}' -L$(ALLIANCE_LIB) \ + -lMgn -lMlu -lMpu -lMcp -lMap -lMmg -lMcl -lMgl \ + -lMal -lMvl -lMel -lMsl -lMhl -lMlo -lMph -lMut -lRcn' >> $makefile + + echo "ALLIANCE_INC = ${ALLIANCE_DEVEL_INCLUDE} -I\$(ALLIANCE_INCLUDE)" >> $makefile + echo "$name : $name.c" >> $makefile + echo ' $(CC) ' \ + "$debug -o $name $name.c $libpath $lib" \ + '$(ALLIANCE_INC) $(ALLIANCE_LIBRARY)' >> $makefile + + if [ $talk -eq 1 ]; then + echo "Compiling, ..." + fi + + make -f $makefile > $name.grr 2>&1 + + if [ ! $? -eq 0 ]; then + echo "Compilation failed!" + cat $name.grr + exit 1 + fi + + if [ $talk -eq 1 ] ; then + echo "Current execution environment" + echo "MBK_CATA_LIB : ${MBK_CATA_LIB-no cell library specified}" + echo "MBK_WORK_LIB : ${MBK_WORK_LIB-:}" + echo "MBK_IN_LO : ${MBK_IN_LO-vst}" + echo "MBK_OUT_LO : ${MBK_OUT_LO-vst}" + echo "MBK_IN_PH : ${MBK_IN_PH-ap}" + echo "MBK_OUT_PH : ${MBK_OUT_PH-ap}" + echo "MBK_CATAL_NAME : ${MBK_CATAL_NAME-CATAL}" + fi + if [ $talk -eq 1 ]; then + echo "Executing ..." + fi + ./$name + exit_code=$? + if [ $talk -eq 1 ]; then + echo "Removing tmp files ..." + fi + if [ $keep -eq 0 ] ; then + rm $name; + fi + rm $name.o $name.grr $makefile > /dev/null 2>&1 + exit $exit_code diff --git a/alliance/src/genlib/src/mbkgen.h b/alliance/src/genlib/src/mbkgen.h new file mode 100644 index 00000000..721f7cd1 --- /dev/null +++ b/alliance/src/genlib/src/mbkgen.h @@ -0,0 +1,51 @@ +/* + * This file is part of the Alliance CAD System + * Copyright (C) Laboratoire LIP6 - Département ASIM + * Universite Pierre et Marie Curie + * + * Home page : http://www-asim.lip6.fr/alliance/ + * E-mail support : mailto:alliance-support@asim.lip6.fr + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * Alliance VLSI CAD System is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with the GNU C Library; see the file COPYING. If not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * + * mbkgen.h : header for the definition of genlib external variable + * version : 1.00 + * date : 05/02/92 + * author : Frederic Petrot + * $Id: mbkgen.h,v 1.1 2002/03/08 14:08:11 fred Exp $ + */ + +#ifndef _MBKGEN_H_ +#define _MBKGEN_H_ + +#ifdef _MPH_H_ +extern phfig_list *WORK_PHFIG; +extern phins_list *WORK_PHINS; +#endif +#ifdef _MLO_H_ +extern lofig_list *WORK_LOFIG; +extern long num_index; +#endif + +enum {MBK_INSTANCE, MBK_SEGMENT, MBK_CONNECTOR, MBK_REFERENCE, MBK_VIA}; + +extern int is_bus(); +extern int bus_decod(); + +#endif + diff --git a/alliance/src/genlib/src/mgn.h b/alliance/src/genlib/src/mgn.h new file mode 100644 index 00000000..9e1c1dbf --- /dev/null +++ b/alliance/src/genlib/src/mgn.h @@ -0,0 +1,352 @@ +/* + * This file is part of the Alliance CAD System + * Copyright (C) Laboratoire LIP6 - Département ASIM + * Universite Pierre et Marie Curie + * + * Home page : http://www-asim.lip6.fr/alliance/ + * E-mail support : mailto:alliance-support@asim.lip6.fr + * + * This progam is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * Alliance VLSI CAD System is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with the GNU C Library; see the file COPYING. If not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/******************************************************************************* +* mgn.h * +* header for the definition of genlib functions, and macros * +* author : Frederic Petrot * +* version : 3.18 * +* date : 03/09/93 * +* version : 3.26 * +* date : 10/06/97 * +*******************************************************************************/ +/* Types for the ptype lists as required in version 3.26 + As the types are all exclusives from another there is no need for + styled values. */ + +/******************************************************************************* +* physical placement functions * +*******************************************************************************/ +extern void genDEF_PHFIG(); +extern void genLOAD_PHFIG(); +extern void genSAVE_PHFIG(); +extern void genDEF_AB(); +extern void genDEF_PHINS(); +extern ptype_list *genPHCON(); +extern ptype_list *genCOPY_UP_CON(); +extern ptype_list *genCOPY_UP_CON_FACE(); +extern ptype_list *genCOPY_UP_ALL_CON(); +extern ptype_list *genPHSEG(); +extern ptype_list *genCOPY_UP_SEG(); +extern ptype_list *genTHRU_H(); +extern ptype_list *genTHRU_V(); +extern ptype_list *genTHRU_CON_H(); +extern ptype_list *genTHRU_CON_V(); +extern ptype_list *genWIRE1(); +extern ptype_list *genWIRE2(); +extern ptype_list *genWIRE3(); +extern ptype_list *genPHVIA(); +extern ptype_list *genPHBIGVIA(); +extern ptype_list *genPLACE(); +extern ptype_list *genPLACE_RIGHT(); +extern ptype_list *genPLACE_TOP(); +extern ptype_list *genPLACE_LEFT(); +extern ptype_list *genPLACE_BOTTOM(); +extern ptype_list *genPLACE_REF(); +extern ptype_list *genPLACE_ON(); +extern ptype_list *genPHREF(); +extern void genDEL_PHREF(); +extern ptype_list *genCOPY_UP_REF(); +extern ptype_list *genCOPY_UP_ALL_REF(); +extern ptype_list *genPLACE_VIA_REF(); +extern ptype_list *genPLACE_CON_REF(); +extern ptype_list *genPLACE_SEG_REF(); +extern void genFLATTEN_PHFIG(); +extern void genFLATTEN_ALL_PHINS(); +extern long genGET_PHFIG_REF_X(); +extern long genGET_PHFIG_REF_Y(); +extern long genGET_REF_X(); +extern long genGET_REF_Y(); +extern long genGET_CON_X(); +extern long genGET_CON_Y(); +extern long genGET_INS_X(); +extern long genGET_INS_Y(); +extern long genHEIGHT(); +extern long genWIDTH(); +extern void genREVERSE_PHCON(); +extern void genOUTLINE(); +/******************************************************************************* +* netlist description functions * +*******************************************************************************/ +extern void genDEF_LOFIG(); +extern void genLOAD_LOFIG(); +extern void genSAVE_LOFIG(); +extern void genLOINS(); +extern void genLOINSE(); +extern void genLOINSA(); +extern void genLOTRS(); +extern void genLOCON(); +extern void genLOSIGMERGE(); +extern void genFLATTEN_LOFIG(); +extern void genFLATTEN_ALL_LOINS(); +extern void genDEF_PHSC(); +extern void genSAVE_PHSC(); +extern void genSC_PLACE(); +extern void genSC_RIGHT(); +extern void genSC_LEFT(); +extern void genSC_TOP(); +extern void genSC_BOTTOM(); +extern void genSC_CHANNEL(); +extern void genSC_CON_CHANNEL(); +/******************************************************************************* +* name forming functions, for both views * +*******************************************************************************/ +extern char *genBUS(); +extern char *genELM(); +extern char *genNAME(); + +/******************************************************************************* +* macro definitions for allowed stdlib functions * +*******************************************************************************/ +#define PRINTF printf +#define STRLEN(a) (long)(a == NULL ? 0 : strlen(a)) + +/******************************************************************************* +* macro definitions in order to allows float and integer typed parameters * +*******************************************************************************/ +#ifndef __GENLIB__ +#define GENLIB_DEF_PHFIG(name) genDEF_PHFIG(name) +#define GENLIB_LOAD_PHFIG(name) genLOAD_PHFIG(name) +#define GENLIB_SAVE_PHFIG genSAVE_PHFIG +#define GENLIB_DEF_AB(dx1,dy1,dx2,dy2) \ + genDEF_AB((long)((dx1)*SCALE_X),(long)((dy1)*SCALE_X), \ + (long)((dx2)*SCALE_X),(long)((dy2)*SCALE_X)) +#define GENLIB_DEF_PHINS(name) \ + genDEF_PHINS(name) +#define GENLIB_PHCON(layer,width,name,orient,x,y) \ + genPHCON(layer,(long)((width)*SCALE_X),name,orient, \ + (long)((x)*SCALE_X),(long)((y)*SCALE_X)) +#define GENLIB_COPY_UP_CON(index,locname,insname,newname) \ + genCOPY_UP_CON(index,locname,insname,newname) +#define GENLIB_COPY_UP_ALL_CON(orient,insname,cheminom) \ + genCOPY_UP_ALL_CON(orient,insname,cheminom) +#define GENLIB_COPY_UP_CON_FACE(orient,locname,insname,newname) \ + genCOPY_UP_CON_FACE(orient,locname,insname,newname) +#define GENLIB_PHSEG(layer,width,name,x1,y1,x2,y2) \ + genPHSEG(layer,(long)((width)*SCALE_X),name,(long)((x1)*SCALE_X), \ + (long)((y1)*SCALE_X), (long)((x2)*SCALE_X), \ + (long)((y2)*SCALE_X)) +#define GENLIB_COPY_UP_SEG(locname,insname,newname) \ + genCOPY_UP_SEG(locname,insname,newname) +#define GENLIB_WIRE1(layer,width,ins1,con1,index1,ins2,con2,index2) \ + genWIRE1(layer,(long)((width)*SCALE_X),ins1,con1,index1,ins2, \ + con2,index2) +#define GENLIB_WIRE2(layer,width,ins1,con1,index1,ins2,con2,index2,x,y) \ + genWIRE2(layer,(long)((width)*SCALE_X),ins1,con1,index1,ins2, \ + con2,index2, (long)((x)*SCALE_X),(long)((y)*SCALE_X)) +#define GENLIB_WIRE3(layer,width,ins1,con1,index1,ins2,con2,index2,x1,y1,x2,y2) \ + genWIRE3(layer,(long)((width)*SCALE_X),ins1,con1,index1,ins2, \ + con2,index2, (long)((x1)*SCALE_X),(long)((y1)*SCALE_X), \ + (long)((x2)*SCALE_X),(long)((y2)*SCALE_X)) +#define GENLIB_PHVIA(type,x,y) \ + genPHVIA(type,(long)((x)*SCALE_X),(long)((y)*SCALE_X)) +#define GENLIB_PHBIGVIA(type,x,y,dx,dy,name) \ + genPHBIGVIA(type,(long)((x)*SCALE_X),(long)((y)*SCALE_X), \ + (long)((dx)*SCALE_X),(long)((dy)*SCALE_X),name) +#define GENLIB_PLACE(figname,insname,sym,x,y) \ + genPLACE(figname,insname,sym,(long)((x)*SCALE_X),(long)((y)*SCALE_X)) +#define GENLIB_PLACE_RIGHT(figname,insname,sym) genPLACE_RIGHT(figname,insname,sym) +#define GENLIB_PLACE_TOP(figname,insname,sym) genPLACE_TOP(figname,insname,sym) +#define GENLIB_PLACE_LEFT(figname,insname,sym) genPLACE_LEFT(figname,insname,sym) +#define GENLIB_PLACE_BOTTOM(figname,insname,sym) genPLACE_BOTTOM(figname,insname,sym) +#define GENLIB_PLACE_REF(figname,insname,sym,insref,refname) \ + genPLACE_REF(figname,insname,sym,insref,refname) +#define GENLIB_PLACE_ON(figname,insname1,con1,index1,sym,insname2,con2,index2) \ + genPLACE_ON(figname,insname1,con1,index1,sym,\ + insname2,con2,index2) +#define GENLIB_THRU_H(layer,width,y) \ + genTHRU_H(layer,(long)((width)*SCALE_X),(long)((y)*SCALE_X)) +#define GENLIB_THRU_V(layer,width,x) \ + genTHRU_V(layer,(long)((width)*SCALE_X),(long)((x)*SCALE_X)) +#define GENLIB_THRU_CON_H(layer,width,name,y) \ + genTHRU_CON_H(layer,(long)((width)*SCALE_X),name,(long)((y)*SCALE_X)) +#define GENLIB_THRU_CON_V(layer,width,name,x) \ + genTHRU_CON_V(layer,(long)((width)*SCALE_X),name,(long)((x)*SCALE_X)) +#define GENLIB_PHREF(type,name,x,y) \ + genPHREF(type,name,(long)((x)*SCALE_X),(long)((y)*SCALE_X)) +#define GENLIB_DEL_PHREF genDEL_PHREF +#define GENLIB_COPY_UP_REF(refname,insname,newname) \ + genCOPY_UP_REF(refname,insname,newname) +#define GENLIB_COPY_UP_ALL_REF(reftype,insname,cheminom) \ + genCOPY_UP_ALL_REF(reftype,insname,cheminom) +#define GENLIB_PLACE_VIA_REF(insname,refname,type) \ + genPLACE_VIA_REF(insname,refname,type) +#define GENLIB_PLACE_CON_REF(insname,refname,conname,layer,width,face) \ + genPLACE_CON_REF(insname,refname,conname,layer,\ + (long)((width)*SCALE_X),face) +#define GENLIB_PLACE_SEG_REF(insname,refname,layer,width,face) \ + genPLACE_SEG_REF(insname,refname,layer,(long)((width)*SCALE_X),face) +#define GENLIB_GET_PHFIG_REF_X(refname) \ + ((genGET_PHFIG_REF_X(refname)/SCALE_X)) +#define GENLIB_GET_PHFIG_REF_Y(refname) \ + ((genGET_PHFIG_REF_Y(refname)/SCALE_X)) +#define GENLIB_GET_REF_X(insname,refname) \ + ((genGET_REF_X(insname,refname)/SCALE_X)) +#define GENLIB_GET_REF_Y(insname,refname) \ + ((genGET_REF_Y(insname,refname)/SCALE_X)) +#define GENLIB_GET_INS_X(insname) ((genGET_INS_X(insname)/SCALE_X)) +#define GENLIB_GET_INS_Y(insname) ((genGET_INS_Y(insname)/SCALE_X)) +#define GENLIB_GET_INS_XDX(insname) ((genGET_INS_XDX(insname)/SCALE_X)) +#define GENLIB_GET_INS_YDY(insname) ((genGET_INS_YDY(insname)/SCALE_X)) +#define GENLIB_GET_CON_X(insname,conname,index) \ + ((genGET_CON_X(insname,conname,index)/SCALE_X)) +#define GENLIB_GET_CON_Y(insname,conname,index) \ + ((genGET_CON_Y(insname,conname,index)/SCALE_X)) +#define GENLIB_GET_CON_LAYER(insname,conname,index) \ + (genGET_CON_LAYER(insname,conname,index)) +#define GENLIB_HEIGHT(cellName) ((genHEIGHT(cellName)/SCALE_X)) +#define GENLIB_WIDTH(cellName) ((genWIDTH(cellName)/SCALE_X)) +#define GENLIB_FLATTEN_PHFIG(insname,concat) genFLATTEN_PHFIG(insname,concat) +#define GENLIB_FLATTEN_ALL_PHINS(concat, catal) genFLATTEN_ALL_PHINS(concat, catal) +#define GENLIB_REVERSE_PHCON(conname) genREVERSE_PHCON(conname) +#define GENLIB_OUTLINE genOUTLINE + +#define GENLIB_DEF_LOFIG(name) genDEF_LOFIG(name) +#define GENLIB_LOAD_LOFIG(name) genLOAD_LOFIG(name) +#define GENLIB_SAVE_LOFIG genSAVE_LOFIG +#define GENLIB_LOSIG(name) genLOSIG(name) +#define GENLIB_LOINS genLOINS +#define GENLIB_LOINSE genLOINSE +#define GENLIB_LOINSA genLOINSA +#define GENLIB_LOTRS(type,width,length,grid,source,drain) \ + genLOTRS(type,(long)((width)*SCALE_X), \ + (long)((length)*SCALE_X),grid,source,drain) +#define GENLIB_LOCON(conname,direction,signame) genLOCON(conname,direction,signame) +#define GENLIB_LOSIGMERGE(signame1, signame2) genLOSIGMERGE(signame1, signame2) +#define GENLIB_FLATTEN_LOFIG(insname,concat) genFLATTEN_LOFIG(insname,concat) +#define GENLIB_FLATTEN_ALL_LOINS(concat, catal) genFLATTEN_ALL_LOINS(concat, catal) +#define GENLIB_UNFLATTEN_LOFIG genUNFLATTEN_LOFIG + +#define GENLIB_USED(s, c) genUSED(s, c) + +#define GENLIB_DEF_PHSC(name) genDEF_PHSC(name) +#define GENLIB_SAVE_PHSC genSAVE_PHSC +#define GENLIB_SC_PLACE(insname,sym,x,y) \ + genSC_PLACE(insname,sym,(long)((x)*SCALE_X),(long)((y)*SCALE_X)) +#define GENLIB_SC_RIGHT(insname,sym) genSC_RIGHT(insname,sym) +#define GENLIB_SC_LEFT(insname,sym) genSC_LEFT(insname,sym) +#define GENLIB_SC_TOP(insname,sym) genSC_TOP(insname,sym) +#define GENLIB_SC_BOTTOM(insname,sym) genSC_BOTTOM(insname,sym) +#define GENLIB_SC_CHANNEL(direction,width,insname) \ + genSC_CHANNEL(direction,(long)((width)*SCALE_X),insname) +#define GENLIB_SC_CON_CHANNEL(conname,orient,layer,width,insname) \ + genSC_CON_CHANNEL(conname,orient,layer,\ + (long)((width)*SCALE_X),insname) + +#define GENLIB_BUS(signame,from,to) genBUS(signame,from,to) +#define GENLIB_ELM(signame,number) genELM(signame,number) +#define GENLIB_NAME genNAME + +#endif + +/* + * New allowed names for layers and contacts + */ +#define METAL ALU1 +#define ALLOWM TALU1 +#define METAL2 ALU2 +#define ALLOWM2 TALU2 +#define METAL3 ALU3 +#define ALLOWM3 TALU3 +#define METAL4 ALU4 +#define ALLOWM4 TALU4 +#define METAL5 ALU5 +#define ALLOWM5 TALU5 +#define METAL6 ALU6 +#define ALLOWM6 TALU6 +#define METAL7 ALU7 +#define ALLOWM7 TALU7 +#define METAL8 ALU8 +#define ALLOWM8 TALU8 +#define METAL9 ALU9 +#define ALLOWM9 TALU9 + +#define VIA12 CONT_VIA +#define VIA23 CONT_VIA2 +#define VIA34 CONT_VIA3 +#define VIA45 CONT_VIA4 +#define VIA56 CONT_VIA5 +#define VIA67 CONT_VIA6 +#define VIA78 CONT_VIA7 +#define VIA89 CONT_VIA8 + +/* Names usable that macro-expand into several contacts: they have no + * internal counterparts. + */ +#define VIA13 (LAST_CONTACT + 1) +#define VIA14 (LAST_CONTACT + 2) +#define VIA15 (LAST_CONTACT + 3) +#define VIA16 (LAST_CONTACT + 4) +#define VIA17 (LAST_CONTACT + 5) +#define VIA18 (LAST_CONTACT + 6) +#define VIA19 (LAST_CONTACT + 7) +#define VIA24 (LAST_CONTACT + 8) +#define VIA25 (LAST_CONTACT + 9) +#define VIA26 (LAST_CONTACT + 10) +#define VIA27 (LAST_CONTACT + 11) +#define VIA28 (LAST_CONTACT + 12) +#define VIA29 (LAST_CONTACT + 13) +#define VIA35 (LAST_CONTACT + 14) +#define VIA36 (LAST_CONTACT + 15) +#define VIA37 (LAST_CONTACT + 16) +#define VIA38 (LAST_CONTACT + 17) +#define VIA39 (LAST_CONTACT + 18) +#define VIA46 (LAST_CONTACT + 19) +#define VIA47 (LAST_CONTACT + 20) +#define VIA48 (LAST_CONTACT + 21) +#define VIA49 (LAST_CONTACT + 22) +#define VIA57 (LAST_CONTACT + 23) +#define VIA58 (LAST_CONTACT + 24) +#define VIA59 (LAST_CONTACT + 25) +#define VIA68 (LAST_CONTACT + 26) +#define VIA69 (LAST_CONTACT + 27) +#define VIA79 (LAST_CONTACT + 28) + +#define CONT_VIA13 VIA13 +#define CONT_VIA14 VIA14 +#define CONT_VIA15 VIA15 +#define CONT_VIA16 VIA16 +#define CONT_VIA17 VIA17 +#define CONT_VIA18 VIA18 +#define CONT_VIA19 VIA19 +#define CONT_VIA24 VIA24 +#define CONT_VIA25 VIA25 +#define CONT_VIA26 VIA26 +#define CONT_VIA27 VIA27 +#define CONT_VIA28 VIA28 +#define CONT_VIA29 VIA29 +#define CONT_VIA35 VIA35 +#define CONT_VIA36 VIA36 +#define CONT_VIA37 VIA37 +#define CONT_VIA38 VIA38 +#define CONT_VIA39 VIA39 +#define CONT_VIA46 VIA46 +#define CONT_VIA47 VIA47 +#define CONT_VIA48 VIA48 +#define CONT_VIA49 VIA49 +#define CONT_VIA57 VIA57 +#define CONT_VIA58 VIA58 +#define CONT_VIA59 VIA59 +#define CONT_VIA68 VIA68 +#define CONT_VIA69 VIA69 +#define CONT_VIA79 VIA79