2 * This file is part of the Alliance CAD System
3 * Copyright (C) Laboratoire LIP6 - Département ASIM
4 * Universite Pierre et Marie Curie
6 * Home page : http://www-asim.lip6.fr/alliance/
7 * E-mail support : mailto:alliance-support@asim.lip6.fr
9 * This library is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Library General Public License as published
11 * by the Free Software Foundation; either version 2 of the License, or (at
12 * your option) any later version.
14 * Alliance VLSI CAD System is distributed in the hope that it will be
15 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
17 * Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with the GNU C Library; see the file COPYING. If not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 * Purpose : logical utility functions
27 * Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
28 * Modified by Czo <Olivier.Sirol@lip6.fr> 1997,98
29 * $Id: mlu_lib.h,v 1.42 2009/05/20 12:22:04 fabrice Exp $
36 # if defined(__STDC__) || defined(__GNUC__)
45 #define MBK_TRANS_PARALLEL (long)20034401
46 #define MBK_TRANS_MARK (long)20034402
48 extern eqt_param
*MBK_GLOBALPARAMS
;
49 extern chain_list
*MBK_GLOBALFUNC
;
50 extern ht
*MBK_MONTE_MODEL_PARAMS
;
51 extern ptype_list
*MBK_MONTE_DIST
;
52 extern ptype_list
*MBK_MONTE_PARAMS
;
54 extern void (*FlattenOnCreateLOTRS
)(lotrs_list
*tr
);
55 extern void (*FlattenOnCreateLOINS
)(loins_list
*li
);
56 extern void flattenlofig
__P((lofig_list
*ptfig
, char *insname
, char concat
));
57 extern void flattenloinslist(lofig_list
* ptfig
, chain_list
*cl
, char concat
);
58 extern void mbk_transfert_loins_params(loins_list
*li
, lofig_list
*origlf
, lofig_list
*newlf
);
59 extern void flattenlofig_bypointer( lofig_list
*ptfig
, chain_list
*ptinslist
, AdvancedNameAllocator
*ana
, char concat
);
60 extern void flatten_setup_realname_from_hiername(lofig_list
*lf
, AdvancedNameAllocator
*ana
);
61 extern lofig_list
* unflatOutsideList
__P((lofig_list
*ptfig
, char *figname
, char *insname
));
62 extern lofig_list
* flatOutsideList
__P((lofig_list
*ptfig
));
63 extern int IsInBlackList (char *figname
);
64 extern void loadBlackList ();
65 extern void deleteBlackList ();
66 extern lofig_list
* unflattenlofig
__P((lofig_list
*ptfig
, char *figname
, char *insname
, chain_list
*list
));
67 extern void rflattenlofig
__P((lofig_list
*ptfig
, char concat
, char catal
));
68 extern void loadlofig
__P((lofig_list
*ptfig
, char *name
, char mode
));
69 extern void savelofig
__P((lofig_list
*ptfig
));
70 extern void mlodebug
__P((void *head_pnt
, char *stru_name
));
71 extern losig_list
* duplosiglst
__P((losig_list
*losig_ptr
, lofig_list
*lf
));
72 extern void duplosiglim
__P((losig_list
*losig_ptr
, losig_list
*losig_rpt
));
73 extern losig_list
* duplosig
__P((losig_list
*losig_ptr
, lofig_list
*lf
));
74 extern chain_list
* dupchainlst
__P((chain_list
*chain_ptr
));
75 extern optparam_list
* dupoptparamlst
__P((optparam_list
*optparam_ptr
));
76 extern optparam_list
* dupoptparam
__P((optparam_list
*optparam_ptr
));
77 extern locon_list
* duploconlst
__P((locon_list
*locon_ptr
));
78 extern locon_list
* duplocon
__P((locon_list
*locon_ptr
));
79 extern loins_list
* duploinslst
__P((loins_list
*loins_ptr
));
80 extern loins_list
* duploins
__P((loins_list
*loins_ptr
));
81 extern lotrs_list
* duplotrslst
__P((lotrs_list
*lotrs_ptr
));
82 extern lotrs_list
* duplotrs
__P((lotrs_list
*lotrs_ptr
));
83 extern lotrs_list
* rduplotrs
__P((lotrs_list
*lotrs_ptr
));
84 loins_list
*rduploins (loins_list
*loins_ptr
);
85 extern lofig_list
* duplofiglst
__P((lofig_list
*lofig_ptr
));
86 extern lofig_list
* duplofig
__P((lofig_list
*lofig_ptr
));
87 extern lofig_list
* rduplofig
__P((lofig_list
*lofig_ptr
));
88 extern void sortlocon
__P((locon_list
**connectors
));
89 extern void sortlosig
__P((losig_list
**signals
));
90 extern losig_list
* givelosig
__P((lofig_list
*ptfig
, long index
));
91 extern int checkloconorder
__P((locon_list
*c
));
92 extern int restoredirvbe
__P((lofig_list
*lof
));
93 extern int guessextdir
__P((lofig_list
*lof
));
94 extern int restorealldir
__P((lofig_list
*lf
));
95 extern chain_list
* sort_sigs
__P((losig_list
*sig_list
, ht
*endht
));
96 extern void mbk_createsigtable
__P((lofig_list
*lofig
));
97 extern losig_list
* mbk_getlosigfromtab
__P((char *name
));
98 extern void mbk_destroysigtable
__P(());
99 extern void vectorbounds
__P((lofig_list
*ptfig
, char *radical
, int *begin
, int *end
));
100 extern int mbk_checklofig
__P((lofig_list
*fig
));
101 extern void savelofig_recursive
__P((lofig_list
*ptfig
));
102 extern char *mbk_LosigTestREGEX(losig_list
*testlosig
, char *refname
);
103 extern void flatten_parameters (lofig_list
* fig
, loins_list
*ptfatherloins
, eqt_param
* param_tab
, int x
, int y
,
104 int Tx
, int Ty
, int R
, int A
, eqt_ctx
**mc_ctx
);
106 void freeflatmodel (lofig_list
*fig
);
107 void ClearLOTRSLoconFlags(lotrs_list
*tr
);
108 void ClearAllLOTRSLoconFlags(lotrs_list
*tr
);
109 void ClearAllLoconFlags(locon_list
*lc
);
110 void ClearAllLOINSLoconFlags(loins_list
*li
);
111 void ClearLOFIGLoconFlags(lofig_list
*lf
);
113 long mbk_removeparallel(lofig_list
*ptlofig
, int remove
);
114 void mbk_restoreparallel(lofig_list
*ptlofig
);
115 void mbk_markparallel(lofig_list
*ptlofig
);
116 void mbk_unmarkparallel(lofig_list
*ptlofig
);
117 void mbk_freeparallel(lofig_list
*ptlofig
);
119 void SetBlackList(chain_list
*list
);
121 char *mbk_get_subckt_name(lotrs_list
*tr
);
122 void mbk_set_montecarlo_global_seed(unsigned int value
);
123 unsigned int mbk_get_montecarlo_global_seed(int reset
);
124 void mbk_init_montecarlo_global_seed(unsigned int value
);
125 unsigned int mbk_get_a_seed();
127 int mbk_recur_Eval(eqt_ctx
*ctx
, ht
*allparams
, char *name
, char *where
);
128 void mbk_EvalGlobalMonteCarloDistributions(eqt_ctx
*ctx
);
129 void mbk_recur_Eval_Start(eqt_ctx
*ctx
, ht
*allparams
, char *where
);
131 unsigned int mbk_signlofig( lofig_list
*ptfig
);
132 void mbk_set_transistor_instance_connector_orientation_info (lofig_list
* lf
);
134 typedef struct vcardnodeinfo
141 void mbk_addvcardnode(losig_list
*ls
, char *name
, float v
, long rcn
);
142 void mbk_CheckPowerSupplies(lofig_list
*lf
);