abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mainInit.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [mainInit.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [The main package.]
8 
9  Synopsis [Initialization procedures.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: mainInit.c,v 1.3 2005/09/14 22:53:37 casem Exp $]
18 
19 ***********************************************************************/
20 
21 #include "base/abc/abc.h"
22 #include "mainInt.h"
23 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 extern void Abc_Init( Abc_Frame_t * pAbc );
31 extern void Abc_End ( Abc_Frame_t * pAbc );
32 extern void Io_Init( Abc_Frame_t * pAbc );
33 extern void Io_End ( Abc_Frame_t * pAbc );
34 extern void Cmd_Init( Abc_Frame_t * pAbc );
35 extern void Cmd_End ( Abc_Frame_t * pAbc );
36 extern void If_Init( Abc_Frame_t * pAbc );
37 extern void If_End ( Abc_Frame_t * pAbc );
38 extern void Map_Init( Abc_Frame_t * pAbc );
39 extern void Map_End ( Abc_Frame_t * pAbc );
40 extern void Mio_Init( Abc_Frame_t * pAbc );
41 extern void Mio_End ( Abc_Frame_t * pAbc );
42 extern void Super_Init( Abc_Frame_t * pAbc );
43 extern void Super_End ( Abc_Frame_t * pAbc );
44 extern void Libs_Init( Abc_Frame_t * pAbc );
45 extern void Libs_End( Abc_Frame_t * pAbc );
46 extern void Load_Init( Abc_Frame_t * pAbc );
47 extern void Load_End( Abc_Frame_t * pAbc );
48 extern void Scl_Init( Abc_Frame_t * pAbc );
49 extern void Scl_End( Abc_Frame_t * pAbc );
50 extern void Wlc_Init( Abc_Frame_t * pAbc );
51 extern void Wlc_End( Abc_Frame_t * pAbc );
52 extern void Cba_Init( Abc_Frame_t * pAbc );
53 extern void Cba_End( Abc_Frame_t * pAbc );
54 extern void Test_Init( Abc_Frame_t * pAbc );
55 extern void Test_End( Abc_Frame_t * pAbc );
56 extern void Abc2_Init( Abc_Frame_t * pAbc );
57 extern void Abc2_End ( Abc_Frame_t * pAbc );
58 extern void Abc85_Init( Abc_Frame_t * pAbc );
59 extern void Abc85_End( Abc_Frame_t * pAbc );
60 
63 
65 {
66  if( ! s_InitializerStart )
67  s_InitializerStart = p;
68 
69  p->next = NULL;
71 
72  if ( s_InitializerEnd )
73  s_InitializerEnd->next = p;
74 
75  s_InitializerEnd = p;
76 
77 }
78 
79 ////////////////////////////////////////////////////////////////////////
80 /// FUNCTION DEFINITIONS ///
81 ////////////////////////////////////////////////////////////////////////
82 
83 /**Function*************************************************************
84 
85  Synopsis [Starts all the packages.]
86 
87  Description []
88 
89  SideEffects []
90 
91  SeeAlso []
92 
93 ***********************************************************************/
94 void Abc_FrameInit( Abc_Frame_t * pAbc )
95 {
97  Cmd_Init( pAbc );
98  Cmd_CommandExecute( pAbc, "set checkread" );
99  Io_Init( pAbc );
100  Abc_Init( pAbc );
101  If_Init( pAbc );
102  Map_Init( pAbc );
103  Mio_Init( pAbc );
104  Super_Init( pAbc );
105  Libs_Init( pAbc );
106  Load_Init( pAbc );
107  Scl_Init( pAbc );
108  Wlc_Init( pAbc );
109  Cba_Init( pAbc );
110  Test_Init( pAbc );
111  for( p = s_InitializerStart ; p ; p = p->next )
112  if(p->init)
113  p->init(pAbc);
114 }
115 
116 
117 /**Function*************************************************************
118 
119  Synopsis [Stops all the packages.]
120 
121  Description []
122 
123  SideEffects []
124 
125  SeeAlso []
126 
127 ***********************************************************************/
128 void Abc_FrameEnd( Abc_Frame_t * pAbc )
129 {
131  for( p = s_InitializerEnd ; p ; p = p->prev )
132  if ( p->destroy )
133  p->destroy(pAbc);
134  Abc_End( pAbc );
135  Io_End( pAbc );
136  Cmd_End( pAbc );
137  If_End( pAbc );
138  Map_End( pAbc );
139  Mio_End( pAbc );
140  Super_End( pAbc );
141  Libs_End( pAbc );
142  Load_End( pAbc );
143  Scl_End( pAbc );
144  Wlc_End( pAbc );
145  Cba_End( pAbc );
146  Test_End( pAbc );
147 }
148 
149 
150 ////////////////////////////////////////////////////////////////////////
151 /// END OF FILE ///
152 ////////////////////////////////////////////////////////////////////////
153 
154 
156 
void Wlc_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: wlcCom.c:56
void Mio_End(Abc_Frame_t *pAbc)
Definition: mio.c:107
void Scl_Init(Abc_Frame_t *pAbc)
Definition: scl.c:91
Abc_Frame_Initialization_Func destroy
Definition: mainInt.h:141
void Load_Init(Abc_Frame_t *pAbc)
Definition: cmdLoad.c:182
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Load_End(Abc_Frame_t *pAbc)
Definition: cmdLoad.c:217
int Cmd_CommandExecute(void *pAbc, char *pCommandLine)
void If_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: ifCom.c:51
void Map_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: mapper.c:48
void Cmd_End(Abc_Frame_t *pAbc)
Definition: cmd.c:127
void Abc2_End(Abc_Frame_t *pAbc)
void Cmd_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: cmd.c:79
void Test_End(Abc_Frame_t *pAbc)
Definition: test.c:60
Abc_FrameInitializer_t * next
Definition: mainInt.h:143
void Abc_FrameEnd(Abc_Frame_t *pAbc)
Definition: mainInit.c:128
void Abc_FrameAddInitializer(Abc_FrameInitializer_t *p)
Definition: mainInit.c:64
void Io_End(Abc_Frame_t *pAbc)
Definition: io.c:153
void Abc85_Init(Abc_Frame_t *pAbc)
void Libs_End(Abc_Frame_t *pAbc)
Definition: libSupport.c:199
void Libs_Init(Abc_Frame_t *pAbc)
Definition: libSupport.c:193
void If_End(Abc_Frame_t *pAbc)
Definition: ifCom.c:75
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
Abc_FrameInitializer_t * prev
Definition: mainInt.h:144
static Abc_FrameInitializer_t * s_InitializerEnd
Definition: mainInit.c:62
void Super_End(Abc_Frame_t *pAbc)
Definition: super.c:65
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
void Mio_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: mio.c:83
void Map_End(Abc_Frame_t *pAbc)
Definition: mapper.c:64
void Scl_End(Abc_Frame_t *pAbc)
Definition: scl.c:115
void Abc85_End(Abc_Frame_t *pAbc)
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
void Io_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: io.c:95
void Super_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: super.c:48
void Cba_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: cbaCom.c:55
void Abc_End(Abc_Frame_t *pAbc)
Definition: abc.c:1108
void Wlc_End(Abc_Frame_t *pAbc)
Definition: wlcCom.c:76
Abc_Frame_Initialization_Func init
Definition: mainInt.h:140
void Cba_End(Abc_Frame_t *pAbc)
Definition: cbaCom.c:75
ABC_NAMESPACE_IMPL_START void Abc_Init(Abc_Frame_t *pAbc)
DECLARATIONS ///.
Definition: abc.c:679
static Abc_FrameInitializer_t * s_InitializerStart
Definition: mainInit.c:61
void Test_Init(Abc_Frame_t *pAbc)
DECLARATIONS ///.
Definition: test.c:45
void Abc_FrameInit(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: mainInit.c:94
void Abc2_Init(Abc_Frame_t *pAbc)