ioAbc.h 9.51 KB
Newer Older
Alan Mishchenko committed
1 2
/**CFile****************************************************************

Alan Mishchenko committed
3
  FileName    [ioAbc.h]
Alan Mishchenko committed
4 5 6 7 8 9 10 11 12 13 14 15 16

  SystemName  [ABC: Logic synthesis and verification system.]

  PackageName [Command processing package.]

  Synopsis    [External declarations.]

  Author      [Alan Mishchenko]
  
  Affiliation [UC Berkeley]

  Date        [Ver. 1.0. Started - June 20, 2005.]

Alan Mishchenko committed
17
  Revision    [$Id: ioAbc.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
Alan Mishchenko committed
18 19

***********************************************************************/
Alan Mishchenko committed
20

21 22
#ifndef ABC__base__io__ioAbc_h
#define ABC__base__io__ioAbc_h
Alan Mishchenko committed
23

24

Alan Mishchenko committed
25 26 27 28
////////////////////////////////////////////////////////////////////////
///                          INCLUDES                                ///
////////////////////////////////////////////////////////////////////////

29 30
#include "base/abc/abc.h"
#include "misc/extra/extra.h"
31
#include "misc/util/utilNam.h"
Alan Mishchenko committed
32 33 34 35 36

////////////////////////////////////////////////////////////////////////
///                         PARAMETERS                               ///
////////////////////////////////////////////////////////////////////////

37 38 39 40


ABC_NAMESPACE_HEADER_START

Alan Mishchenko committed
41

Alan Mishchenko committed
42 43 44 45
////////////////////////////////////////////////////////////////////////
///                         BASIC TYPES                              ///
////////////////////////////////////////////////////////////////////////

Alan Mishchenko committed
46 47 48 49 50
// network functionality
typedef enum { 
    IO_FILE_NONE = 0, 
    IO_FILE_AIGER,      
    IO_FILE_BAF,      
Alan Mishchenko committed
51
    IO_FILE_BBLIF,      
Alan Mishchenko committed
52 53 54
    IO_FILE_BLIF,      
    IO_FILE_BLIFMV,      
    IO_FILE_BENCH,      
Alan Mishchenko committed
55
    IO_FILE_BOOK,
Alan Mishchenko committed
56 57 58 59 60
    IO_FILE_CNF,      
    IO_FILE_DOT,      
    IO_FILE_EDIF,      
    IO_FILE_EQN,      
    IO_FILE_GML,      
61
    IO_FILE_JSON,      
Alan Mishchenko committed
62 63
    IO_FILE_LIST,      
    IO_FILE_PLA,      
64
    IO_FILE_MOPLA,      
65
    IO_FILE_SMV,      
Alan Mishchenko committed
66 67 68 69
    IO_FILE_VERILOG,    
    IO_FILE_UNKNOWN       
} Io_FileType_t;

Alan Mishchenko committed
70
////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
71
///                      MACRO DEFINITIONS                           ///
Alan Mishchenko committed
72 73 74 75 76 77 78 79
////////////////////////////////////////////////////////////////////////

#define  IO_WRITE_LINE_LENGTH    78    // the output line length

////////////////////////////////////////////////////////////////////////
///                    FUNCTION DECLARATIONS                         ///
////////////////////////////////////////////////////////////////////////

Alan Mishchenko committed
80 81 82 83
/*=== abcReadAiger.c ==========================================================*/
extern Abc_Ntk_t *        Io_ReadAiger( char * pFileName, int fCheck );
/*=== abcReadBaf.c ============================================================*/
extern Abc_Ntk_t *        Io_ReadBaf( char * pFileName, int fCheck );
Alan Mishchenko committed
84 85
/*=== abcReadBblif.c ============================================================*/
extern Abc_Ntk_t *        Io_ReadBblif( char * pFileName, int fCheck );
Alan Mishchenko committed
86
/*=== abcReadBlif.c ===========================================================*/
Alan Mishchenko committed
87
extern Abc_Ntk_t *        Io_ReadBlif( char * pFileName, int fCheck );
Alan Mishchenko committed
88 89
/*=== abcReadBlifMv.c =========================================================*/
extern Abc_Ntk_t *        Io_ReadBlifMv( char * pFileName, int fBlifMv, int fCheck );
Alan Mishchenko committed
90 91
/*=== abcReadBench.c ==========================================================*/
extern Abc_Ntk_t *        Io_ReadBench( char * pFileName, int fCheck );
92
extern void               Io_ReadBenchInit( Abc_Ntk_t * pNtk, char * pFileName );
Alan Mishchenko committed
93
/*=== abcReadEdif.c ===========================================================*/
Alan Mishchenko committed
94
extern Abc_Ntk_t *        Io_ReadEdif( char * pFileName, int fCheck );
Alan Mishchenko committed
95
/*=== abcReadEqn.c ============================================================*/
Alan Mishchenko committed
96
extern Abc_Ntk_t *        Io_ReadEqn( char * pFileName, int fCheck );
Alan Mishchenko committed
97
/*=== abcReadPla.c ============================================================*/
98
extern Abc_Ntk_t *        Io_ReadPla( char * pFileName, int fZeros, int fBoth, int fOnDc, int fSkipPrepro, int fCheck );
Alan Mishchenko committed
99 100 101
/*=== abcReadVerilog.c ========================================================*/
extern Abc_Ntk_t *        Io_ReadVerilog( char * pFileName, int fCheck );
/*=== abcWriteAiger.c =========================================================*/
102
extern void               Io_WriteAiger( Abc_Ntk_t * pNtk, char * pFileName, int fWriteSymbols, int fCompact, int fUnique );
103
extern void               Io_WriteAigerCex( Abc_Cex_t * pCex, Abc_Ntk_t * pNtk, void * pG, char * pFileName );
Alan Mishchenko committed
104 105
/*=== abcWriteBaf.c ===========================================================*/
extern void               Io_WriteBaf( Abc_Ntk_t * pNtk, char * pFileName );
Alan Mishchenko committed
106 107
/*=== abcWriteBblif.c ===========================================================*/
extern void               Io_WriteBblif( Abc_Ntk_t * pNtk, char * pFileName );
Alan Mishchenko committed
108 109
/*=== abcWriteBlif.c ==========================================================*/
extern void               Io_WriteBlifLogic( Abc_Ntk_t * pNtk, char * pFileName, int fWriteLatches );
110
extern void               Io_WriteBlif( Abc_Ntk_t * pNtk, char * pFileName, int fWriteLatches, int fBb2Wb, int fSeq );
Alan Mishchenko committed
111
extern void               Io_WriteTimingInfo( FILE * pFile, Abc_Ntk_t * pNtk );
112
extern void               Io_WriteBlifSpecial( Abc_Ntk_t * pNtk, char * FileName, char * pLutStruct, int fUseHie );
Alan Mishchenko committed
113 114 115
/*=== abcWriteBlifMv.c ==========================================================*/ 
extern void               Io_WriteBlifMv( Abc_Ntk_t * pNtk, char * FileName );
/*=== abcWriteBench.c =========================================================*/
116
extern int                Io_WriteBench( Abc_Ntk_t * pNtk, const char * FileName );
Alan Mishchenko committed
117
extern int                Io_WriteBenchLut( Abc_Ntk_t * pNtk, char * FileName );
Alan Mishchenko committed
118 119
/*=== abcWriteBook.c =========================================================*/
extern void               Io_WriteBook( Abc_Ntk_t * pNtk, char * FileName );
Alan Mishchenko committed
120 121 122 123 124 125 126
/*=== abcWriteCnf.c ===========================================================*/
extern int                Io_WriteCnf( Abc_Ntk_t * pNtk, char * FileName, int fAllPrimes );
/*=== abcWriteDot.c ===========================================================*/
extern void               Io_WriteDot( Abc_Ntk_t * pNtk, char * FileName );
extern void               Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesShow, char * pFileName, int fGateNames, int fUseReverse );
extern void               Io_WriteDotSeq( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesShow, char * pFileName, int fGateNames, int fUseReverse );
/*=== abcWriteEqn.c ===========================================================*/
Alan Mishchenko committed
127
extern void               Io_WriteEqn( Abc_Ntk_t * pNtk, char * pFileName );
128 129
/*=== abcWriteEdgelist.c ===========================================================*/
extern void               Io_WriteEdgelist( Abc_Ntk_t * pNtk, char * pFileName, int fWriteLatches, int fBb2Wb, int fSeq , int fName);
Alan Mishchenko committed
130
/*=== abcWriteGml.c ===========================================================*/
Alan Mishchenko committed
131
extern void               Io_WriteGml( Abc_Ntk_t * pNtk, char * pFileName );
Alan Mishchenko committed
132 133 134
/*=== abcWriteList.c ==========================================================*/
extern void               Io_WriteList( Abc_Ntk_t * pNtk, char * pFileName, int fUseHost );
/*=== abcWritePla.c ===========================================================*/
Alan Mishchenko committed
135
extern int                Io_WritePla( Abc_Ntk_t * pNtk, char * FileName );
136
extern int                Io_WriteMoPla( Abc_Ntk_t * pNtk, char * FileName );
137 138
/*=== abcWriteSmv.c ===========================================================*/
extern int                Io_WriteSmv( Abc_Ntk_t * pNtk, char * FileName );
Alan Mishchenko committed
139
/*=== abcWriteVerilog.c =======================================================*/
140
extern void               Io_WriteVerilog( Abc_Ntk_t * pNtk, char * FileName, int fOnlyAnds );
Alan Mishchenko committed
141 142
/*=== abcUtil.c ===============================================================*/
extern Io_FileType_t      Io_ReadFileType( char * pFileName );
143
extern Io_FileType_t      Io_ReadLibType( char * pFileName );
Alan Mishchenko committed
144
extern Abc_Ntk_t *        Io_ReadNetlist( char * pFileName, Io_FileType_t FileType, int fCheck );
145
extern Abc_Ntk_t *        Io_Read( char * pFileName, Io_FileType_t FileType, int fCheck, int fBarBufs );
Alan Mishchenko committed
146 147 148 149 150 151 152 153
extern void               Io_Write( Abc_Ntk_t * pNtk, char * pFileName, Io_FileType_t FileType );
extern void               Io_WriteHie( Abc_Ntk_t * pNtk, char * pBaseName, char * pFileName );
extern Abc_Obj_t *        Io_ReadCreatePi( Abc_Ntk_t * pNtk, char * pName );
extern Abc_Obj_t *        Io_ReadCreatePo( Abc_Ntk_t * pNtk, char * pName );
extern Abc_Obj_t *        Io_ReadCreateLatch( Abc_Ntk_t * pNtk, char * pNetLI, char * pNetLO );
extern Abc_Obj_t *        Io_ReadCreateResetLatch( Abc_Ntk_t * pNtk, int fBlifMv );
extern Abc_Obj_t *        Io_ReadCreateResetMux( Abc_Ntk_t * pNtk, char * pResetLO, char * pDataLI, int fBlifMv );
extern Abc_Obj_t *        Io_ReadCreateNode( Abc_Ntk_t * pNtk, char * pNameOut, char * pNamesIn[], int nInputs );
154
extern Abc_Obj_t *        Io_ReadCreateConst( Abc_Ntk_t * pNtk, char * pName, int fConst1 );
Alan Mishchenko committed
155 156 157 158
extern Abc_Obj_t *        Io_ReadCreateInv( Abc_Ntk_t * pNtk, char * pNameIn, char * pNameOut );
extern Abc_Obj_t *        Io_ReadCreateBuf( Abc_Ntk_t * pNtk, char * pNameIn, char * pNameOut );
extern FILE *             Io_FileOpen( const char * FileName, const char * PathVar, const char * Mode, int fVerbose );

159 160 161
/*=== ioJson.c ===========================================================*/
extern void               Io_ReadJson( char * pFileName );
extern void               Io_WriteJson( char * pFileName );
Alan Mishchenko committed
162

163 164 165 166 167


ABC_NAMESPACE_HEADER_END


Alan Mishchenko committed
168 169

#endif
Alan Mishchenko committed
170

Alan Mishchenko committed
171 172 173 174
////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////