diff --git a/alliance/src/scl/Makefile.am b/alliance/src/scl/Makefile.am new file mode 100644 index 00000000..af437a64 --- /dev/null +++ b/alliance/src/scl/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src diff --git a/alliance/src/scl/configure.in b/alliance/src/scl/configure.in new file mode 100644 index 00000000..c1c75087 --- /dev/null +++ b/alliance/src/scl/configure.in @@ -0,0 +1,45 @@ +dnl +/* +dnl This file is part of the Alliance CAD System +dnl Copyright (C) Laboratoire LIP6 - Département ASIM +dnl Universite Pierre et Marie Curie +dnl +dnl Home page : http://www-asim.lip6.fr/alliance/ +dnl E-mail support : mailto:alliance-support@asim.lip6.fr +dnl +dnl This library is free software; you can redistribute it and/or modify it +dnl under the terms of the GNU Library General Public License as published +dnl by the Free Software Foundation; either version 2 of the License, or (at +dnl your option) any later version. +dnl +dnl Alliance VLSI CAD System is distributed in the hope that it will be +dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +dnl Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License along +dnl with the GNU C Library; see the file COPYING. If not, write to the Free +dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +dnl +dnl Purpose : Auto stuffing Alliance +dnl Almost ten years since I wrote this stuff, I just can't +dnl believe it +dnl Date : 01/02/2002 +dnl Author : Frederic Petrot +dnl $Id: configure.in,v 1.1 2002/03/21 12:36:13 ludo Exp $ +dnl +dnl +AC_INIT(src/scl.h) +AM_INIT_AUTOMAKE(scl, 1.5) +AC_PROG_INSTALL +AC_PROG_CC +AC_HEADER_STDC +AC_C_CONST +AC_PROG_RANLIB + +AM_ALLIANCE + +AC_OUTPUT([ +Makefile +src/Makefile +]) diff --git a/alliance/src/scl/src/Makefile.am b/alliance/src/scl/src/Makefile.am new file mode 100644 index 00000000..ec93abeb --- /dev/null +++ b/alliance/src/scl/src/Makefile.am @@ -0,0 +1,12 @@ +CFLAGS = @CFLAGS@ \ + -DALLIANCE_TOP=\"${ALLIANCE_TOP}\" +lib_LIBRARIES = libscl.a +include_HEADERS = scl.h +libScl_a_SOURCES = \ +scgmain.h schenv.c schget.h scpadd.h scpfree.c \ +scg.h schadd.c schenv.h schview.c scpalloc.c scpfree.h \ +scgbefig.c schadd.h scherror.c schview.h scpalloc.h scpswap.h \ +scgbefig.h schalloc.c scherror.h scpbuild.c \ +scglofig.c schalloc.h schfree.c scl.h scpbuild.h \ +scglofig.h schdel.c schfree.h scp.h scpdel.c \ +scgmain.c schdel.h schget.c scpadd.c scpdel.h diff --git a/alliance/src/scl/src/main.c b/alliance/src/scl/src/main.c new file mode 100644 index 00000000..53fe2287 --- /dev/null +++ b/alliance/src/scl/src/main.c @@ -0,0 +1,178 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : main.c | +| | +| Date : 08.02.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include "mut.h" +# include "aut.h" +# include "abl.h" +# include "bdd.h" +# include "abe.h" +# include "abv.h" +# include "mlo.h" +# include "scl.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Usage | +| | +\------------------------------------------------------------*/ + +void SchUsage() +{ + fprintf( stderr, "\t\tschtest [Options] Input_name [Output_name]\n\n" ); + fprintf( stdout, "\t\tOptions : -V Sets Verbose mode on\n" ); + fprintf( stdout, "\t\t -B Behavioral mode on\n" ); + fprintf( stdout, "\t\t -v Vectorized mode on\n" ); + fprintf( stdout, "\t\t -P to place and route\n" ); + fprintf( stdout, "\n" ); + + exit( 1 ); +} + + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +int main( argc, argv ) + + int argc; + char *argv[]; +{ + schfig_list *SchFigure; + befig_list *BeFigure; + lofig_list *LoFigure; + char *InputFileName; + int Number; + int Index; + char Option; + + int FlagVerbose = 0; + int FlagVector = 0; + int FlagBeh = 0; + int FlagPlace = 0; + + mbkenv(); + autenv(); + schenv(); + + InputFileName = (char *)0; + + if ( argc < 2 ) SchUsage(); + + InputFileName = (char *)0; + + for ( Number = 1; Number < argc; Number++ ) + { + if ( argv[ Number ][ 0 ] == '-' ) + { + for ( Index = 1; argv[ Number ][ Index ] != '\0'; Index++ ) + { + Option = argv[ Number ][ Index ]; + + switch ( Option ) + { + case 'V' : FlagVerbose = 1; + break; + case 'v' : FlagVector = 1; + break; + case 'P' : FlagPlace = 1; + break; + case 'B' : FlagBeh = 1; + break; + default : SchUsage(); + } + } + } + else + if ( InputFileName == (char *)0 ) InputFileName = argv[ Number ]; + else + SchUsage(); + } + + if ( InputFileName == (char *)0 ) SchUsage(); + + if ( FlagBeh ) + { + BeFigure = vhdlloadbefig( (befig_list *)0, InputFileName, 3 ); + SchFigure = befig2schfig( BeFigure ); + } + else + { + LoFigure = getlofig( InputFileName, 'A' ); + SchFigure = lofig2schfig( LoFigure, FlagVector ); + } + + if ( FlagPlace ) + { + placerouteschfig( SchFigure ); + } + + if ( FlagVerbose ) + { + viewschfig( SchFigure ); + } + + delschfig( SchFigure->NAME ); + + return( 0 ); +} + + diff --git a/alliance/src/scl/src/scg.h b/alliance/src/scl/src/scg.h new file mode 100644 index 00000000..85dd66d2 --- /dev/null +++ b/alliance/src/scl/src/scg.h @@ -0,0 +1,72 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scg | +| | +| File : scg.h | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCG_H +# define SCG_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ + + +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +extern schfig_list *getschfig_from_cnsfig(); +extern schfig_list *getschfig_from_lofig(); + + +# endif diff --git a/alliance/src/scl/src/scgbefig.c b/alliance/src/scl/src/scgbefig.c new file mode 100644 index 00000000..2110e5be --- /dev/null +++ b/alliance/src/scl/src/scgbefig.c @@ -0,0 +1,417 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scg | +| | +| File : scgbefig.c | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "abl.h" +# include "bdd.h" +# include "mlo.h" +# include "abe.h" +# include "scl.h" + +# include + +# include "scgbefig.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + static authtable *ScgHashNameNet = (authtable *)0; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +static void scg_connect_schcon( SchCon, NetName ) + + schcon_list *SchCon; + char *NetName; +{ + schnet_list *SchNet; + authelem *Element; + + Element = searchauthelem( ScgHashNameNet, NetName ); + + if ( Element != (authelem *)0 ) + { + SchNet = (schnet_list *)Element->VALUE; + + addschnetcon( SchNet, SchCon ); + } +} + +/*------------------------------------------------------------\ +| | +| Get Sch Figure From Befig | +| | +\------------------------------------------------------------*/ + +schfig_list *befig2schfig( BeFigure ) + + befig_list *BeFigure; +{ + schfig_list *SchFigure; + schcon_list *SchCon; + schbox_list *SchBox; + schnet_list *SchNet; + chain_list *ScanChain; + chain_list *Support; + biabl_list *ScanBiAbl; + bepor_list *ScanPort; + beaux_list *ScanAux; + bebus_list *ScanBus; + bebux_list *ScanBux; + bereg_list *ScanReg; + beout_list *ScanOut; + char *Value; + unsigned char SchDir; + char Buffer[ 512 ]; + + ScgHashNameNet = createauthtable( 100 ); + + SchFigure = addschfig( BeFigure->NAME ); + SchFigure->SOURCE = (void *)BeFigure; + SchFigure->SOURCE_TYPE = SCH_SOURCE_BEFIG; + +/* +** First create all figure connectors and nets +*/ + for ( ScanPort = BeFigure->BEPOR; + ScanPort != (bepor_list *)0; + ScanPort = ScanPort->NEXT ) + { + if ( ScanPort->DIRECTION == IN ) SchDir = SCH_CON_IN; + else SchDir = SCH_CON_OUT; + + SchCon = addschfigcon( SchFigure, ScanPort->NAME, SchDir ); + + SchCon->SOURCE = (void *)ScanPort; + SchCon->SOURCE_TYPE = SCH_SOURCE_BEPOR; + + SchNet = addschnet( SchFigure ); + SchNet->SOURCE = (void *)ScanPort; + SchNet->SOURCE_TYPE = SCH_SOURCE_BEPOR; + + SchCon->NET = SchNet; + addschnetcon( SchNet, SchCon ); + + addauthelem( ScgHashNameNet, ScanPort->NAME, (long)SchNet ); + } + + for ( ScanAux = BeFigure->BEAUX; + ScanAux != (beaux_list *)0; + ScanAux = ScanAux->NEXT ) + { + if ( ! searchauthelem( ScgHashNameNet, ScanAux->NAME ) ) + { + SchNet = addschnet( SchFigure ); + SchNet->SOURCE = (void *)ScanAux; + SchNet->SOURCE_TYPE = SCH_SOURCE_BEAUX; + + addauthelem( ScgHashNameNet, ScanAux->NAME, (long)SchNet ); + } + } + + for ( ScanReg = BeFigure->BEREG; + ScanReg != (bereg_list *)0; + ScanReg = ScanReg->NEXT ) + { + if ( ! searchauthelem( ScgHashNameNet, ScanReg->NAME ) ) + { + SchNet = addschnet( SchFigure ); + SchNet->SOURCE = (void *)ScanReg; + SchNet->SOURCE_TYPE = SCH_SOURCE_BEREG; + + addauthelem( ScgHashNameNet, ScanReg->NAME, (long)SchNet ); + } + } + + for ( ScanBux = BeFigure->BEBUX; + ScanBux != (bebux_list *)0; + ScanBux = ScanBux->NEXT ) + { + if ( ! searchauthelem( ScgHashNameNet, ScanBux->NAME ) ) + { + SchNet = addschnet( SchFigure ); + SchNet->SOURCE = (void *)ScanBux; + SchNet->SOURCE_TYPE = SCH_SOURCE_BEBUX; + + addauthelem( ScgHashNameNet, ScanBux->NAME, (long)SchNet ); + } + } + + for ( ScanBus = BeFigure->BEBUS; + ScanBus != (bebus_list *)0; + ScanBus = ScanBus->NEXT ) + { + if ( ! searchauthelem( ScgHashNameNet, ScanBus->NAME ) ) + { + SchNet = addschnet( SchFigure ); + SchNet->SOURCE = (void *)ScanBus; + SchNet->SOURCE_TYPE = SCH_SOURCE_BEBUS; + + addauthelem( ScgHashNameNet, ScanBus->NAME, (long)SchNet ); + } + } + + for ( ScanOut = BeFigure->BEOUT; + ScanOut != (beout_list *)0; + ScanOut = ScanOut->NEXT ) + { + if ( ! searchauthelem( ScgHashNameNet, ScanOut->NAME ) ) + { + SchNet = addschnet( SchFigure ); + SchNet->SOURCE = (void *)ScanOut; + SchNet->SOURCE_TYPE = SCH_SOURCE_BEOUT; + + addauthelem( ScgHashNameNet, ScanOut->NAME, (long)SchNet ); + } + } + +/* +** Now create all boxes for aux, bux, reg etc .. +*/ + for ( ScanAux = BeFigure->BEAUX; + ScanAux != (beaux_list *)0; + ScanAux = ScanAux->NEXT ) + { + sprintf( Buffer, "beaux_%s", ScanAux->NAME ); + SchBox = addschbox( SchFigure, Buffer ); + SchBox->SOURCE = (void *)ScanAux; + SchBox->SOURCE_TYPE = SCH_SOURCE_BEAUX; + + Support = getablexprsupport( ScanAux->ABL, ABL_SUPPORT_CHAIN ); + + for ( ScanChain = Support; + ScanChain != (chain_list *)0; + ScanChain = ScanChain->NEXT ) + { + Value = (char *)ScanChain->DATA; + + if ( ( Value[ 0 ] == '\'' ) || + ( Value[ 0 ] == '"' ) ) continue; + + SchCon = addschboxcon( SchFigure, SchBox, Value, SCH_CON_IN ); + SchCon->SOURCE = (void *)ScanAux; + SchCon->SOURCE_TYPE = SCH_SOURCE_BEAUX; + + scg_connect_schcon( SchCon, SchCon->NAME ); + } + + freechain( Support ); + + SchCon = addschboxcon( SchFigure, SchBox, ScanAux->NAME, SCH_CON_OUT ); + scg_connect_schcon( SchCon, SchCon->NAME ); + } + + for ( ScanBus = BeFigure->BEBUS; + ScanBus != (bebus_list *)0; + ScanBus = ScanBus->NEXT ) + { + sprintf( Buffer, "bebus_%s", ScanBus->NAME ); + SchBox = addschbox( SchFigure, Buffer ); + SchBox->SOURCE = (void *)ScanBus; + SchBox->SOURCE_TYPE = SCH_SOURCE_BEBUS; + + Support = (chain_list *)0; + + for ( ScanBiAbl = ScanBus->BIABL; + ScanBiAbl != (biabl_list *)0; + ScanBiAbl = ScanBiAbl->NEXT ) + { + Support = unionablexprsupport( Support, ScanBiAbl->CNDABL, ABL_SUPPORT_CHAIN ); + Support = unionablexprsupport( Support, ScanBiAbl->VALABL, ABL_SUPPORT_CHAIN ); + } + + for ( ScanChain = Support; + ScanChain != (chain_list *)0; + ScanChain = ScanChain->NEXT ) + { + Value = (char *)ScanChain->DATA; + + if ( ( Value[ 0 ] == '\'' ) || + ( Value[ 0 ] == '"' ) ) continue; + + SchCon = addschboxcon( SchFigure, SchBox, Value, SCH_CON_IN ); + SchCon->SOURCE = (void *)ScanBus; + SchCon->SOURCE_TYPE = SCH_SOURCE_BEBUS; + + scg_connect_schcon( SchCon, SchCon->NAME ); + } + + freechain( Support ); + + SchCon = addschboxcon( SchFigure, SchBox, ScanBus->NAME, SCH_CON_OUT ); + scg_connect_schcon( SchCon, SchCon->NAME ); + } + + for ( ScanBux = BeFigure->BEBUX; + ScanBux != (bebux_list *)0; + ScanBux = ScanBux->NEXT ) + { + sprintf( Buffer, "bebux_%s", ScanBux->NAME ); + SchBox = addschbox( SchFigure, Buffer ); + SchBox->SOURCE = (void *)ScanBux; + SchBox->SOURCE_TYPE = SCH_SOURCE_BEBUX; + + Support = (chain_list *)0; + + for ( ScanBiAbl = ScanBux->BIABL; + ScanBiAbl != (biabl_list *)0; + ScanBiAbl = ScanBiAbl->NEXT ) + { + Support = unionablexprsupport( Support, ScanBiAbl->CNDABL, ABL_SUPPORT_CHAIN ); + Support = unionablexprsupport( Support, ScanBiAbl->VALABL, ABL_SUPPORT_CHAIN ); + } + + for ( ScanChain = Support; + ScanChain != (chain_list *)0; + ScanChain = ScanChain->NEXT ) + { + Value = (char *)ScanChain->DATA; + + if ( ( Value[ 0 ] == '\'' ) || + ( Value[ 0 ] == '"' ) ) continue; + + SchCon = addschboxcon( SchFigure, SchBox, Value, SCH_CON_IN ); + SchCon->SOURCE = (void *)ScanBux; + SchCon->SOURCE_TYPE = SCH_SOURCE_BEBUX; + + scg_connect_schcon( SchCon, SchCon->NAME ); + } + + freechain( Support ); + + SchCon = addschboxcon( SchFigure, SchBox, ScanBux->NAME, SCH_CON_OUT ); + scg_connect_schcon( SchCon, SchCon->NAME ); + } + + for ( ScanReg = BeFigure->BEREG; + ScanReg != (bereg_list *)0; + ScanReg = ScanReg->NEXT ) + { + sprintf( Buffer, "bereg_%s", ScanReg->NAME ); + SchBox = addschbox( SchFigure, Buffer ); + SchBox->SOURCE = (void *)ScanReg; + SchBox->SOURCE_TYPE = SCH_SOURCE_BEREG; + + Support = (chain_list *)0; + + for ( ScanBiAbl = ScanReg->BIABL; + ScanBiAbl != (biabl_list *)0; + ScanBiAbl = ScanBiAbl->NEXT ) + { + Support = unionablexprsupport( Support, ScanBiAbl->CNDABL, ABL_SUPPORT_CHAIN ); + Support = unionablexprsupport( Support, ScanBiAbl->VALABL, ABL_SUPPORT_CHAIN ); + } + + for ( ScanChain = Support; + ScanChain != (chain_list *)0; + ScanChain = ScanChain->NEXT ) + { + Value = (char *)ScanChain->DATA; + + if ( ( Value[ 0 ] == '\'' ) || + ( Value[ 0 ] == '"' ) ) continue; + + SchCon = addschboxcon( SchFigure, SchBox, Value, SCH_CON_IN ); + SchCon->SOURCE = (void *)ScanReg; + SchCon->SOURCE_TYPE = SCH_SOURCE_BEREG; + + scg_connect_schcon( SchCon, SchCon->NAME ); + } + + freechain( Support ); + + SchCon = addschboxcon( SchFigure, SchBox, ScanReg->NAME, SCH_CON_OUT ); + scg_connect_schcon( SchCon, SchCon->NAME ); + } + + for ( ScanOut = BeFigure->BEOUT; + ScanOut != (beout_list *)0; + ScanOut = ScanOut->NEXT ) + { + sprintf( Buffer, "beout_%s", ScanOut->NAME ); + SchBox = addschbox( SchFigure, Buffer ); + SchBox->SOURCE = (void *)ScanOut; + SchBox->SOURCE_TYPE = SCH_SOURCE_BEOUT; + + Support = getablexprsupport( ScanOut->ABL, ABL_SUPPORT_CHAIN ); + + for ( ScanChain = Support; + ScanChain != (chain_list *)0; + ScanChain = ScanChain->NEXT ) + { + Value = (char *)ScanChain->DATA; + + if ( ( Value[ 0 ] == '\'' ) || + ( Value[ 0 ] == '"' ) ) continue; + + SchCon = addschboxcon( SchFigure, SchBox, Value, SCH_CON_IN ); + SchCon->SOURCE = (void *)ScanOut; + SchCon->SOURCE_TYPE = SCH_SOURCE_BEOUT; + + scg_connect_schcon( SchCon, SchCon->NAME ); + } + + SchCon = addschboxcon( SchFigure, SchBox, ScanOut->NAME, SCH_CON_OUT ); + scg_connect_schcon( SchCon, SchCon->NAME ); + } + + destroyauthtable( ScgHashNameNet ); + + return( SchFigure ); +} diff --git a/alliance/src/scl/src/scgbefig.h b/alliance/src/scl/src/scgbefig.h new file mode 100644 index 00000000..58d2a075 --- /dev/null +++ b/alliance/src/scl/src/scgbefig.h @@ -0,0 +1,68 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scg | +| | +| File : scglofig.h | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCG_LOFIG_H +# define SCG_LOFIG_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern schfig_list *getschfig_from_lofig(); + +# endif diff --git a/alliance/src/scl/src/scglofig.c b/alliance/src/scl/src/scglofig.c new file mode 100644 index 00000000..92095abd --- /dev/null +++ b/alliance/src/scl/src/scglofig.c @@ -0,0 +1,266 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scg | +| | +| File : scglofig.c | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" + +# include +# include "scglofig.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Get Sch Figure From Lo fig | +| | +\------------------------------------------------------------*/ + + +schfig_list *lofig2schfig( LoFigure, Vectorized ) + + lofig_list *LoFigure; + int Vectorized; +{ + locon_list *LoCon; + loins_list *LoIns; + losig_list *LoSig; + lotrs_list *LoTrs; + schcon_list *SchCon; + schbox_list *SchBox; + schnet_list *SchNet; + schfig_list *SchFigure; + ptype_list *PType; + + SchFigure = addschfig( LoFigure->NAME ); + + SchFigure->SOURCE = (void *)LoFigure; + SchFigure->SOURCE_TYPE = SCH_SOURCE_LOFIG; + + for ( LoSig = LoFigure->LOSIG; + LoSig != (losig_list *)0; + LoSig = LoSig->NEXT ) + { + SchNet = addschnet( SchFigure ); + + SchNet->SOURCE = (void *)LoSig; + SchNet->SOURCE_TYPE = SCH_SOURCE_LOSIG ; + + LoSig->USER = addptype( LoSig->USER, SCH_NET_TYPE, SchNet ); + } + + for ( LoCon = LoFigure->LOCON; + LoCon != (locon_list *)0; + LoCon = LoCon->NEXT ) + { + if ( ( ! ( ( isvdd( LoCon->NAME ) ) || + ( isvss( LoCon->NAME ) ) ) ) || + ( LoFigure->LOTRS != (lotrs_list *)0 ) ) + { + if ( ( LoCon->DIRECTION == IN ) || + ( LoCon->DIRECTION == INOUT ) || + ( LoCon->DIRECTION == UNKNOWN ) || + ( LoFigure->LOTRS != (lotrs_list *)0 ) ) + { + SchCon = addschfigcon( SchFigure, LoCon->NAME, SCH_CON_IN ); + + SchCon->SOURCE = (void *)LoCon; + SchCon->SOURCE_TYPE = SCH_SOURCE_LOCON; + + LoSig = LoCon->SIG; + PType = getptype( LoSig->USER, SCH_NET_TYPE ); + SchNet = (schnet_list *)PType->DATA; + + addschnetcon( SchNet, SchCon ); + } + + if ( ( LoCon->DIRECTION != IN ) || + ( LoFigure->LOTRS != (lotrs_list *)0 ) ) + { + SchCon = addschfigcon( SchFigure, LoCon->NAME, SCH_CON_OUT ); + + SchCon->SOURCE = (void *)LoCon; + SchCon->SOURCE_TYPE = SCH_SOURCE_LOCON; + + LoSig = LoCon->SIG; + PType = getptype( LoSig->USER, SCH_NET_TYPE ); + SchNet = (schnet_list *)PType->DATA; + + addschnetcon( SchNet, SchCon ); + } + } + } + + for ( LoIns = LoFigure->LOINS; + LoIns != (loins_list *)0; + LoIns = LoIns->NEXT ) + { + SchBox = addschbox( SchFigure, LoIns->INSNAME ); + SchBox->SOURCE = (void *)LoIns; + SchBox->SOURCE_TYPE = SCH_SOURCE_LOINS; + + for ( LoCon = LoIns->LOCON; + LoCon != (locon_list *)0; + LoCon = LoCon->NEXT ) + { + if ( ! ( ( isvdd( LoCon->NAME ) ) || + ( isvss( LoCon->NAME ) ) ) ) + { + if ( ( LoCon->DIRECTION == IN ) || + ( LoCon->DIRECTION == INOUT ) || + ( LoCon->DIRECTION == UNKNOWN ) ) + { + SchCon = addschboxcon( SchFigure, SchBox, LoCon->NAME, SCH_CON_IN ); + + SchCon->SOURCE = (void *)LoCon; + SchCon->SOURCE_TYPE = SCH_SOURCE_LOCON; + + LoSig = LoCon->SIG; + PType = getptype( LoSig->USER, SCH_NET_TYPE ); + SchNet = (schnet_list *)PType->DATA; + + addschnetcon( SchNet, SchCon ); + } + + if ( LoCon->DIRECTION != IN ) + { + SchCon = addschboxcon( SchFigure, SchBox, LoCon->NAME, SCH_CON_OUT ); + + SchCon->SOURCE = (void *)LoCon; + SchCon->SOURCE_TYPE = SCH_SOURCE_LOCON; + + LoSig = LoCon->SIG; + PType = getptype( LoSig->USER, SCH_NET_TYPE ); + SchNet = (schnet_list *)PType->DATA; + + addschnetcon( SchNet, SchCon ); + } + } + } + } + + for ( LoTrs = LoFigure->LOTRS; + LoTrs != (lotrs_list *)0; + LoTrs = LoTrs->NEXT ) + { + if ( LoTrs->TRNAME != (char *)0 ) + { + SchBox = addschbox( SchFigure, LoTrs->TRNAME ); + } + else + { + SchBox = addschbox( SchFigure, ( LoTrs->TYPE == TRANSN ) ? "ntrans" : "ptrans " ); + } + + SchBox->SOURCE = (void *)LoTrs; + SchBox->SOURCE_TYPE = SCH_SOURCE_LOTRS; +/* +** Transitor Source +*/ + LoCon = LoTrs->SOURCE; + + SchCon = addschboxcon( SchFigure, SchBox, "s", SCH_CON_IN ); + SchCon->SOURCE = (void *)LoTrs; + SchCon->SOURCE_TYPE = SCH_SOURCE_LOTRS; + + LoSig = LoCon->SIG; + PType = getptype( LoSig->USER, SCH_NET_TYPE ); + SchNet = (schnet_list *)PType->DATA; + + addschnetcon( SchNet, SchCon ); +/* +** Transitor Drain +*/ + LoCon = LoTrs->DRAIN; + + SchCon = addschboxcon( SchFigure, SchBox, "d", SCH_CON_IN ); + SchCon->SOURCE = (void *)LoTrs; + SchCon->SOURCE_TYPE = SCH_SOURCE_LOTRS; + + LoSig = LoCon->SIG; + PType = getptype( LoSig->USER, SCH_NET_TYPE ); + SchNet = (schnet_list *)PType->DATA; + + addschnetcon( SchNet, SchCon ); +/* +** Transitor Grid +*/ + LoCon = LoTrs->GRID; + + SchCon = addschboxcon( SchFigure, SchBox, "g", SCH_CON_OUT ); + SchCon->SOURCE = (void *)LoTrs; + SchCon->SOURCE_TYPE = SCH_SOURCE_LOTRS; + + LoSig = LoCon->SIG; + PType = getptype( LoSig->USER, SCH_NET_TYPE ); + SchNet = (schnet_list *)PType->DATA; + + addschnetcon( SchNet, SchCon ); + } + + for ( LoSig = LoFigure->LOSIG; + LoSig != (losig_list *)0; + LoSig = LoSig->NEXT ) + { + LoSig->USER = delptype( LoSig->USER, SCH_NET_TYPE ); + } + + return( SchFigure ); +} diff --git a/alliance/src/scl/src/scglofig.h b/alliance/src/scl/src/scglofig.h new file mode 100644 index 00000000..58d2a075 --- /dev/null +++ b/alliance/src/scl/src/scglofig.h @@ -0,0 +1,68 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scg | +| | +| File : scglofig.h | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCG_LOFIG_H +# define SCG_LOFIG_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern schfig_list *getschfig_from_lofig(); + +# endif diff --git a/alliance/src/scl/src/scgmain.c b/alliance/src/scl/src/scgmain.c new file mode 100644 index 00000000..fbbd8470 --- /dev/null +++ b/alliance/src/scl/src/scgmain.c @@ -0,0 +1,77 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scg | +| | +| File : scgn.c | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" + +# include +# include "scg.h" +# include "scgmain.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +schfig_list *getschfig( FileName ) + + char *FileName; +{ + return ( getschfig_from_lofig( FileName ) ); +} diff --git a/alliance/src/scl/src/scgmain.h b/alliance/src/scl/src/scgmain.h new file mode 100644 index 00000000..7f8b2cf8 --- /dev/null +++ b/alliance/src/scl/src/scgmain.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scg | +| | +| File : scgmain.h | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCG_MAIN_H +# define SCG_MAIN_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/schadd.c b/alliance/src/scl/src/schadd.c new file mode 100644 index 00000000..703ddb20 --- /dev/null +++ b/alliance/src/scl/src/schadd.c @@ -0,0 +1,275 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schadd.c | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" + +# include +# include "schadd.h" +# include "scherror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Sch Add Functions | +| | +\------------------------------------------------------------*/ + +schnet_list *addschnetcon( Net, Con) + + schnet_list *Net; + schcon_list *Con; + +{ + Con->NET = Net; + Net->CON_NET = addchain( Net->CON_NET, (void *)Con ); + + if ( IsSchConExternal( Con ) ) + { + if ( IsSchConIn( Con ) ) Net->NUMBER_IN++; + else Net->NUMBER_OUT++; + } + else + { + if ( IsSchConIn( Con ) ) Net->NUMBER_OUT++; + else Net->NUMBER_IN++; + } + + return ( Net ); +} + +/*------------------------------------------------------------\ +| | +| Sch Add Figure | +| | +\------------------------------------------------------------*/ + +schfig_list *addschfig( Name ) + + char *Name; + +{ + schfig_list *Figure; + + Figure = allocschfig(); + + Figure->NAME = namealloc( Name ); + + Figure->NEXT = HEAD_SCHFIG; + HEAD_SCHFIG = Figure; + + return( Figure ); +} + +/*------------------------------------------------------------\ +| | +| Sch Add Box | +| | +\------------------------------------------------------------*/ + +schbox_list *addschbox( Figure, Name ) + + schfig_list *Figure; + char *Name; +{ + schbox_list *Box; + + Box = allocschbox(); + + Box->NAME = namealloc( Name ); + + Box->NEXT = Figure->BOX; + Figure->BOX = Box; + + return( Box ); +} + +/*------------------------------------------------------------\ +| | +| Sch Add Box Connector | +| | +\------------------------------------------------------------*/ + +schcon_list *addschboxcon( Figure, Box, Name, Type ) + + schfig_list *Figure; + schbox_list *Box; + char *Name; + unsigned char Type; +{ + schcon_list *Connector; + + Connector = allocschcon(); + + Connector->NAME = namealloc( Name ); + + if ( Type == SCH_CON_IN ) + { + Connector->NEXT = Box->CON_IN; + Box->CON_IN = Connector; + + Box->NUMBER_IN++; + } + else + { + Connector->NEXT = Box->CON_OUT; + Box->CON_OUT = Connector; + + Box->NUMBER_OUT++; + } + + if ( Type == SCH_CON_IN ) SetSchConIn( Connector ); + else SetSchConOut( Connector ); + + SetSchConInternal( Connector ); + + Connector->ROOT_TYPE = SCH_ROOT_CON_BOX; + Connector->ROOT = (void *)Box; + + return( Connector ); +} + +/*------------------------------------------------------------\ +| | +| Sch Add Figure Connector | +| | +\------------------------------------------------------------*/ + +schcon_list *addschfigcon( Figure, Name, Type ) + + schfig_list *Figure; + char *Name; + unsigned char Type; +{ + schcon_list *Connector; + + Connector = allocschcon(); + + Connector->NAME = namealloc( Name ); + + if ( Type == SCH_CON_IN ) + { + Connector->NEXT = Figure->CON_IN; + Figure->CON_IN = Connector; + + Figure->NUMBER_IN++; + } + else + { + Connector->NEXT = Figure->CON_OUT; + Figure->CON_OUT = Connector; + + Figure->NUMBER_OUT++; + } + + if ( Type == SCH_CON_IN ) SetSchConIn( Connector ); + else SetSchConOut( Connector ); + + SetSchConExternal( Connector ); + + Connector->ROOT_TYPE = SCH_ROOT_CON_FIG; + Connector->ROOT = (void *)Figure; + + return( Connector ); +} + +/*------------------------------------------------------------\ +| | +| Sch Add Net | +| | +\------------------------------------------------------------*/ + +schnet_list *addschnet( Figure ) + + schfig_list *Figure; +{ + schnet_list *Net; + + Net = allocschnet(); + + Net->NEXT = Figure->NET; + Figure->NET = Net; + + return( Net ); +} + +/*------------------------------------------------------------\ +| | +| Sch Add Wire | +| | +\------------------------------------------------------------*/ + +schwir_list *addschwir( Figure, Net ) + + schfig_list *Figure; + schnet_list *Net; +{ + schwir_list *Wire; + + Wire = allocschwir(); + + Wire->NEXT = Net->WIRE; + Net->WIRE = Wire; + + return( Wire ); +} + diff --git a/alliance/src/scl/src/schadd.h b/alliance/src/scl/src/schadd.h new file mode 100644 index 00000000..ea09e918 --- /dev/null +++ b/alliance/src/scl/src/schadd.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schadd.h | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCH_ADD_H +# define SCH_ADD_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/schalloc.c b/alliance/src/scl/src/schalloc.c new file mode 100644 index 00000000..a0fd76ee --- /dev/null +++ b/alliance/src/scl/src/schalloc.c @@ -0,0 +1,136 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schalloc.c | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + + +# include +# include +# include "schalloc.h" +# include "scherror.h" + +# include "mut.h" +# include "mlo.h" +# include "aut.h" +# include "scl.h" + + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + schfig_list *HEAD_SCHFIG = (schfig_list *)0; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Alloc Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Sch Alloc Figure | +| | +\------------------------------------------------------------*/ + +schfig_list *allocschfig() +{ + return( (schfig_list *)(autallocblock( sizeof( schfig_list ) ) ) ); +} + +/*------------------------------------------------------------\ +| | +| Sch Alloc Box | +| | +\------------------------------------------------------------*/ + +schbox_list *allocschbox() +{ + return( (schbox_list *)(autallocheap( sizeof( schbox_list ) ) ) ); +} + +/*------------------------------------------------------------\ +| | +| Sch Alloc Connector | +| | +\------------------------------------------------------------*/ + +schcon_list *allocschcon() +{ + return( (schcon_list *)(autallocheap( sizeof( schcon_list ) ) ) ); +} + +/*------------------------------------------------------------\ +| | +| Sch Alloc Net | +| | +\------------------------------------------------------------*/ + +schnet_list *allocschnet() +{ + return( (schnet_list *)(autallocheap( sizeof( schnet_list ) ) ) ); +} + +/*------------------------------------------------------------\ +| | +| Sch Alloc Wire | +| | +\------------------------------------------------------------*/ + +schwir_list *allocschwir() +{ + return( (schwir_list *)(autallocheap( sizeof( schwir_list ) ) ) ); +} + diff --git a/alliance/src/scl/src/schalloc.h b/alliance/src/scl/src/schalloc.h new file mode 100644 index 00000000..9d50205b --- /dev/null +++ b/alliance/src/scl/src/schalloc.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schalloc.h | +| | +| Date : 28.01.97 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCH_ALLOC_H +# define SCH_ALLOC_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/schdel.c b/alliance/src/scl/src/schdel.c new file mode 100644 index 00000000..9f9425db --- /dev/null +++ b/alliance/src/scl/src/schdel.c @@ -0,0 +1,222 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schdel.c | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" + +# include +# include "schdel.h" +# include "scherror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Sch Del Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Sch Del Connector List | +| | +\------------------------------------------------------------*/ + +static void loc_delschcon( HeadCon ) + + schcon_list *HeadCon; +{ + schcon_list *ScanCon; + schcon_list *DelCon; + + ScanCon = HeadCon; + + while ( ScanCon != (schcon_list *)0 ) + { + DelCon = ScanCon; + ScanCon = ScanCon->NEXT; + + freeschcon( DelCon ); + } +} + +/*------------------------------------------------------------\ +| | +| Sch Del Wire List | +| | +\------------------------------------------------------------*/ + +static void loc_delschwir( HeadWire ) + + schwir_list *HeadWire; +{ + schwir_list *ScanWire; + schwir_list *DelWire; + + ScanWire = HeadWire; + + while ( ScanWire != (schwir_list *)0 ) + { + DelWire = ScanWire; + ScanWire = ScanWire->NEXT; + + freeschwir( DelWire ); + } +} + + +/*------------------------------------------------------------\ +| | +| Sch Del Net List | +| | +\------------------------------------------------------------*/ + +static void loc_delschnet( HeadNet ) + + schnet_list *HeadNet; +{ + schnet_list *ScanNet; + schnet_list *DelNet; + + ScanNet = HeadNet; + + while ( ScanNet != (schnet_list *)0 ) + { + DelNet = ScanNet; + ScanNet = ScanNet->NEXT; + + loc_delschwir( DelNet->WIRE ); + + if ( DelNet->CON_NET != (chain_list *)0 ) + { + freechain( DelNet->CON_NET ); + } + + freeschnet( DelNet ); + } +} + +/*------------------------------------------------------------\ +| | +| Sch Del Box List | +| | +\------------------------------------------------------------*/ + +static void loc_delschbox( HeadBox ) + + schbox_list *HeadBox; +{ + schbox_list *ScanBox; + schbox_list *DelBox; + + ScanBox = HeadBox; + + while ( ScanBox != (schbox_list *)0 ) + { + DelBox = ScanBox; + ScanBox = ScanBox->NEXT; + + loc_delschcon( DelBox->CON_IN ); + loc_delschcon( DelBox->CON_OUT ); + + freeschbox( DelBox ); + } +} + +/*------------------------------------------------------------\ +| | +| Sch Del Figure | +| | +\------------------------------------------------------------*/ + +int delschfig( Name ) + + char *Name; +{ + schfig_list *Figure; + schfig_list **Previous; + + Name = namealloc( Name ); + Previous = &HEAD_SCHFIG; + + for ( Figure = HEAD_SCHFIG; + Figure != (schfig_list *)0; + Figure = Figure->NEXT ) + { + if ( Figure->NAME == Name ) break; + + Previous = &Figure->NEXT; + } + + if ( Figure == (schfig_list *)0 ) return( 0 ); + + *Previous = Figure->NEXT; + + loc_delschcon( Figure->CON_IN ); + loc_delschcon( Figure->CON_OUT ); + + loc_delschnet( Figure->CON_OUT ); + loc_delschbox( Figure->CON_OUT ); + + freeschfig( Figure ); + + return( 1 ); +} + diff --git a/alliance/src/scl/src/schdel.h b/alliance/src/scl/src/schdel.h new file mode 100644 index 00000000..39fd222b --- /dev/null +++ b/alliance/src/scl/src/schdel.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schdel.h | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCH_DEL_H +# define SCH_DEL_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/schenv.c b/alliance/src/scl/src/schenv.c new file mode 100644 index 00000000..d23eaa55 --- /dev/null +++ b/alliance/src/scl/src/schenv.c @@ -0,0 +1,95 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schenv.c | +| | +| Date : 04.07.96 | +| | +| Author : Jacomme Ludovic | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "scl.h" + +# include +# include +# include +# include "schenv.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + char *SCH_IN; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| schenv | +| | +\------------------------------------------------------------*/ + +void schenv() +{ + SCH_IN = namealloc( mbkgetenv( "SCH_IN") ); + + if ( SCH_IN == (char *)0 ) + { + SCH_IN = namealloc( IN_LO ); + } +} diff --git a/alliance/src/scl/src/schenv.h b/alliance/src/scl/src/schenv.h new file mode 100644 index 00000000..3b620b60 --- /dev/null +++ b/alliance/src/scl/src/schenv.h @@ -0,0 +1,75 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schenv.h | +| | +| Date : 04.07.96 | +| | +| Author : Jacomme Ludovic | +| | +\------------------------------------------------------------*/ + +# ifndef SCH_ENV_H +# define SCH_ENV_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/scherror.c b/alliance/src/scl/src/scherror.c new file mode 100644 index 00000000..d8d9e59d --- /dev/null +++ b/alliance/src/scl/src/scherror.c @@ -0,0 +1,94 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : Sch Errors | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ + +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" +# include "scherror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +void sch_error( Error, Text, File, Line ) + + char Error; + char *Text; + char *File; + long Line; +{ + char *Name; + + Name = mbkstrdup( File ); + Name[ strlen( File ) - 1 ] = '\0'; + + fprintf( stderr, "%s%ld ", Name, Line ); + + switch( Error ) + { + default : + + fprintf( stderr, "unknown internal error %d !\n", Error ); + } + + autexit( 1 ); +} diff --git a/alliance/src/scl/src/scherror.h b/alliance/src/scl/src/scherror.h new file mode 100644 index 00000000..226716d4 --- /dev/null +++ b/alliance/src/scl/src/scherror.h @@ -0,0 +1,76 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : Sch Errors | +| | +| Date : 28.01.97 | +| | +\------------------------------------------------------------*/ + +# ifndef SCH_ERROR_H +# define SCH_ERROR_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# define SCH_EXPR_NULL_ERROR 0 +# define SCH_UNKNOWN_ATOM_ERROR 1 +# define SCH_OPERATOR_ERROR 2 + +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ + +# define scherror( E, V ) (sch_error( (E), (V), __FILE__, __LINE__ )) + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern void sch_error(); + +# endif diff --git a/alliance/src/scl/src/schfree.c b/alliance/src/scl/src/schfree.c new file mode 100644 index 00000000..57394814 --- /dev/null +++ b/alliance/src/scl/src/schfree.c @@ -0,0 +1,141 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schfree.c | +| | +| Date : 28.01.97 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" + +# include +# include +# include "schfree.h" +# include "scherror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Sch Free Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Sch Free Figure | +| | +\------------------------------------------------------------*/ + +void freeschfig( Figure ) + + schfig_list *Figure; +{ + autfreeblock( (char *)Figure ); +} + +/*------------------------------------------------------------\ +| | +| Sch Free Box | +| | +\------------------------------------------------------------*/ + +void freeschbox( Box ) + + schbox_list *Box; +{ + autfreeheap( (char *)Box, sizeof( schbox_list )); +} + +/*------------------------------------------------------------\ +| | +| Sch Free Connector | +| | +\------------------------------------------------------------*/ + +void freeschcon( Connector ) + + schcon_list *Connector; +{ + autfreeheap( (char *)Connector, sizeof( schcon_list )); +} + +/*------------------------------------------------------------\ +| | +| Sch Free Net | +| | +\------------------------------------------------------------*/ + +void freeschnet( Net ) + + schnet_list *Net; +{ + autfreeheap( (char *)Net, sizeof( schnet_list )); +} + +/*------------------------------------------------------------\ +| | +| Sch Free Wire | +| | +\------------------------------------------------------------*/ + +void freeschwir( Wire ) + + schwir_list *Wire; +{ + autfreeheap( (char *)Wire, sizeof( schwir_list )); +} + diff --git a/alliance/src/scl/src/schfree.h b/alliance/src/scl/src/schfree.h new file mode 100644 index 00000000..8daf33de --- /dev/null +++ b/alliance/src/scl/src/schfree.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schfree.h | +| | +| Date : 28.01.97 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCH_FREE_H +# define SCH_FREE_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/schget.c b/alliance/src/scl/src/schget.c new file mode 100644 index 00000000..139c0c3e --- /dev/null +++ b/alliance/src/scl/src/schget.c @@ -0,0 +1,110 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schget.c | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" + +# include +# include +# include +# include "schget.h" +# include "scherror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Sch Get Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Get Sch Vector Name | +| | +\------------------------------------------------------------*/ + +char *getschvectorname( Vector, Index ) + + char *Vector; + long *Index; +{ + char *LeftParen; + char Buffer[ 128 ]; + + if ( Vector == (char *)0 ) + { + return( (char *)0 ); + } + + strcpy( Buffer, Vector ); + LeftParen = strchr( Buffer, ' ' ); + + if ( LeftParen == (char *)0 ) + { + return( (char *)0 ); + } + + *LeftParen = '\0'; + *Index = atoi( LeftParen + 1 ); + Vector = namealloc( Buffer ); + + return( Vector ); +} diff --git a/alliance/src/scl/src/schget.h b/alliance/src/scl/src/schget.h new file mode 100644 index 00000000..c2939334 --- /dev/null +++ b/alliance/src/scl/src/schget.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schget.h | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCH_GET_H +# define SCH_GET_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/schview.c b/alliance/src/scl/src/schview.c new file mode 100644 index 00000000..ff44cc23 --- /dev/null +++ b/alliance/src/scl/src/schview.c @@ -0,0 +1,282 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schview.c | +| | +| Date : 11.03.97 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" + +# include "schview.h" +# include "scherror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Sch View Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Sch View Wire | +| | +\------------------------------------------------------------*/ + +void viewschwir( Wire ) + + schwir_list *Wire; +{ + fprintf( stdout, "\n--> Wire" ); + fprintf( stdout, "\n X : %ld", Wire->X ); + fprintf( stdout, "\n Y : %ld", Wire->Y ); + fprintf( stdout, "\n DX : %ld", Wire->DX ); + fprintf( stdout, "\n DX : %ld", Wire->DY ); + fprintf( stdout, "\n FLAGS : %lx", Wire->FLAGS ); + fprintf( stdout, "\n USER : %lx", (long)Wire->USER ); + fprintf( stdout, "\n<-- Wire" ); +} + +/*------------------------------------------------------------\ +| | +| Sch View Net | +| | +/------------------------------------------------------------*/ + +void viewschnet( Net ) + + schnet_list *Net ; +{ + schwir_list *ScanWire; + schcon_list *ScanCon; + chain_list *ScanChain; + char *RootName; + + fprintf( stdout, "\n --> Net" ); + fprintf( stdout, "\n NUMBER_IN : %ld", Net->NUMBER_IN ); + fprintf( stdout, "\n NUMBER_OUT : %ld", Net->NUMBER_OUT ); + fprintf( stdout, "\n FLAGS : %lx", Net->FLAGS ); + + fprintf( stdout, "\n SOURCE_TYPE : %d", (int)Net->SOURCE_TYPE ); + fprintf( stdout, "\n USER : %lx", (long)Net->USER ); + + fprintf( stdout, "\n CON_NET :" ); + + for ( ScanChain = Net->CON_NET; + ScanChain != (chain_list *)0; + ScanChain = ScanChain->NEXT ) + { + ScanCon = (schcon_list *)ScanChain->DATA; + + if ( ScanCon->ROOT_TYPE == SCH_ROOT_CON_FIG ) + { + RootName = ((schfig_list *)ScanCon->ROOT)->NAME; + fprintf( stdout, "\n \t # %s\tof fig %s", ScanCon->NAME, RootName ); + } + else + { + RootName = ((schbox_list *)ScanCon->ROOT)->NAME; + fprintf( stdout, "\n \t # %s\tof box %s", ScanCon->NAME, RootName ); + } + } + + fprintf( stdout, "\n WIRE :" ); + + for ( ScanWire = Net->WIRE; + ScanWire != (schwir_list *)0; + ScanWire = ScanWire->NEXT ) + { + viewschwir( ScanWire ); + } + + fprintf( stdout, "\n<-- Net" ); +} + +/*------------------------------------------------------------\ +| | +| Sch View Connector | +| | +\------------------------------------------------------------*/ + +void viewschcon( Con ) + + schcon_list *Con ; +{ + fprintf( stdout, "\n --> Con" ); + fprintf( stdout, "\n \tNAME : %s", Con->NAME ); + fprintf( stdout, "\n \tSOURCE_TYPE : %d", (int)Con->SOURCE_TYPE ); + fprintf( stdout, "\n \tDIR : %d", (int)Con->DIR ); + fprintf( stdout, "\n \tTYPE : Ox%x", (int)Con->TYPE ); + fprintf( stdout, "\n \tROOT_TYPE : %d", (int)Con->ROOT_TYPE ); + fprintf( stdout, "\n \tX_REL : %lx", Con->X_REL ); + fprintf( stdout, "\n \tY_REL : %lx", Con->Y_REL ); + fprintf( stdout, "\n \tFLAGS : %lx", Con->FLAGS ); + fprintf( stdout, "\n \tUSER : %lx", (long)Con->USER ); + fprintf( stdout, "\n <-- Con" ); +} + +/*------------------------------------------------------------\ +| | +| Sch View Box | +| | +\------------------------------------------------------------*/ + +void viewschbox( Box ) + + schbox_list *Box; +{ + schcon_list *ScanCon; + + fprintf( stdout, "\n--> Box" ); + fprintf( stdout, "\n NAME : %s", Box->NAME ); + fprintf( stdout, "\n SOURCE_TYPE : %d", (int)Box->SOURCE_TYPE ); + fprintf( stdout, "\n NUMBER_IN : %ld", Box->NUMBER_IN ); + fprintf( stdout, "\n NUMBER_OUT : %ld", Box->NUMBER_OUT ); + fprintf( stdout, "\n X : %ld", Box->X ); + fprintf( stdout, "\n Y : %ld", Box->Y ); + fprintf( stdout, "\n DX : %ld", Box->DX ); + fprintf( stdout, "\n DY : %ld", Box->DY ); + fprintf( stdout, "\n FLAGS : %lx", Box->FLAGS ); + fprintf( stdout, "\n USER : %lx", (long)Box->USER ); + + fprintf( stdout, "\n CON_IN : " ); + + for ( ScanCon = Box->CON_IN; + ScanCon != (schcon_list *)0; + ScanCon = ScanCon->NEXT ) + { + viewschcon( ScanCon ); + } + + fprintf( stdout, "\n CON_OUT : " ); + + for ( ScanCon = Box->CON_OUT; + ScanCon != (schcon_list *)0; + ScanCon = ScanCon->NEXT ) + { + viewschcon( ScanCon ); + } + + fprintf( stdout, "\n<-- Box" ); +} + +/*------------------------------------------------------------\ +| | +| Sch View Figure | +| | +\------------------------------------------------------------*/ + +void viewschfig( Figure ) + + schfig_list *Figure; +{ + schcon_list *ScanCon; + schbox_list *ScanBox; + schnet_list *ScanNet; + + fprintf( stdout, "\n--> Figure" ); + fprintf( stdout, "\n NAME : %s", Figure->NAME ); + fprintf( stdout, "\n SOURCE_TYPE : %d", (int)Figure->SOURCE_TYPE ); + fprintf( stdout, "\n NUMBER_IN : %ld", Figure->NUMBER_IN ); + fprintf( stdout, "\n NUMBER_OUT : %ld", Figure->NUMBER_OUT ); + fprintf( stdout, "\n X : %ld", Figure->X ); + fprintf( stdout, "\n Y : %ld", Figure->Y ); + fprintf( stdout, "\n FLAGS : %lx", Figure->FLAGS ); + fprintf( stdout, "\n USER : %lx", (long)Figure->USER ); + + fprintf( stdout, "\n CON_IN : " ); + + for ( ScanCon = Figure->CON_IN; + ScanCon != (schcon_list *)0; + ScanCon = ScanCon->NEXT ) + { + viewschcon( ScanCon ); + } + + fprintf( stdout, "\n CON_OUT : " ); + + for ( ScanCon = Figure->CON_OUT; + ScanCon != (schcon_list *)0; + ScanCon = ScanCon->NEXT ) + { + viewschcon( ScanCon ); + } + + fprintf( stdout, "\n BOX : " ); + + for ( ScanBox = Figure->BOX; + ScanBox != (schbox_list *)0; + ScanBox = ScanBox->NEXT ) + { + viewschbox( ScanBox ); + } + + fprintf( stdout, "\n NET : " ); + + for ( ScanNet = Figure->NET; + ScanNet != (schnet_list *)0; + ScanNet = ScanNet->NEXT ) + { + viewschnet( ScanNet ); + } + + fprintf( stdout, "\n<-- Figure\n" ); +} diff --git a/alliance/src/scl/src/schview.h b/alliance/src/scl/src/schview.h new file mode 100644 index 00000000..45538f26 --- /dev/null +++ b/alliance/src/scl/src/schview.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Sch | +| | +| File : schview.h | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCH_VIEW_H +# define SCH_VIEW_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/scl.h b/alliance/src/scl/src/scl.h new file mode 100644 index 00000000..2601099e --- /dev/null +++ b/alliance/src/scl/src/scl.h @@ -0,0 +1,486 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------\ +| | +| Title : Structures and fonctions for SCL | +| | +| File : sch105.h | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------*/ + +# ifndef SCL_105_H +# define SCL_105_H + +/*------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------*/ +/*------------------------------------------------------\ +| | +| Box & Connectors Size / Step | +| | +\------------------------------------------------------*/ + +# define SCP_BOX_MIN_DX 8 + +# define SCP_BOX_CON_BASE_Y 2 +# define SCP_BOX_CON_STEP_Y 4 +# define SCP_BOX_CON_X 0 + +# define SCP_BOX_STEP_Y 5 +# define SCP_CON_STEP_Y 3 +# define SCP_CELL_MIN_DX 2 + +# define SCP_PRIMARY_CON_DX 3 +# define SCP_PRIMARY_CON_DY 2 +# define SCP_CON_DY 2 + +# define SCP_CLUSTER_ROUTE_STEP_X 2 + +/*------------------------------------------------------\ +| | +| From Type | +| | +\------------------------------------------------------*/ + +# define SCH_FROM_LOFIG 0x0001 +# define SCH_FROM_BEFIG 0x0002 + +/*------------------------------------------------------\ +| | +| P Type Id | +| | +\------------------------------------------------------*/ + +# define SCH_NET_TYPE 0x90000020 +# define SCH_BOX_TYPE 0x90000200 + +/*------------------------------------------------------\ +| | +| Box Mask | +| | +\------------------------------------------------------*/ + +# define SCH_BOX_TAGED 0x0001 +# define SCH_BOX_CLUSTERED 0x0002 +# define SCH_BOX_CLUSTER 0x0004 +# define SCH_BOX_CLUSTER_NET 0x0008 + +# define SCH_BOX_TRANSPARENCE 0x0010 +# define SCH_BOX_RETAGED 0x0020 +# define SCH_BOX_PLACED 0x0040 + +/*------------------------------------------------------\ +| | +| Con Mask | +| | +\------------------------------------------------------*/ + +# define SCH_CON_IN 0x0001 +# define SCH_CON_OUT 0x0002 +# define SCH_CON_VEC 0x0004 +# define SCH_CON_EXTERNAL 0x0008 +# define SCH_CON_INTERNAL 0x0010 +# define SCH_CON_VEC_FIRST 0x0020 +# define SCH_CON_VEC_LAST 0x0040 + +# define SCH_CON_TAGED 0x0100 +# define SCH_CON_PLACED 0x0200 + +# define SCH_NET_CANAL 0x0F + +# define SCH_NET_MAXDIR 0x20 +# define SCH_NET_MINDIR 0x10 + +# define SCH_ROOT_CON_BOX 0x0001 +# define SCH_ROOT_CON_FIG 0x0002 + + +# define SCH_SOURCE_LOSIG 1 +# define SCH_SOURCE_LOINS 2 +# define SCH_SOURCE_LOCON 3 +# define SCH_SOURCE_LOFIG 4 +# define SCH_SOURCE_LOTRS 5 + +# define SCH_SOURCE_BEPOR 6 +# define SCH_SOURCE_BEAUX 7 +# define SCH_SOURCE_BEREG 8 +# define SCH_SOURCE_BEBUX 9 +# define SCH_SOURCE_BEBUS 10 +# define SCH_SOURCE_BEOUT 11 +# define SCH_SOURCE_BEFIG 12 + +/*------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------*/ +/*------------------------------------------------------\ +| | +| Box | +| | +\------------------------------------------------------*/ + +# define IsSchBoxClustered( X ) ( ( X )->FLAGS & SCH_BOX_CLUSTERED ) +# define SetSchBoxClustered( X ) ( ( X )->FLAGS |= SCH_BOX_CLUSTERED ) +# define ClearSchBoxClustered( X ) ( ( X )->FLAGS &= ~SCH_BOX_CLUSTERED ) + +# define IsSchBoxTaged( X ) ( ( X )->FLAGS & SCH_BOX_TAGED ) +# define SetSchBoxTaged( X ) ( ( X )->FLAGS |= SCH_BOX_TAGED ) +# define ClearSchBoxTaged( X ) ( ( X )->FLAGS &= ~SCH_BOX_TAGED ) + +# define IsSchBoxReTaged( X ) ( ( X )->FLAGS & SCH_BOX_RETAGED ) +# define SetSchBoxReTaged( X ) ( ( X )->FLAGS |= SCH_BOX_RETAGED ) +# define ClearSchBoxReTaged( X ) ( ( X )->FLAGS &= ~SCH_BOX_RETAGED ) + +# define IsSchBoxCluster( X ) ( ( X )->FLAGS & SCH_BOX_CLUSTER ) +# define SetSchBoxCluster( X ) ( ( X )->FLAGS |= SCH_BOX_CLUSTER ) +# define ClearSchBoxCluster( X ) ( ( X )->FLAGS &= ~SCH_BOX_CLUSTER ) + +# define IsSchBoxTransparence( X ) ( ( X )->FLAGS & SCH_BOX_TRANSPARENCE ) +# define SetSchBoxTransparence( X ) ( ( X )->FLAGS |= SCH_BOX_TRANSPARENCE ) +# define ClearSchBoxTransparence( X ) ( ( X )->FLAGS &= ~SCH_BOX_TRANSPARENCE ) + +# define IsSchBoxPlaced( X ) ( ( X )->FLAGS & SCH_BOX_PLACED ) +# define SetSchBoxPlaced( X ) ( ( X )->FLAGS |= SCH_BOX_PLACED ) +# define ClearSchBoxPlaced( X ) ( ( X )->FLAGS &= ~SCH_BOX_PLACED ) + +# define IsSchBoxClusterNet( X ) ( ( X )->FLAGS & SCH_BOX_CLUSTER_NET ) +# define SetSchBoxClusterNet( X ) ( ( X )->FLAGS |= SCH_BOX_CLUSTER_NET ) +# define ClearSchBoxClusterNet( X ) ( ( X )->FLAGS &= ~SCH_BOX_CLUSTER_NET ) + +/*------------------------------------------------------\ +| | +| Connector | +| | +\------------------------------------------------------*/ + +# define IsSchConIn( X ) ( ( X )->TYPE & SCH_CON_IN ) +# define SetSchConIn( X ) ( ( X )->TYPE |= SCH_CON_IN ) +# define ClearSchConIn( X ) ( ( X )->TYPE &= ~SCH_CON_IN ) + +# define IsSchConOut( X ) ( ( X )->TYPE & SCH_CON_OUT ) +# define SetSchConOut( X ) ( ( X )->TYPE |= SCH_CON_OUT ) +# define ClearSchConOut( X ) ( ( X )->TYPE &= ~SCH_CON_OUT ) + +# define IsSchConVec( X ) ( ( X )->TYPE & SCH_CON_VEC ) +# define SetSchConVec( X ) ( ( X )->TYPE |= SCH_CON_VEC ) +# define ClearSchConVec( X ) ( ( X )->TYPE &= ~SCH_CON_VEC ) + +# define IsSchConVecFirst( X ) ( ( X )->TYPE & SCH_CON_VEC_FIRST ) +# define SetSchConVecFirst( X ) ( ( X )->TYPE |= SCH_CON_VEC_FIRST ) +# define ClearSchConVecFirst( X ) ( ( X )->TYPE &= ~SCH_CON_VEC_FIRST ) + +# define IsSchConVecLast( X ) ( ( X )->TYPE & SCH_CON_VEC_LAST ) +# define SetSchConVecLast( X ) ( ( X )->TYPE |= SCH_CON_VEC_LAST ) +# define ClearSchConVecLast( X ) ( ( X )->TYPE &= ~SCH_CON_VEC_LAST ) + +# define IsSchConExternal( X ) ( ( X )->TYPE & SCH_CON_EXTERNAL ) +# define SetSchConExternal( X ) ( ( X )->TYPE |= SCH_CON_EXTERNAL ) +# define ClearSchConExternal( X ) ( ( X )->TYPE &= ~SCH_CON_EXTERNAL ) + +# define IsSchConInternal( X ) ( ( X )->TYPE & SCH_CON_INTERNAL ) +# define SetSchConInternal( X ) ( ( X )->TYPE |= SCH_CON_INTERNAL ) +# define ClearSchConInternal( X ) ( ( X )->TYPE &= ~SCH_CON_INTERNAL ) + +# define IsSchConPlaced( X ) ( ( X )->FLAGS & SCH_CON_PLACED ) +# define SetSchConPlaced( X ) ( ( X )->FLAGS |= SCH_CON_PLACED ) +# define ClearSchConPlaced( X ) ( ( X )->FLAGS &= ~SCH_CON_PLACED ) + +# define IsSchConTaged( X ) ( ( X )->FLAGS & SCH_CON_TAGED ) +# define SetSchConTaged( X ) ( ( X )->FLAGS |= SCH_CON_TAGED ) +# define ClearSchConTaged( X ) ( ( X )->FLAGS &= ~SCH_CON_TAGED ) + +/*------------------------------------------------------\ +| | +| Net | +| | +\------------------------------------------------------*/ + +# define IsSchNetCanal( X ) ( ( X )->FLAGS & SCH_NET_CANAL ) +# define GetSchNetDirType( X ) ( ( X )->FLAGS & (SCH_NET_MAXDIR|SCH_NET_MINDIR) ) +# define SetSchNetMaxOutput( X ) ( ( X )->FLAGS |= SCH_NET_MAXDIR ) +# define SetSchNetMinOutput( X ) ( ( X )->FLAGS |= SCH_NET_MINDIR ) + +# define SetSchNetCanal( X ) ( ( X )->FLAGS |= SCH_NET_CANAL ) + +# define ClearSchNetCanal( X ) ( ( X )->FLAGS &= ~SCH_NET_CANAL ) +# define ClearSchNetDir( X ) ( ( X )->FLAGS &= ~(SCH_NET_MINDIR|SCH_NET_MAXDIR) ) + +/*------------------------------------------------------\ +| | +| Add Connector | +| | +\------------------------------------------------------*/ + +# define addschfigconin( F, N ) (addschfigcon( (F), (N), SCH_CON_IN )) +# define addschfigconout( F, N ) (addschfigcon( (F), (N), SCH_CON_OUT )) + +# define addschboxconin( F, B, N ) (addschboxcon( (F), (B), (N), SCH_CON_IN )) +# define addschboxconout( F, B, N ) (addschboxcon( (F), (B), (N), SCH_CON_OUT )) + +/*------------------------------------------------------\ +| | +| Structures | +| | +\------------------------------------------------------*/ +/*------------------------------------------------------\ +| | +| Wires | +| | +\------------------------------------------------------*/ + + typedef struct schwir_list + { + struct schwir_list *NEXT; + struct schnet_list *NET; + long X; + long Y; + long DX; + long DY; + long FLAGS; + void *USER; + + } schwir_list; + +/*------------------------------------------------------\ +| | +| Nets (Signals) | +| | +\------------------------------------------------------*/ + + typedef struct schnet_list + { + struct schnet_list *NEXT; + chain_list *CON_NET; + struct schwir_list *WIRE; + void *SOURCE; + unsigned char SOURCE_TYPE; + long FLAGS; + long NUMBER_IN; + long NUMBER_OUT; + long CANAL; + long YMIN; + long YMAX; + void *USER; + + } schnet_list; + +/*------------------------------------------------------\ +| | +| Connectors | +| | +\------------------------------------------------------*/ + + typedef struct schcon_list + { + struct schcon_list *NEXT; + char *NAME; + unsigned short TYPE; + unsigned char DIR; + unsigned char ROOT_TYPE; + void *ROOT; + schnet_list *NET; + void *SOURCE; + unsigned char SOURCE_TYPE; + long X_REL; + long Y_REL; + long FLAGS; + void *USER; + + } schcon_list; + + +/*------------------------------------------------------\ +| | +| Box (Instance) | +| | +\------------------------------------------------------*/ + + typedef struct schbox_list + { + struct schbox_list *NEXT; + char *NAME; + struct schcon_list *CON_IN; + long NUMBER_IN; + struct schcon_list *CON_OUT; + long NUMBER_OUT; + void *SOURCE; + unsigned char SOURCE_TYPE; /* type de la source */ + long X; + long Y; + long DX; + long DY; + long FLAGS; + void *USER; + + } schbox_list; + +/*------------------------------------------------------\ +| | +| Figure | +| | +\------------------------------------------------------*/ + + typedef struct schfig_list + { + struct schfig_list *NEXT; + char *NAME; + struct schcon_list *CON_IN; + long NUMBER_IN; + struct schcon_list *CON_OUT; + long NUMBER_OUT; + schbox_list *BOX; + schnet_list *NET; + void *SOURCE; + unsigned char SOURCE_TYPE; + long X; + long Y; + long FLAGS; + void *USER; + + } schfig_list; + +/*------------------------------------------------------\ +| | +| Global Variables | +| | +\------------------------------------------------------*/ + + extern schfig_list *HEAD_SCHFIG; + extern char *SCH_IN; + +/*------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------*/ +/*------------------------------------------------------\ +| | +| Env Functions | +| | +\------------------------------------------------------*/ + + extern void schenv(); + +/*------------------------------------------------------\ +| | +| Alloc Functions | +| | +\------------------------------------------------------*/ + + extern schfig_list *allocschfig(); + extern schcon_list *allocschcon(); + extern schbox_list *allocschbox(); + extern schwir_list *allocschwir(); + extern schnet_list *allocschnet(); + + +/*------------------------------------------------------\ +| | +| Free Functions | +| | +\------------------------------------------------------*/ + + extern void freeschfig(); + extern void freeschcon(); + extern void freeschbox(); + extern void freeschwir(); + extern void freeschnet(); + + +/*------------------------------------------------------\ +| | +| Add Functions | +| | +\------------------------------------------------------*/ + + extern schnet_list *addschnetcon(); + extern schfig_list *addschfig(); + extern schcon_list *addschfigcon(); + extern schcon_list *addschboxcon(); + extern schbox_list *addschbox(); + extern schwir_list *addschwir(); + extern schnet_list *addschnet(); + + +/*------------------------------------------------------\ +| | +| Del Functions | +| | +\------------------------------------------------------*/ + + extern int delschfig(); + +/*------------------------------------------------------\ +| | +| View Functions | +| | +\------------------------------------------------------*/ + + extern void viewschfig(); + extern void viewschbox(); + extern void viewschcon(); + extern void viewschwir(); + extern void viewschnet(); + +/*------------------------------------------------------\ +| | +| Get Functions | +| | +\------------------------------------------------------*/ + + extern char *getschvectorname(); + +/*------------------------------------------------------\ +| | +| Translate Functions | +| | +\------------------------------------------------------*/ + + extern schfig_list *lofig2schfig(); + extern schfig_list *befig2schfig(); + +/*------------------------------------------------------\ +| | +| Place / Route Functions | +| | +\------------------------------------------------------*/ + + extern void placerouteschfig(); + +# endif diff --git a/alliance/src/scl/src/scp.h b/alliance/src/scl/src/scp.h new file mode 100644 index 00000000..0e41b6c9 --- /dev/null +++ b/alliance/src/scl/src/scp.h @@ -0,0 +1,158 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------\ +| | +| Title : Structures and fonctions for SCP | +| | +| File : scp.h | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------*/ + +# ifndef SCP_H +# define SCP_H + +/*------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------*/ + +# define SCP_CEL_BOX 0x0001 +# define SCP_CEL_CON 0x0002 + +/*------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------*/ + +/*------------------------------------------------------\ +| | +| Structures | +| | +\------------------------------------------------------*/ + +/*------------------------------------------------------\ +| | +| Colums | +| | +\------------------------------------------------------*/ + + typedef struct scpcol_list + { + struct scpcol_list *NEXT; + struct scpcel_list *CELL; + struct scpcel_list *LAST_CELL; + long NUMBER_CELL; + long MAX_DX_CELL; + } scpcol_list; + +/*------------------------------------------------------\ +| | +| Cells | +| | +\------------------------------------------------------*/ + + typedef struct scpcel_list + { + struct scpcel_list *NEXT; + struct scpcel_list *PREV; + struct scpcol_list *COL; + void *ROOT; + long TYPE; + } scpcel_list; + +/*------------------------------------------------------\ +| | +| Global Variables | +| | +\------------------------------------------------------*/ + + scpcol_list *HEAD_SCPCOL; + +/*------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------*/ +/*------------------------------------------------------\ +| | +| Alloc Functions | +| | +\------------------------------------------------------*/ + + extern scpcol_list *allocscpcol(); + extern scpcel_list *allocscpcel(); + +/*------------------------------------------------------\ +| | +| Free Functions | +| | +\------------------------------------------------------*/ + + extern void freescpcol(); + extern void freescpcel(); + +/*------------------------------------------------------\ +| | +| Add Functions | +| | +\------------------------------------------------------*/ + + extern scpcel_list *addscpcel(); + extern scpcol_list *addscpcol(); + + extern scpcel_list *addschboxtoscpcel(); + extern scpcel_list *addschcontoscpcel(); + + +/*------------------------------------------------------\ +| | +| Del Functions | +| | +\------------------------------------------------------*/ + + extern void delscpcol(); + +/*------------------------------------------------------\ +| | +| Search Functions | +| | +\------------------------------------------------------*/ + + extern void swapscpcel(); + +/*------------------------------------------------------\ +| | +| View Functions | +| | +\------------------------------------------------------*/ + + +# endif diff --git a/alliance/src/scl/src/scpadd.c b/alliance/src/scl/src/scpadd.c new file mode 100644 index 00000000..1c9f4d27 --- /dev/null +++ b/alliance/src/scl/src/scpadd.c @@ -0,0 +1,154 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : scpadd.c | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" + +# include +# include "scp.h" +# include "scpadd.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Scp Add Functions | +| | +\------------------------------------------------------------*/ + +/*------------------------------------------------------------\ +| | +| Sch Add Cell | +| | +\------------------------------------------------------------*/ + +scpcel_list *addscpcel( Column ) + + scpcol_list *Column; +{ + scpcel_list *Cell; + + + Cell = allocscpcel(); + + Cell->COL = Column; + + Cell->NEXT = Column->CELL; + + Cell->PREV = NULL; + + if ( Column->CELL != NULL ) + { + Column->CELL->PREV = Cell; + } + else + { + Column->LAST_CELL = Cell; + } + + Column->CELL = Cell; + + Column->NUMBER_CELL++; + + return( Cell ); +} + +scpcel_list *addschboxtoscpcel( SchBox, ScpCel) +schbox_list *SchBox; +scpcel_list *ScpCel; +{ + ScpCel->ROOT = SchBox; + ScpCel->TYPE = SCP_CEL_BOX; + + SchBox->USER = (void *)ScpCel; + + return( ScpCel ); +} + +scpcel_list *addschcontoscpcel( SchCon, ScpCel) +schcon_list *SchCon; +scpcel_list *ScpCel; +{ + ScpCel->ROOT = SchCon; + ScpCel->TYPE = SCP_CEL_CON; + + SchCon->USER = (void *)ScpCel; + + return( ScpCel ); +} +/*------------------------------------------------------------\ +| | +| Scp Add Column | +| | +\------------------------------------------------------------*/ + +scpcol_list *addscpcol( ) + +{ + scpcol_list *Column; + + Column = allocscpcol(); + + Column->NEXT = HEAD_SCPCOL; + HEAD_SCPCOL = Column; + + return( Column ); +} diff --git a/alliance/src/scl/src/scpadd.h b/alliance/src/scl/src/scpadd.h new file mode 100644 index 00000000..279673b9 --- /dev/null +++ b/alliance/src/scl/src/scpadd.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : scpadd.h | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCP_ADD_H +# define SCP_ADD_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/scpalloc.c b/alliance/src/scl/src/scpalloc.c new file mode 100644 index 00000000..e40b3d8a --- /dev/null +++ b/alliance/src/scl/src/scpalloc.c @@ -0,0 +1,99 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : scpalloc.c | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "mlo.h" +# include "aut.h" +# include "scl.h" + +# include +# include +# include "scp.h" +# include "scpalloc.h" + + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Alloc Functions | +| | +\------------------------------------------------------------*/ + +/*------------------------------------------------------------\ +| | +| Scp Alloc Cel | +| | +\------------------------------------------------------------*/ + +scpcel_list *allocscpcel() +{ + return( (scpcel_list *)(autallocheap( sizeof( scpcel_list ) ) ) ); +} + +/*------------------------------------------------------------\ +| | +| Scp Alloc Col | +| | +\------------------------------------------------------------*/ + +scpcol_list *allocscpcol() +{ + return( (scpcol_list *)(autallocheap( sizeof( scpcol_list ) ) ) ); +} diff --git a/alliance/src/scl/src/scpalloc.h b/alliance/src/scl/src/scpalloc.h new file mode 100644 index 00000000..4afe69fb --- /dev/null +++ b/alliance/src/scl/src/scpalloc.h @@ -0,0 +1,69 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : scpalloc.h | +| | +| Date : 28.01.97 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCP_ALLOC_H +# define SCP_ALLOC_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif + + + diff --git a/alliance/src/scl/src/scpbuild.c b/alliance/src/scl/src/scpbuild.c new file mode 100644 index 00000000..5c4ee30d --- /dev/null +++ b/alliance/src/scl/src/scpbuild.c @@ -0,0 +1,2023 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : Scp Build | +| | +| Date : 04.03.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include +# include "mut.h" +# include "mlo.h" +# include "aut.h" +# include "scl.h" + +# include "scp.h" +# include "scpbuild.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Locals Functions | +| | +\------------------------------------------------------------*/ + + static int SchNetCompare(); + static int CheckNetIntersection __P((chain_list *, schnet_list *)); + +/*------------------------------------------------------------\ +| | +| Function Loc Add Transparence | +| | +\------------------------------------------------------------*/ + +static schbox_list * loc_add_transparence( Figure, Net ) + + schfig_list *Figure; + schnet_list *Net; +{ + schbox_list *Box; + schcon_list *Con_in; + schcon_list *Con_out; + + Box = addschbox( Figure, "trans" ); + SetSchBoxTransparence( Box ); + + Con_in = addschboxconin( Figure, Box, "i" ); + Con_out = addschboxconout( Figure, Box, "o" ); + + addschnetcon( Net, Con_out ); + addschnetcon( Net, Con_in ); + + return ( Box ); +} + +/*------------------------------------------------------------\ +| | +| Function Loc Destroy Transparence | +| | +\------------------------------------------------------------*/ + +static void loc_destroytransparence( Figure, Transparence) + + schfig_list *Figure; + schbox_list *Transparence; +{ + schnet_list *SchNet; + schwir_list *SchWire; + + SchNet = Transparence->CON_IN->NET; + SchWire = addschwir(Figure, SchNet); + + SchWire->X = Transparence->X + Transparence->CON_IN->X_REL; + SchWire->Y = Transparence->Y + Transparence->CON_IN->Y_REL; + SchWire->DX = Transparence->X + Transparence->CON_OUT->X_REL; + SchWire->DY = Transparence->Y + Transparence->CON_OUT->Y_REL; +} + +/*------------------------------------------------------------\ +| | +| Function Loc Destroy Cluster Net | +| | +\------------------------------------------------------------*/ + +static void loc_destroyclusternet( Figure, Cluster ) + + schfig_list *Figure; + schbox_list *Cluster; +{ + schnet_list *SchNetIn; + schnet_list *SchNetOut; + schwir_list *SchWire; + schwir_list **PrevSchWire; + + SchNetIn = Cluster->CON_IN->NET; + SchNetOut = Cluster->CON_OUT->NET; + + SchWire = addschwir( Figure, SchNetIn ); + + SchWire->X = Cluster->X + Cluster->CON_IN->X_REL; + SchWire->Y = Cluster->Y + Cluster->CON_IN->Y_REL; + SchWire->DX = Cluster->X + Cluster->CON_OUT->X_REL; + SchWire->DY = Cluster->Y + Cluster->CON_OUT->Y_REL; + + PrevSchWire = &SchNetOut->WIRE; + + for ( SchWire = SchNetOut->WIRE; + SchWire != (schwir_list *)0; + SchWire = SchWire->NEXT ) + { + SchWire->NET = SchNetIn; + PrevSchWire = &SchWire->NEXT; + } + + *PrevSchWire = SchNetIn->WIRE; + SchNetIn->WIRE = SchNetOut->WIRE; + SchNetOut->WIRE = (schwir_list *)0; +} + +/*------------------------------------------------------------\ +| | +| Function Loc Destroy Cluster | +| | +\------------------------------------------------------------*/ + +static void loc_destroycluster(Figure, Cluster ) + + schfig_list *Figure; + schbox_list *Cluster; +{ + schwir_list *SchWire1; + schwir_list *SchWire2; + schwir_list *SchWire3; + schbox_list *Box; + schbox_list *BoxN; + schcon_list *Con; + schcon_list *BoxConIn; + schcon_list *ConCast; + schnet_list *SchNet; + schcon_list *ClusterCon; + ptype_list *ScanBox; + ptype_list *HeadBox; + chain_list *ScanCon; + long LastDY; + long CurrentDX; + long Counter; + int NumberBoxIn; + int Middle; + +# ifdef DEBUG + fprintf( stdout, "loc_destroycluster %s\n", Cluster->NAME ); +# endif +/* +** Get the three boxes of the cluster +*/ + HeadBox = (ptype_list *)Cluster->SOURCE; + Box = (schbox_list *)HeadBox->DATA; + HeadBox = HeadBox->NEXT; +/* +** Compute the position of the output box +*/ + Box->USER = (void *)Cluster->USER; + Box->X = Cluster->X + Cluster->DX - Box->DX; + Box->Y += Cluster->Y; + + for ( Con = Box->CON_OUT; + Con != (schcon_list *)0; + Con = Con->NEXT ) + { + Con->X_REL = Box->DX + SCP_BOX_CON_X; + + ClusterCon = (schcon_list *)Con->USER; + + SchNet = Con->NET; + + for ( ScanCon = SchNet->CON_NET; + ScanCon != (chain_list *)0; + ScanCon = ScanCon->NEXT ) + { + ConCast = (schcon_list *) ScanCon->DATA; + + if ( ConCast == ClusterCon ) + { + ScanCon->DATA = (void *)Con; + } + } + } + + if ( IsSchBoxCluster( Box ) ) + { + loc_destroycluster( Figure, Box ); + } + + NumberBoxIn = Box->NUMBER_IN; + + Box->CON_IN = (schcon_list *)reverse( (chain_list *)Box->CON_IN ); + BoxConIn = Box->CON_IN; + + ScanBox = HeadBox; + LastDY = 0; + Counter = 1; + Middle = 1 + ( NumberBoxIn ) / 2; + CurrentDX = 0; + + while ( ScanBox != (ptype_list *)0 ) + { + BoxN = (schbox_list *)ScanBox->DATA; + + if ( Counter != Middle ) + { + if ( Counter > Middle ) + { + CurrentDX--; + } + else + { + CurrentDX++; + } + } + else + if ( NumberBoxIn & 1 ) + { + CurrentDX++; + } + + BoxN->USER = (void *)Cluster->USER; + BoxN->X = Cluster->X; + BoxN->Y = Cluster->Y + LastDY; +/* +** Compute the position of output connectors of the N input box +*/ + for ( Con = BoxN->CON_OUT; + Con != (schcon_list *)0; + Con = Con->NEXT ) + { + Con->X_REL = BoxN->DX + SCP_BOX_CON_X; + } +/* +** Replace input connectors of the cluster by input connectors of the N box +*/ + for ( Con = BoxN->CON_IN; + Con != (schcon_list *)0; + Con = Con->NEXT ) + { + ClusterCon = (schcon_list *)Con->USER; + + SchNet = Con->NET; + + for ( ScanCon = SchNet->CON_NET; + ScanCon != (chain_list *)0; + ScanCon = ScanCon->NEXT ) + { + ConCast = (schcon_list *) ScanCon->DATA; + + if ( ConCast == ClusterCon ) + { + ScanCon->DATA = (void *)Con; + } + } + } +/* +** Compute wire from the output of BoxN to the input of Box +*/ + SchWire1 = addschwir( Figure, BoxN->CON_OUT->NET ); + + SchWire1->X = BoxN->X + BoxN->CON_OUT->X_REL; + SchWire1->Y = BoxN->Y + BoxN->CON_OUT->Y_REL; + SchWire1->DX = Box->X + BoxConIn->X_REL - (CurrentDX * SCP_CLUSTER_ROUTE_STEP_X); + SchWire1->DY = SchWire1->Y; + + SchWire2 = addschwir( Figure, BoxN->CON_OUT->NET ); + + SchWire2->X = SchWire1->DX; + SchWire2->Y = SchWire1->DY; + SchWire2->DX = SchWire2->X; + SchWire2->DY = Box->Y + BoxConIn->Y_REL; + + SchWire3 = addschwir( Figure, BoxN->CON_OUT->NET ); + + SchWire3->X = SchWire2->DX; + SchWire3->Y = SchWire2->DY; + SchWire3->DX = Box->X + BoxConIn->X_REL; + SchWire3->DY = SchWire3->Y; + + if ( IsSchBoxCluster( BoxN ) ) + { + loc_destroycluster( Figure, BoxN ); + } + + LastDY += BoxN->DY; + BoxConIn = BoxConIn->NEXT; + + Counter++; + ScanBox = ScanBox->NEXT; + } + + Box->CON_IN = (schcon_list *)reverse( (chain_list *)Box->CON_IN ); +} + +/*------------------------------------------------------------\ +| | +| Function Loc Build Cluster | +| | +\------------------------------------------------------------*/ + +static void loc_buildcluster( Figure ) + + schfig_list *Figure; +{ + schbox_list *Box; + schbox_list *SavBox; + schbox_list **PrevBox; + schcon_list *SchCon; + schcon_list *ConCast; + schcon_list *ClusterCon; + schbox_list *BoxN; + schcon_list *ConN; + schbox_list *Cluster; + schnet_list *SchNet; + ptype_list *HeadList; + ptype_list *ScanList; + chain_list *ScanChain; + char Buffer[ 32 ]; + int Number; + int FoundOne; + int Go; + + Number = 0; + PrevBox = &Figure->BOX; + + for ( Box = Figure->BOX; + Box != (schbox_list *)0; + Box = Box->NEXT ) + { + PrevBox = &Box->NEXT; + } + + for ( Box = Figure->BOX; + Box != (schbox_list *)0; + Box = Box->NEXT ) + { + Go = 1; +/* +** Search a box with one output and two inputs minimum +*/ + if ( ( ! IsSchBoxClustered( Box ) ) && + ( Box->NUMBER_IN >= 1 ) && + ( Box->NUMBER_OUT >= 1 ) ) + { + HeadList = (ptype_list *)0; + FoundOne = 0; + + for ( ConN = Box->CON_IN; + ConN != (schcon_list *)0; + ConN = ConN->NEXT ) + { +/* +** if the input signal have more than one output or more than one input +** => should create a box net +*/ + if ( ( ConN->NET->NUMBER_OUT != 1 ) || + ( ConN->NET->NUMBER_IN != 1 ) ) + { + HeadList = addptype( HeadList, SCP_CLUSTER_BOX_NET, (void *)ConN ); + } + else + { +/* +** The input signal (with one input and one output) should be connected to a box +** with only one output +*/ + for ( ScanChain = ConN->NET->CON_NET; + ScanChain != (chain_list *)0; + ScanChain = ScanChain->NEXT ) + { + ConCast = (schcon_list *)ScanChain->DATA; + + if ( ConCast == ConN ) continue; +/* +** The input of the input signal is a box +*/ + if ( ConCast->ROOT_TYPE == SCH_ROOT_CON_BOX ) + { + BoxN = (schbox_list *)ConCast->ROOT; + + if ( BoxN->NUMBER_OUT != 1 ) + { +/* +** The input of the input signal is a box, and this box has more than one output +** => should create a box net +*/ + HeadList = addptype( HeadList, SCP_CLUSTER_BOX_NET, (void *)ConN ); + } + else + { +/* +** The input of the input signal is a box, and this box has only one output, we found it ! +** => this box will be part of the cluster +*/ + HeadList = addptype( HeadList, SCP_CLUSTER_BOX, (void *)BoxN ); + FoundOne = 1; + } + } + else +/* +** The input of the input signal is a primary input +** => should create a box net +*/ + if ( ConCast->ROOT_TYPE == SCH_ROOT_CON_FIG ) + { + HeadList = addptype( HeadList, SCP_CLUSTER_BOX_NET, (void *)ConN ); + } + else + { + Go = 0; break; + } + } + } + + if ( ! Go ) break; + } +/* +** Create a cluster with those N boxes ! +*/ + if ( ( Go == 1 ) && + ( FoundOne == 1 ) ) + { + SavBox = Figure->BOX; + Figure->BOX = (schbox_list *)0; + + sprintf( Buffer, "cluster_%d", Number++ ); + + Cluster = addschbox( Figure, Buffer ); + Figure->BOX = SavBox; + + *PrevBox = Cluster; + PrevBox = &Cluster->NEXT; + + SetSchBoxCluster( Cluster ); + + Cluster->SOURCE = (void *)HeadList; + + for ( ScanList = HeadList; + ScanList != (ptype_list *)0; + ScanList = ScanList->NEXT ) + { +/* +** Must create a cluster box net ! +*/ + if ( ScanList->TYPE == SCP_CLUSTER_BOX_NET ) + { + ConN = (schcon_list *)ScanList->DATA; + + sprintf( Buffer, "clustnet_%d", Number++ ); + BoxN = addschbox( Figure, Buffer ); + + SetSchBoxClusterNet( BoxN ); + + SchCon = addschboxconin( Figure , BoxN, ConN->NAME ); + SchCon->NET = ConN->NET; + + for ( ScanChain = SchCon->NET->CON_NET; + ScanChain != (chain_list *)0; + ScanChain = ScanChain->NEXT ) + { + ConCast = (schcon_list *)ScanChain->DATA; + + if ( ConCast == ConN ) + { + ScanChain->DATA = (void *)SchCon; + } + } + + SchCon = addschboxconout( Figure, BoxN, ConN->NAME ); + SchNet = addschnet( Figure ); + + addschnetcon( SchNet, SchCon ); + addschnetcon( SchNet, ConN ); + + ScanList->DATA = (void *)BoxN; + } + else + { + BoxN = (schbox_list *)ScanList->DATA; + } + + SetSchBoxClustered( BoxN ); +/* +** Duplicates all inputs of the N input boxes in the cluster (in the same order) +*/ + BoxN->CON_IN = (schcon_list *)reverse( (chain_list *)BoxN->CON_IN ); + + for ( SchCon = BoxN->CON_IN; + SchCon != (schcon_list *)0; + SchCon = SchCon->NEXT ) + { + ClusterCon = addschboxconin( Figure, Cluster, SchCon->NAME ); + SchNet = SchCon->NET; + + for ( ScanChain = SchNet->CON_NET; + ScanChain != (chain_list *)0; + ScanChain = ScanChain->NEXT ) + { + ConCast = (schcon_list *)ScanChain->DATA; + + if ( ConCast == SchCon ) + { + ScanChain->DATA = (void *)ClusterCon; + } + } + + ClusterCon->NET = SchNet; + + SchCon->USER = (void *)ClusterCon; + } + + BoxN->CON_IN = (schcon_list *)reverse((chain_list *) BoxN->CON_IN ); + } + + SetSchBoxClustered( Box ); + Cluster->SOURCE = addptype( Cluster->SOURCE, SCP_CLUSTER_BOX, (void *)Box ); + + Box->CON_OUT = (schcon_list *)reverse((chain_list *)Box->CON_OUT ); +/* +** Duplicates all outputs of the output box in the cluster (in the same order) +*/ + for ( SchCon = Box->CON_OUT; + SchCon != (schcon_list *)0; + SchCon = SchCon->NEXT ) + { + ClusterCon = addschboxconout( Figure, Cluster, SchCon->NAME ); + SchNet = SchCon->NET; + + for ( ScanChain = SchNet->CON_NET; + ScanChain != (chain_list *)0; + ScanChain = ScanChain->NEXT ) + { + ConCast = (schcon_list *)ScanChain->DATA; + + if ( ConCast == SchCon ) + { + ScanChain->DATA = (void *) ClusterCon; + } + } + + ClusterCon->NET = SchNet; + SchCon->USER = (void *)ClusterCon; + } + + Box->CON_OUT = (schcon_list *)reverse((chain_list *)Box->CON_OUT ); + } + else + { + freeptype( HeadList ); + } + } + } + +# ifdef DEBUG + for ( Box = Figure->BOX; + Box != (schbox_list *)0; + Box = Box->NEXT ) + { + if ( IsSchBoxCluster( Box ) ) + { + fprintf( stdout, "Cluster %s : ", Box->NAME ); + + for ( ScanList = Box->SOURCE; + ScanList != (ptype_list *)0; + ScanList = ScanList->NEXT ) + { + BoxN = (schbox_list *)ScanList->DATA; + fprintf( stdout, " %s ", BoxN->NAME ); + } + + fprintf( stdout, "\n" ); + } + } +# endif +} + +/*------------------------------------------------------------\ +| | +| Function Loc Build Place First | +| | +\------------------------------------------------------------*/ + +static scpcol_list *loc_buildplacefirst( Figure ) + + schfig_list *Figure; +{ + scpcol_list *ColMax; + scpcel_list *Cell; + scpcol_list *Column; + schbox_list *Box; + schcon_list *Con; + long MaxCumulY; + long CumulY; + + MaxCumulY = 0; + ColMax = HEAD_SCPCOL; + + for ( Column = HEAD_SCPCOL; + Column != (scpcol_list *)0; + Column = Column->NEXT ) + { + CumulY = 0; + + for ( Cell = Column->CELL; + Cell != (scpcel_list *)0; + Cell = Cell->NEXT ) + { + if ( Cell->TYPE == SCP_CEL_BOX ) + { + Box = (schbox_list *)Cell->ROOT; + Box->Y = CumulY; + CumulY += Box->DY + SCP_BOX_STEP_Y; + + if ( Box->DX > Column->MAX_DX_CELL ) + { + Column->MAX_DX_CELL = Box->DX; + } + } + else + if ( Cell->TYPE == SCP_CEL_CON ) + { + Con = (schcon_list *) Cell->ROOT; + Con->Y_REL = CumulY; + CumulY += SCP_CON_STEP_Y; + + if ( Column->MAX_DX_CELL < SCP_CELL_MIN_DX ) + { + Column->MAX_DX_CELL = SCP_CELL_MIN_DX; + } + } + } + + if ( MaxCumulY < CumulY ) + { + ColMax = Column; + MaxCumulY = CumulY; + } + } + + return ( ColMax ); +} + + +/*------------------------------------------------------------\ +| | +| Function Loc Build Place In | +| | +\------------------------------------------------------------*/ + +static schfig_list *loc_buildplacein( Figure, ColumnFrom, ColumnTo ) + + schfig_list *Figure; + scpcol_list *ColumnFrom; + scpcol_list *ColumnTo; +{ + scpcel_list *CellTo; + schcon_list *ConTo; + schbox_list *BoxTo; + + scpcel_list *CellFrom; + schbox_list *BoxFrom; + schcon_list *ConFrom; + + chain_list *Chain; + char Begin = 1; + + long CumulY; + + for ( CellTo = ColumnTo->LAST_CELL; CellTo != (scpcel_list *)0; CellTo = CellTo->PREV ) + { + if ( CellTo->TYPE == SCP_CEL_BOX ) + { + BoxTo = (schbox_list *) CellTo->ROOT; + + for (ConTo = BoxTo->CON_IN; ConTo; ConTo = ConTo->NEXT ) + { + for (Chain = ConTo->NET->CON_NET; Chain; Chain = Chain->NEXT ) + { + ConFrom = (schcon_list *) Chain->DATA; + + if ( ( IsSchConInternal( ConFrom ) ) && + ( IsSchConOut( ConFrom ) ) ) + { + BoxFrom = (schbox_list *) ConFrom->ROOT; + + if ( ( IsSchBoxTaged( BoxFrom ) ) && + ( ! IsSchBoxPlaced(BoxFrom ) ) ) + { + CellFrom = (scpcel_list *) BoxFrom->USER; + if (CellFrom->COL == ColumnFrom) + { + if ( Begin ) + { + /* juste une idee de grandeur */ + + CumulY = BoxTo->Y + 2 * (BoxFrom->DY) + (BoxTo->DY); + Begin = 0; + } + + if ( ( BoxTo->Y + ConTo->Y_REL - ConFrom->Y_REL + BoxFrom->DY) <= CumulY ) + { + BoxFrom->Y = BoxTo->Y + ConTo->Y_REL - ConFrom->Y_REL; + } + else + { + BoxFrom->Y = CumulY - BoxFrom->DY; + } + + CumulY = BoxFrom->Y - 1; + SetSchBoxPlaced( BoxFrom ); + } + } + } + + if ( ( IsSchConExternal( ConFrom ) ) && + ( IsSchConIn( ConFrom ) ) && + ( ! IsSchConPlaced( ConFrom ) ) && + ( IsSchConTaged( ConFrom ) ) ) + { + CellFrom = (scpcel_list *) ConFrom->USER; + + if ( CellFrom->COL == ColumnFrom ) + { + if ( ! IsSchConPlaced( ConFrom ) ) + { + ConFrom->Y_REL = ( BoxTo->Y + ConTo->Y_REL ); + SetSchConPlaced( ConFrom ); + } + } + } + } + } + } + } + + return( Figure ); +} + +/*------------------------------------------------------------\ +| | +| Function Loc Build Place Out | +| | +\------------------------------------------------------------*/ + +static schfig_list *loc_buildplaceout( Figure, ColumnFrom, ColumnTo ) + + schfig_list *Figure; + scpcol_list *ColumnFrom; + scpcol_list *ColumnTo; +{ + chain_list *Chain; + unsigned char Begin; + + schbox_list *BoxFrom; + schcon_list *ConFrom; + scpcel_list *CellFrom; + + schcon_list *ConTo; + scpcel_list *CellTo; + schbox_list *BoxTo; + + long CumulY; + + Begin = 1; + + for ( CellTo = ColumnTo->LAST_CELL; + CellTo != (scpcel_list *)0; + CellTo = CellTo->PREV ) + { + if ( CellTo->TYPE == SCP_CEL_BOX ) + { + BoxTo = (schbox_list *) CellTo->ROOT; + + for ( ConTo = BoxTo->CON_IN; + ConTo != (schcon_list *)0; + ConTo = ConTo->NEXT ) + { + if ( IsSchBoxPlaced( BoxTo ) ) break; + + for ( Chain = ConTo->NET->CON_NET; + Chain != (chain_list *)0; + Chain = Chain->NEXT ) + { + if ( IsSchBoxPlaced( BoxTo ) ) break; + + ConFrom = (schcon_list *) Chain->DATA; + + if ( ConFrom != ConTo ) + { + if ( ( IsSchConInternal( ConFrom ) ) && + ( IsSchConOut( ConFrom ) ) ) + { + BoxFrom = (schbox_list *) ConFrom->ROOT; + + if ( IsSchBoxTaged( BoxFrom ) ) + { + CellFrom = (scpcel_list *) BoxFrom->USER; + + if ( CellFrom->COL == ColumnFrom ) + { + if ( Begin ) + { + CumulY = BoxFrom->Y + 2 * (BoxTo->DY + BoxFrom->DY); + Begin = 0; + } + + if ( ( BoxFrom->Y + ConFrom->Y_REL - ConTo->Y_REL + BoxTo->DY) <= CumulY ) + { + SetSchBoxPlaced( BoxTo ); + BoxTo->Y = BoxFrom->Y + ConFrom->Y_REL - ConTo->Y_REL; + CumulY = BoxTo->Y - 1; + } + else + { /* BoxTo->Y = CumulY-BoxTo->DY; */ + } + } + } + } + } + } + } + + if ( ! IsSchBoxPlaced( BoxTo ) ) + { + BoxTo->Y = CumulY - BoxTo->DY; + SetSchBoxPlaced( BoxTo ); + CumulY = BoxTo->Y - 1; + } + } + + if ( CellTo->TYPE == SCP_CEL_CON ) + { + ConTo = (schcon_list *) CellTo->ROOT; + + for ( Chain = ConTo->NET->CON_NET; + Chain != (chain_list *)0; + Chain = Chain->NEXT ) + { + if ( IsSchConPlaced( ConTo ) ) break; + + ConFrom = (schcon_list *)Chain->DATA; + + if ( ConFrom != ConTo ) + { + if ( ( IsSchConInternal( ConFrom ) ) && + ( IsSchConOut( ConFrom ) ) ) + { + BoxFrom = (schbox_list *) ConFrom->ROOT; + + if ( IsSchBoxTaged( BoxFrom ) ) + { + CellFrom = (scpcel_list *) BoxFrom->USER; + + if ( CellFrom->COL == ColumnFrom ) + { + if ( Begin ) + { + CumulY = BoxFrom->Y + 2 * (BoxFrom->DY); + Begin = 0; + } + + if ( ( BoxFrom->Y + ConFrom->Y_REL + 2 ) <= CumulY ) + { + SetSchConPlaced(ConTo); + ConTo->Y_REL = BoxFrom->Y + ConFrom->Y_REL; + CumulY = ConTo->Y_REL - 1; + } + else + { /* ConTo->Y_REL = CumulY; */ + } + } + } + } + } + } + + if ( Begin && IsSchConPlaced( ConTo ) ) + { + ConTo->Y_REL = CumulY; + SetSchConPlaced(ConTo); + CumulY = ConTo->Y_REL - 1; + } + } + } + + return (Figure); +} + +/*------------------------------------------------------------\ +| | +| Function Loc Build Place | +| | +\------------------------------------------------------------*/ + +static schfig_list *loc_buildplace( Figure ) + + schfig_list *Figure; +{ + scpcol_list *Column; + scpcol_list *MaxColumn; + + MaxColumn = loc_buildplacefirst( Figure ); + + for ( Column = MaxColumn; Column->NEXT; Column = Column->NEXT ) + { + loc_buildplaceout( Figure, Column, Column->NEXT ); + } + + HEAD_SCPCOL = (scpcol_list *)reverse( (chain_list *)HEAD_SCPCOL ); + + for ( Column = MaxColumn; Column->NEXT; Column = Column->NEXT ) + { + loc_buildplacein(Figure, Column->NEXT, Column); + } + + HEAD_SCPCOL = (scpcol_list *)reverse((chain_list *)HEAD_SCPCOL ); + + return ( Figure ); +} + +/*------------------------------------------------------------\ +| | +| Function Loc Routage Canal | +| | +\------------------------------------------------------------*/ + +static long loc_routage_canal( Figure, ColumnFrom, ColumnTo, Xdep ) + + schfig_list *Figure; + scpcol_list *ColumnFrom; + scpcol_list *ColumnTo; + long Xdep; +{ + scpcel_list *ScanCell; + schbox_list *SchBox; + schnet_list *SchNet; + schnet_list **SchNetTable; + schwir_list *SchWire; + schcon_list *ScanCon; + schcon_list *SchCon; + chain_list *SchNetList = NULL; + chain_list *CurChannelNets = NULL; + chain_list *ptchain; + long numschnet = 0; + long channel; + long i = 0; + + Xdep += ColumnFrom->MAX_DX_CELL; + + /* Traverse Canal Input and Output Connectors to */ + /* obtain list of SchNets in Canal and their */ + /* vertical extremities with direction */ + + /* Channel Input Connectors */ + + for ( ScanCell = ColumnFrom->CELL; + ScanCell != (scpcel_list *)0; + ScanCell = ScanCell->NEXT ) + { + if ( ScanCell->TYPE == SCP_CEL_BOX ) + { + SchBox = (schbox_list *) ScanCell->ROOT; + for (ScanCon = SchBox->CON_OUT; ScanCon; ScanCon = ScanCon->NEXT ) { + SchNet = ScanCon->NET; + if (!IsSchNetCanal(SchNet)) { + numschnet++; + SetSchNetCanal(SchNet); + SchNetList = addchain(SchNetList, SchNet); + SchNet->YMAX = SchBox->Y + ScanCon->Y_REL; + SchNet->YMIN = SchBox->Y + ScanCon->Y_REL; + } + else if ((SchBox->Y + ScanCon->Y_REL) > (SchNet->YMAX)) { + SchNet->YMAX = SchBox->Y + ScanCon->Y_REL; + } + else if ((SchBox->Y + ScanCon->Y_REL) < (SchNet->YMIN)) { + SchNet->YMIN = SchBox->Y + ScanCon->Y_REL; + } + } + } + else if (ScanCell->TYPE == SCP_CEL_CON) + { + SchCon = (schcon_list *) ScanCell->ROOT; + + SchNet = SchCon->NET; + if (!IsSchNetCanal(SchNet)) { + numschnet++; + SetSchNetCanal(SchNet); + SchNetList = addchain(SchNetList, SchNet); + SchNet->YMAX = SchCon->Y_REL; + SchNet->YMIN = SchCon->Y_REL; + } + if ((SchCon->Y_REL) > (SchNet->YMAX)) { + SchNet->YMAX = SchCon->Y_REL; + } + if ((SchCon->Y_REL) < (SchNet->YMIN)) { + SchNet->YMIN = SchCon->Y_REL; + } + } + } + + /* Channel Output connectors */ + + for (ScanCell = ColumnTo->CELL; ScanCell; ScanCell = ScanCell->NEXT ) { + if (ScanCell->TYPE == SCP_CEL_BOX) { + SchBox = (schbox_list *) ScanCell->ROOT; + for (ScanCon = SchBox->CON_IN; ScanCon; ScanCon = ScanCon->NEXT ) { + SchNet = ScanCon->NET; + if (!IsSchNetCanal(SchNet)) { + numschnet++; + SetSchNetCanal(SchNet); + SchNetList = addchain(SchNetList, SchNet); + SchNet->YMAX = SchBox->Y + ScanCon->Y_REL; + SetSchNetMaxOutput(SchNet); + SchNet->YMIN = SchBox->Y + ScanCon->Y_REL; + SetSchNetMinOutput(SchNet); + } + else if ((SchBox->Y + ScanCon->Y_REL) > (SchNet->YMAX)) { + SchNet->YMAX = SchBox->Y + ScanCon->Y_REL; + SetSchNetMaxOutput(SchNet); + } + else if ((SchBox->Y + ScanCon->Y_REL) < (SchNet->YMIN)) { + SchNet->YMIN = SchBox->Y + ScanCon->Y_REL; + SetSchNetMinOutput(SchNet); + } + } + } + else if (ScanCell->TYPE == SCP_CEL_CON) { + SchCon = (schcon_list *) ScanCell->ROOT; + + SchNet = SchCon->NET; + if (!IsSchNetCanal(SchNet)) { + numschnet++; + SetSchNetCanal(SchNet); + SchNetList = addchain(SchNetList, SchNet); + SchNet->YMAX = SchCon->Y_REL; + SetSchNetMaxOutput(SchNet); + SchNet->YMIN = SchCon->Y_REL; + SetSchNetMinOutput(SchNet); + } + if ((SchCon->Y_REL) > (SchNet->YMAX)) { + SchNet->YMAX = SchCon->Y_REL; + SetSchNetMaxOutput(SchNet); + } + if ((SchCon->Y_REL) < (SchNet->YMIN)) { + SchNet->YMIN = SchCon->Y_REL; + SetSchNetMinOutput(SchNet); + } + } + } + + /* build table of SchNets and sort */ + + SchNetTable = (schnet_list **) autallocblock( (1 + numschnet ) * sizeof(schnet_list *)); + for (ptchain = SchNetList; ptchain; ptchain = ptchain->NEXT ) { + SchNetTable[i++] = (schnet_list *) ptchain->DATA; + } + qsort(SchNetTable, numschnet, sizeof(schnet_list *), SchNetCompare); + + /* Allocate a channel number to each SchNet */ + + channel = Xdep + 4; + for (i = 0; i < numschnet; i++) { + if ((SchNetTable[i])->YMAX == (SchNetTable[i])->YMIN) { + (SchNetTable[i])->CANAL = channel; + continue; + } + if (CheckNetIntersection(CurChannelNets, SchNetTable[i])) { + channel += 2; + if (CurChannelNets) + freechain(CurChannelNets); + CurChannelNets = addchain(NULL, SchNetTable[i]); + } + else + CurChannelNets = addchain(CurChannelNets, SchNetTable[i]); + (SchNetTable[i])->CANAL = channel; + } + mbkfree(SchNetTable); + + /* Draw horizontal wires from input column to vertical wire */ + + for (ScanCell = ColumnFrom->CELL; ScanCell; ScanCell = ScanCell->NEXT ) { + if (ScanCell->TYPE == SCP_CEL_BOX) { + SchBox = ScanCell->ROOT; + + for (ScanCon = SchBox->CON_OUT; ScanCon; ScanCon = ScanCon->NEXT ) { + SchNet = ScanCon->NET; + SchWire = addschwir(Figure, SchNet); + SchWire->X = SchBox->X + ScanCon->X_REL; + SchWire->DX = SchNet->CANAL; + SchWire->Y = SchBox->Y + ScanCon->Y_REL; + SchWire->DY = SchBox->Y + ScanCon->Y_REL; + } + } + else if (ScanCell->TYPE == SCP_CEL_CON) { + SchCon = (schcon_list *) ScanCell->ROOT; + SchNet = SchCon->NET; + SchWire = addschwir(Figure, SchNet); + /* ICI LUDO + SchWire->X = SchCon->X_REL + 2; + */ + SchWire->X = SchCon->X_REL; + SchWire->DX = SchNet->CANAL; + SchWire->Y = SchCon->Y_REL; + SchWire->DY = SchCon->Y_REL; + } + } + + /* Draw horizontal wires from vertical wire to output column */ + + for (ScanCell = ColumnTo->CELL; ScanCell; ScanCell = ScanCell->NEXT ) { + if (ScanCell->TYPE == SCP_CEL_BOX) { + SchBox = ScanCell->ROOT; + SchBox->X = channel + 6 + (ColumnTo->MAX_DX_CELL - SchBox->DX) / 2; + + for (ScanCon = SchBox->CON_IN; ScanCon; ScanCon = ScanCon->NEXT ) { + SchNet = ScanCon->NET; + SchWire = addschwir(Figure, SchNet); + SchWire->X = SchBox->X + ScanCon->X_REL; + SchWire->DX = SchNet->CANAL; + SchWire->Y = SchBox->Y + ScanCon->Y_REL; + SchWire->DY = SchBox->Y + ScanCon->Y_REL; + } + } + else if (ScanCell->TYPE == SCP_CEL_CON) { + SchCon = (schcon_list *) ScanCell->ROOT; + SchCon->X_REL = channel + 6; + + SchNet = SchCon->NET; + SchWire = addschwir(Figure, SchNet); + /* ICI LUDO + SchWire->X = SchCon->X_REL - 2; + */ + SchWire->X = SchCon->X_REL; + SchWire->DX = SchNet->CANAL; + SchWire->Y = SchCon->Y_REL; + SchWire->DY = SchCon->Y_REL; + } + } + + /* Draw vertical wires */ + + for (ptchain = SchNetList; ptchain; ptchain = ptchain->NEXT ) { + SchNet = (schnet_list *) ptchain->DATA; + ClearSchNetCanal(SchNet); + ClearSchNetDir(SchNet); + if (SchNet->YMIN == SchNet->YMAX) + continue; + SchWire = addschwir(Figure, SchNet); + SchWire->X = SchNet->CANAL; + SchWire->DX = SchNet->CANAL; + SchWire->Y = SchNet->YMIN; + SchWire->DY = SchNet->YMAX; + } + freechain(SchNetList); + + return (channel + 6); +} + +static int +SchNetCompare(net1, net2) + schnet_list **net1; + schnet_list **net2; +{ + long type1, type2; + + type1 = GetSchNetDirType(*net1); + type2 = GetSchNetDirType(*net2); + + if (type1 > type2) + return (1); + if (type1 < type2) + return (-1); + + switch (type1) { + case 0: + return (((*net1)->YMAX - (*net1)->YMIN) - ((*net2)->YMAX - (*net2)->YMIN)); + break; + case SCH_NET_MINDIR: + return ((*net1)->YMIN - (*net2)->YMIN); + break; + case SCH_NET_MAXDIR: + return ((*net2)->YMAX - (*net1)->YMAX); + break; + case SCH_NET_MAXDIR | SCH_NET_MINDIR: + return (((*net2)->YMAX - (*net2)->YMIN) - ((*net1)->YMAX - (*net1)->YMIN)); + break; + } + return 0; +} + +static int +CheckNetIntersection(NetList, Net) + chain_list *NetList; + schnet_list *Net; +{ + chain_list *ptchain; + schnet_list *CmpNet; + + for (ptchain = NetList; ptchain; ptchain = ptchain->NEXT ) { + CmpNet = (schnet_list *) ptchain->DATA; + if (Net->YMIN > CmpNet->YMAX || Net->YMAX < CmpNet->YMIN) + continue; + else + break; + } + if (ptchain != NULL) + return 1; + else + return 0; +} + +/*------------------------------------------------------------\ +| | +| Function Loc Route | +| | +\------------------------------------------------------------*/ + +static schfig_list *loc_route( Figure ) + + schfig_list *Figure; +{ + scpcol_list *Column_from; + scpcol_list *Column_to; + long Xdep; + + Xdep = 0; + + if ( HEAD_SCPCOL != (scpcol_list *)0 ) + { + for ( Column_from = HEAD_SCPCOL; + Column_from->NEXT != (scpcol_list *)0; + Column_from = Column_from->NEXT ) + { + Column_to = Column_from->NEXT; + Xdep = loc_routage_canal( Figure, Column_from, Column_to, Xdep ); + } + } + + return (Figure); +} + +/*------------------------------------------------------------\ +| | +| Function Loc Test Trans | +| | +\------------------------------------------------------------*/ + +static int loc_test_trans( Net, Column ) + + schnet_list *Net; + scpcol_list *Column; +{ + scpcel_list *ScpCel; + schcon_list *SchCon; + schbox_list *SchBox; + chain_list *ChainCon; + + for ( ChainCon = Net->CON_NET; + ChainCon != (chain_list *)0; + ChainCon = ChainCon->NEXT ) + { + SchCon = (schcon_list *) ChainCon->DATA; + + if ( IsSchConInternal( SchCon ) ) + { + SchBox = (schbox_list *) SchCon->ROOT; + + if ( IsSchBoxTransparence( SchBox ) ) + { + ScpCel = (scpcel_list *) SchBox->USER; + + if ( ScpCel->COL == Column ) return( 0 ); + } + } + } + + return( 1 ); +} + + +/*------------------------------------------------------------\ +| | +| Function Loc Placement Initial | +| | +\------------------------------------------------------------*/ + +static schfig_list *loc_placement_initial( Figure ) + + schfig_list *Figure; +{ + int cpt_transparence; + + int cpt; + schcon_list *Con; + schcon_list *Con2; + chain_list *Chain; + + schbox_list *Box; + schbox_list *Box2; + schbox_list *Box4; + scpcol_list *Column2; + scpcol_list *Column; + scpcel_list *Cell; + scpcel_list *Cell2; + + schbox_list *BoxBox4; + scpcel_list *BoxCell2; + schcon_list *BoxCon; + schcon_list *BoxCon2; + chain_list *BoxChain; + + + /* connecteurs externes de sortie dans la premiere colonne */ + + Column2 = addscpcol(); + Column = addscpcol(); + + for ( Con = Figure->CON_OUT; + Con != (schcon_list *)0; + Con = Con->NEXT ) + { + addschcontoscpcel( Con, addscpcel( Column2 ) ); + + for ( Chain = Con->NET->CON_NET; + Chain != (chain_list *)0; + Chain = Chain->NEXT ) + { + if ( loc_test_trans( Con->NET, Column ) ) + { + Box2 = loc_add_transparence( Figure, Con->NET ); + SetSchBoxTaged(Box2); + Cell2 = addscpcel(Column); + addschboxtoscpcel(Box2, Cell2); + } + } + } + + while (cpt_transparence != Column->NUMBER_CELL) { + + Column2 = Column; + Column = addscpcol(); + + cpt = Column2->NUMBER_CELL; + cpt_transparence = 0; + + for (Cell = Column2->CELL; + Cell != (scpcel_list *)0; + Cell = Cell->NEXT ) { + if (Cell->TYPE == SCP_CEL_BOX) { + Box = (schbox_list *) Cell->ROOT; + SetSchBoxReTaged(Box); + } + } + + for (Cell = Column2->LAST_CELL; + cpt != 0; + Cell = (scpcel_list *) Cell->PREV) { + cpt--; + if (Cell->TYPE == SCP_CEL_BOX) { + Box = (schbox_list *) Cell->ROOT; + + for (Con = Box->CON_IN; + Con != (schcon_list *)0; + Con = Con->NEXT ) { + for (Chain = Con->NET->CON_NET; + Chain != (chain_list *)0; + Chain = Chain->NEXT ) { + Con2 = (schcon_list *) Chain->DATA; + + if (Con != Con2) { + if (IsSchConIn(Con2) && IsSchConInternal(Con2) + && !IsSchBoxTaged((schbox_list *) Con2->ROOT) + && loc_test_trans(Con->NET, Column)) { + Box4 = loc_add_transparence(Figure, Con2->NET); + Box4->NAME = namealloc("In_int_not_tag"); + SetSchBoxTaged(Box4); + Cell2 = addscpcel(Column); + addschboxtoscpcel(Box4, Cell2); + cpt_transparence++; + } + + if (IsSchConOut(Con2) && IsSchConInternal(Con2)) { + Box4 = (schbox_list *) Con2->ROOT; + if (!IsSchBoxTaged(Box4)) { + SetSchBoxTaged(Box4); + Cell2 = addscpcel(Column); + addschboxtoscpcel(Box4, Cell2); + + for (BoxCon = Box4->CON_IN; + BoxCon != (schcon_list *)0; + BoxCon = BoxCon->NEXT ) { + for (BoxChain = BoxCon->NET->CON_NET; + BoxChain != (chain_list *)0; + BoxChain = BoxChain->NEXT ) { + BoxCon2 = (schcon_list *) BoxChain->DATA; + + if (BoxCon != BoxCon2) { + if (IsSchConInternal(BoxCon2) + && IsSchBoxTaged((schbox_list *) BoxCon2->ROOT) + && IsSchBoxReTaged((schbox_list *) BoxCon2->ROOT) + && loc_test_trans(BoxCon->NET, Column)) { + BoxBox4 = loc_add_transparence(Figure, BoxCon2->NET); + BoxBox4->NAME = namealloc("IN__Int_Tag"); + SetSchBoxTaged(BoxBox4); + BoxCell2 = addscpcel(Column); + addschboxtoscpcel(BoxBox4, BoxCell2); + cpt_transparence++; + } + } + } + } + for (BoxCon = Box4->CON_OUT; + BoxCon != (schcon_list *)0; + BoxCon = BoxCon->NEXT ) { + for (BoxChain = BoxCon->NET->CON_NET; + BoxChain != (chain_list *)0; + BoxChain = BoxChain->NEXT ) { + BoxCon2 = (schcon_list *) BoxChain->DATA; + + if (BoxCon != BoxCon2) { + if (IsSchConIn(BoxCon2) && IsSchConInternal(BoxCon2) + && !IsSchBoxReTaged((schbox_list *) BoxCon2->ROOT) + && loc_test_trans(BoxCon->NET, Column)) { + BoxBox4 = loc_add_transparence(Figure, BoxCon2->NET); + BoxBox4->NAME = namealloc("OUT__In_Int_Tag"); + SetSchBoxTaged(BoxBox4); + BoxCell2 = addscpcel(Column); + addschboxtoscpcel(BoxBox4, BoxCell2); + cpt_transparence++; + } + } + } + } + } + } + + /* relier un connecteur d'entree */ + + if (IsSchConIn(Con2) && IsSchConExternal(Con2) + && loc_test_trans(Con->NET, Column)) { + Box4 = loc_add_transparence(Figure, Con2->NET); + SetSchBoxTaged(Box4); + Cell2 = addscpcel(Column); + addschboxtoscpcel(Box4, Cell2); + cpt_transparence++; + } + } + } + } /* for */ + } + } + } + Column2 = Column; + Column = addscpcol(); + cpt = Column2->NUMBER_CELL; + + for (Cell = Column2->LAST_CELL; + cpt != 0; + Cell = (scpcel_list *) Cell->PREV) { + cpt--; + if (Cell->TYPE == SCP_CEL_BOX) { + Box = (schbox_list *) Cell->ROOT; + Con2 = Box->CON_IN; + for (Chain = Con2->NET->CON_NET; + Chain != (chain_list *)0; + Chain = Chain->NEXT ) { + Con = (schcon_list *) Chain->DATA; + if (IsSchConExternal(Con) && IsSchConIn(Con) && !IsSchConTaged(Con)) { + Cell2 = addscpcel(Column); + addschcontoscpcel(Con, Cell2); + SetSchConTaged(Con); + } + } + } + } + return (Figure); +} + +/*------------------------------------------------------------\ +| | +| Function Loc Build Box | +| | +\------------------------------------------------------------*/ + +static schfig_list *loc_buildbox( Figure ) + + schfig_list *Figure; +{ + schbox_list *Box; + schbox_list *Box0; + schbox_list *BoxN; + schcon_list *Con; + ptype_list *ScanBox; + ptype_list *HeadList; + long Y_cont1; + long Y_cont2; + long MiddleDY; + long MiddleInDY; + long Delta; + int Number; + int NumberIn; + int NumberBoxIn0; + int NumberOut; + int Middle; + int MiddleIn; + + for ( Box = Figure->BOX; + Box != (schbox_list *)0; + Box = Box->NEXT ) + { +/* +** Compute the size of the box on Y +*/ + if ( IsSchBoxTransparence( Box ) ) + { + Box->DY = SCP_BOX_TRANS_DY; + Y_cont1 = SCP_BOX_TRANS_DY / 2; + Y_cont2 = SCP_BOX_TRANS_DY / 2; + } + else + { + NumberIn = Box->NUMBER_IN; + NumberOut = Box->NUMBER_OUT; + + if ( NumberIn >= NumberOut ) + { + Box->DY = ( 2 * SCP_BOX_CON_BASE_Y ) + ( ( NumberIn - 1 ) * SCP_BOX_CON_STEP_Y ); + + Y_cont1 = Box->DY - SCP_BOX_CON_BASE_Y; + Y_cont2 = Box->DY - SCP_BOX_CON_BASE_Y - + ( ( NumberIn - NumberOut ) * SCP_BOX_CON_STEP_Y / 2 ); + } + else + { + Box->DY = ( 2 * SCP_BOX_CON_BASE_Y ) + ( ( NumberOut - 1 ) * SCP_BOX_CON_STEP_Y ); + + Y_cont2 = Box->DY - SCP_BOX_CON_BASE_Y; + Y_cont1 = Box->DY - SCP_BOX_CON_BASE_Y - + ( ( NumberOut - NumberIn ) * SCP_BOX_CON_STEP_Y / 2 ); + } + } +/* +** Compute the size of the box on X +*/ + if ( IsSchBoxCluster( Box ) ) + { +/* +** Compute the size of the cluster on X +*/ + Box->DX = 0; + + HeadList = (ptype_list *)Box->SOURCE; + Box0 = (schbox_list *)HeadList->DATA; + HeadList = HeadList->NEXT; + + NumberBoxIn0 = 0; + + for ( ScanBox = HeadList; + ScanBox != (ptype_list *)0; + ScanBox = ScanBox->NEXT ) + { + NumberBoxIn0++; + + BoxN = (schbox_list *)ScanBox->DATA; + + if ( Box->DX < BoxN->DX ) Box->DX = BoxN->DX; + } + + Box->DX += Box0->DX + ( SCP_BOX_CON_X * 2 ) + + ( ( SCP_CLUSTER_ROUTE_STEP_X * NumberBoxIn0 ) / 2 ) + SCP_CLUSTER_ROUTE_STEP_X; +/* +** Compute the position of the cluster's outputs on Y +** => The center of input boxes should be in front of the center of Box0's input connectors +*/ + Number = 1; + Middle = NumberBoxIn0 / 2; + MiddleDY = 0; +/* +** Compute MiddleDY : the center of input boxes +*/ + for ( ScanBox = HeadList; + ScanBox != (ptype_list *)0; + ScanBox = ScanBox->NEXT ) + { + BoxN = (schbox_list *)ScanBox->DATA; + if ( Number <= Middle ) + { + MiddleDY += BoxN->DY; + } + else + { + if ( NumberBoxIn0 & 1 ) MiddleDY += BoxN->DY / 2; + + break; + } + + Number++; + } +/* +** Compute MiddleInDY : the center of Box0's input connectors +*/ + /* TO BE DONE */ + Number = 1; + MiddleIn = Box0->NUMBER_IN / 2; + MiddleInDY = SCP_BOX_CON_BASE_Y; + + for ( Con = Box0->CON_IN; + Con != (schcon_list *)0; + Con = Con->NEXT ) + { + if ( Number < MiddleIn ) + { + MiddleInDY += SCP_BOX_CON_STEP_Y; + } + else + { + if ( ! ( Box0->NUMBER_IN & 0x1 ) ) + { + MiddleInDY += SCP_BOX_CON_STEP_Y / 2; + } + + break; + } + + Number++; + } + + /* + MiddleInDY = Box0->DY - MiddleInDY; + Delta = MiddleDY - ( Box->DY / 2 ); + Box0->Y = Delta + ( Box->DY / 2 ) - MiddleInDY; + */ + + Delta = MiddleDY - ( Box->DY / 2 ); + Box0->Y = Delta + ( Box->DY - Box0->DY ) / 2 ; + + /* + MiddleInDY = Box0->DY - MiddleInDY; + Delta = MiddleDY - ( Box->DY / 2 ) + MiddleInDY - ( Box0->DY / 2 ); + Box0->Y = Delta + ( Box->DY - Box0->DX ) / 2; + */ + + Y_cont2 += Delta; + + while ( IsSchBoxCluster( Box0 ) ) + { + ScanBox = (ptype_list *)Box0->SOURCE; + BoxN = (schbox_list *)ScanBox->DATA; + + Y_cont2 += BoxN->Y - ( ( Box0->DY - BoxN->DY ) / 2); + + Box0 = BoxN; + } + } + else + { + if ( ( IsSchBoxTransparence( Box ) ) || + ( IsSchBoxClusterNet( Box ) ) ) + { + Box->DX = 0; + } + else + { + if ( Box->DY <= SCP_BOX_MIN_DX ) + { + Box->DX = SCP_BOX_MIN_DX; + } + else + { + Box->DX = Box->DY; + } + } + } + + for ( Con = Box->CON_IN; + Con != (schcon_list *)0; + Con = Con->NEXT ) + { + Con->X_REL = - SCP_BOX_CON_X; + Con->Y_REL = Y_cont1; + + Y_cont1 = Y_cont1 - SCP_BOX_CON_STEP_Y; + + } + + for ( Con = Box->CON_OUT; + Con != (schcon_list *)0; + Con = Con->NEXT ) + { + Con->X_REL = Box->DX + SCP_BOX_CON_X; + Con->Y_REL = Y_cont2; + + Y_cont2 = Y_cont2 - SCP_BOX_CON_STEP_Y; + } + } + + return ( Figure ); +} + +/*------------------------------------------------------------\ +| | +| Function Loc Compact Wire | +| | +\------------------------------------------------------------*/ + +static void loc_compactwirenet( SchNet ) + + schnet_list *SchNet; +{ + schwir_list *ScanWire; + schwir_list *DelWire; + schwir_list *NextWire; + schwir_list **PrevWire; + long Xmin; + long Xmax; + long Ymin; + long Ymax; + short ScanHor; + short NextHor; + long ScanX1; + long ScanX2; + long NextX1; + long NextX2; + long ScanY1; + long ScanY2; + long NextY1; + long NextY2; +/* +** Delete point wire, and order others +*/ + PrevWire = &SchNet->WIRE; + ScanWire = SchNet->WIRE; + + while ( ScanWire != (schwir_list *)0 ) + { + if ( ( ScanWire->X == ScanWire->DX ) && + ( ScanWire->Y == ScanWire->DY ) ) + { + *PrevWire = ScanWire->NEXT; + DelWire = ScanWire; + ScanWire = ScanWire->NEXT; + + freeschwir( DelWire ); + } + else + { + if ( ScanWire->Y == ScanWire->DY ) + { + Xmin = ScanWire->X; + Xmax = ScanWire->DX; + + if ( Xmin > Xmax ) + { + ScanWire->X = Xmax; + ScanWire->DX = Xmin; + } + } + else + { + Ymin = ScanWire->Y; + Ymax = ScanWire->DY; + + if ( Ymin > Ymax ) + { + ScanWire->Y = Ymax; + ScanWire->DY = Ymin; + } + } + + PrevWire = &ScanWire->NEXT; + ScanWire = ScanWire->NEXT; + } + } +/* +** Build big wire ! +*/ + PrevWire = &SchNet->WIRE; + ScanWire = SchNet->WIRE; + + while ( ScanWire != (schwir_list *)0 ) + { + if ( ScanWire->Y == ScanWire->DY ) ScanHor = 1; + else ScanHor = 0; + + for ( NextWire = ScanWire->NEXT; + NextWire != (schwir_list *)0; + NextWire = NextWire->NEXT ) + { + if ( NextWire->Y == NextWire->DY ) NextHor = 1; + else NextHor = 0; + + if ( ScanHor == NextHor ) + { +/* +** Horizontal wires +*/ + if ( ScanHor == 1 ) + { + if ( ScanWire->Y == NextWire->Y ) + { + ScanX1 = ScanWire->X; + ScanX2 = ScanWire->DX; + NextX1 = NextWire->X; + NextX2 = NextWire->DX; +/* +** Intersection between to horizontal wires +*/ + if ( ( NextX1 <= ScanX2 ) && + ( NextX2 >= ScanX1 ) ) + { + if ( ScanX1 < NextX1 ) Xmin = ScanX1; + else Xmin = NextX1; + + if ( ScanX2 > NextX2 ) Xmax = ScanX2; + else Xmax = NextX2; + + NextWire->X = Xmin; + NextWire->DX = Xmax; + + break; + } + } + } + else +/* +** Vertical wires +*/ + { + if ( ScanWire->X == NextWire->X ) + { + ScanY1 = ScanWire->Y; + ScanY2 = ScanWire->DY; + NextY1 = NextWire->Y; + NextY2 = NextWire->DY; +/* +** Intersection between to vertical wires +*/ + if ( ( NextY1 <= ScanY2 ) && + ( NextY2 >= ScanY1 ) ) + { + if ( ScanY1 < NextY1 ) Ymin = ScanY1; + else Ymin = NextY1; + + if ( ScanY2 > NextY2 ) Ymax = ScanY2; + else Ymax = NextY2; + + NextWire->Y = Ymin; + NextWire->DY = Ymax; + + break; + } + } + } + } + } + + if ( NextWire != (schwir_list *)0 ) + { + *PrevWire = ScanWire->NEXT; + DelWire = ScanWire; + ScanWire = ScanWire->NEXT; + + freeschwir( DelWire ); + } + else + { + PrevWire = &ScanWire->NEXT; + ScanWire = ScanWire->NEXT; + } + } +} + +/*------------------------------------------------------------\ +| | +| Function Loc Clean All | +| | +\------------------------------------------------------------*/ + +static void loc_clean_all( Figure ) + + schfig_list *Figure; +{ + schbox_list *ScanBox; + schnet_list *ScanNet; + + for ( ScanBox = Figure->BOX; + ScanBox != (schbox_list *)0; + ScanBox = ScanBox->NEXT ) + { + if ( ( IsSchBoxCluster( ScanBox ) ) && + ( ! IsSchBoxClustered( ScanBox ) ) ) + { + loc_destroycluster( Figure, ScanBox ); + } + } + + for ( ScanBox = Figure->BOX; + ScanBox != (schbox_list *)0; + ScanBox = ScanBox->NEXT ) + { + if ( IsSchBoxTransparence( ScanBox ) ) + { + loc_destroytransparence( Figure, ScanBox ); + } + } + + for ( ScanBox = Figure->BOX; + ScanBox != (schbox_list *)0; + ScanBox = ScanBox->NEXT ) + { + if ( IsSchBoxClusterNet( ScanBox ) ) + { + loc_destroyclusternet( Figure, ScanBox ); + } + } + + for ( ScanNet = Figure->NET; + ScanNet != (schnet_list *)0; + ScanNet = ScanNet->NEXT ) + { + loc_compactwirenet( ScanNet ); + } + + delscpcol(); +} + +/*------------------------------------------------------------\ +| | +| Function Build | +| | +\------------------------------------------------------------*/ + +void placerouteschfig( SchFigure ) + + schfig_list *SchFigure; +{ +# ifdef DEBUG + fprintf(stdout, "--- Detection des clusters ---\n"); + fflush(stdout); +# endif + loc_buildcluster(SchFigure); +# ifdef DEBUG + fprintf(stdout, "----- Placement initial -----\n"); + fflush(stdout); +# endif + loc_placement_initial(SchFigure); +# ifdef DEBUG + fprintf(stdout, "--- Fabrication des boites ---\n"); + fflush(stdout); + fflush(stdout); +# endif + loc_buildbox(SchFigure); +# ifdef DEBUG + fprintf(stdout, "--------- Placement ---------\n"); + fflush(stdout); + fflush(stdout); +# endif + loc_buildplace(SchFigure); +# ifdef DEBUG + fprintf(stdout, "---------- Routage ----------\n"); + fflush(stdout); + fflush(stdout); +# endif + loc_route(SchFigure); +# ifdef DEBUG + fprintf(stdout, "---------- Nettoyage --------\n"); + fflush(stdout); +# endif + loc_clean_all(SchFigure); +} diff --git a/alliance/src/scl/src/scpbuild.h b/alliance/src/scl/src/scpbuild.h new file mode 100644 index 00000000..3fcea563 --- /dev/null +++ b/alliance/src/scl/src/scpbuild.h @@ -0,0 +1,79 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ + +# ifndef SCP_BUILD_H +# define SCP_BUILD_H + +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : Scp Build | +| | +| Date : 15.03.00 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# define SCP_CLUSTER_BOX 0 +# define SCP_CLUSTER_BOX_NET 1 + +/*------------------------------------------------------------\ +| | +| Box Size | +| | +\------------------------------------------------------------*/ + +# define SCP_BOX_TRANS_DY 2 + +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + +# endif diff --git a/alliance/src/scl/src/scpdel.c b/alliance/src/scl/src/scpdel.c new file mode 100644 index 00000000..63c73c6b --- /dev/null +++ b/alliance/src/scl/src/scpdel.c @@ -0,0 +1,125 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : scpdel.c | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" + +# include +# include "scp.h" +# include "scpdel.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Scp Del Functions | +| | +\------------------------------------------------------------*/ + +/*------------------------------------------------------------\ +| | +| Scp Del Cell List | +| | +\------------------------------------------------------------*/ + +static void loc_delscpcel( HeadCell ) + + scpcel_list *HeadCell; +{ + scpcel_list *ScanCell; + scpcel_list *DelCell; + + ScanCell = HeadCell; + + while ( ScanCell != (scpcel_list *)0 ) + { + DelCell = ScanCell; + ScanCell = ScanCell->NEXT; + + freescpcel( DelCell ); + } +} + +/*------------------------------------------------------------\ +| | +| Scp Del Column List | +| | +\------------------------------------------------------------*/ + +void delscpcol() +{ + scpcol_list *ScanColumn; + scpcol_list *DelColumn; + + ScanColumn = HEAD_SCPCOL; + + while ( ScanColumn != (scpcol_list *)0 ) + { + loc_delscpcel( ScanColumn->CELL ); + + DelColumn = ScanColumn; + ScanColumn = ScanColumn->NEXT; + + freescpcol( DelColumn ); + } + + HEAD_SCPCOL = (scpcol_list *)0; +} diff --git a/alliance/src/scl/src/scpdel.h b/alliance/src/scl/src/scpdel.h new file mode 100644 index 00000000..5f689050 --- /dev/null +++ b/alliance/src/scl/src/scpdel.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : scpdel.h | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCP_DEL_H +# define SCP_DEL_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/scpfree.c b/alliance/src/scl/src/scpfree.c new file mode 100644 index 00000000..0d30698e --- /dev/null +++ b/alliance/src/scl/src/scpfree.c @@ -0,0 +1,110 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : scpfree.c | +| | +| Date : 28.04.97 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include "mut.h" +# include "aut.h" +# include "mlo.h" +# include "scl.h" + +# include +# include +# include "scp.h" +# include "scpfree.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Scp Free Functions | +| | +\------------------------------------------------------------*/ + +/*------------------------------------------------------------\ +| | +| Scp Free Cell | +| | +\------------------------------------------------------------*/ + +void freescpcel( Cell ) + + scpcel_list *Cell; +{ + autfreeheap( (char *)Cell, sizeof( scpcel_list )); +} +/*------------------------------------------------------------\ +| | +| Scp Free Colum | +| | +\------------------------------------------------------------*/ + +void freescpcol( Colum ) + + scpcol_list *Colum; +{ + autfreeheap( (char *)Colum, sizeof( scpcol_list )); +} + + + + + + + + + diff --git a/alliance/src/scl/src/scpfree.h b/alliance/src/scl/src/scpfree.h new file mode 100644 index 00000000..d719233e --- /dev/null +++ b/alliance/src/scl/src/scpfree.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : scpfree.h | +| | +| Date : 28.04.97 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCP_FREE_H +# define SCP_FREE_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/scl/src/scpswap.h b/alliance/src/scl/src/scpswap.h new file mode 100644 index 00000000..fa97b5f2 --- /dev/null +++ b/alliance/src/scl/src/scpswap.h @@ -0,0 +1,66 @@ +/*------------------------------------------------------------\ +| | +| This file is part of the Alliance CAD System Copyright | +| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie| +| | +| Home page : http://www-asim.lip6.fr/alliance/ | +| E-mail support : mailto:alliance-support@asim.lip6.fr | +| | +| This progam is free software; you can redistribute it | +| and/or modify it under the terms of the GNU 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. | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Tool : Scp | +| | +| File : scp.h | +| | +| Date : 28.04.98 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef SCP_SWAP_H +# define SCP_SWAP_H + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif