diff --git a/alliance/src/beh/Makefile.am b/alliance/src/beh/Makefile.am new file mode 100644 index 00000000..07243f94 --- /dev/null +++ b/alliance/src/beh/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src man3 diff --git a/alliance/src/beh/configure.in b/alliance/src/beh/configure.in new file mode 100644 index 00000000..611720a9 --- /dev/null +++ b/alliance/src/beh/configure.in @@ -0,0 +1,46 @@ +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/04/04 14:54:47 ludo Exp $ +dnl +dnl +AC_INIT(src/beh.h) +AM_INIT_AUTOMAKE(beh, 1.11) +AC_PROG_INSTALL +AC_PROG_CC +AC_HEADER_STDC +AC_C_CONST +AC_PROG_RANLIB + +AM_ALLIANCE + +AC_OUTPUT([ +Makefile +src/Makefile +man3/Makefile +]) diff --git a/alliance/src/beh/man3/Makefile.am b/alliance/src/beh/man3/Makefile.am new file mode 100644 index 00000000..042c6e28 --- /dev/null +++ b/alliance/src/beh/man3/Makefile.am @@ -0,0 +1,12 @@ +man_MANS = \ +beh.3 beh_addbiabl.3 beh_delbereg.3 beh_frebemsg.3 beh_rmvbeaux.3 \ +beh_addbeaux.3 beh_addbinod.3 beh_delberin.3 beh_frebeout.3 beh_rmvbebus.3 \ +beh_addbebus.3 beh_debug.3 beh_delbiabl.3 beh_frebepor.3 beh_rmvbebux.3 \ +beh_addbebux.3 beh_delbeaux.3 beh_delbinod.3 beh_frebereg.3 beh_rmvbefig.3 \ +beh_addbefig.3 beh_delbebus.3 beh_depend.3 beh_freberin.3 beh_rmvbegen.3 \ +beh_addbegen.3 beh_delbebux.3 beh_error.3 beh_frebiabl.3 beh_rmvbemsg.3 \ +beh_addbemsg.3 beh_delbefig.3 beh_frebeaux.3 beh_frebinod.3 beh_rmvbeout.3 \ +beh_addbeout.3 beh_delbegen.3 beh_frebebus.3 beh_getgenva.3 beh_rmvbepor.3 \ +beh_addbepor.3 beh_delbemsg.3 beh_frebebux.3 beh_makbdd.3 beh_rmvbereg.3 \ +beh_addbereg.3 beh_delbeout.3 beh_frebefig.3 beh_makgex.3 beh_rmvberin.3 \ +beh_addberin.3 beh_delbepor.3 beh_frebegen.3 beh_message.3 diff --git a/alliance/src/beh/man3/beh.3 b/alliance/src/beh/man3/beh.3 new file mode 100644 index 00000000..304ff07e --- /dev/null +++ b/alliance/src/beh/man3/beh.3 @@ -0,0 +1,152 @@ +.\" $Id: beh.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh.2 108 Feb 15 1995 UPMC; Pirouz BAZARGAN SABET +.TH BEH 3 "October 1, 1997" "ASIM/LIP6" "cao\-vlsi reference manual" + +.so man1/alc_origin.1 +.SH NAME +.PP +\fBBEH\fP \- Generic behavioural data structures + +.SH DESCRIPTION +.PP +\fBBEH\fP is a generic data structure supporting vlsi concepts. +It allows representation of a behavioral description in a data structure. + +.PP +The goal of \fBBEH\fP is to define an ad hoc single data structure (object), +with well known fixed meaning for each concept manipulated within a behavioural +description. So any tools that needs to work with a behavioral view can be +build upon it using these structures. + +.PP +For each object (data structure), a set of functions has been defined in order +to add, delete or access it. These functions are defined in a low\-level library +\fIlibBeh108.a\fP. Some other functions are higher level. They are defined in a +high\-level library \fIlibBhl108.a\fP. There are also some parsers\-drivers. +A pareser reads a behavioural description file in a given format and build up a +complete \fBBEH\fP data base. A driver creates a text file in a given +behavioural description format from a \fBBEH\fP data base. A VHDL +parser\-driver is available in the \fIlibBvl103.a\fP library. + +.PP +The behavioural view envolves the following notions: + +.TP 20 +\fIfigure\fP +behavioural representation of a circuit (see \fBBEFIG\fP). +.TP 20 +\fIport list\fP +ordered list of the circuit's logical ports (see \fBBEPOR\fP). +.TP 20 +\fIgeneric\fP +a global data (constants) relative to a circuit other than logical ports (see +\fBBEGEN\fP). +.TP 20 +\fIsimple output\fP +a simple output port of the circuit (see \fBBEOUT\fP). +.TP 20 +\fIbused output\fP +a bused output port of the circuit (see \fBBEBUS\fP). +.TP 20 +\fIinput\fP +an input port of the circuit (see \fBBERIN\fP). +.TP 20 +\fIinternal register\fP +an internal memorizing element (see \fBBEREG\fP). +.TP 20 +\fIinternal signal\fP +an internal simple signal of the circuit (see \fBBEAUX\fP). +.TP 20 +\fIinternal bus\fP +an internal bused signal of the circuit (see \fBBEBUX\fP). +.TP 20 +\fIassert\fP +a condition, noticed by the circuit designer, that insures a correct usage of +the circuit. The validity of these conditions is to be checked continuously at +run time (see \fBBEMSG\fP). + +.PP +In order to use \fBBEH\fP, concepts on use of libraries are needed. And, since +these libraries are under development, the code is subject to change. + +.PP +To enable work, a static version of each library is always present for the +user. Libraries and header files are suffixed by a number (the library's +version). The programmer can prefer to work with an earlier version of a +library rather than the most recent one. However, it is recommended to adapt +softwares to libraries as soon as possible in order to spotlight potential +compatibility problems before old libraries are removed. + +.PP +A \fImakefile\fP is necessary for all \fBBEH\fP applications. +This is required because any soft must be easily recompilable, and knowing +the needed libraries for a \fBBEH\fP based program is not an easy matter. +It can't be achieved an other way, so do use \fImakefile\fP. + +.PP +For each behavioural description format a parser and a driver have been +developed . These are organized in as many seperate libraries as description +format. So if a parser or driver changes it is not needed to recompile +\fBBEH\fP. Only a relink of the application is needed. + +.PP +In terms of software organization, \fBBEH\fP is splitted into two libraries +for the basic functions, a header file for structures and variable declarations, +and , up to now, one parser\-driver library for VHDL format. + +.PP +It is to be noticed that library's version number is incremented when, at least, +one function composing the library has been modified. Therefore, \fBBEH\fP +libraries may evolve independently form each other. + +.ta 1.5i 3i 4.5i +.PP +Here follows the list of the libraries and their contents. + +.TP 20 +libBeh108.a: +\fBbeh_addbefig, beh_addbeaux, beh_addbebux\fP, +\fBbeh_addbegen, beh_addbebus, beh_addbemsg\fP, +\fBbeh_addbeout, beh_addbepor, beh_addbereg\fP, +\fBbeh_addberin, beh_addbiabl, beh_addbinode\fP, +\fBbeh_delbefig, beh_delbeaux, beh_delbebux\fP, +\fBbeh_delbegen, beh_delbebus, beh_delbemsg\fP, +\fBbeh_delbeout, beh_delbepor, beh_delbereg\fP, +\fBbeh_delberin, beh_delbiabl, beh_delbinode\fP, +\fBbeh_frebefig, beh_frebeaux, beh_frebebux\fP, +\fBbeh_frebegen, beh_frebebus, beh_frebemsg\fP, +\fBbeh_frebeout, beh_frebepor, beh_frebereg\fP, +\fBbeh_freberin, beh_frebiabl, beh_frebinode\fP, +\fBbeh_rmvbefig, beh_rmvbeaux, beh_rmvbebux\fP, +\fBbeh_rmvbegen, beh_rmvbebus, beh_rmvbemsg\fP, +\fBbeh_rmvbeout, beh_rmvbepor, beh_rmvbereg\fP, +\fBbeh_rmvberin\fP + +.TP 20 +libBhl108.a: +\fBbeh_debug\fP + +.PP +The libraries are organized in such a way that no cycle can appear through +calls. It means that if a given library a function calls another function +in another library, then none of the functions of this one does call any +function that belongs to the first library. + +.SH EXAMPLE +.PP +In order to use BEH libraries, one needs something like that in its +\fImakefile\fP: + +.RS +HEADER = -I/labo/include +.br +LIB = -L/labo/lib -lBeh108 -lBhl108 -lBvl109 -llog200 -lMut315 +.RE + +.SH SEE ALSO +.PP +mbk(1), log(3) + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbeaux.3 b/alliance/src/beh/man3/beh_addbeaux.3 new file mode 100644 index 00000000..ffce0ea0 --- /dev/null +++ b/alliance/src/beh/man3/beh_addbeaux.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbeaux.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbeaux.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbeaux.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbebus.3 b/alliance/src/beh/man3/beh_addbebus.3 new file mode 100644 index 00000000..4dd2b2c7 --- /dev/null +++ b/alliance/src/beh/man3/beh_addbebus.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbebus.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbebus.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbebus.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbebux.3 b/alliance/src/beh/man3/beh_addbebux.3 new file mode 100644 index 00000000..7dc614f1 --- /dev/null +++ b/alliance/src/beh/man3/beh_addbebux.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbebux.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbebux.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbebux.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbefig.3 b/alliance/src/beh/man3/beh_addbefig.3 new file mode 100644 index 00000000..ec56c025 --- /dev/null +++ b/alliance/src/beh/man3/beh_addbefig.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbefig.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbefig.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbefig.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbegen.3 b/alliance/src/beh/man3/beh_addbegen.3 new file mode 100644 index 00000000..8dbd286d --- /dev/null +++ b/alliance/src/beh/man3/beh_addbegen.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbegen.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbegen.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbegen.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbemsg.3 b/alliance/src/beh/man3/beh_addbemsg.3 new file mode 100644 index 00000000..93a5406c --- /dev/null +++ b/alliance/src/beh/man3/beh_addbemsg.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbemsg.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbemsg.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbemsg.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbeout.3 b/alliance/src/beh/man3/beh_addbeout.3 new file mode 100644 index 00000000..7825d71c --- /dev/null +++ b/alliance/src/beh/man3/beh_addbeout.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbeout.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbeout.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbeout.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbepor.3 b/alliance/src/beh/man3/beh_addbepor.3 new file mode 100644 index 00000000..046fffd3 --- /dev/null +++ b/alliance/src/beh/man3/beh_addbepor.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbepor.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbepor.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbepor.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbereg.3 b/alliance/src/beh/man3/beh_addbereg.3 new file mode 100644 index 00000000..fb5a6ba4 --- /dev/null +++ b/alliance/src/beh/man3/beh_addbereg.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbereg.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbereg.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbereg.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addberin.3 b/alliance/src/beh/man3/beh_addberin.3 new file mode 100644 index 00000000..b950bedb --- /dev/null +++ b/alliance/src/beh/man3/beh_addberin.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addberin.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addberin.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funberin.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbiabl.3 b/alliance/src/beh/man3/beh_addbiabl.3 new file mode 100644 index 00000000..3641e596 --- /dev/null +++ b/alliance/src/beh/man3/beh_addbiabl.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbiabl.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbiabl.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbiabl.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_addbinod.3 b/alliance/src/beh/man3/beh_addbinod.3 new file mode 100644 index 00000000..a9c0f546 --- /dev/null +++ b/alliance/src/beh/man3/beh_addbinod.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_addbinod.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_addbinod.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbinod.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_debug.3 b/alliance/src/beh/man3/beh_debug.3 new file mode 100644 index 00000000..0c6f80a5 --- /dev/null +++ b/alliance/src/beh/man3/beh_debug.3 @@ -0,0 +1,133 @@ +.\" $Id: beh_debug.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_debug.3 109 Oct 15 1995 UPMC ; Pirouz BAZARGAN SABET +.TH BEH_DEBUG 3 "October 1, 1997" "ASIM/LIP6" "BHL functions" + +.so man1/alc_origin.1 +.SH NAME +.PP +\fBbeh_debug\fP \- BEH structures displayer\-debugger + +.SH SYNOPSYS +.PP +.nf +void beh_debug (pnt, type) +void *pnt; +char *type; +.fi + +.SH PARAMETERS +.PP +.TP 10 +\fIpnt\fP +pointer of the structure to be displayed +.TP 10 +\fItype\fP +name of the structure to be displayed. \fItype\fP can be any of "befig", +"beout", "bereg", "bemsg", "bepor", "begen", "berin", "bebus", "beaux", +"bebux", "biabl", "binode", "beder", "bequad", "abl", "integer", "long", +"short", "character", "ptype", "chain" + +.SH DESCRIPTION +.PP +When called, \fBbeh_debug()\fP displaies the structure pointed by +\fIpnt\fP then, prints the line: + +.RS +COMMAND >> +.RE + +and waits for a command being entered by the user. If \fIpnt\fP is a NULL +pointer or \fItype\fP doesn\'t represent a known structure, \fBbeh_debug()\fP +exits without making any action. + +.PP +To display the structure, \fBbeh_debug()\fP prints a line per field. Fields +containing immediate value (integer, character, string, ...) are displayed +in the following form: + +.RS +name_of_the_field : value_of_the_field +.RE + +.PP +Fields containing a pointer are marked by the symbol \fB\->\fP. If the field +contains a NULL pointer, the field is displayed as: + +.RS +-> name_of_the_field : +.RE + +In the other case, \fBbeh_debug()\fP prints : + +.RS +-> name_of_the_field : available +.RE + +.PP +Two kinds of command are accepted by the displayer. + +.PP +A command can be the name of a field containing a pointer. The command is +accepted only if the pointer is not a NULL pointer (field displayed as +"available"). When the debugger receives such a command, it first pushes the +current structure on its stack then, displaies the structure pointed by the +named field. + +.PP +The second kind of commands are predefined commands : + +.RS +.TP 10 +\fB_exit\fP +to exit from the debugger +.TP 10 +\fB_up\fP +to return to the previous structure +.TP 10 +\fB_stop\fP +to put a stop mark on the current structure +.TP 10 +\fB_top\fP +to return to the first structure (pointed by \fIpnt\fP) +.TP 10 +\fB_back\fP +to return to the last structure marked with a stop mark +.TP 10 +\fB_save\fP +to save the current structure in a static table. At most 10 structures may +be saved. (example : "_save 1" saves the current structure in the entry +number ! of the table) +.TP 10 +\fB_jump\fP +to jump to a saved structure (example : "_jump 1" dislpaies the etructure +save in the entry number 1 of the table). +.TP 10 +\fB_display\fP +displaies a field under a given format. (example : "_display next integer" displaies the field named \fInext\fP as an integer). +.RE + +.PP +In addition to these commands, the command \fB.\fP (dot) can be used to repete +the last command. + +.SH EXAMPLE +.PP +.nf +#include +struct beout *beout_pnt; + +beh_debug (beout_pnt , "beout"); +.fi + +.SH NOTES +.PP +\fBbeh_debug()\fP uses an internal stack. The message \fI"stack overflow"\fP +is printed if too many structures have been pushed on the stack. + +.SH SEE ALSO +.PP +beh(3) + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbeaux.3 b/alliance/src/beh/man3/beh_delbeaux.3 new file mode 100644 index 00000000..863c5321 --- /dev/null +++ b/alliance/src/beh/man3/beh_delbeaux.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbeaux.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbeaux.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbeaux.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbebus.3 b/alliance/src/beh/man3/beh_delbebus.3 new file mode 100644 index 00000000..07674a4d --- /dev/null +++ b/alliance/src/beh/man3/beh_delbebus.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbebus.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbebus.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbebus.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbebux.3 b/alliance/src/beh/man3/beh_delbebux.3 new file mode 100644 index 00000000..f6990916 --- /dev/null +++ b/alliance/src/beh/man3/beh_delbebux.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbebux.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbebux.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbebux.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbefig.3 b/alliance/src/beh/man3/beh_delbefig.3 new file mode 100644 index 00000000..b9010918 --- /dev/null +++ b/alliance/src/beh/man3/beh_delbefig.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbefig.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbefig.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbefig.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbegen.3 b/alliance/src/beh/man3/beh_delbegen.3 new file mode 100644 index 00000000..ed7769d9 --- /dev/null +++ b/alliance/src/beh/man3/beh_delbegen.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbegen.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbegen.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbegen.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbemsg.3 b/alliance/src/beh/man3/beh_delbemsg.3 new file mode 100644 index 00000000..b0e59b5f --- /dev/null +++ b/alliance/src/beh/man3/beh_delbemsg.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbemsg.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbemsg.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbemsg.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbeout.3 b/alliance/src/beh/man3/beh_delbeout.3 new file mode 100644 index 00000000..d7c2bb95 --- /dev/null +++ b/alliance/src/beh/man3/beh_delbeout.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbeout.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbeout.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbeout.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbepor.3 b/alliance/src/beh/man3/beh_delbepor.3 new file mode 100644 index 00000000..27db09f6 --- /dev/null +++ b/alliance/src/beh/man3/beh_delbepor.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbepor.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbepor.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbepor.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbereg.3 b/alliance/src/beh/man3/beh_delbereg.3 new file mode 100644 index 00000000..9c33e08e --- /dev/null +++ b/alliance/src/beh/man3/beh_delbereg.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbereg.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbereg.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbereg.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delberin.3 b/alliance/src/beh/man3/beh_delberin.3 new file mode 100644 index 00000000..09f0c3ee --- /dev/null +++ b/alliance/src/beh/man3/beh_delberin.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delberin.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delberin.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funberin.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbiabl.3 b/alliance/src/beh/man3/beh_delbiabl.3 new file mode 100644 index 00000000..dafb9cd1 --- /dev/null +++ b/alliance/src/beh/man3/beh_delbiabl.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbiabl.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbiabl.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbiabl.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_delbinod.3 b/alliance/src/beh/man3/beh_delbinod.3 new file mode 100644 index 00000000..be1b227d --- /dev/null +++ b/alliance/src/beh/man3/beh_delbinod.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_delbinod.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_delbinod.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbinod.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_depend.3 b/alliance/src/beh/man3/beh_depend.3 new file mode 100644 index 00000000..ccd328ed --- /dev/null +++ b/alliance/src/beh/man3/beh_depend.3 @@ -0,0 +1,53 @@ +.\" $Id: beh_depend.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_depend.3 109 Oct 15 1995 UPMC ; Pirouz BAZARGAN SABET +.TH BEH_DEPEND 3 "October 1, 1997" "ASIM/LIP6" "BHL functions" + +.so man1/alc_origin.1 +.SH NAME +.PP +\fBbeh_depend\fP \- compute forward dependencies in a description + +.SH SYNOPSYS +.PP +.nf +void beh_depend (fig_pnt) +struct befig *fig_pnt; +.fi + +.SH PARAMETERS +.PP +.TP 10 +\fIfig_pnt\fP +pointer of the BEFIG structure + +.SH DESCRIPTION +.PP +\fBbeh_depend()\fP analyzes the forward dependencies in a whole description +(a BEFIG). Forward dependency means, for each input finding out the set of +outputs that depend on it. + +.PP +\fIfig_pnt\fP represents the pointer of the description to be analyzed. + +.PP +After the analysis is acheived, \fBbeh_depend\fP produces a set of dependency +lists for each input. Each dependency list is a list of pointers to those +outputs that depends on the input. A seprate list is produced for each type +of outputs (BEOUT, BEREG, BEAUX, BEBUX, BEMSG, BEDLY, BEBUS). + +.SH EXAMPLE +.PP +.nf +#include +struct befig *befig_pnt; + +beh_depend (befig_pnt); +.fi + +.SH SEE ALSO +.PP +beh(3), befig(3), berin(3), beaux(3), bereg(3), beh_debug(3) + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_error.3 b/alliance/src/beh/man3/beh_error.3 new file mode 100644 index 00000000..d6dba945 --- /dev/null +++ b/alliance/src/beh/man3/beh_error.3 @@ -0,0 +1,39 @@ +.\" $Id: beh_error.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_error.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.TH BEH_ERROR 3 "October 1, 1997" "ASIM/LIP6" "BEH functions" + +.so man1/alc_origin.1 +.SH NAME +.PP +\fBbeh_error\fP + +.SH SYNOPSYS +.PP +.nf +int beh_error (code, str) +int code; +char *str; +.fi + +.SH PARAMETERS +.PP +.TP 10 +\fIcode\fP +error\'s code +.TP 10 +\fIstr\fP +a string to be printed within the error message + +.SH DESCRIPTION +.PP +\fBbeh_error()\fP prints an error message on the standard error output +depending on an error code. The \fIcode\fP parameter determines the message +to be printed. + +.SH SEE ALSO +.PP +beh(3) + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebeaux.3 b/alliance/src/beh/man3/beh_frebeaux.3 new file mode 100644 index 00000000..c7959cda --- /dev/null +++ b/alliance/src/beh/man3/beh_frebeaux.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebeaux.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebeaux.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbeaux.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebebus.3 b/alliance/src/beh/man3/beh_frebebus.3 new file mode 100644 index 00000000..74f92422 --- /dev/null +++ b/alliance/src/beh/man3/beh_frebebus.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebebus.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebebus.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbebus.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebebux.3 b/alliance/src/beh/man3/beh_frebebux.3 new file mode 100644 index 00000000..93acbeef --- /dev/null +++ b/alliance/src/beh/man3/beh_frebebux.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebebux.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebebux.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbebux.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebefig.3 b/alliance/src/beh/man3/beh_frebefig.3 new file mode 100644 index 00000000..39a27ec5 --- /dev/null +++ b/alliance/src/beh/man3/beh_frebefig.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebefig.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebefig.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbefig.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebegen.3 b/alliance/src/beh/man3/beh_frebegen.3 new file mode 100644 index 00000000..3c9e88d2 --- /dev/null +++ b/alliance/src/beh/man3/beh_frebegen.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebegen.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebegen.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbegen.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebemsg.3 b/alliance/src/beh/man3/beh_frebemsg.3 new file mode 100644 index 00000000..abe62992 --- /dev/null +++ b/alliance/src/beh/man3/beh_frebemsg.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebemsg.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebemsg.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbemsg.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebeout.3 b/alliance/src/beh/man3/beh_frebeout.3 new file mode 100644 index 00000000..c2bbe503 --- /dev/null +++ b/alliance/src/beh/man3/beh_frebeout.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebeout.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebeout.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbeout.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebepor.3 b/alliance/src/beh/man3/beh_frebepor.3 new file mode 100644 index 00000000..ccb863ba --- /dev/null +++ b/alliance/src/beh/man3/beh_frebepor.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebepor.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebepor.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbepor.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebereg.3 b/alliance/src/beh/man3/beh_frebereg.3 new file mode 100644 index 00000000..5193f1d3 --- /dev/null +++ b/alliance/src/beh/man3/beh_frebereg.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebereg.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebereg.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbereg.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_freberin.3 b/alliance/src/beh/man3/beh_freberin.3 new file mode 100644 index 00000000..c95d84e4 --- /dev/null +++ b/alliance/src/beh/man3/beh_freberin.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_freberin.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_freberin.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funberin.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebiabl.3 b/alliance/src/beh/man3/beh_frebiabl.3 new file mode 100644 index 00000000..1b0292a7 --- /dev/null +++ b/alliance/src/beh/man3/beh_frebiabl.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebiabl.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebiabl.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbiabl.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_frebinod.3 b/alliance/src/beh/man3/beh_frebinod.3 new file mode 100644 index 00000000..89724005 --- /dev/null +++ b/alliance/src/beh/man3/beh_frebinod.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_frebinod.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_frebinod.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbinod.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_getgenva.3 b/alliance/src/beh/man3/beh_getgenva.3 new file mode 100644 index 00000000..d514560f --- /dev/null +++ b/alliance/src/beh/man3/beh_getgenva.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_getgenva.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_getgenva.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbegen.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_makbdd.3 b/alliance/src/beh/man3/beh_makbdd.3 new file mode 100644 index 00000000..623e4d4e --- /dev/null +++ b/alliance/src/beh/man3/beh_makbdd.3 @@ -0,0 +1,53 @@ +.\" $Id: beh_makbdd.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_makbdd.3 109 Oct 15 1995 UPMC ; Pirouz BAZARGAN SABET +.TH BEH_MAKBDD 3 "October 1, 1997" "ASIM/LIP6" "BHL functions" + +.so man1/alc_origin.1 +.SH NAME +.PP +\fBbeh_makbdd\fP \- create a BDD for each expression in a description + +.SH SYNOPSYS +.PP +.nf +void beh_makbdd (fig_pnt) +struct befig *fig_pnt; +.fi + +.SH PARAMETERS +.PP +.TP 10 +\fIfig_pnt\fP +pointer of the BEFIG structure + +.SH DESCRIPTION +.PP +\fBbeh_makbdd()\fP reads a whole behavioral description (a BEFIG) and +creates a BDD for each expression present in the description. For simple +signals (simple outputs - BEOUT, simple iternal signals - BEAUX, simple +internal delayed signals - BEDLY), one BDD is created which corresponds to +the expression that drives the signal. The BDD is stored into a specific +field in the corresponding structure (NODE). For signals that have multiple +expressions (registers, internal busses, bussed ports), one BDD is created +for each expression and stored in the corresponding field of the structure +(CNDNODE for conditions or VALNODE for the value). + +.PP +\fIfig_pnt\fP represents the pointer of the description. + +.SH EXAMPLE +.PP +.nf +#include +struct befig *befig_pnt; + +beh_makbdd (befig_pnt); +.fi + +.SH SEE ALSO +.PP +beh(3), befig(3), berin(3), beaux(3), bereg(3), beh_debug(3) + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_makgex.3 b/alliance/src/beh/man3/beh_makgex.3 new file mode 100644 index 00000000..d44b99c9 --- /dev/null +++ b/alliance/src/beh/man3/beh_makgex.3 @@ -0,0 +1,55 @@ +.\" $Id: beh_makgex.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_makgex.3 109 Oct 15 1995 UPMC ; Pirouz BAZARGAN SABET +.TH BEH_MAKGEX 3 "October 1, 1997" "ASIM/LIP6" "BHL functions" + +.so man1/alc_origin.1 +.SH NAME +.PP +\fBbeh_makgex\fP \- create a GEX for each expression in a description + +.SH SYNOPSYS +.PP +.nf +void beh_makgex (fig_pnt) +struct befig *fig_pnt; +.fi + +.SH PARAMETERS +.PP +.TP 10 +\fIfig_pnt\fP +pointer of the BEFIG structure + +.SH DESCRIPTION +.PP +\fBbeh_makgex()\fP reads a whole behavioral description (a BEFIG) and +creates a GEX for each expression present in the description. A GEX is +a structure able to represents binary expressions. It has almost the same +organization as an ABL but, like a BDD, uses an index to represent variables. +For simple signals (simple outputs - BEOUT, simple iternal signals - BEAUX, +simple internal delayed signals - BEDLY), one GEX is created which corresponds +to the expression that drives the signal. The GEX is stored into a specific +field in the corresponding structure (NODE). For signals that have multiple +expressions (registers, internal busses, bussed ports), one GEX is created +for each expression and stored in the corresponding field of the structure +(CNDNODE for conditions or VALNODE for the value). + +.PP +\fIfig_pnt\fP represents the pointer of the description. + +.SH EXAMPLE +.PP +.nf +#include +struct befig *befig_pnt; + +beh_makgex (befig_pnt); +.fi + +.SH SEE ALSO +.PP +beh(3), befig(3), berin(3), beaux(3), bereg(3), beh_debug(3), beh_makbdd(3) + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_message.3 b/alliance/src/beh/man3/beh_message.3 new file mode 100644 index 00000000..8cc0307d --- /dev/null +++ b/alliance/src/beh/man3/beh_message.3 @@ -0,0 +1,39 @@ +.\" $Id: beh_message.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_message.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.TH BEH_MESSAGE 3 "October 1, 1997" "ASIM/LIP6" "BEH functions" + +.so man1/alc_origin.1 +.SH NAME +.PP +\fBbeh_message\fP + +.SH SYNOPSYS +.PP +.nf +void beh_message (code, str) +int code; +char *str; +.fi + +.SH PARAMETERS +.PP +.TP 10 +\fIcode\fP +error\'s code +.TP 10 +\fIstr\fP +a string to be printed within the error message + +.SH DESCRIPTION +.PP +\fBbeh_message()\fP prints an error message on the standard output depending +on a message code. The \fIcode\fP parameter determines the message to be +printed. + +.SH SEE ALSO +.PP +beh (3), beh_error(3) + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_rmvbeaux.3 b/alliance/src/beh/man3/beh_rmvbeaux.3 new file mode 100644 index 00000000..0fd85a24 --- /dev/null +++ b/alliance/src/beh/man3/beh_rmvbeaux.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_rmvbeaux.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_rmvbeaux.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbeaux.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_rmvbebus.3 b/alliance/src/beh/man3/beh_rmvbebus.3 new file mode 100644 index 00000000..9db600ef --- /dev/null +++ b/alliance/src/beh/man3/beh_rmvbebus.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_rmvbebus.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_rmvbebus.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbebus.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_rmvbebux.3 b/alliance/src/beh/man3/beh_rmvbebux.3 new file mode 100644 index 00000000..8b9b47a5 --- /dev/null +++ b/alliance/src/beh/man3/beh_rmvbebux.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_rmvbebux.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_rmvbebux.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbebux.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_rmvbefig.3 b/alliance/src/beh/man3/beh_rmvbefig.3 new file mode 100644 index 00000000..3bc0d3ab --- /dev/null +++ b/alliance/src/beh/man3/beh_rmvbefig.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_rmvbefig.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_rmvbefig.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbefig.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_rmvbegen.3 b/alliance/src/beh/man3/beh_rmvbegen.3 new file mode 100644 index 00000000..b328e234 --- /dev/null +++ b/alliance/src/beh/man3/beh_rmvbegen.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_rmvbegen.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_rmvbegen.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbegen.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_rmvbemsg.3 b/alliance/src/beh/man3/beh_rmvbemsg.3 new file mode 100644 index 00000000..61e3f91b --- /dev/null +++ b/alliance/src/beh/man3/beh_rmvbemsg.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_rmvbemsg.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_rmvbemsg.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbemsg.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_rmvbeout.3 b/alliance/src/beh/man3/beh_rmvbeout.3 new file mode 100644 index 00000000..81a1bc40 --- /dev/null +++ b/alliance/src/beh/man3/beh_rmvbeout.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_rmvbeout.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_rmvbeout.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbeout.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_rmvbepor.3 b/alliance/src/beh/man3/beh_rmvbepor.3 new file mode 100644 index 00000000..60cd69f0 --- /dev/null +++ b/alliance/src/beh/man3/beh_rmvbepor.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_rmvbepor.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_rmvbepor.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbepor.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_rmvbereg.3 b/alliance/src/beh/man3/beh_rmvbereg.3 new file mode 100644 index 00000000..7ca45967 --- /dev/null +++ b/alliance/src/beh/man3/beh_rmvbereg.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_rmvbereg.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_rmvbereg.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funbereg.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/man3/beh_rmvberin.3 b/alliance/src/beh/man3/beh_rmvberin.3 new file mode 100644 index 00000000..415c75a0 --- /dev/null +++ b/alliance/src/beh/man3/beh_rmvberin.3 @@ -0,0 +1,6 @@ +.\" $Id: beh_rmvberin.3,v 1.1 2002/04/04 14:54:48 ludo Exp $ +.\" @(#)beh_rmvberin.2 108 Feb 15 1995 UPMC ; Pirouz BAZARGAN SABET +.so man3/funberin.3 + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/beh/src/Makefile.am b/alliance/src/beh/src/Makefile.am new file mode 100644 index 00000000..8b09000f --- /dev/null +++ b/alliance/src/beh/src/Makefile.am @@ -0,0 +1,22 @@ +CFLAGS = @ALLIANCE_CFLAGS@ \ + -DALLIANCE_TOP=\"${ALLIANCE_TOP}\" +lib_LIBRARIES = libBeh.a +include_HEADERS = beh.h +libBeh_a_SOURCES = \ +beh_addbeaux.c beh_delbebus.c beh_frebeaux.c beh_message.c \ +beh_addbebus.c beh_delbebux.c beh_frebebus.c beh_rmvbeaux.c \ +beh_addbebux.c beh_delbeder.c beh_frebebux.c beh_rmvbebus.c \ +beh_addbeder.c beh_delbefig.c beh_frebeder.c beh_rmvbebux.c \ +beh_addbefig.c beh_delbegen.c beh_frebefig.c beh_rmvbeder.c \ +beh_addbegen.c beh_delbemsg.c beh_frebegen.c beh_rmvbefig.c \ +beh_addbemsg.c beh_delbeout.c beh_frebemsg.c beh_rmvbegen.c \ +beh_addbeout.c beh_delbepor.c beh_frebeout.c beh_rmvbemsg.c \ +beh_addbepor.c beh_delbequad.c beh_frebepor.c beh_rmvbeout.c \ +beh_addbequad.c beh_delbereg.c beh_frebereg.c beh_rmvbepor.c \ +beh_addbereg.c beh_delberin.c beh_freberin.c beh_rmvbereg.c \ +beh_addberin.c beh_delbiabl.c beh_frebiabl.c beh_rmvberin.c \ +beh_addbiabl.c beh_delbinod.c beh_frebinod.c beh_rpldelayed.c \ +beh_addbinod.c beh_dict.c beh_getgenva.c beh_rplstable.c \ +beh_apdbeaux.c beh_error.c beh_getvers.c beh_toolbug.c \ +beh_apdberin.c beh_expdelayed.c beh_globals.c beh_vhdlname.c \ +beh_delbeaux.c beh_expstable.c beh.h beh_vhvector.c diff --git a/alliance/src/beh/src/beh.h b/alliance/src/beh/src/beh.h new file mode 100644 index 00000000..80db288b --- /dev/null +++ b/alliance/src/beh/src/beh.h @@ -0,0 +1,351 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh111.h */ +/* date : Mar 8 2000 */ +/* version : v111 */ +/* author : Pirouz BAZARGAN SABET */ +/* contents : low level library for behavioural description */ +/* ###--------------------------------------------------------------### */ + +#ifndef BEH_BEHDEF +#define BEH_BEHDEF + + /* ###------------------------------------------------------### */ + /* defines */ + /* ###------------------------------------------------------### */ + +#define BEH_GENERIC 203698 /* generic ptype code */ +#define BEH_STABLE 0x01 /* description using STABLE */ + +#define BEH_NODE_BDD 0x01 /* fig TYPE : expr. BDD */ +#define BEH_NODE_GEX 0x02 /* fig TYPE : expr. GEX */ +#define BEH_NODE_VARLIST 0x04 /* fig TYPE : list of variables */ +#define BEH_NODE_DERIVATE 0x08 /* fig TYPE : derivatives */ +#define BEH_NODE_USER 0x10 /* fig TYPE : user expression */ +#define BEH_NODE_QUAD 0x20 /* fig TYPE : QUAD structure */ + +#define BEH_CHK_DRIVERS 0x00000001 /* check output drivers */ +#define BEH_CHK_EMPTY 0x00000002 /* check for empty architecture */ + +#define BEH_ARC_VHDL 0x01 /* fig FLAG : VHDL architecture */ +#define BEH_ARC_C 0x02 /* fig FLAG : C architecture */ +#define BEH_FIG_DEPEND 0x04 /* fig FLAG : forward depend. */ +#define BEH_FIG_ZERODELAY 0x08 /* fig FLAG : no delay specified*/ + +#define BEH_CND_UNKNOWN 0x00 /* cond. precedence is unknown */ +#define BEH_CND_PRECEDE 0x01 /* cond. has a precedence */ +#define BEH_CND_NOPRECEDE 0x02 /* cond. has no precedence */ + +#define BEH_ASG_INERTIAL 0x10 /* assignment FLAG : inertial */ +#define BEH_ASG_TRANSPORT 0x20 /* assignment FLAG : transport */ + +#define BEH_FIG__TIMEUNIT 0x07 /* fig TIME UNIT */ +#define BEH_TU__FS 1 /* fig TIME UNIT : fs */ +#define BEH_TU__PS 2 /* fig TIME UNIT : ps */ +#define BEH_TU__NS 3 /* fig TIME UNIT : ns */ +#define BEH_TU__US 4 /* fig TIME UNIT : us */ +#define BEH_TU__MS 5 /* fig TIME UNIT : ms */ + + /* ###------------------------------------------------------### */ + /* global variables */ + /* ###------------------------------------------------------### */ + +extern unsigned int BEH_LINNUM ; + +extern unsigned char BEH_TIMEUNIT; +extern unsigned int BEH_TIMESTEP; + + /* ###------------------------------------------------------### */ + /* structure definitions */ + /* ###------------------------------------------------------### */ + +struct beden /* dictionary entry point */ + { + struct beden *NEXT; /* next entry */ + struct bedrd *DATA; /* data */ + char *KEY ; /* key */ + }; + +struct bedrd /* dictionary record */ + { + struct bedrd *NEXT ; /* next record */ + char *KEY ; /* context key */ + short FD0_VAL; /* data field */ + short FD1_VAL; /* data field */ + short FD2_VAL; /* data field */ + short FD3_VAL; /* data field */ + short FD4_VAL; /* data field */ + short FD5_VAL; /* data field */ + short FD6_VAL; /* data field */ + long PNT_VAL; /* data field */ + }; + +typedef struct befig /* behaviour figure */ + { + struct befig *NEXT ; /* next figure */ + char *NAME ; /* figure's name */ + struct bereg *BEREG ; /* list of internal signals (REGISTER) */ + struct bemsg *BEMSG ; /* list of assert instructions */ + struct berin *BERIN ; /* list of inputs (registers and ports) */ + struct beout *BEOUT ; /* list of output ports */ + struct bebus *BEBUS ; /* list of output ports (BUS) */ + struct beaux *BEAUX ; /* list of internal signals */ + struct beaux *BEDLY ; /* internal signals used for 'DELAYED */ + struct bebux *BEBUX ; /* list of internal signals (BUS) */ + struct bepor *BEPOR ; /* list of ports in reverse order */ + struct begen *BEGEN ; /* list of generic data */ + struct circuit *CIRCUI ; /* Pointer on Circuit for BDDs */ + struct ptype *USER ; /* reserved for user's applications */ + char ERRFLG ; /* error flag */ + char TYPE ; /* description type */ + unsigned char FLAG ; /* description flag */ + unsigned char TIME_UNIT; /* time unit */ + unsigned int TIME_STEP; /* minimum time step */ + } +befig_list; + +typedef struct bereg /* register */ + { + struct bereg *NEXT ; /* next register */ + char *NAME ; /* register's name */ + struct biabl *BIABL ; /* list of drivers (ABL) */ + struct binode *BINODE; /* list of drivers (BDD) */ + } +bereg_list; + +typedef struct bemsg /* assert instruction */ + { + struct bemsg *NEXT ; /* next assertion */ + char *LABEL ; /* instruction's label */ + char *MESSAGE; /* assertion's message */ + struct chain *ABL ; /* assertion's condition (ABL) */ + struct node *NODE ; /* assertion's condition (BDD) */ + char LEVEL ; /* severity level of the assertion */ + } +bemsg_list; + +typedef struct beout /* simple output port */ + { + struct beout *NEXT; /* next output */ + char *NAME; /* port's name */ + struct chain *ABL ; /* port's equation (ABL) */ + struct node *NODE; /* port's equation (BDD) */ + unsigned int TIME; /* driver's delay */ + unsigned char FLAG; /* driver's flag */ + } +beout_list; + +typedef struct bebus /* bussed output port */ + { + struct bebus *NEXT ; /* next bus port */ + char *NAME ; /* port's name */ + struct biabl *BIABL ; /* list of drivers (ABL) */ + struct binode *BINODE; /* list of drivers (BDD) */ + char TYPE ; /* port's type : W or M */ + } +bebus_list; + +typedef struct beaux /* simple internal signal */ + { + struct beaux *NEXT; /* next signal */ + char *NAME; /* signal's name */ + struct chain *ABL ; /* signal's equation (ABL) */ + struct node *NODE; /* signal's equation (BDD) */ + unsigned int TIME; /* driver's delay */ + unsigned char FLAG; /* driver's flag */ + } +beaux_list; + +typedef struct bebux /* bussed internal signal */ + { + struct bebux *NEXT ; /* next signal */ + char *NAME ; /* signal's name */ + struct biabl *BIABL ; /* list of drivers (ABL) */ + struct binode *BINODE; /* list of drivers (BDD) */ + char TYPE ; /* signal's type : W or M */ + } +bebux_list; + +typedef struct bepor /* port */ + { + struct bepor *NEXT ; /* next port */ + char *NAME ; /* port's name */ + char DIRECTION; /* port's mode (I, O, B, Z, T) */ + char TYPE ; /* port's type (B, M or W) */ + } +bepor_list; + +typedef struct biabl /* couple of ABL */ + { + struct biabl *NEXT ; /* next couple */ + char *LABEL ; /* driver's label */ + struct chain *CNDABL; /* driver's connection condition (ABL) */ + struct chain *VALABL; /* equation of driven value (ABL) */ + struct ptype *USER ; /* user field */ + unsigned int TIME ; /* driver's delay */ + unsigned char FLAG ; /* condition and driver's flag */ + } +biabl_list; + +typedef struct binode /* couple of BDD */ + { + struct binode *NEXT ; /* next figure */ + struct node *CNDNODE; /* driver's connection condition (BDD) */ + struct node *VALNODE; /* equation of driven value (BDD) */ + unsigned int TIME ; /* driver's delay */ + unsigned char FLAG ; /* driver's flag */ + } +binode_list; + +typedef struct berin /* primary inputs */ + { + struct berin *NEXT; /* next input */ + char *NAME; /* input's name */ + struct chain *OUT_REF; /* dependent simple output */ + struct chain *BUS_REF; /* dependent bussed output */ + struct chain *AUX_REF; /* dependent simple internal signal */ + struct chain *REG_REF; /* dependent internal register */ + struct chain *BUX_REF; /* dependent bussed internal signal */ + struct chain *MSG_REF; /* dependent assertion */ + struct chain *DLY_REF; /* dependent delayed internal signal */ + } +berin_list; + +typedef struct begen /* generic */ + { + struct begen *NEXT ; /* next generic */ + char *NAME ; /* generic`s name */ + char *TYPE ; /* generic type`s name */ + void *VALUE; /* generic`s value */ + } +begen_list; + +typedef struct bequad + { + struct node *BDD ; /* expression using BDD format */ + struct begex *GEX ; /* expression using GEX format */ + struct chain *VARLIST ; /* variable list */ + struct beder *DERIVATE; /* list of derivate BDDs */ + void *USER ; /* user defined form of the expression */ + } +bequad_list; + +typedef struct beder + { + struct beder *NEXT ; /* next derivative */ + struct node *BDD ; /* derivative BDD */ + short INDEX; /* index of the variable */ + } +beder_list; + +typedef struct begex + { + struct chain *OPERAND; /* list of operands or NULL for term */ + unsigned int TERM ; /* operator or terminal's index */ + unsigned short TYPE ; /* expression's type index */ + } +begex_list; + + /* ###------------------------------------------------------### */ + /* functions */ + /* ###------------------------------------------------------### */ + +extern struct beaux *beh_addbeaux (); +extern struct bebux *beh_addbebux (); +extern struct bebus *beh_addbebus (); +extern struct befig *beh_addbefig (); +extern struct begen *beh_addbegen (); +extern struct bemsg *beh_addbemsg (); +extern struct beout *beh_addbeout (); +extern struct bepor *beh_addbepor (); +extern struct bereg *beh_addbereg (); +extern struct berin *beh_addberin (); +extern struct biabl *beh_addbiabl (); +extern struct binode *beh_addbinode (); + +extern struct beaux *beh_apdbeaux (); +extern struct berin *beh_apdberin (); + +extern struct beder *beh_addbeder (); +extern struct beaux *beh_delbeaux (); +extern struct bebux *beh_delbebux (); +extern struct bebus *beh_delbebus (); +extern struct befig *beh_delbefig (); +extern struct begen *beh_delbegen (); +extern struct bemsg *beh_delbemsg (); +extern struct beout *beh_delbeout (); +extern struct bepor *beh_delbepor (); +extern struct bereg *beh_delbereg (); +extern struct berin *beh_delberin (); +extern struct biabl *beh_delbiabl (); +extern struct binode *beh_delbinode (); +extern struct beder *beh_delbeder (); +extern void beh_delbequad (); + +extern void beh_frebeaux (); +extern void beh_frebebux (); +extern void beh_frebebus (); +extern void beh_frebefig (); +extern void beh_frebegen (); +extern void beh_frebemsg (); +extern void beh_frebeout (); +extern void beh_frebepor (); +extern void beh_frebereg (); +extern void beh_freberin (); +extern void beh_frebiabl (); +extern void beh_frebinode (); +extern void beh_frebeder (); + +extern struct beaux *beh_rmvbeaux (); +extern struct bebux *beh_rmvbebux (); +extern struct bebus *beh_rmvbebus (); +extern struct befig *beh_rmvbefig (); +extern struct begen *beh_rmvbegen (); +extern struct bemsg *beh_rmvbemsg (); +extern struct beout *beh_rmvbeout (); +extern struct bepor *beh_rmvbepor (); +extern struct bereg *beh_rmvbereg (); +extern struct berin *beh_rmvberin (); +extern struct beder *beh_rmvbeder (); + +extern struct chain *beh_expstable (); +extern struct chain *beh_expdelayed (); + +extern struct chain *beh_rplstable (); +extern struct chain *beh_rpldelayed (); + +extern struct beden **beh_initab (); +extern void beh_addtab (); +extern long beh_chktab (); +extern void beh_fretab (); + +extern unsigned int beh_error (); +extern void beh_message (); +extern void beh_toolbug (); + +extern char *beh_vhdlname (); +extern char *beh_vhvector (); + +#endif diff --git a/alliance/src/beh/src/beh_addbeaux.c b/alliance/src/beh/src/beh_addbeaux.c new file mode 100644 index 00000000..48774184 --- /dev/null +++ b/alliance/src/beh/src/beh_addbeaux.c @@ -0,0 +1,64 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbeaux.c */ +/* date : Feb 29 2000 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbeaux */ +/* description : create a BEAUX structure at the top the list */ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct beaux *beh_addbeaux (lastbeaux, name, abl_expr, bdd_expr) + +struct beaux *lastbeaux; /* pointer on the last beaux structure */ +char *name ; /* simple internal signal's name */ +struct chain *abl_expr ; /* simple internal signal's expr. (ABL) */ +struct node *bdd_expr ; /* simple internal signal's expr. (BDD) */ + + { + struct beaux *ptaux; + + name = namealloc (name); + + ptaux = (struct beaux *) mbkalloc (sizeof(struct beaux)); + ptaux->NAME = name ; + ptaux->TIME = 0 ; + ptaux->FLAG = BEH_ASG_INERTIAL; + ptaux->ABL = abl_expr ; + ptaux->NODE = bdd_expr ; + ptaux->NEXT = lastbeaux ; + + return (ptaux); + } diff --git a/alliance/src/beh/src/beh_addbebus.c b/alliance/src/beh/src/beh_addbebus.c new file mode 100644 index 00000000..9161ea37 --- /dev/null +++ b/alliance/src/beh/src/beh_addbebus.c @@ -0,0 +1,64 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbebus.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbebus */ +/* description : create a BEBUS structure at the top the list */ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct bebus *beh_addbebus (lastbebus, name, biabl, binode, type) + +struct bebus *lastbebus; /* pointer on the last bebus structure */ +char *name; /* port's name */ +struct biabl *biabl; /* port's drivers (ABL) */ +struct binode *binode; /* port's drivers (BDD) */ +char type; /* port type mark (M or W) */ + + { + struct bebus *ptbus; + + name = namealloc (name); + + ptbus = (struct bebus *) mbkalloc (sizeof(struct bebus)); + ptbus->NAME = name; + ptbus->BIABL = biabl; + ptbus->BINODE = binode; + ptbus->TYPE = type; + ptbus->NEXT = lastbebus; + + return (ptbus); + } diff --git a/alliance/src/beh/src/beh_addbebux.c b/alliance/src/beh/src/beh_addbebux.c new file mode 100644 index 00000000..968b2374 --- /dev/null +++ b/alliance/src/beh/src/beh_addbebux.c @@ -0,0 +1,64 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbebux.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbebux */ +/* description : create a BEBUX structure at the top the list */ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct bebux *beh_addbebux (lastbebux, name, biabl, binode, type) + +struct bebux *lastbebux; /* pointer on the last bebux structure */ +char *name; /* signal's name */ +struct biabl *biabl; /* signal's expression (ABL) */ +struct binode *binode; /* signal's expression (BDD) */ +char type; /* signal's type mark (M or W) */ + + { + struct bebux *ptbux; + + name = namealloc (name); + + ptbux = (struct bebux *) mbkalloc (sizeof(struct bebux)); + ptbux->NAME = name; + ptbux->BIABL = biabl; + ptbux->BINODE = binode; + ptbux->TYPE = type; + ptbux->NEXT = lastbebux; + + return (ptbux); + } diff --git a/alliance/src/beh/src/beh_addbeder.c b/alliance/src/beh/src/beh_addbeder.c new file mode 100644 index 00000000..7d9c30fc --- /dev/null +++ b/alliance/src/beh/src/beh_addbeder.c @@ -0,0 +1,59 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbeder.c */ +/* date : Mar 17 1995 */ +/* version : v109 */ +/* authors : Laurent VUILLEMIN */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbeder */ +/* description : create a BEDER structure at the top of the list */ +/* called func. : mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct beder *beh_addbeder (last_beder, bdd_expr, index) + +struct beder *last_beder; +struct node *bdd_expr ; +short index ; + + { + struct beder *ptder; + + ptder = (struct beder *) mbkalloc (sizeof(struct beder)); + + ptder->BDD = bdd_expr ; + ptder->INDEX = index ; + ptder->NEXT = last_beder; + + return (ptder); + } diff --git a/alliance/src/beh/src/beh_addbefig.c b/alliance/src/beh/src/beh_addbefig.c new file mode 100644 index 00000000..a4eb11f6 --- /dev/null +++ b/alliance/src/beh/src/beh_addbefig.c @@ -0,0 +1,75 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbefig.c */ +/* date : Mar 8 2000 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbefig */ +/* description : create an empty BEFIG structure at the top of the list*/ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct befig *beh_addbefig (lastbefig, name) + +struct befig *lastbefig; /* pointer on the last befig structure */ +char *name ; /* figure's name */ + + { + struct befig *ptfig ; + unsigned char err_flg = 0; + + ptfig = (struct befig *) mbkalloc (sizeof(struct befig)); + + ptfig->NAME = namealloc (name); + ptfig->BEREG = NULL ; + ptfig->BEMSG = NULL ; + ptfig->BERIN = NULL ; + ptfig->BEOUT = NULL ; + ptfig->BEBUS = NULL ; + ptfig->BEAUX = NULL ; + ptfig->BEDLY = NULL ; + ptfig->BEBUX = NULL ; + ptfig->BEPOR = NULL ; + ptfig->CIRCUI = NULL ; + ptfig->USER = NULL ; + ptfig->BEGEN = NULL ; + ptfig->ERRFLG = err_flg ; + ptfig->TYPE = 0 ; + ptfig->FLAG = 0 ; + ptfig->TIME_UNIT = BEH_TIMEUNIT ; + ptfig->TIME_STEP = BEH_TIMESTEP ; + ptfig->NEXT = lastbefig ; + + return (ptfig); + } diff --git a/alliance/src/beh/src/beh_addbegen.c b/alliance/src/beh/src/beh_addbegen.c new file mode 100644 index 00000000..7a46ea2d --- /dev/null +++ b/alliance/src/beh/src/beh_addbegen.c @@ -0,0 +1,64 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbegen.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbegen */ +/* description : create a BEGEN structure at the top the list */ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct begen *beh_addbegen (lastbegen, name, type, value) + +struct begen *lastbegen; /* pointer on the last begen structure */ +char *name; /* generic's name */ +char *type; /* generic's type mark */ +void *value; /* generic's value */ + + { + + struct begen *ptgen; + + name = namealloc (name); + type = namealloc (type); + + ptgen = (struct begen *) mbkalloc (sizeof(struct begen)); + ptgen->NAME = name; + ptgen->TYPE = type; + ptgen->VALUE = value; + ptgen->NEXT = lastbegen; + + return (ptgen); + } diff --git a/alliance/src/beh/src/beh_addbemsg.c b/alliance/src/beh/src/beh_addbemsg.c new file mode 100644 index 00000000..f2bba9ed --- /dev/null +++ b/alliance/src/beh/src/beh_addbemsg.c @@ -0,0 +1,67 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbemsg.c */ +/* date : Nov 6 1995 */ +/* version : v109 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbemsg */ +/* description : create BEMSG structure at the top the list */ +/* called func. : mbkalloc, namealloc */ +/* ###--------------------------------------------------------------### */ + +struct bemsg *beh_addbemsg (lastbemsg,label,level,message,abl_expr,bdd_expr) + +struct bemsg *lastbemsg; /* pointer on the last bemsg structure */ +char *label; /* assert's label */ +char level; /* severity level (E or W) */ +char *message; /* reported message */ +struct chain *abl_expr; /* assert's condition (ABL) */ +struct node *bdd_expr; /* assert's condition (BDD) */ + + { + + struct bemsg *ptmsg; + + label = namealloc (label); + + ptmsg = (struct bemsg *) mbkalloc (sizeof(struct bemsg)); + ptmsg->LABEL = label; + ptmsg->LEVEL = level; + ptmsg->MESSAGE = message; + ptmsg->ABL = abl_expr; + ptmsg->NODE = bdd_expr; + ptmsg->NEXT = lastbemsg; + + return (ptmsg); + } diff --git a/alliance/src/beh/src/beh_addbeout.c b/alliance/src/beh/src/beh_addbeout.c new file mode 100644 index 00000000..198c3901 --- /dev/null +++ b/alliance/src/beh/src/beh_addbeout.c @@ -0,0 +1,64 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbeout.c */ +/* date : Feb 29 2000 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbeout */ +/* description : create a BEOUT structure at the top the list */ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct beout *beh_addbeout (lastbeout, name, abl_expr, bdd_expr) + +struct beout *lastbeout; /* pointer on the last beout structure */ +char *name ; /* simple output port's name */ +struct chain *abl_expr ; /* simple output port's expression (ABL)*/ +struct node *bdd_expr ; /* simple output port's expression (BDD)*/ + + { + struct beout *ptout; + + name = namealloc (name); + + ptout = (struct beout *) mbkalloc (sizeof(struct beout)); + ptout->NAME = name ; + ptout->ABL = abl_expr ; + ptout->TIME = 0 ; + ptout->FLAG = BEH_ASG_INERTIAL; + ptout->NODE = bdd_expr ; + ptout->NEXT = lastbeout ; + + return (ptout); + } diff --git a/alliance/src/beh/src/beh_addbepor.c b/alliance/src/beh/src/beh_addbepor.c new file mode 100644 index 00000000..431f4586 --- /dev/null +++ b/alliance/src/beh/src/beh_addbepor.c @@ -0,0 +1,62 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbepor.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbepor */ +/* description : create a BEPOR structure at the top the list */ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct bepor *beh_addbepor (lastbepor, name, dir, type) + +struct bepor *lastbepor; /* pointer on the last bepor structure */ +char *name; /* signal's name */ +char dir; /* signal's mode (I, O, B, Z, or T) */ +char type; /* signal'type mark (M or W) */ + + { + struct bepor *ptbepor; + + name = namealloc (name); + + ptbepor = (struct bepor *) mbkalloc (sizeof(struct bepor)); + ptbepor->NAME = name; + ptbepor->DIRECTION = dir; + ptbepor->TYPE = type; + ptbepor->NEXT = lastbepor; + + return (ptbepor); + } diff --git a/alliance/src/beh/src/beh_addbequad.c b/alliance/src/beh/src/beh_addbequad.c new file mode 100644 index 00000000..87f0a258 --- /dev/null +++ b/alliance/src/beh/src/beh_addbequad.c @@ -0,0 +1,61 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbequad.c */ +/* date : Mar 17 1995 */ +/* version : v000 */ +/* authors : Laurent VUILLEMIN */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbequad */ +/* description : create a BEQUAD structure at the top of the list */ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct bequad *beh_addbequad ( bdd_expr, gex_expr, var_list, der_list) + +struct node *bdd_expr; +struct begex *gex_expr; +struct chain *var_list; +struct beder *der_list; + + { + struct bequad *ptquad; + + + ptquad = (struct bequad *) mbkalloc (sizeof(struct bequad)); + ptquad->BDD = bdd_expr; + ptquad->GEX = gex_expr; + ptquad->VARLIST = var_list; + ptquad->DERIVATE = der_list; + ptquad->USER = NULL; + return (ptquad); + } diff --git a/alliance/src/beh/src/beh_addbereg.c b/alliance/src/beh/src/beh_addbereg.c new file mode 100644 index 00000000..565fcfd4 --- /dev/null +++ b/alliance/src/beh/src/beh_addbereg.c @@ -0,0 +1,62 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbereg.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbereg */ +/* description : create a BEREG structure at the top the list */ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct bereg *beh_addbereg (lastbereg, name, biabl, binode) + +struct bereg *lastbereg; /* pointer on the last bereg structure */ +char *name; /* register's name */ +struct biabl *biabl; /* register's drivers (ABL) */ +struct binode *binode; /* register's drivers (BDD) */ + + { + struct bereg *ptreg; + + name = namealloc (name); + + ptreg = (struct bereg *) mbkalloc (sizeof(struct bereg)); + ptreg->NAME = name; + ptreg->BIABL = biabl; + ptreg->BINODE = binode; + ptreg->NEXT = lastbereg; + + return (ptreg); + } diff --git a/alliance/src/beh/src/beh_addberin.c b/alliance/src/beh/src/beh_addberin.c new file mode 100644 index 00000000..804490f1 --- /dev/null +++ b/alliance/src/beh/src/beh_addberin.c @@ -0,0 +1,66 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addberin.c */ +/* date : Sep 20 1994 */ +/* version : v107 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addberin */ +/* description : create a BERIN structure at the top the list */ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct berin *beh_addberin (lastberin, name) + +struct berin *lastberin; /* pointer on the last berin structure */ +char *name; /* signal's name */ + + { + struct berin *ptrin; + + name = namealloc (name); + + ptrin = (struct berin *) mbkalloc (sizeof(struct berin)); + ptrin->NAME = name; + ptrin->NEXT = lastberin; + + ptrin->REG_REF = NULL; + ptrin->MSG_REF = NULL; + ptrin->AUX_REF = NULL; + ptrin->BUX_REF = NULL; + ptrin->BUS_REF = NULL; + ptrin->OUT_REF = NULL; + ptrin->DLY_REF = NULL; + + return (ptrin); + } diff --git a/alliance/src/beh/src/beh_addbiabl.c b/alliance/src/beh/src/beh_addbiabl.c new file mode 100644 index 00000000..7d43a19f --- /dev/null +++ b/alliance/src/beh/src/beh_addbiabl.c @@ -0,0 +1,64 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbiabl.c */ +/* date : Feb 29 2000 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbiabl */ +/* description : create a BIABL structure at the top the list */ +/* called func. : namealloc, mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct biabl *beh_addbiabl (lastbiabl, label, condition, value) + +struct biabl *lastbiabl; /* pointer on the last biabl structure */ +char *label ; /* block's label */ +struct chain *condition; /* guard expression (ABL) */ +struct chain *value ; /* value expression (ABL) */ + + { + struct biabl *ptbiabl; + + ptbiabl = (struct biabl *) mbkalloc (sizeof(struct biabl)); + + ptbiabl->LABEL = label ; + ptbiabl->CNDABL = condition ; + ptbiabl->VALABL = value ; + ptbiabl->TIME = 0 ; + ptbiabl->FLAG = BEH_ASG_INERTIAL; + ptbiabl->USER = NULL ; + ptbiabl->NEXT = lastbiabl ; + + return (ptbiabl); + } diff --git a/alliance/src/beh/src/beh_addbinod.c b/alliance/src/beh/src/beh_addbinod.c new file mode 100644 index 00000000..d73ed532 --- /dev/null +++ b/alliance/src/beh/src/beh_addbinod.c @@ -0,0 +1,60 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_addbinod.c */ +/* date : Feb 29 2000 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_addbinode */ +/* description : create a BINODE structure at the top the list */ +/* called func. : mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct binode *beh_addbinode (lastbinode, condition, value) + +struct binode *lastbinode; /* pointer on the last binode structure */ +struct node *condition ; /* guard expression (BDD) */ +struct node *value ; /* value expression (BDD) */ + + { + struct binode *ptbinode; + + ptbinode = (struct binode *) mbkalloc (sizeof(struct binode)); + ptbinode->TIME = 0 ; + ptbinode->FLAG = BEH_ASG_INERTIAL; + ptbinode->CNDNODE = condition ; + ptbinode->VALNODE = value ; + ptbinode->NEXT = lastbinode ; + + return (ptbinode); + } diff --git a/alliance/src/beh/src/beh_apdbeaux.c b/alliance/src/beh/src/beh_apdbeaux.c new file mode 100644 index 00000000..9a2a9b5d --- /dev/null +++ b/alliance/src/beh/src/beh_apdbeaux.c @@ -0,0 +1,62 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_apdbeaux.c */ +/* date : Dec 2 1999 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_apdbeaux */ +/* description : append two lists of internal signals (BEAUX) */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +struct beaux *beh_apdbeaux (s1_aux, s2_aux) + +struct beaux *s1_aux; +struct beaux *s2_aux; + + { + struct beaux *pt_aux; + + pt_aux = s2_aux; + if (pt_aux != NULL) + { + while (pt_aux->NEXT != NULL) + pt_aux = pt_aux->NEXT; + pt_aux->NEXT = s1_aux; + } + else + s2_aux = s1_aux; + + return (s2_aux); + } diff --git a/alliance/src/beh/src/beh_apdberin.c b/alliance/src/beh/src/beh_apdberin.c new file mode 100644 index 00000000..e94f467f --- /dev/null +++ b/alliance/src/beh/src/beh_apdberin.c @@ -0,0 +1,62 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_apdberin.c */ +/* date : Dec 2 1999 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_apdberin */ +/* description : append two lists of input signals (BERIN) */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +struct berin *beh_apdberin (s1_rin, s2_rin) + +struct berin *s1_rin; +struct berin *s2_rin; + + { + struct berin *pt_rin; + + pt_rin = s2_rin; + if (pt_rin != NULL) + { + while (pt_rin->NEXT != NULL) + pt_rin = pt_rin->NEXT; + pt_rin->NEXT = s1_rin; + } + else + s2_rin = s1_rin; + + return (s2_rin); + } diff --git a/alliance/src/beh/src/beh_delbeaux.c b/alliance/src/beh/src/beh_delbeaux.c new file mode 100644 index 00000000..03372daa --- /dev/null +++ b/alliance/src/beh/src/beh_delbeaux.c @@ -0,0 +1,94 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbeaux.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbeaux */ +/* description : delete a BEAUX structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, freeExpr */ +/* ###--------------------------------------------------------------### */ + +struct beaux *beh_delbeaux (listbeaux, ptbeaux, mode) + +struct beaux *listbeaux; /* list of beaux containing the object */ +struct beaux *ptbeaux; /* pointer of the BEAUX to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct beaux headaux; + struct beaux *ptlastaux; + + if ((listbeaux != NULL) && (ptbeaux != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headaux.NEXT = listbeaux; + ptlastaux = &headaux; + while ((ptlastaux != NULL) && (ptlastaux->NEXT != ptbeaux)) + ptlastaux = ptlastaux->NEXT; + + if (ptlastaux != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if (ptbeaux->ABL != NULL) + (void) fprintf (stderr,"BEH_warning : beaux `%s` not empty\n", + ptbeaux->NAME); + } + else + freeExpr (ptbeaux->ABL); + + ptlastaux->NEXT = ptbeaux->NEXT; + mbkfree (ptbeaux); + } + + listbeaux = headaux.NEXT; + } + + return(listbeaux); + } diff --git a/alliance/src/beh/src/beh_delbebus.c b/alliance/src/beh/src/beh_delbebus.c new file mode 100644 index 00000000..1062ab25 --- /dev/null +++ b/alliance/src/beh/src/beh_delbebus.c @@ -0,0 +1,97 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbebus.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbebus */ +/* description : delete a BEBUS structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, beh_frebiabl, beh_frebinode */ +/* ###--------------------------------------------------------------### */ + +struct bebus *beh_delbebus (listbebus, ptbebus, mode) + +struct bebus *listbebus; /* list of bebus containing the object */ +struct bebus *ptbebus; /* pointer of the BEBUS to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct bebus headbus; + struct bebus *ptlastbus; + + if ((listbebus != NULL) && (ptbebus != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headbus.NEXT = listbebus; + ptlastbus = &headbus; + while ((ptlastbus != NULL) && (ptlastbus->NEXT != ptbebus)) + ptlastbus = ptlastbus->NEXT; + + if (ptlastbus != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbebus->BIABL != NULL) || (ptbebus->BINODE != NULL)) + (void) fprintf (stderr,"BEH_warning : bebus `%s` not empty\n", + ptbebus->NAME); + } + else + { + beh_frebiabl (ptbebus->BIABL); + beh_frebinode (ptbebus->BINODE); + } + + ptlastbus->NEXT = ptbebus->NEXT; + mbkfree (ptbebus); + } + + listbebus = headbus.NEXT; + } + + return(listbebus); + } diff --git a/alliance/src/beh/src/beh_delbebux.c b/alliance/src/beh/src/beh_delbebux.c new file mode 100644 index 00000000..359eaa91 --- /dev/null +++ b/alliance/src/beh/src/beh_delbebux.c @@ -0,0 +1,97 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbebux.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbebux */ +/* description : delete a BEBUX structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, beh_frebiabl, beh_frebinode */ +/* ###--------------------------------------------------------------### */ + +struct bebux *beh_delbebux (listbebux, ptbebux, mode) + +struct bebux *listbebux; /* list of bebux containing the object */ +struct bebux *ptbebux; /* pointer of the BEBUX to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct bebux headbux; + struct bebux *ptlastbux; + + if ((listbebux != NULL) && (ptbebux != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headbux.NEXT = listbebux; + ptlastbux = &headbux; + while ((ptlastbux != NULL) && (ptlastbux->NEXT != ptbebux)) + ptlastbux = ptlastbux->NEXT; + + if (ptlastbux != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbebux->BIABL != NULL) || (ptbebux->BINODE != NULL)) + (void) fprintf (stderr,"BEH_warning : bebux `%s` not empty\n", + ptbebux->NAME); + } + else + { + beh_frebiabl (ptbebux->BIABL); + beh_frebinode (ptbebux->BINODE); + } + + ptlastbux->NEXT = ptbebux->NEXT; + mbkfree (ptbebux); + } + + listbebux = headbux.NEXT; + } + + return(listbebux); + } diff --git a/alliance/src/beh/src/beh_delbeder.c b/alliance/src/beh/src/beh_delbeder.c new file mode 100644 index 00000000..b5305b19 --- /dev/null +++ b/alliance/src/beh/src/beh_delbeder.c @@ -0,0 +1,92 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbeder.c */ +/* date : Oct 25 1995 */ +/* version : v109 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbeder */ +/* description : delete a BEDER structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +struct beder *beh_delbeder (listbeder, ptbeder, mode) + +struct beder *listbeder; /* list of beder containing the object */ +struct beder *ptbeder ; /* pointer of the beder to be deleted */ +char mode ; /* recursive delete or not (Y or N) */ + + { + struct beder headder ; + struct beder *ptlastder; + + if ((listbeder != NULL) && (ptbeder != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headder.NEXT = listbeder; + ptlastder = &headder; + + while ((ptlastder != NULL) && (ptlastder->NEXT != ptbeder)) + ptlastder = ptlastder->NEXT; + + if (ptlastder != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbeder->BDD != NULL) ) + (void) fprintf (stderr,"BEH_warning : beder not empty\n"); + } + + ptlastder->NEXT = ptbeder->NEXT; + mbkfree (ptbeder); + } + + listbeder = headder.NEXT; + } + + return(listbeder); + } diff --git a/alliance/src/beh/src/beh_delbefig.c b/alliance/src/beh/src/beh_delbefig.c new file mode 100644 index 00000000..60b96508 --- /dev/null +++ b/alliance/src/beh/src/beh_delbefig.c @@ -0,0 +1,115 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbefig.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbefig */ +/* description : delete a BEFIG structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N. */ +/* called func. : mbkfree , beh_frebereg, beh_frebemsg, */ +/* beh_freberin, beh_frebeout, beh_frebebus, */ +/* beh_frebeaux, beh_frebebux, beh_frebepor, */ +/* beh_frebegen, getptype */ +/* ###--------------------------------------------------------------### */ + +struct befig *beh_delbefig (listbefig, ptbefig, mode) + +struct befig *listbefig; /* list of befig containing the object */ +struct befig *ptbefig; /* pointer of the BEFIG to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct befig headfig; + struct befig *ptlastfig; + struct ptype *ptptype; + + if ((listbefig != NULL) && (ptbefig != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headfig.NEXT = listbefig; + ptlastfig = &headfig; + while ((ptlastfig != NULL) && (ptlastfig->NEXT != ptbefig)) + ptlastfig = ptlastfig->NEXT; + + if (ptlastfig != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbefig->BEREG != NULL) || (ptbefig->BEMSG != NULL) || + (ptbefig->BERIN != NULL) || (ptbefig->BEOUT != NULL) || + (ptbefig->BEBUS != NULL) || (ptbefig->BEAUX != NULL) || + (ptbefig->BEBUX != NULL) || (ptbefig->BEDLY != NULL) || + (ptbefig->BEPOR != NULL) || (ptbefig->USER != NULL)) + + (void) fprintf (stderr,"BEH_warning : befig `%s` not empty\n", + ptbefig->NAME); + } + else + { + beh_frebereg (ptbefig->BEREG); + beh_frebemsg (ptbefig->BEMSG); + beh_freberin (ptbefig->BERIN); + beh_frebeout (ptbefig->BEOUT); + beh_frebebus (ptbefig->BEBUS); + beh_frebeaux (ptbefig->BEAUX); + beh_frebeaux (ptbefig->BEDLY); + beh_frebebux (ptbefig->BEBUX); + beh_frebepor (ptbefig->BEPOR); + if ((ptptype = getptype (ptbefig->USER,BEH_GENERIC)) != NULL) + beh_frebegen (ptptype->DATA); + } + + ptlastfig->NEXT = ptbefig->NEXT; + mbkfree (ptbefig); + } + + listbefig = headfig.NEXT; + } + + return(listbefig); + } diff --git a/alliance/src/beh/src/beh_delbegen.c b/alliance/src/beh/src/beh_delbegen.c new file mode 100644 index 00000000..eaab290c --- /dev/null +++ b/alliance/src/beh/src/beh_delbegen.c @@ -0,0 +1,94 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbegen.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbegen */ +/* description : delete a BEGEN structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +struct begen *beh_delbegen (listbegen, ptbegen, mode) + +struct begen *listbegen; /* list of begen containing the object */ +struct begen *ptbegen; /* pointer of the BEGEN to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct begen headgen; + struct begen *ptlastgen; + + if ((listbegen != NULL) && (ptbegen != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headgen.NEXT = listbegen; + ptlastgen = &headgen; + while ((ptlastgen != NULL) && (ptlastgen->NEXT != ptbegen)) + ptlastgen = ptlastgen->NEXT; + + if (ptlastgen != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if (ptbegen->VALUE != NULL) + (void) fprintf (stderr,"BEH_warning : begen `%s` not empty\n", + ptbegen->NAME); + } + else + mbkfree (ptbegen->VALUE); + + ptlastgen->NEXT = ptbegen->NEXT; + mbkfree (ptbegen); + } + + listbegen = headgen.NEXT; + } + + return(listbegen); + } diff --git a/alliance/src/beh/src/beh_delbemsg.c b/alliance/src/beh/src/beh_delbemsg.c new file mode 100644 index 00000000..d47b7109 --- /dev/null +++ b/alliance/src/beh/src/beh_delbemsg.c @@ -0,0 +1,94 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbemsg.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbemsg */ +/* description : delete a BEMSG structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, freeExpr */ +/* ###--------------------------------------------------------------### */ + +struct bemsg *beh_delbemsg (listbemsg, ptbemsg, mode) + +struct bemsg *listbemsg; /* list of bemsg containing the object */ +struct bemsg *ptbemsg; /* pointer of the BEMSG to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct bemsg headmsg; + struct bemsg *ptlastmsg; + + if ((listbemsg != NULL) && (ptbemsg != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headmsg.NEXT = listbemsg; + ptlastmsg = &headmsg; + while ((ptlastmsg != NULL) && (ptlastmsg->NEXT != ptbemsg)) + ptlastmsg = ptlastmsg->NEXT; + + if (ptlastmsg != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if (ptbemsg->ABL != NULL) + (void) fprintf (stderr,"BEH_warning : bemsg `%s` not empty\n", + ptbemsg->LABEL); + } + else + freeExpr (ptbemsg->ABL); + + ptlastmsg->NEXT = ptbemsg->NEXT; + mbkfree (ptbemsg); + } + + listbemsg = headmsg.NEXT; + } + + return(listbemsg); + } diff --git a/alliance/src/beh/src/beh_delbeout.c b/alliance/src/beh/src/beh_delbeout.c new file mode 100644 index 00000000..3b67ef82 --- /dev/null +++ b/alliance/src/beh/src/beh_delbeout.c @@ -0,0 +1,94 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbeout.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbeout */ +/* description : delete a BEOUT structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, freeExpr */ +/* ###--------------------------------------------------------------### */ + +struct beout *beh_delbeout (listbeout, ptbeout, mode) + +struct beout *listbeout; /* list of beout containing the object */ +struct beout *ptbeout; /* pointer of the BEOUT to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct beout headout; + struct beout *ptlastout; + + if ((listbeout != NULL) && (ptbeout != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headout.NEXT = listbeout; + ptlastout = &headout; + while ((ptlastout != NULL) && (ptlastout->NEXT != ptbeout)) + ptlastout = ptlastout->NEXT; + + if (ptlastout != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if (ptbeout->ABL != NULL) + (void) fprintf (stderr,"BEH_warning : beout `%s` not empty\n", + ptbeout->NAME); + } + else + freeExpr (ptbeout->ABL); + + ptlastout->NEXT = ptbeout->NEXT; + mbkfree (ptbeout); + } + + listbeout = headout.NEXT; + } + + return(listbeout); + } diff --git a/alliance/src/beh/src/beh_delbepor.c b/alliance/src/beh/src/beh_delbepor.c new file mode 100644 index 00000000..9c7a672b --- /dev/null +++ b/alliance/src/beh/src/beh_delbepor.c @@ -0,0 +1,81 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbepor.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbepor */ +/* description : delete a BEPOR structure and return the pointer of */ +/* the next object. */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +struct bepor *beh_delbepor (listbepor, ptbepor) + +struct bepor *listbepor; /* list of bepor containing the object */ +struct bepor *ptbepor; /* pointer of the BEPOR to be deleted */ + + { + struct bepor headpor; + struct bepor *ptlastpor; + + if ((listbepor != NULL) && (ptbepor != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headpor.NEXT = listbepor; + ptlastpor = &headpor; + while ((ptlastpor != NULL) && (ptlastpor->NEXT != ptbepor)) + ptlastpor = ptlastpor->NEXT; + + if (ptlastpor != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* ###------------------------------------------------------### */ + + ptlastpor->NEXT = ptbepor->NEXT; + mbkfree (ptbepor); + } + + listbepor = headpor.NEXT; + } + + return(listbepor); + } diff --git a/alliance/src/beh/src/beh_delbequad.c b/alliance/src/beh/src/beh_delbequad.c new file mode 100644 index 00000000..c63cf4e3 --- /dev/null +++ b/alliance/src/beh/src/beh_delbequad.c @@ -0,0 +1,73 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbequad.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Laurent VUILLEMIN */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbequad */ +/* description : delete a BEQUAD structure. A warning is printed out */ +/* if the object to be deleted is not empty when the */ +/* mode is N */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_delbequad (listbequad, ptbequad, mode) + +struct bequad *ptbequad; /* pointer of the BEQUAD to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + + if (ptbequad != NULL) + { + /* ###------------------------------------------------------### */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbequad->BDD != NULL) || (ptbequad->GEX != NULL) || + (ptbequad->VARLIST != NULL) || (ptbequad->DERIVATE != NULL)) + (void) fprintf (stderr, "BEH_warning : bequad not empty\n"); + } + else + { + beh_frebeder (ptbequad->DERIVATE); + freechain (ptbequad->VARLIST ); + } + + mbkfree (ptbequad); + } + } diff --git a/alliance/src/beh/src/beh_delbereg.c b/alliance/src/beh/src/beh_delbereg.c new file mode 100644 index 00000000..a0ceffb8 --- /dev/null +++ b/alliance/src/beh/src/beh_delbereg.c @@ -0,0 +1,97 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbereg.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbereg */ +/* description : delete a BEREG structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, beh_frebiabl, beh_frebinode */ +/* ###--------------------------------------------------------------### */ + +struct bereg *beh_delbereg (listbereg, ptbereg, mode) + +struct bereg *listbereg; /* list of bereg containing the object */ +struct bereg *ptbereg; /* pointer of the BEREG to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct bereg headreg; + struct bereg *ptlastreg; + + if ((listbereg != NULL) && (ptbereg != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headreg.NEXT = listbereg; + ptlastreg = &headreg; + while ((ptlastreg != NULL) && (ptlastreg->NEXT != ptbereg)) + ptlastreg = ptlastreg->NEXT; + + if (ptlastreg != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbereg->BIABL != NULL) || (ptbereg->BINODE != NULL)) + (void) fprintf (stderr,"BEH_warning : bereg `%s` not empty\n", + ptbereg->NAME); + } + else + { + beh_frebiabl (ptbereg->BIABL); + beh_frebinode (ptbereg->BINODE); + } + + ptlastreg->NEXT = ptbereg->NEXT; + mbkfree (ptbereg); + } + + listbereg = headreg.NEXT; + } + + return(listbereg); + } diff --git a/alliance/src/beh/src/beh_delberin.c b/alliance/src/beh/src/beh_delberin.c new file mode 100644 index 00000000..7674b2e0 --- /dev/null +++ b/alliance/src/beh/src/beh_delberin.c @@ -0,0 +1,81 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delberin.c */ +/* date : Sep 20 1994 */ +/* version : v107 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delberin */ +/* description : delete a BERIN structure and return the pointer of */ +/* the next object. */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +struct berin *beh_delberin (listberin, ptberin) + +struct berin *listberin; /* list of berin containing the object */ +struct berin *ptberin; /* pointer of the BERIN to be deleted */ + + { + struct berin headrin; + struct berin *ptlastrin; + + if ((listberin != NULL) && (ptberin != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headrin.NEXT = listberin; + ptlastrin = &headrin; + while ((ptlastrin != NULL) && (ptlastrin->NEXT != ptberin)) + ptlastrin = ptlastrin->NEXT; + + if (ptlastrin != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* ###------------------------------------------------------### */ + + ptlastrin->NEXT = ptberin->NEXT; + mbkfree (ptberin); + } + + listberin = headrin.NEXT; + } + + return(listberin); + } diff --git a/alliance/src/beh/src/beh_delbiabl.c b/alliance/src/beh/src/beh_delbiabl.c new file mode 100644 index 00000000..499cb857 --- /dev/null +++ b/alliance/src/beh/src/beh_delbiabl.c @@ -0,0 +1,97 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbiabl.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbiabl */ +/* description : delete a BIABL structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, freeExpr */ +/* ###--------------------------------------------------------------### */ + +struct biabl *beh_delbiabl (listbiabl, ptbiabl, mode) + +struct biabl *listbiabl; /* list of biabl containing the object */ +struct biabl *ptbiabl; /* pointer of the BIABL to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct biabl headabl; + struct biabl *ptlastabl; + + if ((listbiabl != NULL) && (ptbiabl != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headabl.NEXT = listbiabl; + ptlastabl = &headabl; + while ((ptlastabl != NULL) && (ptlastabl->NEXT != ptbiabl)) + ptlastabl = ptlastabl->NEXT; + + if (ptlastabl != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbiabl->VALABL != NULL) || (ptbiabl->CNDABL != NULL)) + (void) fprintf (stderr,"BEH_warning : biabl not empty\n"); + } + else + { + freeExpr (ptbiabl->VALABL); + freeExpr (ptbiabl->CNDABL); + freeptype(ptbiabl->USER); + } + + ptlastabl->NEXT = ptbiabl->NEXT; + mbkfree (ptbiabl); + } + + listbiabl = headabl.NEXT; + } + + return(listbiabl); + } diff --git a/alliance/src/beh/src/beh_delbinod.c b/alliance/src/beh/src/beh_delbinod.c new file mode 100644 index 00000000..3d22c663 --- /dev/null +++ b/alliance/src/beh/src/beh_delbinod.c @@ -0,0 +1,91 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_delbinod.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_delbinode */ +/* description : delete a BINODE structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +struct binode *beh_delbinode (listbinode, ptbinode, mode) + +struct binode *listbinode; /* list of binode containing the object */ +struct binode *ptbinode; /* pointer of the BINODE to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct binode headnode; + struct binode *ptlastnode; + + if ((listbinode != NULL) && (ptbinode != NULL)) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headnode.NEXT = listbinode; + ptlastnode = &headnode; + while ((ptlastnode != NULL) && (ptlastnode->NEXT != ptbinode)) + ptlastnode = ptlastnode->NEXT; + + if (ptlastnode != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbinode->VALNODE != NULL) || (ptbinode->CNDNODE != NULL)) + (void) fprintf (stderr,"BEH_warning : binode not empty\n"); + } + + ptlastnode->NEXT = ptbinode->NEXT; + mbkfree (ptbinode); + } + + listbinode = headnode.NEXT; + } + + return(listbinode); + } diff --git a/alliance/src/beh/src/beh_dict.c b/alliance/src/beh/src/beh_dict.c new file mode 100644 index 00000000..265a3b24 --- /dev/null +++ b/alliance/src/beh/src/beh_dict.c @@ -0,0 +1,347 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_dict.c */ +/* date : Jun 15 1994 */ +/* version : v107 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "beh.h" + +#define BEH_ALODFN 64 +#define BEH_HSZDFN 307 + +static struct beden *BEH_DCEHED = NULL; /* free entries list */ +static struct bedrd *BEH_DCRHED = NULL; /* free records list */ + +/* ###--------------------------------------------------------------### */ +/* function : beh_addent */ +/* description : add a new entry point to the dictionary */ +/* called func. : mbkalloc */ +/* ###--------------------------------------------------------------### */ + +static struct beden *beh_addent (head, key) + +struct beden *head; +char *key; + + { + struct beden *entry; + int i ; + + if (BEH_DCEHED == NULL) + { + BEH_DCEHED = (struct beden *) + mbkalloc (sizeof (struct beden) * BEH_ALODFN); + + entry = BEH_DCEHED; + for (i=1 ; iNEXT = entry + 1; + entry++; + } + entry->NEXT = NULL; + } + + entry = BEH_DCEHED; + BEH_DCEHED = BEH_DCEHED->NEXT; + + entry->NEXT = head; + entry->DATA = NULL; + entry->KEY = key; + + return (entry); + } + +/* ###--------------------------------------------------------------### */ +/* function : beh_addrcd */ +/* description : add a new record to the dictionary */ +/* called func. : mbkalloc */ +/* ###--------------------------------------------------------------### */ + +static struct bedrd *beh_addrcd (head, key) + +struct bedrd *head; +char *key; + + { + struct bedrd *recrd; + int i ; + + if (BEH_DCRHED == NULL) + { + BEH_DCRHED = (struct bedrd *) + mbkalloc (sizeof (struct bedrd) * BEH_ALODFN); + + recrd = BEH_DCRHED; + for (i=1 ; iNEXT = recrd + 1; + recrd++; + } + recrd->NEXT = NULL; + } + + recrd = BEH_DCRHED; + BEH_DCRHED = BEH_DCRHED->NEXT; + + recrd->NEXT = head; + recrd->FD0_VAL = 0; + recrd->FD1_VAL = 0; + recrd->FD2_VAL = 0; + recrd->FD3_VAL = 0; + recrd->FD4_VAL = 0; + recrd->FD5_VAL = 0; + recrd->FD6_VAL = 0; + recrd->PNT_VAL = 0; + recrd->KEY = key; + + return (recrd); + } + +/* ###--------------------------------------------------------------### */ +/* function : beh_initab */ +/* description : create a new dictionary */ +/* called func. : mbkalloc */ +/* ###--------------------------------------------------------------### */ + +struct beden **beh_initab () + + { + struct beden **head; + int i; + + head = (struct beden **) + mbkalloc (sizeof(struct beden *) * BEH_HSZDFN); + + for (i=0 ; iKEY == key_str) + { + found = 1; + break; + } + entry_pnt = entry_pnt->NEXT; + } + + if (found == 0) + { + head [index] = beh_addent (head [index], key_str); + entry_pnt = head [index]; + } + + found = 0; + recrd_pnt = entry_pnt->DATA; + while (recrd_pnt != NULL) + { + if (recrd_pnt->KEY == ctx_str) + { + found = 1; + break; + } + recrd_pnt = recrd_pnt->NEXT; + } + + if (found == 0) + { + entry_pnt->DATA = beh_addrcd (entry_pnt->DATA, ctx_str); + recrd_pnt = entry_pnt->DATA ; + } + + switch (field) + { + case 0 : + recrd_pnt->FD0_VAL = valu; break; + case 1 : + recrd_pnt->FD1_VAL = valu; break; + case 2 : + recrd_pnt->FD2_VAL = valu; break; + case 3 : + recrd_pnt->FD3_VAL = valu; break; + case 4 : + recrd_pnt->FD4_VAL = valu; break; + case 5 : + recrd_pnt->FD5_VAL = valu; break; + case 6 : + recrd_pnt->FD6_VAL = valu; break; + case 7 : + recrd_pnt->PNT_VAL = valu; break; + } + + } + +/* ###--------------------------------------------------------------### */ +/* function : beh_chktab */ +/* description : extract a data from a dictionary */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +long beh_chktab (head, key_str, ctx_str, field) + +struct beden **head ; +char *key_str; +char *ctx_str; +int field ; + + { + int found = 0; + long valu = 0; + unsigned int key ; + unsigned int index ; + struct beden *entry_pnt; + struct bedrd *recrd_pnt; + + key = ((unsigned int) key_str) + ((unsigned int) ctx_str); + + index = key % BEH_HSZDFN; + entry_pnt = head [index]; + + while (entry_pnt != NULL) + { + if (entry_pnt->KEY == key_str) + { + found = 1; + break; + } + entry_pnt = entry_pnt->NEXT; + } + + if (found == 1) + { + found = 0; + recrd_pnt = entry_pnt->DATA; + while (recrd_pnt != NULL) + { + if (recrd_pnt->KEY == ctx_str) + { + found = 1; + break; + } + recrd_pnt = recrd_pnt->NEXT; + } + if (found == 1) + { + switch (field) + { + case 0 : + valu = recrd_pnt->FD0_VAL; break; + case 1 : + valu = recrd_pnt->FD1_VAL; break; + case 2 : + valu = recrd_pnt->FD2_VAL; break; + case 3 : + valu = recrd_pnt->FD3_VAL; break; + case 4 : + valu = recrd_pnt->FD4_VAL; break; + case 5 : + valu = recrd_pnt->FD5_VAL; break; + case 6 : + valu = recrd_pnt->FD6_VAL; break; + case 7 : + valu = recrd_pnt->PNT_VAL; break; + } + } + } + + return (valu); + } + +/* ###--------------------------------------------------------------### */ +/* function : beh_fretab */ +/* description : release a dictionary */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_fretab (pt_hash) + +struct beden **pt_hash; + + { + struct beden *pt_entry ; + struct beden *pt_nxtentry; + struct bedrd *pt_record ; + int i ; + + if (pt_hash != NULL) + { + for (i=0 ; iDATA; + + while (pt_record->NEXT != NULL) + pt_record = pt_record->NEXT; + + pt_record->NEXT = BEH_DCRHED; + BEH_DCRHED = pt_entry->DATA; + + pt_nxtentry = pt_entry->NEXT; + pt_entry->NEXT = BEH_DCEHED; + BEH_DCEHED = pt_entry; + pt_entry = pt_nxtentry; + } + } + } + mbkfree (pt_hash); + } + } diff --git a/alliance/src/beh/src/beh_error.c b/alliance/src/beh/src/beh_error.c new file mode 100644 index 00000000..546467e7 --- /dev/null +++ b/alliance/src/beh/src/beh_error.c @@ -0,0 +1,101 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_error.c */ +/* date : Feb 29 2000 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include + +/* ###--------------------------------------------------------------### */ +/* function : beh_error */ +/* description : print an errorr message */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +unsigned int beh_error (code, str1) + +int code; +char *str1; + + { + fprintf (stderr, "BEH : Error %d: ", code); + + switch (code) + { + case 1: + fprintf (stderr, "combinatory loop: `%s`\n", str1); + break; + case 2: + fprintf (stderr, "cannot make bdd of empty expression\n"); + break; + case 3: + fprintf (stderr, "cannot find terminal `%s`\n", str1); + break; + case 4: + fprintf (stderr, "illegal use of STABLE attribute\n"); + break; + case 5: + fprintf (stderr, "cannot simplify internal signals\n"); + break; + case 6: + fprintf (stderr, "cannot make derivatives of expressions\n"); + break; + + case 40: + fprintf (stderr, "signal `%s` never assigned\n", str1); + break; + case 41: + fprintf (stderr, "`%s` has not an empty architecture\n", str1); + break; + case 67: + fprintf (stderr, "signal `%s` has unknwon type\n", str1); + break; + case 68: + fprintf (stderr, "port `%s` has unknwon type\n", str1); + break; + case 69: + fprintf (stderr, "port `%s` has unknwon mode\n", str1); + break; + case 70: + fprintf (stderr, "unknown time unit\n"); + break; + + case 100: + fprintf (stderr, "cannot find `%s`\n", str1); + break; + case 107: + fprintf (stderr, "cannot open result file\n"); + break; + + default: + fprintf (stderr, "syntax error\n"); + break; + } + + return (1); + } diff --git a/alliance/src/beh/src/beh_expdelayed.c b/alliance/src/beh/src/beh_expdelayed.c new file mode 100644 index 00000000..cdfcf695 --- /dev/null +++ b/alliance/src/beh/src/beh_expdelayed.c @@ -0,0 +1,84 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_expdelayed.c */ +/* date : Dec 2 1999 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_expdelayed */ +/* description : create an expression equivalent to DELAYED attribute */ +/* called func. : addchain */ +/* ###--------------------------------------------------------------### */ + +struct chain *beh_expdelayed (dly_nam) + +char *dly_nam; + + { + char *sig_nam; + char *stb_nam; + struct chain *stb_atm; + struct chain *opr_atm; + struct chain *operat ; + struct chain *pt_abl ; + unsigned int i ; + char buffer [128]; + + strcpy (buffer, dly_nam); + + for (i=0 ; buffer [i] != '\0' ; i++) + { + if (buffer [i] == '\'') + { + buffer [i] = '\0'; + break; + } + } + sig_nam = namealloc (buffer); + + strcat (buffer, "'stable"); + stb_nam = namealloc (buffer); + + stb_atm = addchain (NULL , stb_nam); + opr_atm = addchain (NULL , sig_nam); + operat = addchain (NULL , (char *) XOR ); + pt_abl = addchain (NULL , stb_atm); + pt_abl = addchain (pt_abl, opr_atm); + pt_abl = addchain (pt_abl, operat ); + + operat = addchain (NULL , (char *) NOT ); + pt_abl = addchain (NULL , pt_abl ); + pt_abl = addchain (pt_abl, operat ); + + return (pt_abl); + } diff --git a/alliance/src/beh/src/beh_expstable.c b/alliance/src/beh/src/beh_expstable.c new file mode 100644 index 00000000..923b2c2f --- /dev/null +++ b/alliance/src/beh/src/beh_expstable.c @@ -0,0 +1,70 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_expstable.c */ +/* date : Dec 2 1999 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_expstable */ +/* description : create an expression equivalent to STABLE attribute */ +/* called func. : addchain */ +/* ###--------------------------------------------------------------### */ + +struct chain *beh_expstable (sig_nam) + +char *sig_nam; + + { + char *dly_nam; + struct chain *dly_atm; + struct chain *opr_atm; + struct chain *operat ; + struct chain *pt_abl ; + char buffer [128]; + + sprintf (buffer, "%s'delayed", sig_nam); + dly_nam = namealloc (buffer); + + dly_atm = addchain (NULL , dly_nam); + opr_atm = addchain (NULL , sig_nam); + operat = addchain (NULL , (char *) XOR ); + pt_abl = addchain (NULL , dly_atm); + pt_abl = addchain (pt_abl, opr_atm); + pt_abl = addchain (pt_abl, operat ); + + operat = addchain (NULL , (char *) NOT ); + pt_abl = addchain (NULL , pt_abl ); + pt_abl = addchain (pt_abl, operat ); + + return (pt_abl); + } diff --git a/alliance/src/beh/src/beh_frebeaux.c b/alliance/src/beh/src/beh_frebeaux.c new file mode 100644 index 00000000..13c9ec25 --- /dev/null +++ b/alliance/src/beh/src/beh_frebeaux.c @@ -0,0 +1,65 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebeaux.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebeaux */ +/* description : delete a list of BEAUX structures and all objects */ +/* pointed by any os BEAUXs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebeaux (listbeaux) + +struct beaux *listbeaux; /* list of beaux to be deleted */ + + { + struct beaux *ptbeaux; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbeaux != NULL) + { + freeExpr (listbeaux->ABL); + + ptbeaux = listbeaux; + listbeaux = listbeaux->NEXT; + mbkfree (ptbeaux); + } + + } diff --git a/alliance/src/beh/src/beh_frebebus.c b/alliance/src/beh/src/beh_frebebus.c new file mode 100644 index 00000000..da2cb862 --- /dev/null +++ b/alliance/src/beh/src/beh_frebebus.c @@ -0,0 +1,66 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebebus.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebebus */ +/* description : delete a list of BEBUS structures and all objects */ +/* pointed by any os BEBUSs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebebus (listbebus) + +struct bebus *listbebus; /* list of bebus to be deleted */ + + { + struct bebus *ptbebus; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbebus != NULL) + { + beh_frebiabl (listbebus->BIABL); + beh_frebinode (listbebus->BINODE); + + ptbebus = listbebus; + listbebus = listbebus->NEXT; + mbkfree (ptbebus); + } + + } diff --git a/alliance/src/beh/src/beh_frebebux.c b/alliance/src/beh/src/beh_frebebux.c new file mode 100644 index 00000000..ea00b0a6 --- /dev/null +++ b/alliance/src/beh/src/beh_frebebux.c @@ -0,0 +1,66 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebebux.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebebux */ +/* description : delete a list of BEBUX structures and all objects */ +/* pointed by any os BEBUXs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebebux (listbebux) + +struct bebux *listbebux; /* list of bebux to be deleted */ + + { + struct bebux *ptbebux; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbebux != NULL) + { + beh_frebiabl (listbebux->BIABL); + beh_frebinode (listbebux->BINODE); + + ptbebux = listbebux; + listbebux = listbebux->NEXT; + mbkfree (ptbebux); + } + + } diff --git a/alliance/src/beh/src/beh_frebeder.c b/alliance/src/beh/src/beh_frebeder.c new file mode 100644 index 00000000..7ab040f7 --- /dev/null +++ b/alliance/src/beh/src/beh_frebeder.c @@ -0,0 +1,63 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebeder.c */ +/* date : Mar 22 1995 */ +/* version : v100 */ +/* authors : Laurent VUILLEMIN */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebeder */ +/* description : delete a list of BEDER structures and all objects */ +/* pointed by any os BEDERs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebeder (listbeder) + +struct beder *listbeder; /* list of beder to be deleted */ + + { + struct beder *ptbeder; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbeder != NULL) + { + ptbeder = listbeder; + listbeder = listbeder->NEXT; + mbkfree (ptbeder); + } + + } diff --git a/alliance/src/beh/src/beh_frebefig.c b/alliance/src/beh/src/beh_frebefig.c new file mode 100644 index 00000000..e87a9ed7 --- /dev/null +++ b/alliance/src/beh/src/beh_frebefig.c @@ -0,0 +1,76 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebefig.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebefig */ +/* description : delete a list of BEFIG structures and all objects */ +/* pointed by any os BEFIGs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebefig (listbefig) + +struct befig *listbefig; /* list of befig to be deleted */ + + { + struct befig *ptbefig; + struct ptype *ptptype; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbefig != NULL) + { + beh_frebereg (listbefig->BEREG); + beh_frebemsg (listbefig->BEMSG); + beh_freberin (listbefig->BERIN); + beh_frebeout (listbefig->BEOUT); + beh_frebebus (listbefig->BEBUS); + beh_frebeaux (listbefig->BEAUX); + beh_frebeaux (listbefig->BEDLY); + beh_frebebux (listbefig->BEBUX); + beh_frebepor (listbefig->BEPOR); + if ((ptptype = getptype (listbefig->USER,BEH_GENERIC)) != NULL) + beh_frebegen (ptptype->DATA); + + ptbefig = listbefig; + listbefig = listbefig->NEXT; + mbkfree (ptbefig); + } + + } diff --git a/alliance/src/beh/src/beh_frebegen.c b/alliance/src/beh/src/beh_frebegen.c new file mode 100644 index 00000000..61a57d54 --- /dev/null +++ b/alliance/src/beh/src/beh_frebegen.c @@ -0,0 +1,65 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebegen.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebegen */ +/* description : delete a list of BEGEN structures and all objects */ +/* pointed by any os BEGENs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebegen (listbegen) + +struct begen *listbegen; /* list of begen to be deleted */ + + { + struct begen *ptbegen; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbegen != NULL) + { + mbkfree (listbegen->VALUE); + + ptbegen = listbegen; + listbegen = listbegen->NEXT; + mbkfree (ptbegen); + } + + } diff --git a/alliance/src/beh/src/beh_frebemsg.c b/alliance/src/beh/src/beh_frebemsg.c new file mode 100644 index 00000000..3e772f37 --- /dev/null +++ b/alliance/src/beh/src/beh_frebemsg.c @@ -0,0 +1,65 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebemsg.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebemsg */ +/* description : delete a list of BEMSG structures and all objects */ +/* pointed by any os BEMSGs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebemsg (listbemsg) + +struct bemsg *listbemsg; /* list of bemsg to be deleted */ + + { + struct bemsg *ptbemsg; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbemsg != NULL) + { + freeExpr (listbemsg->ABL); + + ptbemsg = listbemsg; + listbemsg = listbemsg->NEXT; + mbkfree (ptbemsg); + } + + } diff --git a/alliance/src/beh/src/beh_frebeout.c b/alliance/src/beh/src/beh_frebeout.c new file mode 100644 index 00000000..7605401c --- /dev/null +++ b/alliance/src/beh/src/beh_frebeout.c @@ -0,0 +1,65 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebeout.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebeout */ +/* description : delete a list of BEOUT structures and all objects */ +/* pointed by any os BEOUTs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebeout (listbeout) + +struct beout *listbeout; /* list of beout to be deleted */ + + { + struct beout *ptbeout; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbeout != NULL) + { + freeExpr (listbeout->ABL); + + ptbeout = listbeout; + listbeout = listbeout->NEXT; + mbkfree (ptbeout); + } + + } diff --git a/alliance/src/beh/src/beh_frebepor.c b/alliance/src/beh/src/beh_frebepor.c new file mode 100644 index 00000000..bd4b26b5 --- /dev/null +++ b/alliance/src/beh/src/beh_frebepor.c @@ -0,0 +1,62 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebepor.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebepor */ +/* description : delete a list of BEAUX structures and all objects */ +/* pointed by any os BEAUXs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebepor (listbepor) + +struct bepor *listbepor; /* list of bepor to be deleted */ + + { + struct bepor *ptbepor; + + /* ###------------------------------------------------------### */ + /* for each object of the list, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbepor != NULL) + { + ptbepor = listbepor; + listbepor = listbepor->NEXT; + mbkfree (ptbepor); + } + + } diff --git a/alliance/src/beh/src/beh_frebereg.c b/alliance/src/beh/src/beh_frebereg.c new file mode 100644 index 00000000..b7853db6 --- /dev/null +++ b/alliance/src/beh/src/beh_frebereg.c @@ -0,0 +1,66 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebereg.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebereg */ +/* description : delete a list of BEAUX structures and all objects */ +/* pointed by any os BEAUXs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebereg (listbereg) + +struct bereg *listbereg; /* list of bereg to be deleted */ + + { + struct bereg *ptbereg; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbereg != NULL) + { + beh_frebiabl (listbereg->BIABL); + beh_frebinode (listbereg->BINODE); + + ptbereg = listbereg; + listbereg = listbereg->NEXT; + mbkfree (ptbereg); + } + + } diff --git a/alliance/src/beh/src/beh_freberin.c b/alliance/src/beh/src/beh_freberin.c new file mode 100644 index 00000000..d072b84e --- /dev/null +++ b/alliance/src/beh/src/beh_freberin.c @@ -0,0 +1,62 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_freberin.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_freberin */ +/* description : delete a list of BEAUX structures and all objects */ +/* pointed by any os BEAUXs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_freberin (listberin) + +struct berin *listberin; /* list of berin to be deleted */ + + { + struct berin *ptberin; + + /* ###------------------------------------------------------### */ + /* for each object of the list delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listberin != NULL) + { + ptberin = listberin; + listberin = listberin->NEXT; + mbkfree (ptberin); + } + + } diff --git a/alliance/src/beh/src/beh_frebiabl.c b/alliance/src/beh/src/beh_frebiabl.c new file mode 100644 index 00000000..95854c3b --- /dev/null +++ b/alliance/src/beh/src/beh_frebiabl.c @@ -0,0 +1,67 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebiabl.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebiabl */ +/* description : delete a list of BIABL structures and all objects */ +/* pointed by any os BIABLs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebiabl (listbiabl) + +struct biabl *listbiabl; /* list of biabl to be deleted */ + + { + struct biabl *ptbiabl; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbiabl != NULL) + { + freeExpr (listbiabl->VALABL); + freeExpr (listbiabl->CNDABL); + freeptype(listbiabl->USER); + + ptbiabl = listbiabl; + listbiabl = listbiabl->NEXT; + mbkfree (ptbiabl); + } + + } diff --git a/alliance/src/beh/src/beh_frebinod.c b/alliance/src/beh/src/beh_frebinod.c new file mode 100644 index 00000000..6c2c4ac3 --- /dev/null +++ b/alliance/src/beh/src/beh_frebinod.c @@ -0,0 +1,63 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_frebinod.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_frebinode */ +/* description : delete a list of BINODE structures and all objects */ +/* pointed by any os BINODEs in the list */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +void beh_frebinode (listbinode) + +struct binode *listbinode; /* list of binode to be deleted */ + + { + struct binode *ptbinode; + + /* ###------------------------------------------------------### */ + /* for each object of the list, first delete pointed objects */ + /* then, delete the object itself */ + /* ###------------------------------------------------------### */ + + while (listbinode != NULL) + { + ptbinode = listbinode; + listbinode = listbinode->NEXT; + mbkfree (ptbinode); + } + + } diff --git a/alliance/src/beh/src/beh_getgenva.c b/alliance/src/beh/src/beh_getgenva.c new file mode 100644 index 00000000..2204fb04 --- /dev/null +++ b/alliance/src/beh/src/beh_getgenva.c @@ -0,0 +1,70 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_getgenva.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_getgenval */ +/* description : Search an find a BEGEN structure (known from its name)*/ +/* then return its value field. If the BEGEN is not found*/ +/* a NULL pointer is returned */ +/* called func. : */ +/* ###--------------------------------------------------------------### */ + +void *beh_getgenval (listbegen, begenname) + +struct begen *listbegen; /* head of BEGEN list */ +char *begenname; /* name of the structure */ + + { + struct begen *ptbegen; + void *value = NULL; + + /* ###------------------------------------------------------### */ + /* searching the object */ + /* ###------------------------------------------------------### */ + + ptbegen = listbegen; + while ((ptbegen != NULL) && (ptbegen->NAME != begenname)) + ptbegen = ptbegen->NEXT; + + /* ###------------------------------------------------------### */ + /* if found return its value field */ + /* ###------------------------------------------------------### */ + + if (ptbegen != NULL) + value = ptbegen->VALUE; + + return (value); + } diff --git a/alliance/src/beh/src/beh_getvers.c b/alliance/src/beh/src/beh_getvers.c new file mode 100644 index 00000000..5cd1d6c1 --- /dev/null +++ b/alliance/src/beh/src/beh_getvers.c @@ -0,0 +1,45 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_getvers.c */ +/* date : Dec 2 1999 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include + +/* ###--------------------------------------------------------------### */ +/* function : beh_getvers */ +/* description : return a string containing the current version of the */ +/* library */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +char *beh_getvers () + + { + return ("v111"); + } diff --git a/alliance/src/beh/src/beh_globals.c b/alliance/src/beh/src/beh_globals.c new file mode 100644 index 00000000..877455ad --- /dev/null +++ b/alliance/src/beh/src/beh_globals.c @@ -0,0 +1,40 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_globals.c */ +/* date : Mar 8 2000 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +unsigned int BEH_LINNUM = 1 ; + +unsigned char BEH_TIMEUNIT = BEH_TU__PS; +unsigned int BEH_TIMESTEP = 1 ; diff --git a/alliance/src/beh/src/beh_message.c b/alliance/src/beh/src/beh_message.c new file mode 100644 index 00000000..306f1ad1 --- /dev/null +++ b/alliance/src/beh/src/beh_message.c @@ -0,0 +1,62 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_message.c */ +/* date : Oct 30 1995 */ +/* version : v109 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include + +/* ###--------------------------------------------------------------### */ +/* function : beh_message */ +/* description : print a message on the standard output */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +void beh_message (code, str1) + +int code; +char *str1; + + { + (void) fprintf (stdout, "BEH : "); + + switch (code) + { + case 3: + (void) fprintf (stdout, "Compiling `%s` (Behaviour) ...\n", str1); + break; + case 13: + (void) fprintf (stdout, "Saving '%s' in a vhdl file (vbe)\n", str1); + break; + case 14: + (void) fprintf (stdout, "Builting '%s' ...\n", str1); + break; + default: + (void) fprintf (stdout, "%s\n", str1); + } + } diff --git a/alliance/src/beh/src/beh_rmvbeaux.c b/alliance/src/beh/src/beh_rmvbeaux.c new file mode 100644 index 00000000..f8f644c5 --- /dev/null +++ b/alliance/src/beh/src/beh_rmvbeaux.c @@ -0,0 +1,100 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvbeaux.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvbeaux */ +/* description : delete a BEAUX structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, freeExpr */ +/* ###--------------------------------------------------------------### */ + +struct beaux *beh_rmvbeaux (listbeaux, beauxname, mode) + +struct beaux *listbeaux; /* list of beaux containing the object */ +char *beauxname; /* name of the BEAUX to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct beaux headaux; + struct beaux *ptlastaux; + struct beaux *ptbeaux; + + if (listbeaux != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headaux.NEXT = listbeaux; + headaux.NAME = NULL ; + headaux.ABL = NULL ; + ptbeaux = &headaux; + while ((ptbeaux != NULL) && (ptbeaux->NAME != beauxname)) + { + ptlastaux = ptbeaux; + ptbeaux = ptbeaux->NEXT; + } + + if (ptbeaux != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if (ptbeaux->ABL != NULL) + (void) fprintf (stderr,"BEH_warning : beaux `%s` not empty\n", + beauxname); + } + else + freeExpr (ptbeaux->ABL); + + ptlastaux->NEXT = ptbeaux->NEXT; + mbkfree (ptbeaux); + } + + listbeaux = headaux.NEXT; + } + + return(listbeaux); + } diff --git a/alliance/src/beh/src/beh_rmvbebus.c b/alliance/src/beh/src/beh_rmvbebus.c new file mode 100644 index 00000000..6bfbaa0b --- /dev/null +++ b/alliance/src/beh/src/beh_rmvbebus.c @@ -0,0 +1,104 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvbebus.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvbebus */ +/* description : delete a BEBUS structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, beh_frebiabl, beh_frebinode */ +/* ###--------------------------------------------------------------### */ + +struct bebus *beh_rmvbebus (listbebus, bebusname, mode) + +struct bebus *listbebus; /* list of bebus containing the object */ +char *bebusname; /* name of the BEBUS to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct bebus headbus; + struct bebus *ptlastbus; + struct bebus *ptbebus; + + if (listbebus != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headbus.NEXT = listbebus; + headbus.NAME = NULL ; + headbus.BIABL = NULL ; + headbus.BINODE = NULL ; + ptbebus = &headbus; + while ((ptbebus != NULL) && (ptbebus->NAME != bebusname)) + { + ptlastbus = ptbebus; + ptbebus = ptbebus->NEXT; + } + + if (ptbebus != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbebus->BIABL != NULL) || (ptbebus->BINODE != NULL)) + (void) fprintf (stderr,"BEH_warning : bebus `%s` not empty\n", + bebusname); + } + else + { + beh_frebiabl (ptbebus->BIABL); + beh_frebinode (ptbebus->BINODE); + } + + ptlastbus->NEXT = ptbebus->NEXT; + mbkfree (ptbebus); + } + + listbebus = headbus.NEXT; + } + + return(listbebus); + } diff --git a/alliance/src/beh/src/beh_rmvbebux.c b/alliance/src/beh/src/beh_rmvbebux.c new file mode 100644 index 00000000..ff41a1df --- /dev/null +++ b/alliance/src/beh/src/beh_rmvbebux.c @@ -0,0 +1,104 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvbebux.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvbebux */ +/* description : delete a BEBUX structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, beh_frebiabl, beh_frebinode */ +/* ###--------------------------------------------------------------### */ + +struct bebux *beh_rmvbebux (listbebux, bebuxname, mode) + +struct bebux *listbebux; /* list of bebux containing the object */ +char *bebuxname; /* name of the BEBUX to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct bebux headbux; + struct bebux *ptlastbux; + struct bebux *ptbebux; + + if (listbebux != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headbux.NEXT = listbebux; + headbux.NAME = NULL ; + headbux.BIABL = NULL ; + headbux.BINODE = NULL ; + ptbebux = &headbux; + while ((ptbebux != NULL) && (ptbebux->NAME != bebuxname)) + { + ptlastbux = ptbebux; + ptbebux = ptbebux->NEXT; + } + + if (ptbebux != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbebux->BIABL != NULL) || (ptbebux->BINODE != NULL)) + (void) fprintf (stderr,"BEH_warning : bebux `%s` not empty\n", + bebuxname); + } + else + { + beh_frebiabl (ptbebux->BIABL); + beh_frebinode (ptbebux->BINODE); + } + + ptlastbux->NEXT = ptbebux->NEXT; + mbkfree (ptbebux); + } + + listbebux = headbux.NEXT; + } + + return(listbebux); + } diff --git a/alliance/src/beh/src/beh_rmvbeder.c b/alliance/src/beh/src/beh_rmvbeder.c new file mode 100644 index 00000000..d14bfef8 --- /dev/null +++ b/alliance/src/beh/src/beh_rmvbeder.c @@ -0,0 +1,87 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvbeder.c */ +/* date : Mar 22 1995 */ +/* version : v100 */ +/* authors : Laurent VUILLEMIN */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvbeder */ +/* description : delete a BERIN structure and return the pointer of */ +/* the next object. */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +struct beder *beh_rmvbeder (listbeder, bederindex) + +struct beder *listbeder; /* list of beder containing the object */ +short bederindex; /* index of the BEDER to be deleted */ + + { + struct beder headder; + struct beder *ptlastder; + struct beder *ptbeder; + + if (listbeder != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headder.NEXT = listbeder; + headder.INDEX=0; + ptbeder = &headder; + while ((ptbeder != NULL) && (ptbeder->INDEX != bederindex)) + { + ptlastder = ptbeder; + ptbeder = ptbeder->NEXT; + } + + if (ptbeder != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* ###------------------------------------------------------### */ + + + ptlastder->NEXT = ptbeder->NEXT; + mbkfree (ptbeder); + } + + listbeder = headder.NEXT; + } + + return(listbeder); + } diff --git a/alliance/src/beh/src/beh_rmvbefig.c b/alliance/src/beh/src/beh_rmvbefig.c new file mode 100644 index 00000000..0a95dc04 --- /dev/null +++ b/alliance/src/beh/src/beh_rmvbefig.c @@ -0,0 +1,128 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvbefig.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvbefig */ +/* description : delete a BEFIG structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N. */ +/* called func. : mbkfree , beh_frebereg, beh_frebemsg, */ +/* beh_freberin, beh_frebeout, beh_frebebus, */ +/* beh_frebeaux, beh_frebebux, beh_frebepor, */ +/* beh_frebegen, getptype */ +/* ###--------------------------------------------------------------### */ + +struct befig *beh_rmvbefig (listbefig, befigname, mode) + +struct befig *listbefig; /* list of befig containing the object */ +char *befigname; /* name of the BEFIG to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct befig headfig; + struct befig *ptlastfig; + struct befig *ptbefig; + struct ptype *ptptype; + + if (listbefig != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headfig.NEXT = listbefig; + headfig.NAME = NULL ; + headfig.BEREG = NULL ; + headfig.BEMSG = NULL ; + headfig.BERIN = NULL ; + headfig.BEAUX = NULL ; + headfig.BEBUX = NULL ; + headfig.BEDLY = NULL ; + headfig.BEPOR = NULL ; + headfig.USER = NULL ; + ptbefig = &headfig; + while ((ptbefig != NULL) && (ptbefig->NAME != befigname)) + { + ptlastfig = ptbefig; + ptbefig = ptbefig->NEXT; + } + + if (ptbefig != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbefig->BEREG != NULL) || (ptbefig->BEMSG != NULL) || + (ptbefig->BERIN != NULL) || (ptbefig->BEOUT != NULL) || + (ptbefig->BEBUS != NULL) || (ptbefig->BEAUX != NULL) || + (ptbefig->BEBUX != NULL) || (ptbefig->BEDLY != NULL) || + (ptbefig->BEPOR != NULL) || (ptbefig->USER != NULL)) + + (void) fprintf (stderr,"BEH_warning : befig `%s` not empty\n", + befigname); + } + else + { + beh_frebereg (ptbefig->BEREG); + beh_frebemsg (ptbefig->BEMSG); + beh_freberin (ptbefig->BERIN); + beh_frebeout (ptbefig->BEOUT); + beh_frebebus (ptbefig->BEBUS); + beh_frebeaux (ptbefig->BEAUX); + beh_frebeaux (ptbefig->BEDLY); + beh_frebebux (ptbefig->BEBUX); + beh_frebepor (ptbefig->BEPOR); + if ((ptptype = getptype (ptbefig->USER,BEH_GENERIC)) != NULL) + beh_frebegen (ptptype->DATA); + } + + ptlastfig->NEXT = ptbefig->NEXT; + mbkfree (ptbefig); + } + + listbefig = headfig.NEXT; + } + + return(listbefig); + } diff --git a/alliance/src/beh/src/beh_rmvbegen.c b/alliance/src/beh/src/beh_rmvbegen.c new file mode 100644 index 00000000..6eefb69f --- /dev/null +++ b/alliance/src/beh/src/beh_rmvbegen.c @@ -0,0 +1,100 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvbegen.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvbegen */ +/* description : delete a BEGEN structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +struct begen *beh_rmvbegen (listbegen, begenname, mode) + +struct begen *listbegen; /* list of begen containing the object */ +char *begenname; /* name of the BEGEN to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct begen headgen; + struct begen *ptlastgen; + struct begen *ptbegen; + + if (listbegen != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headgen.NEXT = listbegen; + headgen.NAME = NULL ; + headgen.VALUE = NULL ; + ptbegen = &headgen; + while ((ptbegen != NULL) && (ptbegen->NAME != begenname)) + { + ptlastgen = ptbegen; + ptbegen = ptbegen->NEXT; + } + + if (ptbegen != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if (ptbegen->VALUE != NULL) + (void) fprintf (stderr,"BEH_warning : begen `%s` not empty\n", + begenname); + } + else + mbkfree (ptbegen->VALUE); + + ptlastgen->NEXT = ptbegen->NEXT; + mbkfree (ptbegen); + } + + listbegen = headgen.NEXT; + } + + return(listbegen); + } diff --git a/alliance/src/beh/src/beh_rmvbemsg.c b/alliance/src/beh/src/beh_rmvbemsg.c new file mode 100644 index 00000000..ab02e53c --- /dev/null +++ b/alliance/src/beh/src/beh_rmvbemsg.c @@ -0,0 +1,100 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvbemsg.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvbemsg */ +/* description : delete a BEMSG structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, freeExpr */ +/* ###--------------------------------------------------------------### */ + +struct bemsg *beh_rmvbemsg (listbemsg, bemsglabl, mode) + +struct bemsg *listbemsg; /* list of bemsg containing the object */ +char *bemsglabl; /* label of the BEMSG to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct bemsg headmsg; + struct bemsg *ptlastmsg; + struct bemsg *ptbemsg; + + if (listbemsg != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headmsg.NEXT = listbemsg; + headmsg.LABEL = NULL ; + headmsg.ABL = NULL ; + ptbemsg = &headmsg; + while ((ptbemsg != NULL) && (ptbemsg->LABEL != bemsglabl)) + { + ptlastmsg = ptbemsg; + ptbemsg = ptbemsg->NEXT; + } + + if (ptbemsg != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if (ptbemsg->ABL != NULL) + (void) fprintf (stderr,"BEH_warning : bemsg `%s` not empty\n", + bemsglabl); + } + else + freeExpr (ptbemsg->ABL); + + ptlastmsg->NEXT = ptbemsg->NEXT; + mbkfree (ptbemsg); + } + + listbemsg = headmsg.NEXT; + } + + return(listbemsg); + } diff --git a/alliance/src/beh/src/beh_rmvbeout.c b/alliance/src/beh/src/beh_rmvbeout.c new file mode 100644 index 00000000..726f705a --- /dev/null +++ b/alliance/src/beh/src/beh_rmvbeout.c @@ -0,0 +1,100 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvbeout.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvbeout */ +/* description : delete a BEOUT structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, freeExpr */ +/* ###--------------------------------------------------------------### */ + +struct beout *beh_rmvbeout (listbeout, beoutname, mode) + +struct beout *listbeout; /* list of beout containing the object */ +char *beoutname; /* name of the BEOUT to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct beout headout; + struct beout *ptlastout; + struct beout *ptbeout; + + if (listbeout != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headout.NEXT = listbeout; + headout.NAME = NULL ; + headout.ABL = NULL ; + ptbeout = &headout; + while ((ptbeout != NULL) && (ptbeout->NAME != beoutname)) + { + ptlastout = ptbeout; + ptbeout = ptbeout->NEXT; + } + + if (ptbeout != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if (ptbeout->ABL != NULL) + (void) fprintf (stderr,"BEH_warning : beout `%s` not empty\n", + beoutname); + } + else + freeExpr (ptbeout->ABL); + + ptlastout->NEXT = ptbeout->NEXT; + mbkfree (ptbeout); + } + + listbeout = headout.NEXT; + } + + return(listbeout); + } diff --git a/alliance/src/beh/src/beh_rmvbepor.c b/alliance/src/beh/src/beh_rmvbepor.c new file mode 100644 index 00000000..cadcb36a --- /dev/null +++ b/alliance/src/beh/src/beh_rmvbepor.c @@ -0,0 +1,86 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvbepor.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvbepor */ +/* description : delete a BEPOR structure and return the pointer of */ +/* the next object. */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +struct bepor *beh_rmvbepor (listbepor, beporname) + +struct bepor *listbepor; /* list of bepor containing the object */ +char *beporname; /* name of the BEPOR to be deleted */ + + { + struct bepor headpor; + struct bepor *ptlastpor; + struct bepor *ptbepor; + + if (listbepor != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headpor.NEXT = listbepor; + headpor.NAME = NULL ; + ptbepor = &headpor; + while ((ptbepor != NULL) && (ptbepor->NAME != beporname)) + { + ptlastpor = ptbepor; + ptbepor = ptbepor->NEXT; + } + + if (ptbepor != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* ###------------------------------------------------------### */ + + ptlastpor->NEXT = ptbepor->NEXT; + mbkfree (ptbepor); + } + + listbepor = headpor.NEXT; + } + + return(listbepor); + } diff --git a/alliance/src/beh/src/beh_rmvbereg.c b/alliance/src/beh/src/beh_rmvbereg.c new file mode 100644 index 00000000..88583a40 --- /dev/null +++ b/alliance/src/beh/src/beh_rmvbereg.c @@ -0,0 +1,104 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvbereg.c */ +/* date : Sep 3 1993 */ +/* version : v106 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvbereg */ +/* description : delete a BEREG structure and return the pointer of */ +/* the next object. A warning is printed out if the */ +/* object to be deleted is not empty when the mode is N */ +/* called func. : mbkfree, beh_frebiabl, beh_frebinode */ +/* ###--------------------------------------------------------------### */ + +struct bereg *beh_rmvbereg (listbereg, beregname, mode) + +struct bereg *listbereg; /* list of bereg containing the object */ +char *beregname; /* name of the BEREG to be deleted */ +char mode; /* recursive delete or not (Y or N) */ + + { + struct bereg headreg; + struct bereg *ptlastreg; + struct bereg *ptbereg; + + if (listbereg != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headreg.NEXT = listbereg; + headreg.NAME = NULL ; + headreg.BIABL = NULL ; + headreg.BINODE = NULL ; + ptbereg = &headreg; + while ((ptbereg != NULL) && (ptbereg->NAME != beregname)) + { + ptlastreg = ptbereg; + ptbereg = ptbereg->NEXT; + } + + if (ptbereg != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* If the object has been found check the mode and, if asked */ + /* delete pointed objects recursively. */ + /* ###------------------------------------------------------### */ + + if (mode == 'N') + { + if ((ptbereg->BIABL != NULL) || (ptbereg->BINODE != NULL)) + (void) fprintf (stderr,"BEH_warning : bereg `%s` not empty\n", + beregname); + } + else + { + beh_frebiabl (ptbereg->BIABL); + beh_frebinode (ptbereg->BINODE); + } + + ptlastreg->NEXT = ptbereg->NEXT; + mbkfree (ptbereg); + } + + listbereg = headreg.NEXT; + } + + return(listbereg); + } diff --git a/alliance/src/beh/src/beh_rmvberin.c b/alliance/src/beh/src/beh_rmvberin.c new file mode 100644 index 00000000..ad75b51e --- /dev/null +++ b/alliance/src/beh/src/beh_rmvberin.c @@ -0,0 +1,101 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rmvberin.c */ +/* date : Sep 20 1994 */ +/* version : v107 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rmvberin */ +/* description : delete a BERIN structure and return the pointer of */ +/* the next object. */ +/* called func. : mbkfree */ +/* ###--------------------------------------------------------------### */ + +struct berin *beh_rmvberin (listberin, berinname) + +struct berin *listberin; /* list of berin containing the object */ +char *berinname; /* name of the BERIN to be deleted */ + + { + struct berin headrin; + struct berin *ptlastrin; + struct berin *ptberin; + + if (listberin != NULL) + { + + /* ###------------------------------------------------------### */ + /* Search the object to be deleted */ + /* ###------------------------------------------------------### */ + + headrin.NEXT = listberin; + headrin.NAME = NULL; + headrin.OUT_REF = NULL; + headrin.MSG_REF = NULL; + headrin.AUX_REF = NULL; + headrin.BUX_REF = NULL; + headrin.BUS_REF = NULL; + headrin.REG_REF = NULL; + headrin.DLY_REF = NULL; + ptberin = &headrin; + while ((ptberin != NULL) && (ptberin->NAME != berinname)) + { + ptlastrin = ptberin; + ptberin = ptberin->NEXT; + } + + if (ptberin != NULL) + { + + /* ###------------------------------------------------------### */ + /* If the object doesn't exist return the list without */ + /* modification. */ + /* ###------------------------------------------------------### */ + + freechain (ptberin->OUT_REF); + freechain (ptberin->MSG_REF); + freechain (ptberin->AUX_REF); + freechain (ptberin->BUX_REF); + freechain (ptberin->BUS_REF); + freechain (ptberin->REG_REF); + freechain (ptberin->DLY_REF); + + ptlastrin->NEXT = ptberin->NEXT; + mbkfree (ptberin); + } + + listberin = headrin.NEXT; + } + + return(listberin); + } diff --git a/alliance/src/beh/src/beh_rpldelayed.c b/alliance/src/beh/src/beh_rpldelayed.c new file mode 100644 index 00000000..3ac066f7 --- /dev/null +++ b/alliance/src/beh/src/beh_rpldelayed.c @@ -0,0 +1,74 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rpldelayed.c */ +/* date : Dec 2 1999 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rpldelayed */ +/* description : replace DELAYED attribute by STABLE in an expression */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +struct chain *beh_rpldelayed (pt_abl) + +struct chain *pt_abl; + + { + struct chain *opr_lst; + char *dly_nam; + struct chain *new_abl; + + if (pt_abl->NEXT == NULL) + { + dly_nam = (char *) pt_abl->DATA; + if (strstr (dly_nam, "'delayed") != NULL) + { + new_abl = beh_expdelayed (dly_nam); + freeExpr (pt_abl); + pt_abl = new_abl; + } + } + else + { + opr_lst = pt_abl->NEXT; + while (opr_lst != NULL) + { + opr_lst->DATA = beh_rpldelayed (opr_lst->DATA); + opr_lst = opr_lst->NEXT; + } + } + + return (pt_abl); + } diff --git a/alliance/src/beh/src/beh_rplstable.c b/alliance/src/beh/src/beh_rplstable.c new file mode 100644 index 00000000..f14a983c --- /dev/null +++ b/alliance/src/beh/src/beh_rplstable.c @@ -0,0 +1,75 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_rplstable.c */ +/* date : Dec 2 1999 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_rplstable */ +/* description : replace STABLE attribute by DELAYED in an expression */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +struct chain *beh_rplstable (pt_abl) + +struct chain *pt_abl; + + { + struct chain *opr_lst; + char *sig_nam; + struct chain *new_abl; + unsigned int opera ; + + if (pt_abl->NEXT != NULL) + { + opera = (unsigned int) ((struct chain *) pt_abl->DATA)->DATA; + if (opera == STABLE) + { + sig_nam = (char *) ((struct chain *) pt_abl->NEXT->DATA)->DATA; + new_abl = beh_expstable (sig_nam); + freeExpr (pt_abl); + pt_abl = new_abl; + } + else + { + opr_lst = pt_abl->NEXT; + while (opr_lst != NULL) + { + opr_lst->DATA = beh_rplstable (opr_lst->DATA); + opr_lst = opr_lst->NEXT; + } + } + } + + return (pt_abl); + } diff --git a/alliance/src/beh/src/beh_toolbug.c b/alliance/src/beh/src/beh_toolbug.c new file mode 100644 index 00000000..e069e82a --- /dev/null +++ b/alliance/src/beh/src/beh_toolbug.c @@ -0,0 +1,98 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_toolbug.c */ +/* date : Feb 29 2000 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_toolbug */ +/* description : print an error message on the standard error output */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +void beh_toolbug (code, str1, str2, nbr1) + +int code; +char *str1; +char *str2; +int nbr1; + + { + fprintf (stderr,"Fatal error %d executing `%s`: ", code, str1); + switch (code) + { + case 1: + fprintf (stderr,"unknown operator\n"); + break; + case 2: + fprintf (stderr,"cannot create empty atom\n"); + break; + case 3: + fprintf (stderr,"cannot build NOT of empty expression\n"); + break; + case 4: + fprintf (stderr,"cannot combine empty expressions\n"); + break; + case 5: + fprintf (stderr,"cannot find terminal\n"); + break; + case 10: + fprintf (stderr,"cannot drive empty or erroneous description\n"); + break; + case 15 : + fprintf (stderr,"illegal bit string value : `%c`\n",nbr1); + break; + case 16 : + fprintf (stderr,"the same expression cannot be used twice\n"); + break; + case 19: + fprintf (stderr,"empty guard expression: `%s`\n",str2); + break; + case 20: + fprintf (stderr,"empty waveform expression: `%s`\n",str2); + break; + case 100 : + fprintf (stderr, "illegal use of attribute STABLE\n"); + break; + case 101 : + fprintf (stderr, "unknown terminal operand `%s`\n", str2); + break; + case 102 : + fprintf (stderr, "unknown operator `%d`\n", nbr1); + break; + case 103 : + fprintf (stderr, "empty expression\n"); + break; + default: + fprintf (stderr, "BUG\n"); + } + EXIT (1); + } diff --git a/alliance/src/beh/src/beh_vhdlname.c b/alliance/src/beh/src/beh_vhdlname.c new file mode 100644 index 00000000..c8d91b9e --- /dev/null +++ b/alliance/src/beh/src/beh_vhdlname.c @@ -0,0 +1,188 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_vhdlname.c */ +/* date : Mar 1 2000 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_vhdlname */ +/* description : make a legal VHDL name from a string */ +/* called func. : namealloc, beh_initab, beh_addtab, beh_chktab */ +/* ###--------------------------------------------------------------### */ + +char *beh_vhdlname (name) + +char *name; + + { + char *new_name ; + char *prv_name ; + char *tmp_name ; + char buffer [256] ; + int number ; + int flag ; + int i ; + int j ; + static struct beden **namtab = NULL; + static char *keywrd [] = { + "abs" , "access" , + "after" , "alias" , + "all" , "and" , + "architecture", "array" , + "assert" , "attribute" , + "begin" , "bit" , + "bit_vector" , "block" , + "body" , "buffer" , + "bus" , "case" , + "component" , "configuration", + "constant" , "disconnect" , + "downto" , "else" , + "elsif" , "end" , + "entity" , "error" , + "exit" , "file" , + "for" , "function" , + "generate" , "generic" , + "guarded" , "if" , + "in" , "inout" , + "is" , "label" , + "library" , "linkage" , + "loop" , "map" , + "mod" , "mux_bit" , + "mux_vector" , "nand" , + "natural" , "new" , + "next" , "nor" , + "not" , "null" , + "of" , "on" , + "open" , "or" , + "others" , "out" , + "package" , "port" , + "procedure" , "process" , + "range" , "record" , + "reg_bit" , "reg_vector" , + "register" , "rem" , + "report" , "return" , + "select" , "severity" , + "signal" , "stable" , + "subtype" , "then" , + "to" , "transport" , + "type" , "units" , + "until" , "use" , + "variable" , "wait" , + "warning" , "when" , + "while" , "with" , + "wor_bit" , "wor_vector" , + "xor" + }; + + /* ###------------------------------------------------------### */ + /* create a local dictionary. This dictionary is used to save */ + /* the VHDL keywords. In addition, it contains the strings */ + /* that has been changed into legal VHDL names and their */ + /* translation. */ + /* ###------------------------------------------------------### */ + + if (namtab == NULL) + { + namtab = beh_initab (); + for (i=0 ; i<93 ; i++) + beh_addtab (namtab, namealloc (keywrd [i]), NULL, 1, 1); + } + + /* ###------------------------------------------------------### */ + /* check if the string has already been seen. In this case, */ + /* just return the VHDL legal name attributed to the string */ + /* ###------------------------------------------------------### */ + + tmp_name = namealloc (name); + new_name = (char *) beh_chktab (namtab, tmp_name, NULL, 7); + + /* ###------------------------------------------------------### */ + /* otherwise, make a legal VHDL name from the string by */ + /* replacing illegal characters by '_'. If two adjacent '_' are */ + /* found a 'v' character is inserted. If the last character is */ + /* '_', a '0' is added at the end of the name. */ + /* ###------------------------------------------------------### */ + + if (beh_chktab (namtab, tmp_name, NULL, 0) == 0) + { + i = 0; + j = 0; + number = 0; + flag = 1; + while (tmp_name [i] != '\0') + { + buffer [j] = tmp_name [i]; + if ( ((tmp_name [i] >= 'a') && (tmp_name [i] <= 'z')) || + ((tmp_name [i] >= 'A') && (tmp_name [i] <= 'Z')) || + ((tmp_name [i] >= '0') && (tmp_name [i] <= '9') && (i != 0))) + flag = 0; + else + { + if (flag == 1) + buffer [j++] = 'v'; + + buffer [j] = '_'; + flag = 1; + } + i++; + j++; + } + if (buffer [j-1] == '_') + buffer [j++] = '0'; + + buffer [j] = '\0'; + new_name = namealloc (buffer); + + /* ###------------------------------------------------------### */ + /* check that the new name has not been already attributed to */ + /* another string. In such a case, add a '_number' at the end */ + /* of the word and check again. The number is incremented as */ + /* many times as needed to obtain a name that has never been */ + /* used. */ + /* ###------------------------------------------------------### */ + + prv_name = new_name; + while (beh_chktab (namtab, new_name, NULL, 1) != 0) + { + new_name = prv_name; + sprintf (buffer, "%s_%d", new_name, number++); + prv_name = new_name; + new_name = namealloc (buffer); + } + beh_addtab (namtab, new_name, NULL, 1, 1 ); + beh_addtab (namtab, tmp_name, NULL, 7, (long) new_name); + beh_addtab (namtab, tmp_name, NULL, 0, 1 ); + } + + return (new_name); + } diff --git a/alliance/src/beh/src/beh_vhvector.c b/alliance/src/beh/src/beh_vhvector.c new file mode 100644 index 00000000..eacf5088 --- /dev/null +++ b/alliance/src/beh/src/beh_vhvector.c @@ -0,0 +1,89 @@ +/* + * 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. + */ + +/* ###--------------------------------------------------------------### */ +/* file : beh_vhvector.c */ +/* date : Mar 1 2000 */ +/* version : v111 */ +/* authors : Pirouz BAZARGAN SABET */ +/* content : low-level function */ +/* ###--------------------------------------------------------------### */ + +#include +#include "mut.h" +#include "log.h" +#include "beh.h" + +/* ###--------------------------------------------------------------### */ +/* function : beh_vhvector */ +/* description : put parenthesis on element of a vector */ +/* called func. : namealloc, beh_addtab, beh_initab, beh_chktab */ +/* ###--------------------------------------------------------------### */ + +char *beh_vhvector (name) + +char *name; + { + char *new_name ; + char tmp1 [256] ; + int i = 0 ; + static struct beden **tab = NULL; + + /* ###------------------------------------------------------### */ + /* create a local dictionary to save the corresponding VHDL */ + /* vector element name */ + /* ###------------------------------------------------------### */ + + if (tab == NULL) + tab = beh_initab (); + + /* ###------------------------------------------------------### */ + /* check if the string has already been translated to a VHDL */ + /* vector element name or not. If not make the translation and */ + /* save the name in the dictionary. */ + /* ###------------------------------------------------------### */ + + if ((new_name = (char *) beh_chktab (tab, name, NULL, 7)) == NULL) + { + strcpy (tmp1, name); + + while ((name [i] != '\0') && (name [i] != ' ' ) && (name [i] != '\'')) + i ++; + + tmp1 [i] = '\0'; + new_name = beh_vhdlname (tmp1); + + if (name [i] != '\0') + { + if (name [i] == ' ') + sprintf (tmp1, "%s (%s)", new_name, &name [i+1]); + else + sprintf (tmp1, "%s'%s" , new_name, &name [i+1]); + + new_name = namealloc (tmp1); + } + beh_addtab (tab, name, NULL, 7, new_name); + } + + return (new_name); + }