34static void Io_NtkEdgelistWrite( FILE * pFile,
Abc_Ntk_t * pNtk,
int fWriteLatches,
int fBb2Wb,
int fSeq ,
int fName);
35static void Io_NtkEdgelistWriteOne( FILE * pFile,
Abc_Ntk_t * pNtk,
int fWriteLatches,
int fBb2Wb,
int fSeq ,
int fName);
36static void Io_NtkEdgelistWritePis( FILE * pFile,
Abc_Ntk_t * pNtk,
int fWriteLatches );
37static void Io_NtkEdgelistWritePos( FILE * pFile,
Abc_Ntk_t * pNtk,
int fWriteLatches );
38static void Io_NtkEdgelistWriteSubckt( FILE * pFile,
Abc_Obj_t * pNode );
39static void Io_NtkEdgelistWriteAsserts( FILE * pFile,
Abc_Ntk_t * pNtk );
40static void Io_NtkEdgelistWriteNodeFanins( FILE * pFile,
Abc_Obj_t * pNode,
int fName);
41static int Io_NtkEdgelistWriteNode( FILE * pFile,
Abc_Obj_t * pNode,
int Length,
int fName);
42static void Io_NtkEdgelistWriteLatch( FILE * pFile,
Abc_Obj_t * pLatch ,
int fName);
63 pFile = fopen( FileName,
"w" );
66 fprintf( stdout,
"Io_WriteEdgelist(): Cannot open the output file.\n" );
69 fprintf( stdout,
"WriteEdgelist (Verilog-to-PyG @ https://github.com/ycunxi/Verilog-to-PyG) starts writing to %s.\n", FileName );
70 fprintf( pFile,
"# Benchmark Edgelist Dumping (beta) \"%s\" written by ABC on %s (more at https://github.com/ycunxi/Verilog-to-PyG)\n", pNtk->
pName,
Extra_TimeStamp() );
72 Io_NtkEdgelistWrite( pFile, pNtk, fWriteLatches, fBb2Wb, fSeq , fName);
76 if ( Abc_NtkBlackboxNum(pNtk) > 0 || Abc_NtkWhiteboxNum(pNtk) > 0 )
81 if ( pNtkTemp == pNtk )
83 fprintf( pFile,
"\n\n" );
84 Io_NtkEdgelistWrite( pFile, pNtkTemp, fWriteLatches, fBb2Wb, fSeq, fName);
104 assert( Abc_NtkIsNetlist(pNtk) );
108 Io_NtkEdgelistWriteOne( pFile, pNtk, fWriteLatches, fBb2Wb, fSeq , fName);
110 pExdc = Abc_NtkExdc( pNtk );
113 fprintf( pFile,
"\n" );
114 fprintf( pFile,
".exdc\n" );
115 Io_NtkEdgelistWriteOne( pFile, pExdc, fWriteLatches, fBb2Wb, fSeq , fName);
120void Io_NtkEdgelistWrite( FILE * pFile,
Abc_Ntk_t * pNtk,
int fWriteLatches,
int fBb2Wb,
int fSeq ,
int fName)
122 if( Abc_NtkIsNetlist(pNtk) )
148 fprintf( pFile,
".attrib white box seq\n" );
152 fprintf( pFile,
".attrib white box comb\n" );
153 fprintf( pFile,
".delay 1\n" );
159 Io_NtkEdgelistWritePis( pFile, pNtk, 1 );
161 fprintf( pFile,
" %s_in\n",
Abc_ObjName(Abc_ObjFanin0(pObj)) );
163 fprintf( pFile,
" %s\n",
Abc_ObjName(Abc_ObjFanin0(pObj)) );
164 for ( v = 0; v < Abc_NtkPiNum(pNtk); v++ )
165 fprintf( pFile,
"1" );
166 fprintf( pFile,
" 1\n" );
187 int RetValue =
Kit_TruthIsop( (
unsigned *)&uTruth, nVars, vCover, 1 );
188 assert( RetValue == 0 || RetValue == 1 );
190 if ( Vec_IntSize(vCover) == 0 || (Vec_IntSize(vCover) == 1 && Vec_IntEntry(vCover,0) == 0) )
192 char * pStr0 =
" 0\n", * pStr1 =
" 1\n";
194 return Vec_IntSize(vCover) == 0 ? pStr0 : pStr1;
215void Io_NtkEdgelistWriteOne( FILE * pFile,
Abc_Ntk_t * pNtk,
int fWriteLatches,
int fBb2Wb,
int fSeq ,
int fName)
221 Io_NtkEdgelistWritePis( pFile, pNtk, fWriteLatches );
223 if ( Abc_NtkHasBlackbox( pNtk ) )
228 fprintf( pFile,
".blackbox\n" );
236 if ( fWriteLatches && !Abc_NtkIsComb(pNtk) )
240 Io_NtkEdgelistWriteLatch( pFile, pLatch , fName);
246 if ( Abc_NtkBlackboxNum(pNtk) > 0 || Abc_NtkWhiteboxNum(pNtk) > 0 )
248 fprintf( pFile,
"\n" );
250 Io_NtkEdgelistWriteSubckt( pFile, pNode );
251 fprintf( pFile,
"\n" );
253 Io_NtkEdgelistWriteSubckt( pFile, pNode );
254 fprintf( pFile,
"\n" );
262 Extra_ProgressBarUpdate( pProgress, i, NULL );
263 if ( Io_NtkEdgelistWriteNode( pFile, pNode, Length, fName) )
267 Io_NtkEdgelistWritePos( pFile, pNtk, fWriteLatches );
284void Io_NtkEdgelistWritePis( FILE * pFile,
Abc_Ntk_t * pNtk,
int fWriteLatches )
299 pNet = Abc_ObjFanout0(pTerm);
309 fprintf( pFile,
"%d %d Pi 00\n", Abc_ObjId(pTerm), Abc_ObjId(pNet) );
312 LineLength += AddedLength;
320 pNet = Abc_ObjFanout0(pTerm);
330 fprintf( pFile,
"%d %d Pi 00\n", Abc_ObjId(pTerm), Abc_ObjId(pNet) );
333 LineLength += AddedLength;
350void Io_NtkEdgelistWritePos( FILE * pFile,
Abc_Ntk_t * pNtk,
int fWriteLatches )
365 pNet = Abc_ObjFanin0(pTerm);
375 fprintf( pFile,
"%d %d Po 00\n",Abc_ObjId(pNet), Abc_ObjId(pTerm) );
377 LineLength += AddedLength;
385 pNet = Abc_ObjFanin0(pTerm);
396 fprintf( pFile,
"%d %d Po 00\n",Abc_ObjId(pNet), Abc_ObjId(pTerm) );
398 LineLength += AddedLength;
415void Io_NtkEdgelistWriteSubckt( FILE * pFile,
Abc_Obj_t * pNode )
422 fprintf( pFile,
".subckt %s", Abc_NtkName(pModel) );
426 fprintf( pFile,
" %s",
Abc_ObjName(Abc_ObjFanout0(pTerm)) );
427 pTerm = Abc_ObjFanin( pNode, i );
428 fprintf( pFile,
"=%s",
Abc_ObjName(Abc_ObjFanin0(pTerm)) );
432 fprintf( pFile,
" %s",
Abc_ObjName(Abc_ObjFanin0(pTerm)) );
433 pTerm = Abc_ObjFanout( pNode, i );
434 fprintf( pFile,
"=%s",
Abc_ObjName(Abc_ObjFanout0(pTerm)) );
436 fprintf( pFile,
"\n" );
450void Io_NtkEdgelistWriteLatch( FILE * pFile,
Abc_Obj_t * pLatch ,
int fName)
454 pNetLi = Abc_ObjFanin0( Abc_ObjFanin0(pLatch) );
455 pNetLo = Abc_ObjFanout0( Abc_ObjFanout0(pLatch) );
456 Reset = (int)(ABC_PTRUINT_T)Abc_ObjData( pLatch );
464 fprintf( pFile,
"%d", Abc_ObjId(pNetLi) );
465 fprintf( pFile,
" %d", Abc_ObjId(pNetLo) );
468 fprintf( pFile,
" REG %d\n", Reset-1 );
484void Io_NtkEdgelistWriteNodeFanins( FILE * pFile,
Abc_Obj_t * pNode ,
int fName)
502 AddedLength =
strlen(pName) + 1;
505 fprintf( pFile,
" \\\n" );
514 fprintf( pFile,
"%d", Abc_ObjId(pNet) );
516 LineLength += AddedLength;
522 AddedLength =
strlen(pName) + 1;
523 if ( NameCounter && LineLength + AddedLength > 75 )
525 fprintf( pFile,
" \\\n" );
532 temp = Abc_UtilStrsav((
char*)Abc_ObjData(pNode));
535 temp[len - 1] =
'\0';
536 temp[len - 2] =
'\0';
537 temp[len - 3] =
'\0';
540 if (Abc_ObjIsCi(pNode))
541 fprintf( pFile,
" %s Pi AIG %s\n",
Abc_ObjName(Abc_ObjFanout0(pNode)), temp);
542 else if (Abc_ObjIsCo(Abc_ObjFanout0(pNode)))
543 fprintf( pFile,
" %s AIG Po %s\n",
Abc_ObjName(Abc_ObjFanout0(pNode)), temp);
545 fprintf( pFile,
" %s AIG %s\n",
Abc_ObjName(Abc_ObjFanout0(pNode)), temp);
549 if (Abc_ObjIsCi(pNode))
550 fprintf( pFile,
" %d Pi AIG %s\n", Abc_ObjId(Abc_ObjFanout0(pNode)), temp);
551 else if (Abc_ObjIsCo(Abc_ObjFanout0(pNode)))
552 fprintf( pFile,
" %d AIG Po %s\n", Abc_ObjId(Abc_ObjFanout0(pNode)), temp);
554 fprintf( pFile,
" %d AIG %s\n", Abc_ObjId(Abc_ObjFanout0(pNode)), temp);
606 AddedLength =
strlen(pName) + 1;
607 fprintf( pFile,
" m%d", Abc_ObjId(pNode) );
615 AddedLength =
strlen(pName) + 3;
618 fprintf( pFile,
" \\\n" );
623 fprintf( pFile,
" %c=%s",
'a'+i, pName );
624 LineLength += AddedLength;
631 AddedLength =
strlen(pName) + 3;
632 if ( NameCounter && LineLength + AddedLength > 75 )
634 fprintf( pFile,
" \\\n" );
639 fprintf( pFile,
" %c=%s",
'o', pName );
656 static int fReport = 0;
663 fprintf( pFile,
"%s ",
Abc_ObjName( Abc_ObjFanin(pNode,i) ) );
665 fprintf( pFile,
"%d ", Abc_ObjId( Abc_ObjFanin(pNode,i) ) );
668 assert ( i == Abc_ObjFaninNum(pNode) );
670 fprintf( pFile,
"%s",
Abc_ObjName( Abc_ObjFanout0(pNode) ) );
672 fprintf( pFile,
"%d", Abc_ObjId( Abc_ObjFanout0(pNode) ) );
684 if ( pNode2 == NULL )
687 fReport = 1, printf(
"Warning: Missing second output of gate(s) \"%s\".\n",
Mio_GateReadName(pGate) );
690 fprintf( pFile,
" %s",
Abc_ObjName( Abc_ObjFanout0(pNode2) ) );
708int Io_NtkEdgelistWriteNode( FILE * pFile,
Abc_Obj_t * pNode,
int Length,
int fName)
711 if ( Abc_NtkHasMapping(pNode->
pNtk) )
714 if ( Abc_ObjIsBarBuf(pNode) )
716 printf(
"ERROR: not implemented\n");
718 fprintf( pFile,
".barbuf " );
720 fprintf( pFile,
"\n" );
726 fprintf( pFile,
"\n" );
733 Io_NtkEdgelistWriteNodeFanins( pFile, pNode, fName);
754 fprintf( pFile,
".subckt" );
756 fprintf( pFile,
"\n" );
775 int i, nVars = Abc_ObjFaninNum(pNode);
778 printf(
"Node \"%s\" has more than 7 inputs. Writing Edgelist has failed.\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
782 fprintf( pFile,
"\n" );
788 fprintf( pFile,
" %s ",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
790 fprintf( pFile,
"%s\n", (
char*)Abc_ObjData(pNode) );
802 word z, uTruth6 = 0, uTruth7[2], Cofs6[2], Cofs7[2][2];
803 int c, iVar, nVarsMin[2], pVars[2][10];
807 pVars[0][i] = pVars[1][i] = i;
834 assert( nVarsMin[0] < 5 );
835 assert( nVarsMin[1] < 5 );
838 fprintf( pFile,
" %s",
Abc_ObjName(Abc_ObjFanin(pNode,iVar)) );
839 fprintf( pFile,
" %s_cascade0",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
840 fprintf( pFile,
" %s_cascade1",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
841 fprintf( pFile,
" %s\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
842 fprintf( pFile,
"1-1 1\n01- 1\n" );
844 for ( c = 0; c < 2; c++ )
847 (
word)(nVars == 7 ? Cofs7[c][0] : Cofs6[c]), nVarsMin[c], vCover );
849 for ( i = 0; i < nVarsMin[c]; i++ )
850 fprintf( pFile,
" %s",
Abc_ObjName(Abc_ObjFanin(pNode,pVars[c][i])) );
851 fprintf( pFile,
" %s_cascade%d\n",
Abc_ObjName(Abc_ObjFanout0(pNode)), c );
852 fprintf( pFile,
"%s", pSop );
856 assert( nVars == 6 || nVars == 7 );
871 printf(
"Node \"%s\" is not decomposable. Writing Edgelist has failed.\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
876 for ( c = 1; c >= 0; c-- )
879 uTruth7[c] = ((c ? z >> 32 : z) & 0xffff);
880 uTruth7[c] |= (uTruth7[c] << 16);
881 uTruth7[c] |= (uTruth7[c] << 32);
882 for ( i = 0; i < 4; i++ )
883 pVars[c][i] = (z >> (c*32+16+4*i)) & 7;
890 for ( i = 0; i < nVarsMin[c]; i++ )
891 if ( pVars[c][i] == 7 )
892 fprintf( pFile,
" %s_cascade",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
894 fprintf( pFile,
" %s",
Abc_ObjName(Abc_ObjFanin(pNode,pVars[c][i])) );
895 fprintf( pFile,
" %s%s\n",
Abc_ObjName(Abc_ObjFanout0(pNode)), c?
"" :
"_cascade" );
899 (
word)Cofs6[c], nVarsMin[c], vCover );
900 fprintf( pFile,
"%s", pSop );
919 int nLeaves = Abc_ObjFaninNum(pNode);
920 int i, nLutLeaf, nLutLeaf2, nLutRoot, Length;
924 if ( Length != 2 && Length != 3 )
926 printf(
"Wrong LUT struct (%s)\n", pStr );
929 for ( i = 0; i < Length; i++ )
930 if ( pStr[i] -
'0' < 3 || pStr[i] -
'0' > 6 )
932 printf(
"The LUT size (%d) should belong to {3,4,5,6}.\n", pStr[i] -
'0' );
936 nLutLeaf = pStr[0] -
'0';
937 nLutLeaf2 = ( Length == 3 ) ? pStr[1] -
'0' : 0;
938 nLutRoot = pStr[Length-1] -
'0';
939 if ( nLeaves > nLutLeaf - 1 + (nLutLeaf2 ? nLutLeaf2 - 1 : 0) + nLutRoot )
941 printf(
"The node size (%d) is too large for the LUT structure %s.\n", nLeaves, pStr );
946 fprintf( pFile,
"\n" );
947 if ( nLeaves <= Abc_MaxInt( nLutLeaf2, Abc_MaxInt(nLutLeaf, nLutRoot) ) )
954 fprintf( pFile,
" %s ",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
956 fprintf( pFile,
"%s\n", (
char*)Abc_ObjData(pNode) );
963 static word TruthStore[16][1<<10] = {{0}}, * pTruths[16];
964 word pCube[1<<10], pRes[1<<10], Func0, Func1, Func2;
965 char pLut0[32], pLut1[32], pLut2[32] = {0}, * pSop;
968 if ( TruthStore[0][0] == 0 )
970 static word Truth6[6] = {
979 int nWordsMax = (1 << 10);
982 for ( i = 0; i < nVarsMax; i++ )
983 pTruths[i] = TruthStore[i];
984 for ( i = 0; i < 6; i++ )
985 for ( k = 0; k < nWordsMax; k++ )
986 pTruths[i][k] = Truth6[i];
987 for ( i = 6; i < nVarsMax; i++ )
988 for ( k = 0; k < nWordsMax; k++ )
989 pTruths[i][k] = ((k >> (i-6)) & 1) ? ~(
word)0 : 0;
998 if ( Kit_TruthIsConst0((
unsigned *)pRes, nLeaves) || Kit_TruthIsConst1((
unsigned *)pRes, nLeaves) )
1000 fprintf( pFile,
"%s\n const%d\n",
Abc_ObjName(Abc_ObjFanout0(pNode)), Kit_TruthIsConst1((
unsigned *)pRes, nLeaves) );
1010 if ( !
If_CluCheckExt( NULL, pRes, nLeaves, nLutLeaf, nLutRoot, pLut0, pLut1, &Func0, &Func1 ) )
1012 Extra_PrintHex( stdout, (
unsigned *)pRes, nLeaves ); printf(
" " );
1014 printf(
"Node \"%s\" is not decomposable. Writing BLIF has failed.\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1020 if ( !
If_CluCheckExt3( NULL, pRes, nLeaves, nLutLeaf, nLutLeaf2, nLutRoot, pLut0, pLut1, pLut2, &Func0, &Func1, &Func2 ) )
1022 Extra_PrintHex( stdout, (
unsigned *)pRes, nLeaves ); printf(
" " );
1024 printf(
"Node \"%s\" is not decomposable. Writing BLIF has failed.\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1031 for ( i = 0; i < pLut1[0]; i++ )
1032 fprintf( pFile,
" %s",
Abc_ObjName(Abc_ObjFanin(pNode,pLut1[2+i])) );
1033 fprintf( pFile,
" %s_lut1\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1036 fprintf( pFile,
"%s", pSop );
1038 if ( Length == 3 && pLut2[0] > 0 )
1042 for ( i = 0; i < pLut2[0]; i++ )
1043 if ( pLut2[2+i] == nLeaves )
1044 fprintf( pFile,
" %s_lut1",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1046 fprintf( pFile,
" %s",
Abc_ObjName(Abc_ObjFanin(pNode,pLut2[2+i])) );
1047 fprintf( pFile,
" %s_lut2\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1050 fprintf( pFile,
"%s", pSop );
1055 for ( i = 0; i < pLut0[0]; i++ )
1056 if ( pLut0[2+i] == nLeaves )
1057 fprintf( pFile,
" %s_lut1",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1058 else if ( pLut0[2+i] == nLeaves+1 )
1059 fprintf( pFile,
" %s_lut2",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1061 fprintf( pFile,
" %s",
Abc_ObjName(Abc_ObjFanin(pNode,pLut0[2+i])) );
1062 fprintf( pFile,
" %s\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1065 fprintf( pFile,
"%s", pSop );
1083 int nLeaves = Abc_ObjFaninNum(pNode);
1084 int i, nLutLeaf, nLutLeaf2, nLutRoot, Length;
1098 if ( Length != 2 && Length != 3 )
1100 printf(
"Wrong LUT struct (%s)\n", pStr );
1103 for ( i = 0; i < Length; i++ )
1104 if ( pStr[i] -
'0' < 3 || pStr[i] -
'0' > 6 )
1106 printf(
"The LUT size (%d) should belong to {3,4,5,6}.\n", pStr[i] -
'0' );
1110 nLutLeaf = pStr[0] -
'0';
1111 nLutLeaf2 = ( Length == 3 ) ? pStr[1] -
'0' : 0;
1112 nLutRoot = pStr[Length-1] -
'0';
1113 if ( nLeaves > nLutLeaf - 1 + (nLutLeaf2 ? nLutLeaf2 - 1 : 0) + nLutRoot )
1115 printf(
"The node size (%d) is too large for the LUT structure %s.\n", nLeaves, pStr );
1120 if ( nLeaves <= Abc_MaxInt( nLutLeaf2, Abc_MaxInt(nLutLeaf, nLutRoot) ) )
1125 fprintf( pFile,
"%c",
'a' + i );
1127 fprintf( pFile,
" %s",
"o" );
1129 fprintf( pFile,
" %s\n", (
char*)Abc_ObjData(pNode) );
1137 static word TruthStore[16][1<<10] = {{0}}, * pTruths[16];
1138 word pCube[1<<10], pRes[1<<10], Func0, Func1, Func2;
1139 char pLut0[32], pLut1[32], pLut2[32] = {0}, * pSop;
1142 if ( TruthStore[0][0] == 0 )
1144 static word Truth6[6] = {
1153 int nWordsMax = (1 << 10);
1155 assert( nVarsMax <= 16 );
1156 for ( i = 0; i < nVarsMax; i++ )
1157 pTruths[i] = TruthStore[i];
1158 for ( i = 0; i < 6; i++ )
1159 for ( k = 0; k < nWordsMax; k++ )
1160 pTruths[i][k] = Truth6[i];
1161 for ( i = 6; i < nVarsMax; i++ )
1162 for ( k = 0; k < nWordsMax; k++ )
1163 pTruths[i][k] = ((k >> (i-6)) & 1) ? ~(
word)0 : 0;
1172 if ( Kit_TruthIsConst0((
unsigned *)pRes, nLeaves) || Kit_TruthIsConst1((
unsigned *)pRes, nLeaves) )
1174 fprintf( pFile,
".names %s\n %d\n",
"o", Kit_TruthIsConst1((
unsigned *)pRes, nLeaves) );
1175 fprintf( pFile,
".end\n" );
1185 if ( !
If_CluCheckExt( NULL, pRes, nLeaves, nLutLeaf, nLutRoot, pLut0, pLut1, &Func0, &Func1 ) )
1187 Extra_PrintHex( stdout, (
unsigned *)pRes, nLeaves ); printf(
" " );
1189 printf(
"Node \"%s\" is not decomposable. Writing BLIF has failed.\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1195 if ( !
If_CluCheckExt3( NULL, pRes, nLeaves, nLutLeaf, nLutLeaf2, nLutRoot, pLut0, pLut1, pLut2, &Func0, &Func1, &Func2 ) )
1197 Extra_PrintHex( stdout, (
unsigned *)pRes, nLeaves ); printf(
" " );
1199 printf(
"Node \"%s\" is not decomposable. Writing BLIF has failed.\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1206 for ( i = 0; i < pLut1[0]; i++ )
1207 fprintf( pFile,
" %c",
'a' + pLut1[2+i] );
1208 fprintf( pFile,
" lut1\n" );
1211 fprintf( pFile,
"%s", pSop );
1213 if ( Length == 3 && pLut2[0] > 0 )
1217 for ( i = 0; i < pLut2[0]; i++ )
1218 if ( pLut2[2+i] == nLeaves )
1219 fprintf( pFile,
" lut1" );
1221 fprintf( pFile,
" %c",
'a' + pLut2[2+i] );
1222 fprintf( pFile,
" lut2\n" );
1225 fprintf( pFile,
"%s", pSop );
1230 for ( i = 0; i < pLut0[0]; i++ )
1231 if ( pLut0[2+i] == nLeaves )
1232 fprintf( pFile,
" lut1" );
1233 else if ( pLut0[2+i] == nLeaves+1 )
1234 fprintf( pFile,
" lut2" );
1236 fprintf( pFile,
" %c",
'a' + pLut0[2+i] );
1237 fprintf( pFile,
" %s\n",
"o" );
1240 fprintf( pFile,
"%s", pSop );
1241 fprintf( pFile,
".end\n" );
struct Abc_Obj_t_ Abc_Obj_t
#define Abc_NtkForEachCo(pNtk, pCo, i)
#define Abc_NtkForEachPo(pNtk, pPo, i)
ABC_DLL Abc_Obj_t * Abc_NtkFetchTwinNode(Abc_Obj_t *pNode)
#define Abc_NtkForEachLatch(pNtk, pObj, i)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
ABC_DLL void Abc_SopComplement(char *pSop)
#define Abc_NtkForEachBlackbox(pNtk, pObj, i)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
struct Abc_Ntk_t_ Abc_Ntk_t
ABC_DLL Abc_Ntk_t * Abc_NtkToNetlist(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_SopToTruthBig(char *pSop, int nInputs, word **pVars, word *pCube, word *pRes)
#define Abc_NtkForEachWhitebox(pNtk, pObj, i)
ABC_DLL void Abc_SopToTruth7(char *pSop, int nInputs, word r[2])
#define Abc_NtkForEachPi(pNtk, pPi, i)
ABC_DLL char * Abc_SopCreateFromIsop(Mem_Flex_t *pMan, int nVars, Vec_Int_t *vCover)
#define Abc_NtkForEachCi(pNtk, pCi, i)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
ABC_DLL word Abc_SopToTruth(char *pSop, int nInputs)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_CONST(number)
PARAMETERS ///.
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
ABC_NAMESPACE_IMPL_START typedef char ProgressBar
void Extra_PrintHex(FILE *pFile, unsigned *pTruth, int nVars)
int If_Dec7PickBestMux(word t[2], word c0r[2], word c1r[2])
int If_Dec6PickBestMux(word t, word Cofs[2])
word If_Dec6Perform(word t, int fDerive)
word If_Dec7Perform(word t0[2], int fDerive)
word If_Dec6MinimumBase(word uTruth, int *pSupp, int nVarsAll, int *pnVars)
void If_Dec7MinimumBase(word uTruth[2], int *pSupp, int nVarsAll, int *pnVars)
int If_CluMinimumBase(word *t, int *pSupp, int nVarsAll, int *pnVars)
int If_CluCheckExt3(void *p, word *pTruth, int nVars, int nLutLeaf, int nLutLeaf2, int nLutRoot, char *pLut0, char *pLut1, char *pLut2, word *pFunc0, word *pFunc1, word *pFunc2)
int If_CluCheckExt(void *p, word *pTruth, int nVars, int nLutLeaf, int nLutRoot, char *pLut0, char *pLut1, word *pFunc0, word *pFunc1)
#define IO_WRITE_LINE_LENGTH
MACRO DEFINITIONS ///.
void Io_WriteTimingInfo(FILE *pFile, Abc_Ntk_t *pNtk)
void Io_NtkEdgelistWriteConvertedBox(FILE *pFile, Abc_Ntk_t *pNtk, int fSeq)
void Io_WriteEdgelist(Abc_Ntk_t *pNtk, char *FileName, int fWriteLatches, int fBb2Wb, int fSeq, int fName)
FUNCTION DEFINITIONS ///.
int Io_NtkEdgelistWriteNodeGate(FILE *pFile, Abc_Obj_t *pNode, int Length, int fName)
char * Io_NtkWriteEdgelistDeriveSop(Mem_Flex_t *pMem, word uTruth, int nVars, Vec_Int_t *vCover)
int Io_NtkEdgelistWriteNodeSubckt(FILE *pFile, Abc_Obj_t *pNode, int Length)
void Io_NtkEdgelistWriteNodeInt(FILE *pFile, Abc_Obj_t *pNode, Vec_Int_t *vCover)
void Io_NtkEdgelistWriteSubcktFanins(FILE *pFile, Abc_Obj_t *pNode)
void Io_NtkEdgelistWriteNodeIntStruct(FILE *pFile, Abc_Obj_t *pNode, Vec_Int_t *vCover, char *pStr)
void Io_NtkEdgelistWriteModelIntStruct(FILE *pFile, Abc_Obj_t *pNode, Vec_Int_t *vCover, char *pStr)
void Io_NtkEdgelistWrite_int(FILE *pFile, Abc_Ntk_t *pNtk, int fWriteLatches, int fBb2Wb, int fSeq, int fName)
unsigned __int64 word
DECLARATIONS ///.
int Kit_TruthIsop(unsigned *puTruth, int nVars, Vec_Int_t *vMemory, int fTryBoth)
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
Mio_Pin_t * Mio_GateReadPins(Mio_Gate_t *pGate)
struct Mio_LibraryStruct_t_ Mio_Library_t
Mio_Gate_t * Mio_GateReadTwin(Mio_Gate_t *pGate)
word Mio_GateReadTruth(Mio_Gate_t *pGate)
char * Mio_GateReadName(Mio_Gate_t *pGate)
Mio_Pin_t * Mio_PinReadNext(Mio_Pin_t *pPin)
int Mio_LibraryReadGateNameMax(Mio_Library_t *pLib)
struct Mio_PinStruct_t_ Mio_Pin_t
struct Mio_GateStruct_t_ Mio_Gate_t
struct Mem_Flex_t_ Mem_Flex_t
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.