1 /**CFile****************************************************************
2 
3   FileName    [abcapis.h]
4 
5   SystemName  [ABC: Logic synthesis and verification system.]
6 
7   PackageName [Include this file in the external code calling ABC.]
8 
9   Synopsis    [External declarations.]
10 
11   Author      [Alan Mishchenko]
12 
13   Affiliation [UC Berkeley]
14 
15   Date        [Ver. 1.0. Started - September 29, 2012.]
16 
17   Revision    [$Id: abcapis.h,v 1.00 2012/09/29 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef MINI_AIG__abc_apis_h
22 #define MINI_AIG__abc_apis_h
23 
24 ////////////////////////////////////////////////////////////////////////
25 ///                          INCLUDES                                ///
26 ////////////////////////////////////////////////////////////////////////
27 
28 ////////////////////////////////////////////////////////////////////////
29 ///                         PARAMETERS                               ///
30 ////////////////////////////////////////////////////////////////////////
31 
32 ////////////////////////////////////////////////////////////////////////
33 ///                         BASIC TYPES                              ///
34 ////////////////////////////////////////////////////////////////////////
35 
36 ABC_NAMESPACE_HEADER_START
37 
38 typedef struct Abc_Frame_t_      Abc_Frame_t;
39 
40 ////////////////////////////////////////////////////////////////////////
41 ///                      MACRO DEFINITIONS                           ///
42 ////////////////////////////////////////////////////////////////////////
43 
44 #ifdef WIN32
45   #ifdef WIN32_NO_DLL
46     #define ABC_DLLEXPORT
47     #define ABC_DLLIMPORT
48   #else
49     #define ABC_DLLEXPORT __declspec(dllexport)
50     #define ABC_DLLIMPORT __declspec(dllimport)
51   #endif
52 #else  /* defined(WIN32) */
53 #define ABC_DLLIMPORT
54 #endif /* defined(WIN32) */
55 
56 #ifndef ABC_DLL
57 #define ABC_DLL ABC_DLLIMPORT
58 #endif
59 
60 ////////////////////////////////////////////////////////////////////////
61 ///                    FUNCTION DECLARATIONS                         ///
62 ////////////////////////////////////////////////////////////////////////
63 
64 // procedures to start and stop the ABC framework
65 extern ABC_DLL void   Abc_Start();
66 extern ABC_DLL void   Abc_Stop();
67 
68 // procedures to get the ABC framework (pAbc) and execute commands in it
69 extern ABC_DLL Abc_Frame_t * Abc_FrameGetGlobalFrame();
70 extern ABC_DLL int   Cmd_CommandExecute( Abc_Frame_t * pAbc, const char * pCommandLine );
71 
72 // procedures to input/output 'mini AIG'
73 extern ABC_DLL void   Abc_NtkInputMiniAig( Abc_Frame_t * pAbc, void * pMiniAig );
74 extern ABC_DLL void * Abc_NtkOutputMiniAig( Abc_Frame_t * pAbc );
75 extern ABC_DLL void   Abc_FrameGiaInputMiniAig( Abc_Frame_t * pAbc, void * p );
76 extern ABC_DLL void * Abc_FrameGiaOutputMiniAig( Abc_Frame_t * pAbc );
77 extern ABC_DLL void   Abc_NtkSetFlopNum( Abc_Frame_t * pAbc, int nFlops );
78 
79 // procedures to input/output 'mini LUT'
80 extern ABC_DLL void   Abc_FrameGiaInputMiniLut( Abc_Frame_t * pAbc, void * pMiniLut );
81 extern ABC_DLL void * Abc_FrameGiaOutputMiniLut( Abc_Frame_t * pAbc );
82 extern ABC_DLL char * Abc_FrameGiaOutputMiniLutAttr( Abc_Frame_t * pAbc, void * pMiniLut );
83 
84 // procedures to input/output NDR data-structure
85 extern ABC_DLL void   Abc_FrameInputNdr( Abc_Frame_t * pAbc, void * pData );
86 extern ABC_DLL void * Abc_FrameOutputNdr( Abc_Frame_t * pAbc );
87 extern ABC_DLL int  * Abc_FrameOutputNdrArray( Abc_Frame_t * pAbc );
88 
89 // procedures to set CI/CO arrival/required times
90 extern ABC_DLL void   Abc_NtkSetCiArrivalTime( Abc_Frame_t * pAbc, int iCi, float Rise, float Fall );
91 extern ABC_DLL void   Abc_NtkSetCoRequiredTime( Abc_Frame_t * pAbc, int iCo, float Rise, float Fall );
92 
93 // procedure to set AND-gate delay to tech-independent synthesis and mapping
94 extern ABC_DLL void   Abc_NtkSetAndGateDelay( Abc_Frame_t * pAbc, float Delay );
95 
96 // procedures to return the mapped network
97 extern ABC_DLL int *  Abc_NtkOutputMiniMapping( Abc_Frame_t * pAbc );
98 extern ABC_DLL void   Abc_NtkPrintMiniMapping( int * pArray );
99 extern ABC_DLL int *  Abc_FrameReadArrayMapping( Abc_Frame_t * pAbc );
100 extern ABC_DLL int *  Abc_FrameReadBoxes( Abc_Frame_t * pAbc );
101 
102 // procedures to access verifization status and a counter-example
103 extern ABC_DLL int    Abc_FrameReadProbStatus( Abc_Frame_t * pAbc );
104 extern ABC_DLL void * Abc_FrameReadCex( Abc_Frame_t * pAbc );
105 
106 // procedure to return sequential equivalences
107 extern ABC_DLL int *  Abc_FrameReadMiniAigEquivClasses( Abc_Frame_t * pAbc );
108 
109 ABC_NAMESPACE_HEADER_END
110 
111 #endif
112 
113 ////////////////////////////////////////////////////////////////////////
114 ///                       END OF FILE                                ///
115 ////////////////////////////////////////////////////////////////////////
116 
117