This commit is contained in:
parent
9ae4cf6e8d
commit
44c3833f8d
|
@ -0,0 +1 @@
|
|||
SUBDIRS = src etc
|
|
@ -0,0 +1,48 @@
|
|||
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 <Frederic.Petrot@lip6.fr>
|
||||
dnl $Id: configure.in,v 1.1 2002/04/18 13:59:12 ludo Exp $
|
||||
dnl
|
||||
dnl
|
||||
AC_INIT(src/elp.h)
|
||||
AM_INIT_AUTOMAKE(elp, 1.5)
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
AC_PROG_YACC
|
||||
AM_PROG_LEX
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AM_ALLIANCE
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
etc/Makefile
|
||||
])
|
|
@ -0,0 +1,2 @@
|
|||
install-data-local:
|
||||
$(INSTALL_DATA) $(srcdir)/prol.elp @ALLIANCE_TOP@/etc/prol.elp
|
|
@ -0,0 +1,58 @@
|
|||
#Fichier de parametrisation de TAS, PROL10, LEVEL 2, HSPICE
|
||||
#Les parametres sont calcules en tenant compte des shrinks
|
||||
#Par DIOURY karim, le 15/06/1995
|
||||
|
||||
Technologie : prol10 Version : 2.0
|
||||
|
||||
#Reference Simulator
|
||||
ESIM = HSPICE
|
||||
MODEL = MOS
|
||||
LEVEL = 2.0
|
||||
|
||||
#shrink parameters (micron)
|
||||
DLN = 0.0
|
||||
DLP = 0.0
|
||||
DWN = 0.0
|
||||
DWP = 0.0
|
||||
|
||||
#transistor characteristics
|
||||
#NMOS
|
||||
VTN = 0.8
|
||||
BN = 0.7
|
||||
AN = 4.8e-05
|
||||
RNT = 11000.0
|
||||
|
||||
#PMOS
|
||||
VTP = 1.2
|
||||
BP = 0.25
|
||||
AP = 1.7e-05
|
||||
RPT = 26000.0
|
||||
|
||||
#general parameters
|
||||
VDDmax = 4.50
|
||||
VTHR = 2.250
|
||||
VSSdeg = 1.6
|
||||
VDDdeg = 3.5
|
||||
TEMP = 70.0
|
||||
|
||||
#dynamic capacitance: grid capacitance (in pF/u and pF/u2)
|
||||
CGSN = 1500.0e-6
|
||||
CGSP = 1500.0e-6
|
||||
CGPN = 200.0e-6
|
||||
CGPP = 200.0e-6
|
||||
|
||||
#dynamic capacitance: drain capacitance (in pF/u and pF/u2)
|
||||
CDSN = 400.0e-6
|
||||
CDSP = 600.0e-6
|
||||
CDPN = 500.0e-6
|
||||
CDPP = 800.0e-6
|
||||
CDWN = 200.0e-6
|
||||
CDWP = 200.0e-6
|
||||
|
||||
#dynamic capacitance: source capacitance (in pF/u and pF/u2)
|
||||
CSSN = 400.0e-6
|
||||
CSSP = 600.0e-6
|
||||
CSPN = 500.0e-6
|
||||
CSPP = 800.0e-6
|
||||
CSWN = 200.0e-6
|
||||
CSWP = 200.0e-6
|
|
@ -0,0 +1,63 @@
|
|||
# makefile for elp libraries
|
||||
# date : 31/07/95
|
||||
|
||||
include $(ALLIANCE_TOP)/etc/$(ALLIANCE_OS).mk
|
||||
include $(ALLIANCE_TOP)/etc/libraries.mk
|
||||
|
||||
ELP_VERSION = 1.05
|
||||
ELP_INSTALL_VERSION = 105
|
||||
|
||||
OBJ = elperror.o elp.y.o elpy.tab.o elplex.yy.o
|
||||
|
||||
ELP_HEADER = elp$(ELP_INSTALL_VERSION).h
|
||||
ELP_LIB = libElp$(ELP_INSTALL_VERSION).a
|
||||
|
||||
ELP_H = elp105.h
|
||||
|
||||
LOCAL_INC = -I$(TARGET_INCLUDE) \
|
||||
-I$(ALLIANCE_INCLUDE)
|
||||
|
||||
LOCAL_CFLAGS = $(CFLAGS) -c $(LOCAL_INC) \
|
||||
-D$(ALLIANCE_OS) \
|
||||
-DMLO_H="<$(MLO_H)>" \
|
||||
-DMUT_H="<$(MUT_H)>" \
|
||||
-DRCN_H="<$(RCN_H)>" \
|
||||
-DTECHNOLOGY='"$(ALLIANCE_ETC)/prol10.elp"' \
|
||||
-DELP_H='"$(ELP_HEADER)"' \
|
||||
-O3
|
||||
|
||||
LOCAL_YFLAGS = $(YACCFLAGS) -d
|
||||
|
||||
$(TARGET_LIB)/$(ELP_LIB) : $(OBJ)
|
||||
$(AR) $(ARFLAGS) $(TARGET_LIB)/$(ELP_LIB) $(OBJ)
|
||||
$(RANLIB) $(TARGET_LIB)/$(ELP_LIB)
|
||||
$(CP) $(ELP_HEADER) $(TARGET_INCLUDE)/
|
||||
|
||||
elperror.o : elperror.c
|
||||
$(CC) $(LOCAL_CFLAGS) elperror.c
|
||||
|
||||
elp.y.o : elp.c
|
||||
$(SED) -e 's/yy/elpyy/g' -e 's/YY/elpYY/g' elp.c > elp.y.c
|
||||
$(CC) $(LOCAL_CFLAGS) elp.y.c
|
||||
|
||||
elpy.tab.o : elp.yac
|
||||
$(YACC) $(LOCAL_YFLAGS) elp.yac
|
||||
$(SED) -e 's/yy/elpyy/g' -e 's/YY/elpYY/g' y.tab.c > elpy.tab.c
|
||||
$(SED) -e 's/yy/elpyy/g' -e 's/YY/elpYY/g' y.tab.h > elpy.tab.h
|
||||
$(CC) $(LOCAL_CFLAGS) elpy.tab.c
|
||||
$(RM) elpy.tab.c y.tab.c y.tab.h
|
||||
|
||||
elplex.yy.o : elp.lex
|
||||
$(LEX) $(LEXFLAGS) elp.lex
|
||||
echo "s/yy/elpyy/g" > tmp
|
||||
echo "s/YY/elpYY/g" >> tmp
|
||||
echo "s/y\.tab\.h/elpy.tab.h/g" >> tmp
|
||||
$(SED) -f tmp lex.yy.c > elplex.yy.c
|
||||
$(CC) $(LOCAL_CFLAGS) elplex.yy.c
|
||||
$(RM) lex.yy.c elplex.yy.c tmp
|
||||
|
||||
realclean : clean
|
||||
-$(RM) $(TARGET_LIB)/$(ELP_LIB)
|
||||
-$(RM) $(TARGET_INCLUDE)/$(ELP_HEADER)
|
||||
clean :
|
||||
-$(RM) *.o elp.y.c elpy.tab.h
|
|
@ -0,0 +1,15 @@
|
|||
AM_CFLAGS = @ALLIANCE_CFLAGS@ \
|
||||
-DTECHNOLOGY=\"etc/prol.elp\"
|
||||
|
||||
lib_LIBRARIES = libElp.a
|
||||
include_HEADERS = elp.h
|
||||
libElp_a_SOURCES = elp_y.y elp_l.l \
|
||||
elp.c elperror.c elp.h
|
||||
|
||||
CLEANFILES = elp_y.c elp_y.h elp_l.c
|
||||
|
||||
elp_y.c elp_y.h : $(srcdir)/elp_y.y
|
||||
$(YACC) -d $(YFLAGS) $(srcdir)/elp_y.y && sed -e "s/yy/elpyy/g" -e "s/YY/elpYY/g" y.tab.c > elp_y.c && sed -e "s/yy/elpyy/g" -e "s/YY/elpYY/g" y.tab.h > elp_y.h
|
||||
|
||||
elp_l.c : $(srcdir)/elp_l.l elp_y.h
|
||||
$(LEX) -t $(srcdir)/elp_l.l | sed -e "s/yy/elpyy/g" -e "s/YY/elpYY/g" > elp_l.c
|
|
@ -0,0 +1,519 @@
|
|||
/****************************************************************************/
|
||||
/* */
|
||||
/* Chaine de CAO & VLSI Alliance */
|
||||
/* */
|
||||
/* Produit : ELP Verison 1 */
|
||||
/* Fichier : elp.c */
|
||||
/* */
|
||||
/* (c) copyright 1991-1995 Laboratoire MASI equipe CAO & VLSI */
|
||||
/* Tous droits reserves */
|
||||
/* Support : e-mail cao-vlsi@masi.ibp.fr */
|
||||
/* */
|
||||
/* Auteur(s) : Payam KIANI */
|
||||
/* */
|
||||
/****************************************************************************/
|
||||
/* caracterisation electrique des netlists en fonction des parametres elp */
|
||||
/****************************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "elp.h"
|
||||
|
||||
extern FILE *yyin ;
|
||||
char elpTechnoName[elpSTRINGSIZE] ;
|
||||
char elpTechnoFile[elpSTRINGSIZE] ;
|
||||
double elpTechnoVersion ;
|
||||
char elpEsimName[elpSTRINGSIZE] ;
|
||||
char elpModelName[elpSTRINGSIZE] = "MOS" ;
|
||||
int elpModelType ;
|
||||
double elpEsimLevel ;
|
||||
double elpShrink[elpSHRINKNUM] = {1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0} ;
|
||||
double elpModel[elpTRANSNUM][elpMODELNUM] ;
|
||||
double elpVoltage[elpVOLTNUM] ;
|
||||
double elpCapa[elpTRANSNUM][elpCAPANUM] ;
|
||||
double elpGeneral[elpGENERALNUM] = {0.0,0.0,1000.0} ;
|
||||
char elpLang = elpDEFLANG ;
|
||||
int yylineno ;
|
||||
|
||||
/*****************************************************************************/
|
||||
/* function elpenv() */
|
||||
/* recuperation du nom du fichier elp a partir de la variable: */
|
||||
/* ELP_TECHNO_NAME. */
|
||||
/* */
|
||||
/* Parametres en entree: */
|
||||
/* -------------------- */
|
||||
/* Aucun! */
|
||||
/* */
|
||||
/* Parametre en sortie: */
|
||||
/* ------------------- */
|
||||
/* Aucun! */
|
||||
/*****************************************************************************/
|
||||
elpFCT elpenv()
|
||||
{
|
||||
char Buffer[ 512 ];
|
||||
|
||||
char *str ;
|
||||
|
||||
str = mbkgetenv("ELP_TECHNO_NAME");
|
||||
if(str != NULL)
|
||||
strcpy(elpTechnoFile,str) ;
|
||||
else
|
||||
{
|
||||
str = mbkgetenv( "ALLIANCE_TOP" );
|
||||
if ( str == (char *)NULL ) str = ALLIANCE_TOP;
|
||||
sprintf( elpTechnoFile, "%s/%s", str, TECHNOLOGY );
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* function LoadElp() */
|
||||
/* chargement du fichier techno sous forme structure ELP. En cas d'erreur la */
|
||||
/* fonction affiche un message et renvoie le numero d'erreur. Sinon le code */
|
||||
/* de retour est 0. */
|
||||
/* */
|
||||
/* Parametres en entree: */
|
||||
/* -------------------- */
|
||||
/* Aucun! */
|
||||
/* */
|
||||
/* Parametre en sortie: */
|
||||
/* ------------------- */
|
||||
/* La fonction renvoie 0 si le chargement s'est bien effectue, le numero */
|
||||
/* d'erreur sinon. */
|
||||
/*****************************************************************************/
|
||||
elpFCT short elpLoadElp()
|
||||
|
||||
{
|
||||
/* ouverture du fichier techno */
|
||||
if((yyin = fopen(elpTechnoFile,"r")) == NULL)
|
||||
{
|
||||
elpError(1000,elpTechnoFile) ; /* si fichier pas ouvert => erreur 1000 */
|
||||
return 1000 ; /* arret de la procedure elp */
|
||||
}
|
||||
|
||||
yylineno = 1 ;
|
||||
|
||||
/* appel au parser pour chargement */
|
||||
if(yyparse() != 0)
|
||||
{
|
||||
elpError(1002,elpTechnoFile) ; /* si erreur chergement => erreur 1002 */
|
||||
return 1002 ; /* arret de la procedure elp */
|
||||
}
|
||||
|
||||
/* fermeture du fichier techno */
|
||||
if(fclose(yyin) != 0)
|
||||
elpError(1003,elpTechnoFile) ; /* si fermeture ko => erreur 1003 */
|
||||
|
||||
/* type de model du fichier elp */
|
||||
if(strcmp(elpModelName,"MOS") == 0) elpModelType = elpMOS ;
|
||||
else if(strcmp(elpModelName,"MES") == 0) elpModelType = elpMES ;
|
||||
else
|
||||
{
|
||||
elpError(1006,elpTechnoFile) ; /* mauvais nom de model => erreur 1006 */
|
||||
return 1006 ; /* arret de la procedure elp */
|
||||
}
|
||||
/*-------------------------------------------------------------------*/
|
||||
/* verification des parametres obligatoires et calcul des parametres */
|
||||
/* optionnels. */
|
||||
/*-------------------------------------------------------------------*/
|
||||
if( /* verification des parametres obligatoires */
|
||||
((elpModelType == elpMOS) && (
|
||||
(elpModel[elpNMOS][elpVT] == 0.0 ) ||
|
||||
(elpModel[elpNMOS][elpA] == 0.0 ) ||
|
||||
(elpModel[elpNMOS][elpB] == 0.0 ) ||
|
||||
(elpModel[elpNMOS][elpRT] == 0.0 ) ||
|
||||
(elpModel[elpPMOS][elpVT] == 0.0 ) ||
|
||||
(elpModel[elpPMOS][elpA] == 0.0 ) ||
|
||||
(elpModel[elpPMOS][elpB] == 0.0 ) ||
|
||||
(elpModel[elpPMOS][elpRT] == 0.0 ) ||
|
||||
(elpVoltage[elpVDDMAX] == 0.0 ) ||
|
||||
(elpCapa[elpNMOS][elpCGS] == 0.0 ) ||
|
||||
(elpCapa[elpNMOS][elpCGP] == 0.0 ) ||
|
||||
(elpCapa[elpPMOS][elpCGS] == 0.0 ) ||
|
||||
(elpCapa[elpPMOS][elpCGP] == 0.0 ) ||
|
||||
(elpEsimName[0] == '\0') ||
|
||||
(elpEsimLevel == 0.0 ) ||
|
||||
(elpGeneral[elpTEMP] == 0.0 ))) ||
|
||||
((elpModelType == elpMES) && (
|
||||
(elpVoltage[elpVDDMAX] == 0.0 ) ||
|
||||
(elpCapa[elpEMES][elpCSGD] == 0.0 ) ||
|
||||
(elpCapa[elpEMES][elpCSGS] == 0.0 ) ||
|
||||
(elpCapa[elpDMES][elpCSGD] == 0.0 ) ||
|
||||
(elpCapa[elpDMES][elpCSGS] == 0.0 ) ||
|
||||
(elpEsimName[0] == '\0') ||
|
||||
(elpEsimLevel == 0.0 ) ||
|
||||
(elpGeneral[elpTEMP] == 0.0 )))
|
||||
)
|
||||
{
|
||||
elpError(1004,elpTechnoFile) ; /* parametre manquant => erreur 1004 */
|
||||
return 1004 ; /* arret de la procedure elp */
|
||||
}
|
||||
|
||||
/* calcul des parametres optionnels ne se trouvant pas dans le fichier tec */
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/* les niveaux degrades par defaut: VSSdeg = 1.5*VTP */
|
||||
/* VDDdeg = VDDmax-1.5*VTN */
|
||||
/* tension de seuil de calcul : VTHR = VDDmax / 2 */
|
||||
/*-------------------------------------------------------------------------*/
|
||||
if(elpVoltage[elpVSSDEG] == 0.0)
|
||||
elpVoltage[elpVSSDEG] = 1.5*elpModel[elpPMOS][elpVT] ;
|
||||
|
||||
if(elpVoltage[elpVDDDEG] == 0.0)
|
||||
elpVoltage[elpVDDDEG] = elpVoltage[elpVDDMAX] - 1.5*elpModel[elpNMOS][elpVT] ;
|
||||
|
||||
if(elpVoltage[elpVTHR] == 0.0)
|
||||
elpVoltage[elpVTHR] = elpVoltage[elpVDDMAX] / 2 ;
|
||||
|
||||
return 0 ; /* retourne 0 si tout s'est bien passe */
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* fonction LotrsShrink() */
|
||||
/* modifie les dimensions du transistor en fonction des parametres de */
|
||||
/* shrink et du parametre ACM. */
|
||||
/* */
|
||||
/* Parametres en entree: */
|
||||
/* -------------------- */
|
||||
/* 1) lotrs: transistor logique MBK dont on veut modifier les dimensions */
|
||||
/* */
|
||||
/* Parametre en sortie: */
|
||||
/* ------------------- */
|
||||
/* Aucun! */
|
||||
/****************************************************************************/
|
||||
elpFCT int elpLotrsShrink(lotrs)
|
||||
struct lotrs *lotrs ;
|
||||
|
||||
{
|
||||
double deltal ,
|
||||
deltaw ;
|
||||
|
||||
if(lotrs->TYPE == TRANSN)
|
||||
{
|
||||
if(elpModelType == elpMOS)
|
||||
{
|
||||
deltal = elpShrink[elpDLN] * (double)SCALE_X ;
|
||||
deltaw = elpShrink[elpDWN] * (double)SCALE_X ;
|
||||
}
|
||||
else
|
||||
{
|
||||
deltal = elpShrink[elpDLE] * (double)SCALE_X ;
|
||||
deltaw = elpShrink[elpDWE] * (double)SCALE_X ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(elpModelType == elpMOS)
|
||||
{
|
||||
deltal = elpShrink[elpDLP] * (double)SCALE_X ;
|
||||
deltaw = elpShrink[elpDWP] * (double)SCALE_X ;
|
||||
}
|
||||
else
|
||||
{
|
||||
deltal = elpShrink[elpDLD] * (double)SCALE_X ;
|
||||
deltaw = elpShrink[elpDWD] * (double)SCALE_X ;
|
||||
}
|
||||
}
|
||||
|
||||
/* modification de la longueur */
|
||||
lotrs->LENGTH = (long)(elpShrink[elpLMLT]*(double)lotrs->LENGTH + deltal) ;
|
||||
|
||||
/* modification de la largeur */
|
||||
lotrs->WIDTH = (long)(elpShrink[elpWMLT]*(double)lotrs->WIDTH + deltaw) ;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* si la largeur est modifiee, il faut egalement modifier les largeurs */
|
||||
/* laterales XS et XD pour la multiplication de XS ou de XD par la largeur */
|
||||
/* ne bouge pas. En effet cette multiplication donne l'aire du drain ou de */
|
||||
/* la source qui n'est absolument pas affectee par les parametres de shrink.*/
|
||||
/*--------------------------------------------------------------------------*/
|
||||
lotrs->XS = (long)((double)lotrs->XS*((double)lotrs->WIDTH-deltaw)/((double)lotrs->WIDTH*elpShrink[elpWMLT]));
|
||||
lotrs->XD = (long)((double)lotrs->XD*((double)lotrs->WIDTH-deltaw)/((double)lotrs->WIDTH*elpShrink[elpWMLT]));
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* pour ce qui est de l'aire et du perimetre du transistor. Si le parametre */
|
||||
/* ACM est a 1, l'aire et le perimetre du transistor sont calcules unique- */
|
||||
/* ment en fonction de la largeur (quelles que soient leurs valeurs initi- */
|
||||
/* ales. Dans ce cas: */
|
||||
/* */
|
||||
/* Aire = Weffectif*WMLT */
|
||||
/* Perimetre = Weffectif */
|
||||
/* */
|
||||
/* Or ce qu'on a dans le transistor logique, ce n'est pas la surface, mais */
|
||||
/* la largeur laterale X, telle que Aire = X*Weffectif. La transformation */
|
||||
/* dans le cas ACM=1 est donc: */
|
||||
/* */
|
||||
/* X = WMLT*SCALE_X */
|
||||
/* Perimetre = Weffectif */
|
||||
/*--------------------------------------------------------------------------*/
|
||||
if(elpGeneral[elpACM] == 1.0)
|
||||
{
|
||||
lotrs->XS = lotrs->XD = (long)(elpShrink[elpWMLT] * (double)SCALE_X) ;
|
||||
lotrs->PS = lotrs->PD = lotrs->WIDTH ;
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* fonction LotrsCapaDrain() */
|
||||
/* calcule la capacite de drain d'un transistor MBK passe en parametre. */
|
||||
/* */
|
||||
/* Parametres en entree: */
|
||||
/* -------------------- */
|
||||
/* 1) lotrs: transistor logique MBK dont on veut calculer la capacite de */
|
||||
/* drain. */
|
||||
/* */
|
||||
/* Parametre en sortie: */
|
||||
/* ------------------- */
|
||||
/* la fonction renvoie la capcite du drain du transistor en picoF. */
|
||||
/****************************************************************************/
|
||||
elpFCT float elpLotrsCapaDrain(lotrs)
|
||||
struct lotrs *lotrs ;
|
||||
|
||||
{
|
||||
short lotrstype ; /* variable indiquant le type du transistor a traiter */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Methode de calcul des capacites: si le perimetre est manquant, la contri- */
|
||||
/* bution en perimetre sera remplacee par la contribution en largeur. Sinon, */
|
||||
/* seul le perimetre sera pris en compte. La variable 'lotrstype' contiendra */
|
||||
/* le type du transistor qu'on traite. */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
if(elpModelType == elpMOS)
|
||||
{
|
||||
lotrstype = (lotrs->TYPE == TRANSN) ? elpNMOS : elpPMOS ;
|
||||
return (float)(
|
||||
/* contribution en surface */
|
||||
((double)lotrs->XD*(double)lotrs->WIDTH / (double)(SCALE_X*SCALE_X))
|
||||
* elpCapa[lotrstype][elpCDS] +
|
||||
/* contribution en perimetre */
|
||||
((double)lotrs->PD / (double)SCALE_X ) * elpCapa[lotrstype][elpCDP] +
|
||||
/* contribution en largeur */
|
||||
((double)lotrs->WIDTH / (double)SCALE_X ) * elpCapa[lotrstype][elpCDW]) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
lotrstype = (lotrs->TYPE == TRANSN) ? elpEMES : elpDMES ;
|
||||
if(lotrs->GRID->SIG != lotrs->DRAIN->SIG)
|
||||
return(float)(
|
||||
/* contribution en surface */
|
||||
((double)lotrs->WIDTH*(double)lotrs->LENGTH / (double)(SCALE_X*SCALE_X))
|
||||
*elpCapa[lotrstype][elpCSGD]) ;
|
||||
else return(float)(0.0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* fonction LotrsCapaSource() */
|
||||
/* calcule la capacite de source d'un transistor MBK passe en parametre. */
|
||||
/* */
|
||||
/* Parametres en entree: */
|
||||
/* -------------------- */
|
||||
/* 1) lotrs: transistor logique MBK dont on veut calculer la capacite de */
|
||||
/* source. */
|
||||
/* */
|
||||
/* Parametre en sortie: */
|
||||
/* ------------------- */
|
||||
/* la fonction renvoie la capcite de la source du transistor en picoF. */
|
||||
/****************************************************************************/
|
||||
elpFCT float elpLotrsCapaSource(lotrs)
|
||||
struct lotrs *lotrs ;
|
||||
|
||||
{
|
||||
short lotrstype ; /* variable indiquant le type du transistor a traiter */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Methode de calcul des capacites: si le perimetre est manquant, la contri- */
|
||||
/* bution en perimetre sera remplacee par la contribution en largeur. Sinon, */
|
||||
/* seul le perimetre sera pris en compte. La variable 'lotrstype' contiendra */
|
||||
/* le type du transistor qu'on traite. */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
if(elpModelType == elpMOS)
|
||||
{
|
||||
lotrstype = (lotrs->TYPE == TRANSN) ? elpNMOS : elpPMOS ;
|
||||
return (float)(
|
||||
/* contribution en surface */
|
||||
((double)lotrs->XS*(double)lotrs->WIDTH / (double)(SCALE_X*SCALE_X)) * elpCapa[lotrstype][elpCSS] +
|
||||
/* contribution en perimetre */
|
||||
((double)lotrs->PS / (double)SCALE_X ) * elpCapa[lotrstype][elpCSP] +
|
||||
/* contribution en largeur */
|
||||
((double)lotrs->WIDTH / (double)SCALE_X ) * elpCapa[lotrstype][elpCSW]) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
lotrstype = (lotrs->TYPE == TRANSN) ? elpEMES : elpDMES ;
|
||||
if(lotrs->GRID->SIG != lotrs->SOURCE->SIG)
|
||||
return(float)(
|
||||
/* contribution en surface */
|
||||
((double)lotrs->WIDTH*(double)lotrs->LENGTH / (double)(SCALE_X*SCALE_X))
|
||||
*elpCapa[lotrstype][elpCSGS]) ;
|
||||
else return(float)(0.0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* fonction LotrsCapaGrid() */
|
||||
/* calcule la capacite de grille d'un transistor MBK passe en parametre. */
|
||||
/* */
|
||||
/* Parametres en entree: */
|
||||
/* -------------------- */
|
||||
/* 1) lotrs: transistor logique MBK dont on veut calculer la capacite de */
|
||||
/* grille. */
|
||||
/* */
|
||||
/* Parametre en sortie: */
|
||||
/* ------------------- */
|
||||
/* la fonction renvoie la capcite de la grille du transistor en picoF. */
|
||||
/****************************************************************************/
|
||||
elpFCT float elpLotrsCapaGrid(lotrs)
|
||||
struct lotrs *lotrs ;
|
||||
|
||||
{
|
||||
/* variable indiquant le type du transistor */
|
||||
short lotrstype ;
|
||||
|
||||
/* les parametres CGxx sont obligatoires et ne sont donc pas manquant */
|
||||
|
||||
if(elpModelType == elpMOS)
|
||||
{
|
||||
lotrstype = (lotrs->TYPE == TRANSN) ? elpNMOS : elpPMOS ;
|
||||
return(float)(
|
||||
/* contribution en surface */
|
||||
((double)lotrs->WIDTH*(double)lotrs->LENGTH / (double)(SCALE_X*SCALE_X))
|
||||
*elpCapa[lotrstype][elpCGS] +
|
||||
/* contribution en perimetre */
|
||||
(2.0*(double)lotrs->WIDTH / (double)SCALE_X)*elpCapa[lotrstype][elpCGP]) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
double cgd = 0;
|
||||
double cgs = 0;
|
||||
lotrstype = (lotrs->TYPE == TRANSN) ? elpEMES : elpDMES ;
|
||||
if(lotrs->GRID->SIG != lotrs->DRAIN->SIG) cgd = elpCapa[lotrstype][elpCSGD];
|
||||
if(lotrs->GRID->SIG != lotrs->SOURCE->SIG) cgs = elpCapa[lotrstype][elpCSGS];
|
||||
return(float)(
|
||||
/* contribution en surface */
|
||||
((double)lotrs->WIDTH*(double)lotrs->LENGTH / (double)(SCALE_X*SCALE_X))
|
||||
*(cgd + cgs)) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* fonction LofigCapaDiff() */
|
||||
/* calcule les capas de diffusion des transistors de la figure lofig */
|
||||
/* */
|
||||
/* Parametres en entree: */
|
||||
/* -------------------- */
|
||||
/* 1) lofig: figure logique MBK dont dans laquelle il faut ajouter les */
|
||||
/* capas de diffusion. */
|
||||
/* */
|
||||
/* Parametre en sortie: */
|
||||
/* ------------------- */
|
||||
/* Aucun! */
|
||||
/****************************************************************************/
|
||||
elpFCT int elpLofigCapaDiff(lofig)
|
||||
struct lofig*lofig ;
|
||||
|
||||
{
|
||||
lotrs_list *lotrs ;
|
||||
|
||||
/* si les parametres CDxx ou CSxx sont manquants => erreur 1005 */
|
||||
if(elpModelType == elpMOS)
|
||||
{
|
||||
if((
|
||||
(elpCapa[elpNMOS][elpCDS] == 0.0) &&
|
||||
(elpCapa[elpNMOS][elpCDP] == 0.0) &&
|
||||
(elpCapa[elpNMOS][elpCDW] == 0.0) &&
|
||||
(elpCapa[elpPMOS][elpCDS] == 0.0) &&
|
||||
(elpCapa[elpPMOS][elpCDP] == 0.0) &&
|
||||
(elpCapa[elpPMOS][elpCDW] == 0.0)
|
||||
) ||
|
||||
(
|
||||
(elpCapa[elpNMOS][elpCSS] == 0.0) &&
|
||||
(elpCapa[elpNMOS][elpCSP] == 0.0) &&
|
||||
(elpCapa[elpNMOS][elpCSW] == 0.0) &&
|
||||
(elpCapa[elpPMOS][elpCSS] == 0.0) &&
|
||||
(elpCapa[elpPMOS][elpCSP] == 0.0) &&
|
||||
(elpCapa[elpPMOS][elpCSW] == 0.0)
|
||||
))
|
||||
{
|
||||
elpError(1005,"diffusion") ;
|
||||
return 0 ;
|
||||
}
|
||||
}
|
||||
|
||||
for(lotrs = lofig->LOTRS ; lotrs != NULL ; lotrs = lotrs->NEXT)
|
||||
if((lotrs->PS != 0.0) && (lotrs->XS != 0.0))
|
||||
{
|
||||
if( ! lotrs->DRAIN->SIG->PRCN )
|
||||
addlorcnet( lotrs->DRAIN->SIG );
|
||||
if( ! lotrs->SOURCE->SIG->PRCN )
|
||||
addlorcnet( lotrs->SOURCE->SIG );
|
||||
addcapa( lotrs->DRAIN->SIG, elpLotrsCapaDrain(lotrs) ) ;
|
||||
addcapa( lotrs->SOURCE->SIG, elpLotrsCapaSource(lotrs) ) ;
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* fonction LofigCapaGrid() */
|
||||
/* calcule les capas de grille. */
|
||||
/* */
|
||||
/* Parametres en entree: */
|
||||
/* -------------------- */
|
||||
/* 1) lofig: figure logique MBK dont dans laquelle il faut ajouter les */
|
||||
/* capas de grille. */
|
||||
/* */
|
||||
/* Parametre en sortie: */
|
||||
/* ------------------- */
|
||||
/* Aucun! */
|
||||
/****************************************************************************/
|
||||
elpFCT int elpLofigCapaGrid(lofig)
|
||||
struct lofig *lofig ;
|
||||
|
||||
{
|
||||
lotrs_list *lotrs ;
|
||||
|
||||
for(lotrs = lofig->LOTRS ; lotrs != NULL ; lotrs = lotrs->NEXT)
|
||||
{
|
||||
if( ! lotrs->GRID->SIG->PRCN )
|
||||
addlorcnet( lotrs->GRID->SIG );
|
||||
|
||||
addcapa( lotrs->GRID->SIG, elpLotrsCapaGrid(lotrs) );
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* fonction LofigShrink() */
|
||||
/* modifie les dimensions de tous les transistors en fonction des parametres*/
|
||||
/* de shrink. */
|
||||
/* */
|
||||
/* Parametres en entree: */
|
||||
/* -------------------- */
|
||||
/* 1) lofig: figure logique MBK dont dans laquelle il faut modifier les */
|
||||
/* dimensions des transistors. */
|
||||
/* */
|
||||
/* Parametre en sortie: */
|
||||
/* ------------------- */
|
||||
/* Aucun! */
|
||||
/****************************************************************************/
|
||||
elpFCT int elpLofigShrink(lofig)
|
||||
struct lofig *lofig ;
|
||||
|
||||
{
|
||||
lotrs_list *lotrs ;
|
||||
|
||||
|
||||
for(lotrs = lofig->LOTRS ; lotrs != NULL ; lotrs = lotrs->NEXT)
|
||||
elpLotrsShrink(lotrs) ;
|
||||
|
||||
return ;
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
/****************************************************************************/
|
||||
/* */
|
||||
/* Chaine de CAO & VLSI Alliance */
|
||||
/* */
|
||||
/* Produit : ELP Verison 1 */
|
||||
/* Fichier : elp104.h */
|
||||
/* */
|
||||
/* (c) copyright 1991-1995 Laboratoire MASI equipe CAO & VLSI */
|
||||
/* Tous droits reserves */
|
||||
/* Support : e-mail cao-vlsi@masi.ibp.fr */
|
||||
/* */
|
||||
/* Auteur(s) : Payam KIANI */
|
||||
/* */
|
||||
/****************************************************************************/
|
||||
|
||||
/* les inclusions */
|
||||
#include <stdio.h>
|
||||
#include <varargs.h>
|
||||
#include "mut.h"
|
||||
#include "mlo.h"
|
||||
#include "rcn.h"
|
||||
|
||||
/* les definitions */
|
||||
|
||||
#define elperrorFCT /* identification des fonctions du fichier elperror.c */
|
||||
#define elpFCT /* identification des fonctions du fichier elp.c */
|
||||
|
||||
extern char elpLang ;
|
||||
#define elpTRANSNUM 4 /* nombre de type de transistor */
|
||||
#define elpNMOS 0 /* pour les parametres du NMOS */
|
||||
#define elpPMOS 1 /* pour les parametres du PMOS */
|
||||
#define elpEMES 2 /* pour les parametres du EMES */
|
||||
#define elpDMES 3 /* pour les parametres du DMES */
|
||||
#define elpSTRINGSIZE 256 /* taille des chaines de caracteres */
|
||||
#define elpENGLISH 'E' /* langue anglaise */
|
||||
#define elpFRENCH 'F' /* langue francaise */
|
||||
#define elpDEFLANG elpENGLISH /* langue par defaut */
|
||||
|
||||
/* definition du chemin d'acces de quelques fichiers techno */
|
||||
#define elpECPD10
|
||||
#define elpECPD12
|
||||
#define elpECPD15
|
||||
#define elpAMS12
|
||||
#define elpHCMOS5
|
||||
|
||||
/* les informations sur la technologie utilisee */
|
||||
extern char elpTechnoName[elpSTRINGSIZE] ;
|
||||
extern char elpTechnoFile[elpSTRINGSIZE] ;
|
||||
extern double elpTechnoVersion ;
|
||||
|
||||
/* les parametres du shrink du transistor */
|
||||
#define elpSHRINKNUM 10 /* nombre de parametres du tableau Shrink */
|
||||
extern double elpShrink[elpSHRINKNUM] ;
|
||||
#define elpLMLT 0 /* parametre multiplicatif de la longueur */
|
||||
#define elpWMLT 1 /* parametre multiplicatif de la largeur */
|
||||
#define elpDLN 2 /* parametre de reduction de la longueur NMOS */
|
||||
#define elpDWN 3 /* parametre de reduction de la largeur NMOS */
|
||||
#define elpDLP 4 /* parametre de reduction de la longueur PMOS */
|
||||
#define elpDWP 5 /* parametre de reduction de la largeur PMOS */
|
||||
#define elpDLE 6 /* parametre de reduction de la longueur EMES */
|
||||
#define elpDWE 7 /* parametre de reduction de la largeur EMES */
|
||||
#define elpDLD 8 /* parametre de reduction de la longueur DMES */
|
||||
#define elpDWD 9 /* parametre de reduction de la largeur DMES */
|
||||
|
||||
/* les parametres du modele des transistors (modele MCC) */
|
||||
#define elpMODELNUM 4 /* nombre de parametres pour chaque modele */
|
||||
extern double elpModel[elpTRANSNUM][elpMODELNUM] ;
|
||||
#define elpVT 0 /* tension de seuil */
|
||||
#define elpA 1 /* parametre A */
|
||||
#define elpB 2 /* parametre B */
|
||||
#define elpRT 3 /* resistance en mode lineaire */
|
||||
|
||||
/* les parametres definissant les tensions */
|
||||
#define elpVOLTNUM 4 /* nombre d'elements du tableau Voltage */
|
||||
extern double elpVoltage[elpVOLTNUM] ;
|
||||
#define elpVDDMAX 0 /* tension d'alimentation */
|
||||
#define elpVDDDEG 1 /* tension du niveau degrade haut */
|
||||
#define elpVSSDEG 2 /* tension du niveau degrade bas */
|
||||
#define elpVTHR 3 /* seuil de mesure des temps de propa */
|
||||
|
||||
/* les parametres definissant les capacites dynamiques */
|
||||
#define elpCAPANUM 10 /* nombre de capacites carrees */
|
||||
extern double elpCapa[elpTRANSNUM][elpCAPANUM] ;
|
||||
#define elpCGS 0 /* capacite grille contribution en surface */
|
||||
#define elpCGP 1 /* capacite grille contribution en perimetre */
|
||||
#define elpCDS 2 /* capacite drain contribution en surface */
|
||||
#define elpCDP 3 /* capacite drain contribution en perimetre */
|
||||
#define elpCDW 4 /* capacite drain contribution en largeur */
|
||||
#define elpCSS 5 /* capacite source contribution en surface */
|
||||
#define elpCSP 6 /* capacite source contribution en perimetre */
|
||||
#define elpCSW 7 /* capacite source contribution en largeur */
|
||||
#define elpCSGD 8 /* capacite grille drain pour le mesfet */
|
||||
#define elpCSGS 9 /* capacite grille source pour le mesfet */
|
||||
|
||||
/* les parametres du simulateur electrique */
|
||||
extern char elpEsimName[elpSTRINGSIZE] ;
|
||||
extern char elpModelName[elpSTRINGSIZE] ;
|
||||
extern double elpEsimLevel ;
|
||||
#define elpMOS 0 /* type de model de transistor mosfet */
|
||||
#define elpMES 1 /* type de model de transistor mesfet */
|
||||
|
||||
/* les parametres generaux */
|
||||
#define elpGENERALNUM 3 /* nombre de parametres du tableau General */
|
||||
extern double elpGeneral[elpGENERALNUM] ;
|
||||
#define elpACM 0 /* methode de calcul des capacites dynamiques */
|
||||
#define elpTEMP 1 /* temperature de simulation et d'analyse */
|
||||
#define elpSLOPE 2 /* front sur les connecteurs d'entree */
|
||||
|
||||
|
||||
/* les fonctions externes */
|
||||
extern int elpenv() ;
|
||||
extern short elpLoadElp() ;
|
||||
extern int elpLotrsShrink() ;
|
||||
extern float elpLotrsCapaDrain() ;
|
||||
extern float elpLotrsCapaSource() ;
|
||||
extern float elpLotrsCapaGrid() ;
|
||||
extern int elpLofigCapaDiff() ;
|
||||
extern int elpLofigCapaGrid() ;
|
||||
extern int elpLofigShrink() ;
|
||||
extern short elpError() ;
|
|
@ -0,0 +1,77 @@
|
|||
%{
|
||||
#include <stdio.h>
|
||||
#include "elp_y.h"
|
||||
#undef ECHO
|
||||
#define ECHO
|
||||
|
||||
extern double atof() ;
|
||||
%}
|
||||
|
||||
dble [0-9.eE+-]+
|
||||
|
||||
%%
|
||||
^#.*$ {ECHO ; }
|
||||
[ \t\n;]+ {ECHO ; }
|
||||
[=:] {ECHO ; return *yytext ;}
|
||||
[t,T]echnologie {ECHO ; return telpTECNAME ;}
|
||||
[v,V]ersion {ECHO ; return telpTECVER ;}
|
||||
LMLT {ECHO ; return telpLMLT ;}
|
||||
WMLT {ECHO ; return telpWMLT ;}
|
||||
DLN {ECHO ; return telpDLN ;}
|
||||
DWN {ECHO ; return telpDWN ;}
|
||||
DLP {ECHO ; return telpDLP ;}
|
||||
DWP {ECHO ; return telpDWP ;}
|
||||
DLE {ECHO ; return telpDLE ;}
|
||||
DWE {ECHO ; return telpDWE ;}
|
||||
DLD {ECHO ; return telpDLD ;}
|
||||
DWD {ECHO ; return telpDWD ;}
|
||||
VTN {ECHO ; return telpVTN ;}
|
||||
AN {ECHO ; return telpAN ;}
|
||||
BN {ECHO ; return telpBN ;}
|
||||
RNT {ECHO ; return telpRNT ;}
|
||||
VTP {ECHO ; return telpVTP ;}
|
||||
AP {ECHO ; return telpAP ;}
|
||||
BP {ECHO ; return telpBP ;}
|
||||
RPT {ECHO ; return telpRPT ;}
|
||||
VDDmax {ECHO ; return telpVDDmax ;}
|
||||
VDDdeg {ECHO ; return telpVDDdeg ;}
|
||||
VSSdeg {ECHO ; return telpVSSdeg ;}
|
||||
VTHR {ECHO ; return telpVTHR ;}
|
||||
CGSN {ECHO ; return telpCGSN ;}
|
||||
CGPN {ECHO ; return telpCGPN ;}
|
||||
CGSP {ECHO ; return telpCGSP ;}
|
||||
CGPP {ECHO ; return telpCGPP ;}
|
||||
CDSN {ECHO ; return telpCDSN ;}
|
||||
CDPN {ECHO ; return telpCDPN ;}
|
||||
CDWN {ECHO ; return telpCDWN ;}
|
||||
CDSP {ECHO ; return telpCDSP ;}
|
||||
CDPP {ECHO ; return telpCDPP ;}
|
||||
CDWP {ECHO ; return telpCDWP ;}
|
||||
CSSN {ECHO ; return telpCSSN ;}
|
||||
CSPN {ECHO ; return telpCSPN ;}
|
||||
CSWN {ECHO ; return telpCSWN ;}
|
||||
CSSP {ECHO ; return telpCSSP ;}
|
||||
CSPP {ECHO ; return telpCSPP ;}
|
||||
CSWP {ECHO ; return telpCSWP ;}
|
||||
CGDE {ECHO ; return telpCGDE ;}
|
||||
CGSE {ECHO ; return telpCGSE ;}
|
||||
CGDD {ECHO ; return telpCGDD ;}
|
||||
CGSD {ECHO ; return telpCGSD ;}
|
||||
ESIM {ECHO ; return telpESIM ;}
|
||||
MODEL {ECHO ; return telpMODEL ;}
|
||||
LEVEL {ECHO ; return telpLEVEL ;}
|
||||
ACM {ECHO ; return telpACM ;}
|
||||
TEMP {ECHO ; return telpTEMP ;}
|
||||
SLOPE {ECHO ; return telpSLOPE ;}
|
||||
{dble} {
|
||||
ECHO ;
|
||||
yylval.elpdbl = atof(yytext) ;
|
||||
return telpDOUBLE ;
|
||||
}
|
||||
[a-zA-Z&_!?$%][^ =:\t\n()]* {
|
||||
ECHO ;
|
||||
strcpy(yylval.elpstr,yytext) ;
|
||||
return telpSTRING ;
|
||||
}
|
||||
|
||||
%%
|
|
@ -0,0 +1,111 @@
|
|||
%{
|
||||
#include "elp.h"
|
||||
%}
|
||||
|
||||
%union {
|
||||
double elpdbl ;
|
||||
char elpstr[50];
|
||||
}
|
||||
|
||||
%token telpTECNAME telpTECVER telpLMLT telpWMLT telpDLN telpDLP telpDWN telpDWP
|
||||
%token telpDLE telpDLD telpDWE telpDWD
|
||||
%token telpVTN telpAN telpBN telpRNT telpVTP telpAP telpBP telpRPT
|
||||
%token telp telpVDDmax telpVDDdeg telpVSSdeg telpVTHR
|
||||
%token telpCGSN telpCGPN telpCGSP telpCGPP
|
||||
%token telpCDSN telpCDPN telpCDWN telpCDSP telpCDPP telpCDWP
|
||||
%token telpCSSN telpCSPN telpCSWN telpCSSP telpCSPP telpCSWP
|
||||
%token telpCGDE telpCGSE telpCGDD telpCGSD
|
||||
%token telpESIM telpMODEL telpLEVEL telpACM telpTEMP telpSLOPE
|
||||
%token <elpdbl> telpDOUBLE
|
||||
%token <elpstr> telpSTRING
|
||||
%start elp
|
||||
|
||||
%%
|
||||
|
||||
elp : telpTECNAME ':' telpSTRING telpTECVER ':' telpDOUBLE
|
||||
{
|
||||
strcpy(elpTechnoName,$3) ;
|
||||
elpTechnoVersion = $6 ;
|
||||
}
|
||||
variables
|
||||
;
|
||||
|
||||
variables : /* empty */
|
||||
| variables elpvar
|
||||
;
|
||||
|
||||
elpvar :
|
||||
/* les parametres de shrink des transistors */
|
||||
telpLMLT '=' telpDOUBLE {elpShrink[elpLMLT] = $3 ;}
|
||||
| telpWMLT '=' telpDOUBLE {elpShrink[elpWMLT] = $3 ;}
|
||||
| telpDLN '=' telpDOUBLE {elpShrink[elpDLN] = $3 ;}
|
||||
| telpDWN '=' telpDOUBLE {elpShrink[elpDWN] = $3 ;}
|
||||
| telpDLP '=' telpDOUBLE {elpShrink[elpDLP] = $3 ;}
|
||||
| telpDWP '=' telpDOUBLE {elpShrink[elpDWP] = $3 ;}
|
||||
| telpDLE '=' telpDOUBLE {elpShrink[elpDLE] = $3 ;}
|
||||
| telpDWE '=' telpDOUBLE {elpShrink[elpDWE] = $3 ;}
|
||||
| telpDLD '=' telpDOUBLE {elpShrink[elpDLD] = $3 ;}
|
||||
| telpDWD '=' telpDOUBLE {elpShrink[elpDWD] = $3 ;}
|
||||
|
||||
/* les caracteristiques des transistors */
|
||||
| telpVTN '=' telpDOUBLE {elpModel[elpNMOS][elpVT] = $3 ;}
|
||||
| telpAN '=' telpDOUBLE {elpModel[elpNMOS][elpA] = $3 ;}
|
||||
| telpBN '=' telpDOUBLE {elpModel[elpNMOS][elpB] = $3 ;}
|
||||
| telpRNT '=' telpDOUBLE {elpModel[elpNMOS][elpRT] = $3 ;}
|
||||
| telpVTP '=' telpDOUBLE {elpModel[elpPMOS][elpVT] = $3 ;}
|
||||
| telpAP '=' telpDOUBLE {elpModel[elpPMOS][elpA] = $3 ;}
|
||||
| telpBP '=' telpDOUBLE {elpModel[elpPMOS][elpB] = $3 ;}
|
||||
| telpRPT '=' telpDOUBLE {elpModel[elpPMOS][elpRT] = $3 ;}
|
||||
|
||||
/* les tensions */
|
||||
| telpVDDmax '=' telpDOUBLE {elpVoltage[elpVDDMAX] = $3 ;}
|
||||
| telpVDDdeg '=' telpDOUBLE {elpVoltage[elpVDDDEG] = $3 ;}
|
||||
| telpVSSdeg '=' telpDOUBLE {elpVoltage[elpVSSDEG] = $3 ;}
|
||||
| telpVTHR '=' telpDOUBLE {elpVoltage[elpVTHR] = $3 ;}
|
||||
|
||||
/* les capacites dynamiques */
|
||||
| telpCGSN '=' telpDOUBLE {elpCapa[elpNMOS][elpCGS] = $3 ;}
|
||||
| telpCGPN '=' telpDOUBLE {elpCapa[elpNMOS][elpCGP] = $3 ;}
|
||||
| telpCGSP '=' telpDOUBLE {elpCapa[elpPMOS][elpCGS] = $3 ;}
|
||||
| telpCGPP '=' telpDOUBLE {elpCapa[elpPMOS][elpCGP] = $3 ;}
|
||||
| telpCDSN '=' telpDOUBLE {elpCapa[elpNMOS][elpCDS] = $3 ;}
|
||||
| telpCDPN '=' telpDOUBLE {elpCapa[elpNMOS][elpCDP] = $3 ;}
|
||||
| telpCDWN '=' telpDOUBLE {elpCapa[elpNMOS][elpCDW] = $3 ;}
|
||||
| telpCDSP '=' telpDOUBLE {elpCapa[elpPMOS][elpCDS] = $3 ;}
|
||||
| telpCDPP '=' telpDOUBLE {elpCapa[elpPMOS][elpCDP] = $3 ;}
|
||||
| telpCDWP '=' telpDOUBLE {elpCapa[elpPMOS][elpCDW] = $3 ;}
|
||||
| telpCSSN '=' telpDOUBLE {elpCapa[elpNMOS][elpCSS] = $3 ;}
|
||||
| telpCSPN '=' telpDOUBLE {elpCapa[elpNMOS][elpCSP] = $3 ;}
|
||||
| telpCSWN '=' telpDOUBLE {elpCapa[elpNMOS][elpCSW] = $3 ;}
|
||||
| telpCSSP '=' telpDOUBLE {elpCapa[elpPMOS][elpCSS] = $3 ;}
|
||||
| telpCSPP '=' telpDOUBLE {elpCapa[elpPMOS][elpCSP] = $3 ;}
|
||||
| telpCSWP '=' telpDOUBLE {elpCapa[elpPMOS][elpCSW] = $3 ;}
|
||||
| telpCGDE '=' telpDOUBLE {elpCapa[elpEMES][elpCSGD] = $3 ;}
|
||||
| telpCGSD '=' telpDOUBLE {elpCapa[elpDMES][elpCSGS] = $3 ;}
|
||||
| telpCGDD '=' telpDOUBLE {elpCapa[elpDMES][elpCSGD] = $3 ;}
|
||||
| telpCGSE '=' telpDOUBLE {elpCapa[elpEMES][elpCSGS] = $3 ;}
|
||||
|
||||
/* les parametres du simulateur electrique */
|
||||
| telpESIM '=' telpSTRING {strcpy(elpEsimName,$3) ;}
|
||||
| telpMODEL '=' telpSTRING {strcpy(elpModelName,$3) ;}
|
||||
| telpLEVEL '=' telpDOUBLE {elpEsimLevel = $3 ;}
|
||||
|
||||
/* les parametres generaux */
|
||||
| telpACM '=' telpDOUBLE {elpGeneral[elpACM] = $3 ;}
|
||||
| telpTEMP '=' telpDOUBLE {elpGeneral[elpTEMP] = $3 ;}
|
||||
| telpSLOPE '=' telpDOUBLE {elpGeneral[elpSLOPE] = $3 ;}
|
||||
;
|
||||
%%
|
||||
|
||||
extern int yylineno ;
|
||||
extern char yytext[] ;
|
||||
|
||||
yyerror()
|
||||
|
||||
{
|
||||
elpError(1001,yytext,yylineno) ; /* si erreur de syntaxe => erreur 1001 */
|
||||
}
|
||||
|
||||
|
||||
yywrap() {return 1 ;}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
/****************************************************************************/
|
||||
/* */
|
||||
/* Chaine de CAO & VLSI Alliance */
|
||||
/* */
|
||||
/* Produit : ELP Verison 1 */
|
||||
/* Fichier : elperror.c */
|
||||
/* */
|
||||
/* (c) copyright 1991-1995 Laboratoire MASI equipe CAO & VLSI */
|
||||
/* Tous droits reserves */
|
||||
/* Support : e-mail cao-vlsi@masi.ibp.fr */
|
||||
/* */
|
||||
/* Auteur(s) : Payam KIANI */
|
||||
/* */
|
||||
/****************************************************************************/
|
||||
/* traitement des erreur elp */
|
||||
/****************************************************************************/
|
||||
|
||||
#include <varargs.h>
|
||||
#include "elp.h"
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* fonction Error() */
|
||||
/* affichage et gestion des messages. Les erreurs de la bibliotheque ELP n' */
|
||||
/* arretent pas l'execution du programme. Ce sont juste des avertissements. */
|
||||
/* C'est a celui qui travaille avec de faire ce qu'il en veut! */
|
||||
/* */
|
||||
/* Parametres en entree: */
|
||||
/* -------------------- */
|
||||
/* 1) errnum : le numero de l'erreur (> 1000 pour eviter les conflits). */
|
||||
/* 2) va_alist: la fonction est a nombre d'arguments variables. La vari- */
|
||||
/* able va_alist contient tous les autres arguments que le */
|
||||
/* numero de l'erreur. */
|
||||
/* */
|
||||
/* Parametre en sortie: */
|
||||
/* ------------------- */
|
||||
/* La fonction renvoie le numero de l'erreur. */
|
||||
/*****************************************************************************/
|
||||
elperrorFCT short elpError(errnum,va_alist)
|
||||
short errnum ;
|
||||
va_dcl
|
||||
|
||||
{
|
||||
va_list arg ;
|
||||
|
||||
if(elpLang == elpENGLISH)
|
||||
fprintf(stderr,"\n!!! elp error: %d !!!\n",errnum) ;
|
||||
else
|
||||
fprintf(stderr,"\n!!! erreur elp : %d !!!\n",errnum) ;
|
||||
|
||||
va_start(arg) ;
|
||||
|
||||
switch(errnum)
|
||||
{
|
||||
/* fichier techno ne pouvant pas s'ouvrir */
|
||||
case 1000: if(elpLang == elpENGLISH)
|
||||
fprintf(stderr,"can not open the file %s\n",
|
||||
va_arg(arg,char *)) ;
|
||||
else
|
||||
fprintf(stderr,"le fichier %s ne peut pas s'ouvrir\n",
|
||||
va_arg(arg,char *)) ;
|
||||
break ;
|
||||
|
||||
/* erreur de syntaxe dans le fichier techno */
|
||||
case 1001: if(elpLang == elpENGLISH)
|
||||
fprintf(stderr,"syntax error on %s at line %d\n",
|
||||
va_arg(arg,char *),va_arg(arg,int)) ;
|
||||
else
|
||||
fprintf(stderr,"erreur de syntaxe sur %s ligne %d\n",
|
||||
va_arg(arg,char *),va_arg(arg,int)) ;
|
||||
break ;
|
||||
|
||||
/* erreur dans le parser */
|
||||
case 1002: if(elpLang == elpENGLISH)
|
||||
fprintf(stderr,"loading error: %s\n",va_arg(arg,char *)) ;
|
||||
else
|
||||
fprintf(stderr,"erreur de chargement: %s\n",
|
||||
va_arg(arg,char *)) ;
|
||||
break ;
|
||||
|
||||
/* fichier techno ne pouvant pas etre ferme */
|
||||
case 1003: if(elpLang == elpENGLISH)
|
||||
fprintf(stderr,"can not close the file %s\n",
|
||||
va_arg(arg,char *)) ;
|
||||
else
|
||||
fprintf(stderr,"le fichier %s ne peut pas se ferme\n",
|
||||
va_arg(arg,char *)) ;
|
||||
break ;
|
||||
|
||||
/* paramtetre obligatoire manquant */
|
||||
case 1004: if(elpLang == elpENGLISH)
|
||||
fprintf(stderr,"incomplete technology file %s\n",
|
||||
va_arg(arg,char *)) ;
|
||||
else
|
||||
fprintf(stderr,"fichier techno incomplet %s\n",
|
||||
va_arg(arg,char *)) ;
|
||||
break ;
|
||||
|
||||
case 1005: if(elpLang == elpENGLISH)
|
||||
fprintf(stderr,"no %s capacitance parameters\n",
|
||||
va_arg(arg,char *)) ;
|
||||
else
|
||||
fprintf(stderr,"pas de parametre de capacite de %s\n",
|
||||
va_arg(arg,char *)) ;
|
||||
break ;
|
||||
case 1006: if(elpLang == elpENGLISH)
|
||||
fprintf(stderr,"bad transistor model name in %s \n",
|
||||
va_arg(arg,char *)) ;
|
||||
else
|
||||
fprintf(stderr,"mauvais nom de modele de transistor dans %s\n",
|
||||
va_arg(arg,char *)) ;
|
||||
break ;
|
||||
}
|
||||
|
||||
fflush(stderr) ;
|
||||
return errnum ;
|
||||
}
|
Loading…
Reference in New Issue