abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mainLib.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [main.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [The main package.]
8 
9  Synopsis [Here everything starts.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: main.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "base/abc/abc.h"
22 #include "mainInt.h"
23 
25 
26 
27 ////////////////////////////////////////////////////////////////////////
28 /// DECLARATIONS ///
29 ////////////////////////////////////////////////////////////////////////
30 
31 ////////////////////////////////////////////////////////////////////////
32 /// FUNCTION DEFINITIONS ///
33 ////////////////////////////////////////////////////////////////////////
34 
35 /**Function*************************************************************
36 
37  Synopsis [Initialization procedure for the library project.]
38 
39  Description [Note that when Abc_Start() is run in a static library
40  project, it does not load the resource file by default. As a result,
41  ABC is not set up the same way, as when it is run on a command line.
42  For example, some error messages while parsing files will not be
43  produced, and intermediate networks will not be checked for consistancy.
44  One possibility is to load the resource file after Abc_Start() as follows:
45  Abc_UtilsSource( Abc_FrameGetGlobalFrame() );]
46 
47  SideEffects []
48 
49  SeeAlso []
50 
51 ***********************************************************************/
52 void Abc_Start()
53 {
54  Abc_Frame_t * pAbc;
55  // added to detect memory leaks:
56 #if defined(_DEBUG) && defined(_MSC_VER)
57  _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
58 #endif
59  // start the glocal frame
60  pAbc = Abc_FrameGetGlobalFrame();
61  // source the resource file
62 // Abc_UtilsSource( pAbc );
63 }
64 
65 /**Function*************************************************************
66 
67  Synopsis [Deallocation procedure for the library project.]
68 
69  Description []
70 
71  SideEffects []
72 
73  SeeAlso []
74 
75 ***********************************************************************/
76 void Abc_Stop()
77 {
78  Abc_Frame_t * pAbc;
79  pAbc = Abc_FrameGetGlobalFrame();
80  // perform uninitializations
81  Abc_FrameEnd( pAbc );
82  // stop the framework
83  Abc_FrameDeallocate( pAbc );
84 }
85 
86 
87 ////////////////////////////////////////////////////////////////////////
88 /// END OF FILE ///
89 ////////////////////////////////////////////////////////////////////////
90 
91 
93 
void Abc_FrameDeallocate(Abc_Frame_t *p)
Definition: mainFrame.c:179
void Abc_FrameEnd(Abc_Frame_t *pAbc)
Definition: mainInit.c:128
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
void * Abc_FrameGetGlobalFrame()
Definition: mainFrame.c:593
ABC_NAMESPACE_IMPL_START void Abc_Start()
DECLARATIONS ///.
Definition: mainLib.c:52
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
void Abc_Stop()
Definition: mainLib.c:76