00001
00021 #ifndef __IO_H__
00022 #define __IO_H__
00023
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027
00031
00032 #include "abc.h"
00033
00037
00041
00042
00043 typedef enum {
00044 IO_FILE_NONE = 0,
00045 IO_FILE_AIGER,
00046 IO_FILE_BAF,
00047 IO_FILE_BLIF,
00048 IO_FILE_BLIFMV,
00049 IO_FILE_BENCH,
00050 IO_FILE_CNF,
00051 IO_FILE_DOT,
00052 IO_FILE_EDIF,
00053 IO_FILE_EQN,
00054 IO_FILE_GML,
00055 IO_FILE_LIST,
00056 IO_FILE_PLA,
00057 IO_FILE_VERILOG,
00058 IO_FILE_UNKNOWN
00059 } Io_FileType_t;
00060
00064
00065 #define IO_WRITE_LINE_LENGTH 78 // the output line length
00066
00070
00071
00072 extern Abc_Ntk_t * Io_ReadAiger( char * pFileName, int fCheck );
00073
00074 extern Abc_Ntk_t * Io_ReadBaf( char * pFileName, int fCheck );
00075
00076 extern Abc_Ntk_t * Io_ReadBlif( char * pFileName, int fCheck );
00077
00078 extern Abc_Ntk_t * Io_ReadBlifMv( char * pFileName, int fBlifMv, int fCheck );
00079
00080 extern Abc_Ntk_t * Io_ReadBench( char * pFileName, int fCheck );
00081
00082 extern Abc_Ntk_t * Io_ReadEdif( char * pFileName, int fCheck );
00083
00084 extern Abc_Ntk_t * Io_ReadEqn( char * pFileName, int fCheck );
00085
00086 extern Abc_Ntk_t * Io_ReadPla( char * pFileName, int fCheck );
00087
00088 extern Abc_Ntk_t * Io_ReadVerilog( char * pFileName, int fCheck );
00089
00090 extern void Io_WriteAiger( Abc_Ntk_t * pNtk, char * pFileName, int fWriteSymbols );
00091
00092 extern void Io_WriteBaf( Abc_Ntk_t * pNtk, char * pFileName );
00093
00094 extern void Io_WriteBlifLogic( Abc_Ntk_t * pNtk, char * pFileName, int fWriteLatches );
00095 extern void Io_WriteBlif( Abc_Ntk_t * pNtk, char * pFileName, int fWriteLatches );
00096 extern void Io_WriteTimingInfo( FILE * pFile, Abc_Ntk_t * pNtk );
00097
00098 extern void Io_WriteBlifMv( Abc_Ntk_t * pNtk, char * FileName );
00099
00100 extern int Io_WriteBench( Abc_Ntk_t * pNtk, char * FileName );
00101 extern int Io_WriteBenchLut( Abc_Ntk_t * pNtk, char * FileName );
00102
00103 extern int Io_WriteCnf( Abc_Ntk_t * pNtk, char * FileName, int fAllPrimes );
00104
00105 extern void Io_WriteDot( Abc_Ntk_t * pNtk, char * FileName );
00106 extern void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesShow, char * pFileName, int fGateNames, int fUseReverse );
00107 extern void Io_WriteDotSeq( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesShow, char * pFileName, int fGateNames, int fUseReverse );
00108
00109 extern void Io_WriteEqn( Abc_Ntk_t * pNtk, char * pFileName );
00110
00111 extern void Io_WriteGml( Abc_Ntk_t * pNtk, char * pFileName );
00112
00113 extern void Io_WriteList( Abc_Ntk_t * pNtk, char * pFileName, int fUseHost );
00114
00115 extern int Io_WritePla( Abc_Ntk_t * pNtk, char * FileName );
00116
00117 extern void Io_WriteVerilog( Abc_Ntk_t * pNtk, char * FileName );
00118
00119 extern Io_FileType_t Io_ReadFileType( char * pFileName );
00120 extern Abc_Ntk_t * Io_ReadNetlist( char * pFileName, Io_FileType_t FileType, int fCheck );
00121 extern Abc_Ntk_t * Io_Read( char * pFileName, Io_FileType_t FileType, int fCheck );
00122 extern void Io_Write( Abc_Ntk_t * pNtk, char * pFileName, Io_FileType_t FileType );
00123 extern void Io_WriteHie( Abc_Ntk_t * pNtk, char * pBaseName, char * pFileName );
00124 extern Abc_Obj_t * Io_ReadCreatePi( Abc_Ntk_t * pNtk, char * pName );
00125 extern Abc_Obj_t * Io_ReadCreatePo( Abc_Ntk_t * pNtk, char * pName );
00126 extern Abc_Obj_t * Io_ReadCreateAssert( Abc_Ntk_t * pNtk, char * pName );
00127 extern Abc_Obj_t * Io_ReadCreateLatch( Abc_Ntk_t * pNtk, char * pNetLI, char * pNetLO );
00128 extern Abc_Obj_t * Io_ReadCreateResetLatch( Abc_Ntk_t * pNtk, int fBlifMv );
00129 extern Abc_Obj_t * Io_ReadCreateResetMux( Abc_Ntk_t * pNtk, char * pResetLO, char * pDataLI, int fBlifMv );
00130 extern Abc_Obj_t * Io_ReadCreateNode( Abc_Ntk_t * pNtk, char * pNameOut, char * pNamesIn[], int nInputs );
00131 extern Abc_Obj_t * Io_ReadCreateConst( Abc_Ntk_t * pNtk, char * pName, bool fConst1 );
00132 extern Abc_Obj_t * Io_ReadCreateInv( Abc_Ntk_t * pNtk, char * pNameIn, char * pNameOut );
00133 extern Abc_Obj_t * Io_ReadCreateBuf( Abc_Ntk_t * pNtk, char * pNameIn, char * pNameOut );
00134 extern FILE * Io_FileOpen( const char * FileName, const char * PathVar, const char * Mode, int fVerbose );
00135
00136
00137 #ifdef __cplusplus
00138 }
00139 #endif
00140
00141 #endif
00142
00146