ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
giaMini.c
Go to the documentation of this file.
1
20
21#include "gia.h"
22#include "opt/dau/dau.h"
23#include "base/main/mainInt.h"
24#include "misc/util/utilTruth.h"
25#include "aig/miniaig/miniaig.h"
26#include "aig/miniaig/minilut.h"
27
29
30
34
35extern int Kit_TruthToGia( Gia_Man_t * pMan, unsigned * pTruth, int nVars, Vec_Int_t * vMemory, Vec_Int_t * vLeaves, int fHash );
36
40
52int Gia_ObjFromMiniFanin0Copy( Gia_Man_t * pGia, Vec_Int_t * vCopies, Mini_Aig_t * p, int Id )
53{
54 int Lit = Mini_AigNodeFanin0( p, Id );
55 return Abc_LitNotCond( Vec_IntEntry(vCopies, Abc_Lit2Var(Lit)), Abc_LitIsCompl(Lit) );
56}
57int Gia_ObjFromMiniFanin1Copy( Gia_Man_t * pGia, Vec_Int_t * vCopies, Mini_Aig_t * p, int Id )
58{
59 int Lit = Mini_AigNodeFanin1( p, Id );
60 return Abc_LitNotCond( Vec_IntEntry(vCopies, Abc_Lit2Var(Lit)), Abc_LitIsCompl(Lit) );
61}
62Gia_Man_t * Gia_ManFromMiniAig( Mini_Aig_t * p, Vec_Int_t ** pvCopies, int fGiaSimple )
63{
64 Gia_Man_t * pGia, * pTemp;
65 Vec_Int_t * vCopies;
66 int i, iGiaLit = 0, nNodes;
67 // get the number of nodes
68 nNodes = Mini_AigNodeNum(p);
69 // create ABC network
70 pGia = Gia_ManStart( nNodes );
71 pGia->pName = Abc_UtilStrsav( "MiniAig" );
72 // create mapping from MiniAIG objects into ABC objects
73 vCopies = Vec_IntAlloc( nNodes );
74 Vec_IntPush( vCopies, 0 );
75 // iterate through the objects
76 if ( fGiaSimple )
77 pGia->fGiaSimple = fGiaSimple;
78 else
79 Gia_ManHashAlloc( pGia );
80 for ( i = 1; i < nNodes; i++ )
81 {
82 if ( Mini_AigNodeIsPi( p, i ) )
83 iGiaLit = Gia_ManAppendCi(pGia);
84 else if ( Mini_AigNodeIsPo( p, i ) )
85 iGiaLit = Gia_ManAppendCo(pGia, Gia_ObjFromMiniFanin0Copy(pGia, vCopies, p, i));
86 else if ( Mini_AigNodeIsAnd( p, i ) )
87 iGiaLit = Gia_ManHashAnd(pGia, Gia_ObjFromMiniFanin0Copy(pGia, vCopies, p, i), Gia_ObjFromMiniFanin1Copy(pGia, vCopies, p, i));
88 else assert( 0 );
89 Vec_IntPush( vCopies, iGiaLit );
90 }
91 assert( Vec_IntSize(vCopies) == nNodes );
92 if ( pvCopies )
93 *pvCopies = vCopies;
94 else
95 Vec_IntFree( vCopies );
96 Gia_ManSetRegNum( pGia, Mini_AigRegNum(p) );
97 if ( !fGiaSimple )
98 {
99 pGia = Gia_ManCleanup( pTemp = pGia );
100 if ( pvCopies )
101 Gia_ManDupRemapLiterals( *pvCopies, pTemp );
102 Gia_ManStop( pTemp );
103 }
104 return pGia;
105}
106
119{
120 Mini_Aig_t * p;
121 Gia_Obj_t * pObj;
122 int i;
123 // create the manager
124 p = Mini_AigStart();
125 Gia_ManConst0(pGia)->Value = Mini_AigLitConst0();
126 // create primary inputs
127 Gia_ManForEachCi( pGia, pObj, i )
128 pObj->Value = Mini_AigCreatePi(p);
129 // create internal nodes
130 Gia_ManForEachAnd( pGia, pObj, i )
131 pObj->Value = Mini_AigAnd( p, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
132 // create primary outputs
133 Gia_ManForEachCo( pGia, pObj, i )
134 pObj->Value = Mini_AigCreatePo( p, Gia_ObjFanin0Copy(pObj) );
135 // set registers
136 Mini_AigSetRegNum( p, Gia_ManRegNum(pGia) );
137 return p;
138}
139
152{
153 Gia_Man_t * pGia;
154 if ( pAbc == NULL )
155 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
156 Gia_ManStopP( &pAbc->pGiaMiniAig );
157 Vec_IntFreeP( &pAbc->vCopyMiniAig );
158 pGia = Gia_ManFromMiniAig( (Mini_Aig_t *)p, &pAbc->vCopyMiniAig, 0 );
159 Abc_FrameUpdateGia( pAbc, pGia );
160 pAbc->pGiaMiniAig = Gia_ManDup( pGia );
161// Gia_ManDelete( pGia );
162}
164{
165 Gia_Man_t * pGia;
166 if ( pAbc == NULL )
167 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
168 pGia = Abc_FrameReadGia( pAbc );
169 if ( pGia == NULL )
170 printf( "Current network in ABC framework is not defined.\n" );
171 return Gia_ManToMiniAig( pGia );
172}
173
185void Gia_ManReadMiniAigNames( char * pFileName, Gia_Man_t * pGia )
186{
187 char * filename3 = Abc_UtilStrsavTwo( pFileName, ".ilo" );
188 FILE * pFile = fopen( filename3, "rb" );
189 if ( pFile )
190 {
191 char Buffer[5000], * pName; int i, iLines = 0;
192 Vec_Ptr_t * vTemp = Vec_PtrAlloc( Gia_ManRegNum(pGia) );
193 assert( pGia->vNamesIn == NULL );
194 pGia->vNamesIn = Vec_PtrAlloc( Gia_ManCiNum(pGia) );
195 assert( pGia->vNamesOut == NULL );
196 pGia->vNamesOut = Vec_PtrAlloc( Gia_ManCoNum(pGia) );
197 while ( fgets(Buffer, 5000, pFile) )
198 {
199 if ( Buffer[strlen(Buffer)-1] == '\n' )
200 Buffer[strlen(Buffer)-1] = 0;
201 if ( iLines < Gia_ManPiNum(pGia) )
202 Vec_PtrPush( pGia->vNamesIn, Abc_UtilStrsav(Buffer) );
203 else if ( iLines < Gia_ManCiNum(pGia) )
204 Vec_PtrPush( vTemp, Abc_UtilStrsav(Buffer) );
205 else
206 Vec_PtrPush( pGia->vNamesOut, Abc_UtilStrsav(Buffer) );
207 iLines++;
208 }
209 Vec_PtrForEachEntry( char *, vTemp, pName, i )
210 {
211 Vec_PtrPush( pGia->vNamesIn, Abc_UtilStrsav(pName) );
212 Vec_PtrPush( pGia->vNamesOut, Abc_UtilStrsavTwo(pName, "_in") );
213 }
214 Vec_PtrFreeFree( vTemp );
215 fclose( pFile );
216 printf( "Read ILO names into file \"%s\".\n", filename3 );
217 }
218 ABC_FREE( filename3 );
219}
220Gia_Man_t * Gia_ManReadMiniAig( char * pFileName, int fGiaSimple )
221{
222 Mini_Aig_t * p = Mini_AigLoad( pFileName );
223 Gia_Man_t * pTemp, * pGia = Gia_ManFromMiniAig( p, NULL, fGiaSimple );
224 ABC_FREE( pGia->pName );
225 pGia->pName = Extra_FileNameGeneric( pFileName );
226 Mini_AigStop( p );
227 Gia_ManReadMiniAigNames( pFileName, pGia );
228 if ( !Gia_ManIsNormalized(pGia) )
229 {
230 pGia = Gia_ManDupNormalize( pTemp = pGia, 0 );
231 ABC_SWAP( Vec_Ptr_t *, pTemp->vNamesIn, pGia->vNamesIn );
232 ABC_SWAP( Vec_Ptr_t *, pTemp->vNamesOut, pGia->vNamesOut );
233 Gia_ManStop( pTemp );
234 }
235 return pGia;
236}
237void Gia_ManWriteMiniAig( Gia_Man_t * pGia, char * pFileName )
238{
239 Mini_Aig_t * p = Gia_ManToMiniAig( pGia );
240 Mini_AigDump( p, pFileName );
241 //Mini_AigDumpVerilog( "test_miniaig.v", "top", p );
242 Mini_AigStop( p );
243}
244
245
246
247
260{
261 Gia_Man_t * pGia, * pTemp;
262 Vec_Int_t * vCopies;
263 Vec_Int_t * vCover = Vec_IntAlloc( 1000 );
264 Vec_Int_t * vLits = Vec_IntAlloc( 100 );
265 int i, k, Fan, iGiaLit, nNodes;
266 int LutSize = Abc_MaxInt( 2, Mini_LutSize(p) );
267 // get the number of nodes
268 nNodes = Mini_LutNodeNum(p);
269 // create ABC network
270 pGia = Gia_ManStart( 3 * nNodes );
271 pGia->pName = Abc_UtilStrsav( "MiniLut" );
272 // create mapping from MiniLUT objects into ABC objects
273 vCopies = Vec_IntAlloc( nNodes );
274 Vec_IntPush( vCopies, 0 );
275 Vec_IntPush( vCopies, 1 );
276 // iterate through the objects
277 Gia_ManHashAlloc( pGia );
278 for ( i = 2; i < nNodes; i++ )
279 {
280 if ( Mini_LutNodeIsPi( p, i ) )
281 iGiaLit = Gia_ManAppendCi(pGia);
282 else if ( Mini_LutNodeIsPo( p, i ) )
283 iGiaLit = Gia_ManAppendCo(pGia, Vec_IntEntry(vCopies, Mini_LutNodeFanin(p, i, 0)));
284 else if ( Mini_LutNodeIsNode( p, i ) )
285 {
286 unsigned * puTruth = Mini_LutNodeTruth( p, i );
287 word Truth = ((word)*puTruth << 32) | (word)*puTruth;
288 word * pTruth = LutSize < 6 ? &Truth : (word *)puTruth;
289 Vec_IntClear( vLits );
290 Mini_LutForEachFanin( p, i, Fan, k )
291 Vec_IntPush( vLits, Vec_IntEntry(vCopies, Fan) );
292 iGiaLit = Dsm_ManTruthToGia( pGia, pTruth, vLits, vCover );
293 }
294 else assert( 0 );
295 Vec_IntPush( vCopies, iGiaLit );
296 }
297 Vec_IntFree( vCover );
298 Vec_IntFree( vLits );
299 Gia_ManHashStop( pGia );
300 assert( Vec_IntSize(vCopies) == nNodes );
301 if ( pvCopies )
302 *pvCopies = vCopies;
303 else
304 Vec_IntFree( vCopies );
305 Gia_ManSetRegNum( pGia, Mini_LutRegNum(p) );
306 pGia = Gia_ManCleanup( pTemp = pGia );
307 if ( pvCopies )
308 Gia_ManDupRemapLiterals( *pvCopies, pTemp );
309 Gia_ManStop( pTemp );
310 return pGia;
311}
312
313
326{
327 Gia_Man_t * pGia;
328 Vec_Int_t * vCopies;
329 Vec_Int_t * vCover = Vec_IntAlloc( 1000 );
330 Vec_Int_t * vLits = Vec_IntAlloc( 100 );
331 int i, k, Fan, iGiaLit, nNodes;
332 // get the number of nodes
333 nNodes = Mini_LutNodeNum(p);
334 // create ABC network
335 pGia = Gia_ManStart( 3 * nNodes );
336 pGia->pName = Abc_UtilStrsav( "MiniLut" );
337 // create mapping from MiniLUT objects into ABC objects
338 vCopies = Vec_IntAlloc( nNodes );
339 Vec_IntPush( vCopies, 0 );
340 Vec_IntPush( vCopies, 1 );
341 // iterate through the objects
342 pGia->fGiaSimple = 1;
343 for ( i = 2; i < nNodes; i++ )
344 {
345 if ( Mini_LutNodeIsPi( p, i ) )
346 iGiaLit = Gia_ManAppendCi(pGia);
347 else if ( Mini_LutNodeIsPo( p, i ) )
348 iGiaLit = Gia_ManAppendCo(pGia, Vec_IntEntry(vCopies, Mini_LutNodeFanin(p, i, 0)));
349 else if ( Mini_LutNodeIsNode( p, i ) )
350 {
351 unsigned * puTruth = Mini_LutNodeTruth( p, i );
352 Vec_IntClear( vLits );
353 Mini_LutForEachFanin( p, i, Fan, k )
354 Vec_IntPush( vLits, Vec_IntEntry(vCopies, Fan) );
355 iGiaLit = Kit_TruthToGia( pGia, puTruth, Vec_IntSize(vLits), vCover, vLits, 0 );
356 }
357 else assert( 0 );
358 Vec_IntPush( vCopies, iGiaLit );
359 }
360 Vec_IntFree( vCover );
361 Vec_IntFree( vLits );
362 assert( Vec_IntSize(vCopies) == nNodes );
363 if ( pvCopies )
364 *pvCopies = vCopies;
365 else
366 Vec_IntFree( vCopies );
367 Gia_ManSetRegNum( pGia, Mini_LutRegNum(p) );
368 return pGia;
369}
370
371
386{
387 Gia_Obj_t * pObj; int i;
388 // mark objects pointed by COs in negative polarity
389 Vec_Bit_t * vMarks = Vec_BitStart( Gia_ManObjNum(pGia) );
390 Gia_ManForEachCo( pGia, pObj, i )
391 if ( Gia_ObjIsAnd(Gia_ObjFanin0(pObj)) && Gia_ObjFaninC0(pObj) )
392 Vec_BitWriteEntry( vMarks, Gia_ObjFaninId0p(pGia, pObj), 1 );
393 // unmark objects pointed by COs in positive polarity
394 Gia_ManForEachCo( pGia, pObj, i )
395 if ( Gia_ObjIsAnd(Gia_ObjFanin0(pObj)) && !Gia_ObjFaninC0(pObj) )
396 Vec_BitWriteEntry( vMarks, Gia_ObjFaninId0p(pGia, pObj), 0 );
397 return vMarks;
398}
399
412{
413 Mini_Lut_t * p;
414 Vec_Bit_t * vMarks;
415 Gia_Obj_t * pObj, * pFanin;
416 Vec_Int_t * vLeaves = Vec_IntAlloc( 16 );
417 Vec_Int_t * vInvMap = Vec_IntStart( Gia_ManObjNum(pGia) );
418 int i, k, iFanin, LutSize, nWords, Count = 0, pVars[16];
419 word * pTruth;
420 assert( Gia_ManHasMapping(pGia) );
421 LutSize = Gia_ManLutSizeMax( pGia );
422 LutSize = Abc_MaxInt( LutSize, 2 );
423 nWords = Abc_Truth6WordNum( LutSize );
424 assert( LutSize >= 2 );
425 // create the manager
426 p = Mini_LutStart( LutSize );
427 // create primary inputs
428 Gia_ManFillValue( pGia );
429 Gia_ManConst0(pGia)->Value = 0;
430 Gia_ManForEachCi( pGia, pObj, i )
431 pObj->Value = Mini_LutCreatePi(p);
432 // create internal nodes
433 vMarks = Gia_ManFindComplLuts( pGia );
434 Gia_ObjComputeTruthTableStart( pGia, LutSize );
435 Gia_ManForEachLut( pGia, i )
436 {
437 Vec_IntClear( vLeaves );
438 Gia_LutForEachFanin( pGia, i, iFanin, k )
439 Vec_IntPush( vLeaves, iFanin );
440 if ( Vec_IntSize(vLeaves) > 6 )
441 {
442 int Extra = Vec_IntSize(vLeaves) - 7;
443 for ( k = Extra; k >= 0; k-- )
444 Vec_IntPush( vLeaves, Vec_IntEntry(vLeaves, k) );
445 for ( k = Extra; k >= 0; k-- )
446 Vec_IntDrop( vLeaves, k );
447 assert( Vec_IntSize(vLeaves) == Gia_ObjLutSize(pGia, i) );
448 }
449 Gia_ManForEachObjVec( vLeaves, pGia, pFanin, k )
450 pVars[k] = pFanin->Value;
451 pObj = Gia_ManObj( pGia, i );
452 pTruth = Gia_ObjComputeTruthTableCut( pGia, pObj, vLeaves );
453 if ( Vec_BitEntry(vMarks, i) )
454 Abc_TtNot( pTruth, nWords );
455 Vec_IntForEachEntry( vLeaves, iFanin, k )
456 if ( Vec_BitEntry(vMarks, iFanin) )
457 Abc_TtFlip( pTruth, nWords, k );
458 pObj->Value = Mini_LutCreateNode( p, Gia_ObjLutSize(pGia, i), pVars, (unsigned *)pTruth );
459 }
460 Vec_IntFree( vLeaves );
461 // create inverter truth table
462 Vec_WrdClear( pGia->vTtMemory );
463 for ( i = 0; i < nWords; i++ )
464 Vec_WrdPush( pGia->vTtMemory, ABC_CONST(0x5555555555555555) );
465 pTruth = Vec_WrdArray( pGia->vTtMemory );
466 // create primary outputs
467 Gia_ManForEachCo( pGia, pObj, i )
468 {
469 if ( Gia_ObjFanin0(pObj) == Gia_ManConst0(pGia) )
470 pObj->Value = Mini_LutCreatePo( p, Gia_ObjFaninC0(pObj) );
471 else if ( Gia_ObjFaninC0(pObj) == Vec_BitEntry(vMarks, Gia_ObjFaninId0p(pGia, pObj)) )
472 pObj->Value = Mini_LutCreatePo( p, Gia_ObjFanin0(pObj)->Value );
473 else // add inverter LUT
474 {
475 int LutInv, Fanin = Gia_ObjFanin0(pObj)->Value;
476 if ( (LutInv = Vec_IntEntry(vInvMap, Fanin)) == 0 )
477 {
478 LutInv = Mini_LutCreateNode( p, 1, &Fanin, (unsigned *)pTruth );
479 Vec_IntWriteEntry( vInvMap, Fanin, LutInv );
480 Count++;
481 }
482 pObj->Value = Mini_LutCreatePo( p, LutInv );
483 }
484 }
485 Vec_IntFree( vInvMap );
486 Vec_BitFree( vMarks );
488 // set registers
489 Mini_LutSetRegNum( p, Gia_ManRegNum(pGia) );
490 //Mini_LutPrintStats( p );
491 //printf( "Added %d inverters.\n", Count );
492 return p;
493}
494char * Gia_ManToMiniLutAttr( Gia_Man_t * pGia, void * pMiniLut )
495{
496 Mini_Lut_t * p = (Mini_Lut_t *)pMiniLut; int i;
497 char * pAttrs = ABC_CALLOC( char, Mini_LutNodeNum(p) );
498 Gia_ManForEachLut( pGia, i )
499 if ( Gia_ObjLutIsMux(pGia, i) )
500 pAttrs[Gia_ManObj(pGia, i)->Value] = 1;
501 return pAttrs;
502}
503
516{
517 Gia_Man_t * pGia;
518 if ( pAbc == NULL )
519 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
520 pGia = Gia_ManFromMiniLut( (Mini_Lut_t *)p, NULL );
521 Abc_FrameUpdateGia( pAbc, pGia );
522// Gia_ManDelete( pGia );
523}
525{
526 if ( pAbc == NULL )
527 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
528 Vec_IntFreeP( &pAbc->vCopyMiniLut );
529 Gia_ManStopP( &pAbc->pGiaMiniLut );
530 pAbc->pGiaMiniLut = Gia_ManFromMiniLut2( (Mini_Lut_t *)p, &pAbc->vCopyMiniLut );
531// Abc_FrameUpdateGia( pAbc, pGia );
532}
534{
535 Mini_Lut_t * pRes = NULL;
536 Gia_Man_t * pGia;
537 if ( pAbc == NULL )
538 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
539 Gia_ManStopP( &pAbc->pGiaMiniLut );
540 Vec_IntFreeP( &pAbc->vCopyMiniLut );
541 pGia = Abc_FrameReadGia( pAbc );
542 if ( pGia == NULL )
543 printf( "Current network in ABC framework is not defined.\n" );
544 pRes = Gia_ManToMiniLut( pGia );
545 pAbc->pGiaMiniLut = Gia_ManFromMiniLut( pRes, &pAbc->vCopyMiniLut );
546 return pRes;
547}
548char * Abc_FrameGiaOutputMiniLutAttr( Abc_Frame_t * pAbc, void * pMiniLut )
549{
550 Gia_Man_t * pGia;
551 if ( pAbc == NULL )
552 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
553 pGia = Abc_FrameReadGia( pAbc );
554 if ( pGia == NULL )
555 printf( "Current network in ABC framework is not defined.\n" );
556 return Gia_ManToMiniLutAttr( pGia, pMiniLut );
557}
559{
560 int * pRes = NULL;
561 if ( pAbc == NULL )
562 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
563 if ( pAbc->vMiniLutObjs == NULL )
564 printf( "MiniLut objects are not defined.\n" );
565 pRes = Vec_IntReleaseArray( pAbc->vMiniLutObjs );
566 Vec_IntFreeP( &pAbc->vMiniLutObjs );
567 return pRes;
568}
569void Abc_FrameSetObjDelays( Abc_Frame_t * pAbc, int * pDelays, int nDelays )
570{
571 Vec_IntFreeP( &pAbc->vObjDelays );
572 pAbc->vObjDelays = Vec_IntAllocArrayCopy( pDelays, nDelays );
573}
574
575
587Gia_Man_t * Gia_ManReadMiniLut( char * pFileName )
588{
589 Mini_Lut_t * p = Mini_LutLoad( pFileName );
590 Gia_Man_t * pGia = Gia_ManFromMiniLut( p, NULL );
591 ABC_FREE( pGia->pName );
592 pGia->pName = Extra_FileNameGeneric( pFileName );
593 Mini_LutStop( p );
594 return pGia;
595}
596void Gia_ManWriteMiniLut( Gia_Man_t * pGia, char * pFileName )
597{
598 Mini_Lut_t * p = Gia_ManToMiniLut( pGia );
599 Mini_LutDump( p, pFileName );
600 Mini_LutStop( p );
601}
602
615{
616 int * pRes = ABC_FALLOC( int, Vec_IntSize(vMap2) );
617 Vec_Int_t * vMap = Vec_IntStartFull( Gia_ManObjNum(p) );
618 int i, Entry, iRepr, fCompl, iLit;
619 Gia_Obj_t * pObj;
620 Gia_ManSetPhase( p1 );
621 Gia_ManSetPhase( p2 );
622 Vec_IntForEachEntry( vMap1, Entry, i )
623 {
624 if ( Entry == -1 )
625 continue;
626 pObj = Gia_ManObj( p1, Abc_Lit2Var(Entry) );
627 if ( ~pObj->Value == 0 )
628 continue;
629 fCompl = Abc_LitIsCompl(Entry) ^ pObj->fPhase;
630 iRepr = Gia_ObjReprSelf(p, Abc_Lit2Var(pObj->Value));
631 Vec_IntWriteEntry( vMap, iRepr, Abc_Var2Lit(i, fCompl) );
632 }
633 Vec_IntForEachEntry( vMap2, Entry, i )
634 {
635 if ( Entry == -1 )
636 continue;
637 pObj = Gia_ManObj( p2, Abc_Lit2Var(Entry) );
638 if ( ~pObj->Value == 0 )
639 continue;
640 fCompl = Abc_LitIsCompl(Entry) ^ pObj->fPhase;
641 iRepr = Gia_ObjReprSelf(p, Abc_Lit2Var(pObj->Value));
642 if ( (iLit = Vec_IntEntry(vMap, iRepr)) == -1 )
643 continue;
644 pRes[i] = Abc_LitNotCond( iLit, fCompl );
645 }
646 Vec_IntFill( vMap, Gia_ManCoNum(p1), -1 );
647 Vec_IntForEachEntry( vMap1, Entry, i )
648 {
649 if ( Entry == -1 )
650 continue;
651 pObj = Gia_ManObj( p1, Abc_Lit2Var(Entry) );
652 if ( !Gia_ObjIsCo(pObj) )
653 continue;
654 Vec_IntWriteEntry( vMap, Gia_ObjCioId(pObj), i );
655 }
656 Vec_IntForEachEntry( vMap2, Entry, i )
657 {
658 if ( Entry == -1 )
659 continue;
660 pObj = Gia_ManObj( p2, Abc_Lit2Var(Entry) );
661 if ( !Gia_ObjIsCo(pObj) )
662 continue;
663 assert( pRes[i] == -1 );
664 pRes[i] = Abc_Var2Lit( Vec_IntEntry(vMap, Gia_ObjCioId(pObj)), 0 );
665 assert( pRes[i] != -1 );
666 }
667 Vec_IntFree( vMap );
668 return pRes;
669}
670void Gia_ManNameMapVerify( Gia_Man_t * p, Gia_Man_t * p1, Gia_Man_t * p2, Vec_Int_t * vMap1, Vec_Int_t * vMap2, int * pMap )
671{
672 int iLut, iObj1, iObj2, nSize = Vec_IntSize(vMap2);
673 Gia_Obj_t * pObjAig, * pObjLut;
674 Gia_ManSetPhase( p1 );
675 Gia_ManSetPhase( p2 );
676 for ( iLut = 0; iLut < nSize; iLut++ )
677 if ( pMap[iLut] >= 0 )
678 {
679 int iObj = Abc_Lit2Var( pMap[iLut] );
680 int fCompl = Abc_LitIsCompl( pMap[iLut] );
681 int iLitAig = Vec_IntEntry( vMap1, iObj );
682 int iLitLut = Vec_IntEntry( vMap2, iLut );
683 pObjAig = Gia_ManObj( p1, Abc_Lit2Var(iLitAig) );
684 if ( Gia_ObjIsCo(pObjAig) )
685 continue;
686 if ( ~pObjAig->Value == 0 )
687 continue;
688 pObjLut = Gia_ManObj( p2, Abc_Lit2Var(iLitLut) );
689 if ( ~pObjLut->Value == 0 )
690 continue;
691 iObj1 = Gia_ObjReprSelf(p, Abc_Lit2Var(pObjAig->Value));
692 iObj2 = Gia_ObjReprSelf(p, Abc_Lit2Var(pObjLut->Value));
693 if ( iObj1 != iObj2 )
694 printf( "Found functional mismatch for LutId %d and AigId %d.\n", iLut, iObj );
695 if ( (pObjLut->fPhase ^ Abc_LitIsCompl(iLitLut)) != (pObjAig->fPhase ^ Abc_LitIsCompl(iLitAig) ^ fCompl) )
696 printf( "Found phase mismatch for LutId %d and AigId %d.\n", iLut, iObj );
697 }
698}
700{
701 int fVerbose = 0;
702 int nConfs = 1000;
703 Gia_Man_t * pGia, * pTemp;
704 int * pRes = NULL;
705 if ( pAbc->pGiaMiniAig == NULL )
706 printf( "GIA derived from MiniAig is not available.\n" );
707 if ( pAbc->pGiaMiniLut == NULL )
708 printf( "GIA derived from MiniLut is not available.\n" );
709 if ( pAbc->pGiaMiniAig == NULL || pAbc->pGiaMiniLut == NULL )
710 return NULL;
711 pGia = Gia_ManDup2( pAbc->pGiaMiniAig, pAbc->pGiaMiniLut );
712 //Gia_AigerWrite( pGia, "aig_m_lut.aig", 0, 0, 0 );
713 // compute equivalences in this AIG
714 pTemp = Gia_ManComputeGiaEquivs( pGia, nConfs, fVerbose );
715 Gia_ManStop( pTemp );
716 //if ( fVerbose )
717 // Abc_PrintTime( 1, "Equivalence computation time", Abc_Clock() - clk );
718 //if ( fVerbose )
719 // Gia_ManPrintStats( pGia, NULL );
720 //Vec_IntPrint( pAbc->vCopyMiniAig );
721 //Vec_IntPrint( pAbc->vCopyMiniLut );
722 pRes = Gia_ManMapMiniLut2MiniAig( pGia, pAbc->pGiaMiniAig, pAbc->pGiaMiniLut, pAbc->vCopyMiniAig, pAbc->vCopyMiniLut );
723 //Gia_ManNameMapVerify( pGia, pAbc->pGiaMiniAig, pAbc->pGiaMiniLut, pAbc->vCopyMiniAig, pAbc->vCopyMiniLut, pRes );
724 Gia_ManStop( pGia );
725 return pRes;
726}
728{
729 Vec_Int_t * vSwitching;
730 int i, iObj, * pRes = NULL;
731 if ( pAbc->pGiaMiniLut == NULL )
732 {
733 printf( "GIA derived from MiniLut is not available.\n" );
734 return NULL;
735 }
736 vSwitching = Gia_ManComputeSwitchProbs( pAbc->pGiaMiniLut, 48, 16, 0 );
737 pRes = ABC_CALLOC( int, Vec_IntSize(pAbc->vCopyMiniLut) );
738 Vec_IntForEachEntry( pAbc->vCopyMiniLut, iObj, i )
739 if ( iObj >= 0 )
740 pRes[i] = (int)(10000*Vec_FltEntry( (Vec_Flt_t *)vSwitching, Abc_Lit2Var(iObj) ));
741 Vec_IntFree( vSwitching );
742 return pRes;
743}
744int * Abc_FrameReadMiniLutSwitching2( Abc_Frame_t * pAbc, int fRandPiFactor )
745{
746 Vec_Int_t * vSwitching;
747 int i, iObj, * pRes = NULL;
748 if ( pAbc->pGiaMiniLut == NULL )
749 {
750 printf( "GIA derived from MiniLut is not available.\n" );
751 return NULL;
752 }
753 vSwitching = Gia_ManComputeSwitchProbs2( pAbc->pGiaMiniLut, 48, 16, 0, fRandPiFactor );
754 pRes = ABC_CALLOC( int, Vec_IntSize(pAbc->vCopyMiniLut) );
755 Vec_IntForEachEntry( pAbc->vCopyMiniLut, iObj, i )
756 if ( iObj >= 0 )
757 pRes[i] = (int)(10000*Vec_FltEntry( (Vec_Flt_t *)vSwitching, Abc_Lit2Var(iObj) ));
758 Vec_IntFree( vSwitching );
759 return pRes;
760}
762{
763 Vec_Int_t * vSwitching;
764 int i, iObj, * pRes = NULL;
765 if ( pAbc->pGiaMiniAig == NULL )
766 {
767 printf( "GIA derived from MiniAIG is not available.\n" );
768 return NULL;
769 }
770 vSwitching = Gia_ManComputeSwitchProbs( pAbc->pGiaMiniAig, 48, 16, 0 );
771 pRes = ABC_CALLOC( int, Gia_ManCoNum(pAbc->pGiaMiniAig) );
772 Gia_ManForEachCoDriverId( pAbc->pGiaMiniAig, iObj, i )
773 pRes[i] = (int)(10000*Vec_FltEntry( (Vec_Flt_t *)vSwitching, iObj ));
774 Vec_IntFree( vSwitching );
775 return pRes;
776}
777
797{
798 Vec_Int_t * vRes = Vec_IntStartFull( Vec_IntSize(vMap) );
799 Vec_Int_t * vGia2Mini = Vec_IntStartFull( Gia_ManObjNum(p) );
800 Gia_Obj_t * pObj, * pRepr;
801 int i, iObjLit, iReprLit, fCompl, iReprGia, iReprMini;
802 Vec_IntForEachEntry( vMap, iObjLit, i )
803 {
804 if ( iObjLit == -1 )
805 continue;
806// if ( Gia_ObjHasRepr(p, Abc_Lit2Var(iObjLit)) && !Gia_ObjProved(p, Abc_Lit2Var(iObjLit)) )
807// continue;
808 iReprGia = Gia_ObjReprSelf( p, Abc_Lit2Var(iObjLit) );
809 iReprMini = Vec_IntEntry( vGia2Mini, iReprGia );
810 if ( iReprMini == -1 )
811 {
812 Vec_IntWriteEntry( vGia2Mini, iReprGia, i );
813 continue;
814 }
815 if ( iReprMini == i )
816 continue;
817 assert( iReprMini < i );
818 Vec_IntWriteEntry( vRes, i, iReprMini );
819 }
820 Vec_IntFree( vGia2Mini );
822 Vec_IntForEachEntry( vRes, iReprMini, i )
823 {
824 if ( iReprMini == -1 )
825 continue;
826 iObjLit = Vec_IntEntry(vMap, i);
827 iReprLit = Vec_IntEntry(vMap, iReprMini);
828 pObj = Gia_ManObj( p, Abc_Lit2Var(iObjLit) );
829 pRepr = Gia_ManObj( p, Abc_Lit2Var(iReprLit) );
830 fCompl = Abc_LitIsCompl(iObjLit) ^ Abc_LitIsCompl(iReprLit) ^ pObj->fPhase ^ pRepr->fPhase;
831 Vec_IntWriteEntry( vRes, i, Abc_Var2Lit(iReprMini, fCompl) );
832 }
833 return vRes;
834}
836{
837 Vec_Int_t * vRes;
838 int * pRes;
839 if ( pAbc->pGiaMiniAig == NULL )
840 printf( "GIA derived from MiniAig is not available.\n" );
841 if ( pAbc->vCopyMiniAig == NULL )
842 printf( "Mapping of MiniAig nodes is not available.\n" );
843 if ( pAbc->pGia2 == NULL )
844 printf( "Internal GIA with equivalence classes is not available.\n" );
845 if ( pAbc->pGia2->pReprs == NULL )
846 {
847 printf( "Equivalence classes of internal GIA are not available.\n" );
848 return NULL;
849 }
850 else if ( 0 )
851 {
852 int i;
853 for ( i = 1; i < Gia_ManObjNum(pAbc->pGia2); i++ )
854 if ( Gia_ObjHasRepr(pAbc->pGia2, i) )
855 printf( "Obj %3d : Repr %3d Proved %d Failed %d\n", i, Gia_ObjRepr(pAbc->pGia2, i), Gia_ObjProved(pAbc->pGia2, i), Gia_ObjFailed(pAbc->pGia2, i) );
856 }
857 if ( Gia_ManObjNum(pAbc->pGia2) != Gia_ManObjNum(pAbc->pGiaMiniAig) )
858 printf( "Internal GIA with equivalence classes is not directly derived from MiniAig.\n" );
859 // derive the set of equivalent node pairs
860 vRes = Gia_ManMapEquivAfterScorr( pAbc->pGia2, pAbc->vCopyMiniAig );
861 pRes = Vec_IntReleaseArray( vRes );
862 Vec_IntFree( vRes );
863 return pRes;
864}
865
878{
879 Gia_Man_t * pGia, * pTemp;
880 Vec_Int_t * vCopies;
881 int i, iGiaLit = 0, nNodes;
882 // get the number of nodes
883 nNodes = Mini_AigNodeNum(p);
884 // create ABC network
885 pGia = Gia_ManStart( nNodes );
886 pGia->pName = Abc_UtilStrsav( "MiniAig" );
887 // create mapping from MiniAIG objects into ABC objects
888 vCopies = Vec_IntAlloc( nNodes );
889 Vec_IntPush( vCopies, 0 );
890 // iterate through the objects
891 Gia_ManHashAlloc( pGia );
892 for ( i = 1; i < nNodes; i++ )
893 {
894 if ( Mini_AigNodeIsPi( p, i ) )
895 iGiaLit = Gia_ManAppendCi(pGia);
896 else if ( Mini_AigNodeIsPo( p, i ) )
897 iGiaLit = Gia_ManAppendCo(pGia, Gia_ObjFromMiniFanin0Copy(pGia, vCopies, p, i));
898 else if ( Mini_AigNodeIsAnd( p, i ) )
899 iGiaLit = Gia_ManHashAnd(pGia, Gia_ObjFromMiniFanin0Copy(pGia, vCopies, p, i), Gia_ObjFromMiniFanin1Copy(pGia, vCopies, p, i));
900 else assert( 0 );
901 if ( pEquivs[i] != -1 )
902 iGiaLit = Abc_LitNotCond( Vec_IntEntry(vCopies, Abc_Lit2Var(pEquivs[i])), Abc_LitIsCompl(pEquivs[i]) );
903 Vec_IntPush( vCopies, iGiaLit );
904 }
905 Gia_ManHashStop( pGia );
906 assert( Vec_IntSize(vCopies) == nNodes );
907 Vec_IntFree( vCopies );
908 Gia_ManSetRegNum( pGia, Mini_AigRegNum(p) );
909 pGia = Gia_ManSeqCleanup( pTemp = pGia );
910 Gia_ManStop( pTemp );
911 return pGia;
912}
914{
915 Gia_Man_t * pGia, * pTemp;
916 Vec_Int_t * vCopies;
917 int i, iGiaLit = 0, iGiaLit2, nNodes, iPos = 0, nPos = 0, Temp;
918 // get the number of nodes
919 nNodes = Mini_AigNodeNum(p);
920 // create ABC network
921 pGia = Gia_ManStart( 2 * nNodes );
922 pGia->pName = Abc_UtilStrsav( "MiniAig" );
923 // create mapping from MiniAIG objects into ABC objects
924 vCopies = Vec_IntAlloc( nNodes );
925 Vec_IntPush( vCopies, 0 );
926 // iterate through the objects
927 Gia_ManHashAlloc( pGia );
928 for ( i = 1; i < nNodes; i++ )
929 {
930 if ( Mini_AigNodeIsPi( p, i ) )
931 iGiaLit = Gia_ManAppendCi(pGia);
932 else if ( Mini_AigNodeIsPo( p, i ) )
933 {
934 nPos++;
935 Vec_IntPush( vCopies, -1 );
936 continue;
937 }
938 else if ( Mini_AigNodeIsAnd( p, i ) )
939 iGiaLit = Gia_ManHashAnd(pGia, Gia_ObjFromMiniFanin0Copy(pGia, vCopies, p, i), Gia_ObjFromMiniFanin1Copy(pGia, vCopies, p, i));
940 else assert( 0 );
941 Vec_IntPush( vCopies, iGiaLit );
942 }
943 assert( Vec_IntSize(vCopies) == nNodes );
944 assert( nPos > Mini_AigRegNum(p) );
945 // create miters for each equiv class
946 for ( i = 1; i < nNodes; i++ )
947 {
948 if ( pEquivs[i] == -1 )
949 continue;
950 iGiaLit = Vec_IntEntry(vCopies, i);
951 iGiaLit2 = Abc_LitNotCond( Vec_IntEntry(vCopies, Abc_Lit2Var(pEquivs[i])), Abc_LitIsCompl(pEquivs[i]) );
952 Gia_ManAppendCo( pGia, Gia_ManHashXor(pGia, iGiaLit, iGiaLit2) );
953 }
954 // create flop inputs
955 Temp = Gia_ManCoNum(pGia);
956 for ( i = 1; i < nNodes; i++ )
957 {
958 if ( !Mini_AigNodeIsPo( p, i ) )
959 continue;
960 if ( iPos++ >= nPos - Mini_AigRegNum(p) )
961 Gia_ManAppendCo(pGia, Gia_ObjFromMiniFanin0Copy(pGia, vCopies, p, i));
962 }
963 assert( iPos == nPos );
964 assert( Mini_AigRegNum(p) == Gia_ManCoNum(pGia) - Temp );
965 Gia_ManSetRegNum( pGia, Mini_AigRegNum(p) );
966 Gia_ManHashStop( pGia );
967 Vec_IntFree( vCopies );
968 pGia = Gia_ManCleanup( pTemp = pGia );
969 Gia_ManStop( pTemp );
970 return pGia;
971}
972void Gia_MiniAigVerify( Abc_Frame_t * pAbc, char * pFileName )
973{
974 int * pEquivs;
975 Gia_Man_t * pGia;
976 char * pFileMiter = "mini_aig_miter.aig";
977 char * pFileReduced = "mini_aig_reduced.aig";
978 Mini_Aig_t * p = Mini_AigLoad( pFileName );
980 Cmd_CommandExecute( pAbc, "&ps; &scorr; &ps" );
981 pEquivs = Abc_FrameReadMiniAigEquivClasses( pAbc );
982 // dump miter for verification
983 pGia = Gia_MiniAigMiter( p, pEquivs );
984 Gia_AigerWrite( pGia, pFileMiter, 0, 0, 0 );
985 printf( "Dumped miter AIG in file \"%s\".\n", pFileMiter );
986 Gia_ManStop( pGia );
987 // dump reduced AIG
988 pGia = Gia_MiniAigReduce( p, pEquivs );
989 Gia_AigerWrite( pGia, pFileReduced, 0, 0, 0 );
990 printf( "Dumped reduced AIG in file \"%s\".\n", pFileReduced );
991 Gia_ManStop( pGia );
992 // cleanup
993 ABC_FREE( pEquivs );
994 Mini_AigStop( p );
995}
996
1008void Gia_MiniAigSuperGates_rec( Mini_Aig_t * p, int iObj, Vec_Int_t * vRes, Vec_Int_t * vMap )
1009{
1010 int iFan0, iFan1;
1011 if ( Mini_AigNodeIsPi(p, iObj) )
1012 {
1013 assert( Vec_IntEntry(vMap, iObj) >= 0 );
1014 Vec_IntPush( vRes, Vec_IntEntry(vMap, iObj) );
1015 return;
1016 }
1017 iFan0 = Mini_AigNodeFanin0( p, iObj );
1018 iFan1 = Mini_AigNodeFanin1( p, iObj );
1019 assert( !Abc_LitIsCompl(iFan0) );
1020 assert( !Abc_LitIsCompl(iFan1) );
1021 Gia_MiniAigSuperGates_rec( p, Abc_Lit2Var(iFan0), vRes, vMap );
1022 Gia_MiniAigSuperGates_rec( p, Abc_Lit2Var(iFan1), vRes, vMap );
1023}
1025{
1026 Vec_Wec_t * vRes = Vec_WecStart( Mini_AigPoNum(p) );
1027 Vec_Int_t * vMap = Vec_IntStartFull( Mini_AigNodeNum(p) );
1028 int i, Index = 0;
1029 Mini_AigForEachPi( p, i )
1030 Vec_IntWriteEntry( vMap, i, Index++ );
1031 assert( Index == Mini_AigPiNum(p) );
1032 Index = 0;
1033 Mini_AigForEachPo( p, i )
1034 {
1035 int iFan0 = Mini_AigNodeFanin0( p, i );
1036 assert( !Abc_LitIsCompl(iFan0) );
1037 Gia_MiniAigSuperGates_rec( p, Abc_Lit2Var(iFan0), Vec_WecEntry(vRes, Index++), vMap );
1038 }
1039 assert( Index == Mini_AigPoNum(p) );
1040 Vec_IntFree( vMap );
1041 return vRes;
1042}
1043
1056{
1057 int i, Entry;
1058 printf( "\n" );
1059 Vec_IntForEachEntry( p, Entry, i )
1060 printf( "%d(%d) ", Entry%nPis, Entry/nPis );
1061 printf( " Total = %d\n", Vec_IntSize(p) );
1062}
1064{
1065 int i, k = 0, This, Prev = -1, fChange = 0;
1066 Vec_IntForEachEntry( p, This, i )
1067 {
1068 if ( Prev == This )
1069 {
1070 Vec_IntWriteEntry( p, k++, (This/nPis+1)*nPis + This%nPis );
1071 Prev = -1;
1072 fChange = 1;
1073 }
1074 else
1075 {
1076 if ( Prev != -1 )
1077 Vec_IntWriteEntry( p, k++, Prev );
1078 Prev = This;
1079 }
1080 }
1081 if ( Prev != -1 )
1082 Vec_IntWriteEntry( p, k++, Prev );
1083 Vec_IntShrink( p, k );
1084 return fChange;
1085}
1086int Gia_MiniAigSuperPreprocess( Mini_Aig_t * p, Vec_Wec_t * vSuper, int nPis, int fVerbose )
1087{
1088 Vec_Int_t * vRes;
1089 int i, nIters, Multi = 1;
1090 Vec_WecForEachLevel( vSuper, vRes, i )
1091 {
1092 Vec_IntSort( vRes, 0 );
1093 if ( fVerbose )
1094 printf( "\nOutput %d\n", i );
1095 if ( fVerbose )
1096 Gia_MiniAigSuperPrintDouble( vRes, nPis );
1097 for ( nIters = 1; Gia_MiniAigSuperMerge(vRes, nPis); nIters++ )
1098 {
1099 if ( fVerbose )
1100 Gia_MiniAigSuperPrintDouble( vRes, nPis );
1101 }
1102 Multi = Abc_MaxInt( Multi, nIters );
1103 }
1104 if ( fVerbose )
1105 printf( "Multi = %d.\n", Multi );
1106 return Multi;
1107}
1108
1121{
1122 Gia_Man_t * pNew;
1123 Vec_Int_t * vTemp, * vLits = Vec_IntAlloc( 100 );
1124 Vec_Int_t * vDrivers = Vec_IntAlloc(100);
1125 int i, k, iObj, iLit, nInputs = nPis*Multi;
1126 pNew = Gia_ManStart( 1000 );
1127 pNew->pName = Abc_UtilStrsav( "tree" );
1128 for ( i = 0; i < nInputs; i++ )
1129 Gia_ManAppendCi( pNew );
1130 Gia_ManHashAlloc( pNew );
1131 Vec_WecForEachLevel( p, vTemp, i )
1132 {
1133 Vec_IntClear( vLits );
1134 Vec_IntForEachEntry( vTemp, iObj, k )
1135 {
1136 assert( iObj < nInputs );
1137 Vec_IntPush( vLits, 2+2*((iObj%nPis)*Multi+iObj/nPis) );
1138 }
1139 Vec_IntPush( vDrivers, Gia_ManHashAndMulti2(pNew, vLits) );
1140 }
1141 Gia_ManHashStop( pNew );
1142 Vec_IntFree( vLits );
1143 Vec_IntForEachEntry( vDrivers, iLit, i )
1144 Gia_ManAppendCo( pNew, iLit );
1145 Vec_IntFree( vDrivers );
1146 return pNew;
1147}
1148Gia_Man_t * Gia_MiniAigSuperDerive( char * pFileName, int fVerbose )
1149{
1150 Mini_Aig_t * p = Mini_AigLoad( pFileName );
1151 Vec_Wec_t * vSuper = Gia_MiniAigSuperGates( p );
1152 int Multi = Gia_MiniAigSuperPreprocess( p, vSuper, Mini_AigPiNum(p), fVerbose );
1153 Gia_Man_t * pNew = Gia_MiniAigSuperDeriveGia( vSuper, Mini_AigPiNum(p), Multi );
1154 Vec_WecFree( vSuper );
1155 Mini_AigStop( p );
1156 return pNew;
1157}
1158
1171{
1172 Vec_Int_t * vTriples = Vec_IntAlloc( 100 );
1173 char * pFileName = "test.txt";
1174 FILE * pFile = fopen( pFileName, "rb" );
1175 if ( pFile == NULL )
1176 printf( "Cannot open the file.\n" );
1177 else
1178 {
1179 int nLines = 0, nLinesAll = 0;
1180 char * pToken;
1181 char Buffer[1000];
1182 while ( fgets( Buffer, 1000, pFile ) != NULL )
1183 {
1184 nLinesAll++;
1185 if ( Buffer[0] != '#' )
1186 continue;
1187 //printf( "%s", Buffer );
1188 nLines++;
1189 pToken = strtok( Buffer+3, " \r\n\r+=" );
1190 while ( pToken )
1191 {
1192 Vec_IntPush( vTriples, atoi(pToken) );
1193 pToken = strtok( NULL, " \r\n\r+=" );
1194 }
1195 }
1196 fclose( pFile );
1197 printf( "Collected %d (out of %d) lines.\n", nLines, nLinesAll );
1198 printf( "Entries = %d\n", Vec_IntSize(vTriples) );
1199 }
1200 return vTriples;
1201}
1202void Gia_MiniAigGenerate_rec( Mini_Aig_t * p, Vec_Int_t * vTriples, int iObj, Vec_Int_t * vDefs, Vec_Int_t * vMap )
1203{
1204 int Index, Entry0, Entry1, Entry2, Value;
1205 if ( Vec_IntEntry(vMap, iObj) >= 0 )
1206 return;
1207 Index = Vec_IntEntry( vDefs, iObj );
1208 Entry0 = Vec_IntEntry( vTriples, 3*Index+0 );
1209 Entry1 = Vec_IntEntry( vTriples, 3*Index+1 );
1210 Entry2 = Vec_IntEntry( vTriples, 3*Index+2 );
1211 Gia_MiniAigGenerate_rec( p, vTriples, Entry1, vDefs, vMap );
1212 Gia_MiniAigGenerate_rec( p, vTriples, Entry2, vDefs, vMap );
1213 assert( Vec_IntEntry(vMap, Entry1) >= 0 );
1214 assert( Vec_IntEntry(vMap, Entry2) >= 0 );
1215 Value = Mini_AigAnd( p, Vec_IntEntry(vMap, Entry1), Vec_IntEntry(vMap, Entry2) );
1216 Vec_IntWriteEntry( vMap, Entry0, Value );
1217}
1219{
1220 Mini_Aig_t * p = Mini_AigStart();
1221 Vec_Int_t * vTriples = Gia_MiniAigProcessFile();
1222 Vec_Int_t * vDefs = Vec_IntStartFull( Vec_IntSize(vTriples) );
1223 Vec_Int_t * vMap = Vec_IntStartFull( Vec_IntSize(vTriples) );
1224 Vec_Int_t * vMapIn = Vec_IntStart( Vec_IntSize(vTriples) );
1225 Vec_Int_t * vMapOut = Vec_IntStart( Vec_IntSize(vTriples) );
1226 Vec_Int_t * vPis = Vec_IntAlloc( 100 );
1227 Vec_Int_t * vPos = Vec_IntAlloc( 100 );
1228 int i, ObjOut, ObjIn;
1229 assert( Vec_IntSize(vTriples) % 3 == 0 );
1230 for ( i = 0; i < Vec_IntSize(vTriples)/3; i++ )
1231 {
1232 int Entry0 = Vec_IntEntry(vTriples, 3*i+0);
1233 int Entry1 = Vec_IntEntry(vTriples, 3*i+1);
1234 int Entry2 = Vec_IntEntry(vTriples, 3*i+2);
1235 Vec_IntWriteEntry( vDefs, Entry0, i );
1236 Vec_IntAddToEntry( vMapOut, Entry0, 1 );
1237 Vec_IntAddToEntry( vMapIn, Entry1, 1 );
1238 Vec_IntAddToEntry( vMapIn, Entry2, 1 );
1239 }
1240 Vec_IntForEachEntryTwo( vMapOut, vMapIn, ObjOut, ObjIn, i )
1241 if ( !ObjOut && ObjIn )
1242 Vec_IntPush( vPis, i );
1243 else if ( ObjOut && !ObjIn )
1244 Vec_IntPush( vPos, i );
1245 Vec_IntForEachEntry( vPis, ObjIn, i )
1246 Vec_IntWriteEntry( vMap, ObjIn, Mini_AigCreatePi(p) );
1247 Vec_IntForEachEntry( vPos, ObjOut, i )
1248 Gia_MiniAigGenerate_rec( p, vTriples, ObjOut, vDefs, vMap );
1249 Vec_IntForEachEntry( vPos, ObjOut, i )
1250 {
1251 assert( Vec_IntEntry(vMap, ObjOut) >= 0 );
1252 Mini_AigCreatePo( p, Vec_IntEntry(vMap, ObjOut) );
1253 }
1254 Vec_IntFree( vTriples );
1255 Vec_IntFree( vDefs );
1256 Vec_IntFree( vMap );
1257 Vec_IntFree( vMapIn );
1258 Vec_IntFree( vMapOut );
1259 Vec_IntFree( vPis );
1260 Vec_IntFree( vPos );
1261 Mini_AigDump( p, "test.miniaig" );
1262 Mini_AigStop( p );
1263}
1264
1276Vec_Str_t * Gia_ManRetimableF( Gia_Man_t * p, int * pRst, int * pSet, int * pEna )
1277{
1278 Vec_Str_t * vStops = Vec_StrStart( Gia_ManObjNum(p) );
1279 Vec_Int_t * vTemps = Vec_IntStartFull( 3*Gia_ManObjNum(p) );
1280 Gia_Obj_t * pObj, * pObjRi, * pObjRo; int i;
1281 char * pStops = Vec_StrArray(vStops);
1282 assert( Gia_ManRegNum(p) > 0 );
1283 Gia_ManForEachRiRo( p, pObjRi, pObjRo, i ) {
1284 Vec_IntWriteEntry( vTemps, 3*Gia_ObjId(p, pObjRo) + 0, pRst[i] );
1285 Vec_IntWriteEntry( vTemps, 3*Gia_ObjId(p, pObjRo) + 1, pSet[i] );
1286 Vec_IntWriteEntry( vTemps, 3*Gia_ObjId(p, pObjRo) + 2, pEna[i] );
1287 }
1288 Gia_ManForEachAnd( p, pObj, i ) {
1289 int * pFan0 = Vec_IntEntryP( vTemps, 3*Gia_ObjFaninId0(pObj, i) );
1290 int * pFan1 = Vec_IntEntryP( vTemps, 3*Gia_ObjFaninId1(pObj, i) );
1291 int * pNode = Vec_IntEntryP( vTemps, 3*i );
1292 pStops[i] = (char)1;
1293 if ( pFan0[0] != -1 && pFan0[0] == pFan1[0] && pFan0[1] == pFan1[1] && pFan0[2] == pFan1[2] )
1294 pStops[i] = (char)0, pNode[0] = pFan0[0], pNode[1] = pFan0[1], pNode[2] = pFan0[2];
1295 }
1296 Vec_IntFree( vTemps );
1297 return vStops;
1298}
1299Vec_Str_t * Gia_ManRetimableB( Gia_Man_t * p, int * pRst, int * pSet, int * pEna )
1300{
1301 Vec_Str_t * vStops = Vec_StrStart( Gia_ManObjNum(p) );
1302 Vec_Int_t * vTemps = Vec_IntStartFull( 3*Gia_ManObjNum(p) );
1303 Gia_Obj_t * pObj, * pObjRi, * pObjRo; int i, n, iFanout;
1304 char * pStops = Vec_StrArray(vStops);
1305 assert( Gia_ManRegNum(p) > 0 );
1306 Gia_ManForEachRiRo( p, pObjRi, pObjRo, i ) {
1307 Vec_IntWriteEntry( vTemps, 3*Gia_ObjId(p, pObjRi) + 0, pRst[i] );
1308 Vec_IntWriteEntry( vTemps, 3*Gia_ObjId(p, pObjRi) + 1, pSet[i] );
1309 Vec_IntWriteEntry( vTemps, 3*Gia_ObjId(p, pObjRi) + 2, pEna[i] );
1310 }
1312 Gia_ManForEachAndReverse( p, pObj, i ) {
1313 int * pFan0 = Vec_IntEntryP( vTemps, 3*Gia_ObjFanoutId(p, i, 0) );
1314 int * pNode = Vec_IntEntryP( vTemps, 3*i );
1315 pStops[i] = (char)1;
1316 if ( pFan0[0] == -1 )
1317 continue;
1318 Gia_ObjForEachFanoutStaticId( p, i, iFanout, n ) {
1319 int * pFan1 = Vec_IntEntryP( vTemps, 3*iFanout );
1320 if ( pFan1[0] == -1 || pFan0[0] != pFan1[0] || pFan0[1] != pFan1[1] || pFan0[2] != pFan1[2] )
1321 break;
1322 }
1323 if ( n < Gia_ObjFanoutNum(p, pObj) )
1324 continue;
1325 pStops[i] = (char)0, pNode[0] = pFan0[0], pNode[1] = pFan0[1], pNode[2] = pFan0[2];
1326 }
1328 Vec_IntFree( vTemps );
1329 Gia_ManForEachRiRo( p, pObjRi, pObjRo, i ) {
1330 if ( Gia_ObjIsAnd(Gia_ManObj(p, Abc_Lit2Var(pRst[i]))) ) pStops[Abc_Lit2Var(pRst[i])] = 1;
1331 if ( Gia_ObjIsAnd(Gia_ManObj(p, Abc_Lit2Var(pSet[i]))) ) pStops[Abc_Lit2Var(pSet[i])] = 1;
1332 if ( Gia_ObjIsAnd(Gia_ManObj(p, Abc_Lit2Var(pEna[i]))) ) pStops[Abc_Lit2Var(pEna[i])] = 1;
1333 }
1334 return vStops;
1335}
1336
1348void Abc_FrameRemapLits( int * pLits, int nLits, Vec_Int_t * vMap )
1349{
1350 for ( int i = 0; i < nLits; i++ )
1351 pLits[i] = Abc_Lit2LitL( Vec_IntArray(vMap), pLits[i] );
1352}
1353void Abc_FrameSetRetimingData( Abc_Frame_t * pAbc, int * pRst, int * pSet, int * pEna, int nRegs )
1354{
1355 Gia_Man_t * pGia;
1356 int * pRstNew = ABC_CALLOC( int, nRegs );
1357 int * pSetNew = ABC_CALLOC( int, nRegs );
1358 int * pEnaNew = ABC_CALLOC( int, nRegs );
1359 if ( pAbc == NULL )
1360 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
1361 pGia = Abc_FrameReadGia( pAbc );
1362 if ( pGia == NULL )
1363 printf( "Current network in ABC framework is not defined.\n" );
1364 else {
1365 assert( nRegs == Gia_ManRegNum(pGia) );
1366 memmove( pRstNew, pRst, sizeof(int)*nRegs );
1367 memmove( pSetNew, pSet, sizeof(int)*nRegs );
1368 memmove( pEnaNew, pEna, sizeof(int)*nRegs );
1369 }
1370 if ( pAbc->vCopyMiniAig == NULL )
1371 printf( "Mapping of MiniAig nodes is not available.\n" );
1372 else {
1373 Abc_FrameRemapLits( pRstNew, nRegs, pAbc->vCopyMiniAig );
1374 Abc_FrameRemapLits( pSetNew, nRegs, pAbc->vCopyMiniAig );
1375 Abc_FrameRemapLits( pEnaNew, nRegs, pAbc->vCopyMiniAig );
1376 }
1377 assert( pGia->vStopsF == NULL );
1378 assert( pGia->vStopsB == NULL );
1379 pGia->vStopsF = Gia_ManRetimableF( pGia, pRstNew, pSetNew, pEnaNew );
1380 pGia->vStopsB = Gia_ManRetimableB( pGia, pRstNew, pSetNew, pEnaNew );
1381 ABC_FREE( pRstNew );
1382 ABC_FREE( pSetNew );
1383 ABC_FREE( pEnaNew );
1384}
1385
1389
1390
1392
int nWords
Definition abcNpn.c:127
void Abc_FrameUpdateGia(Abc_Frame_t *pAbc, Gia_Man_t *pNew)
Definition abc.c:824
#define ABC_SWAP(Type, a, b)
Definition abc_global.h:253
#define ABC_FALLOC(type, num)
Definition abc_global.h:266
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
#define ABC_FREE(obj)
Definition abc_global.h:267
#define ABC_CONST(number)
PARAMETERS ///.
Definition abc_global.h:240
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
Definition abcapis.h:38
ABC_DLL Gia_Man_t * Abc_FrameReadGia(Abc_Frame_t *p)
Definition mainFrame.c:343
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
struct Vec_Str_t_ Vec_Str_t
Definition bblif.c:46
ABC_DLL int Cmd_CommandExecute(Abc_Frame_t *pAbc, const char *sCommand)
Definition cmdApi.c:193
int Dsm_ManTruthToGia(void *p, word *pTruth, Vec_Int_t *vLeaves, Vec_Int_t *vCover)
Definition dauGia.c:441
Cube * p
Definition exorList.c:222
char * Extra_FileNameGeneric(char *FileName)
void * Abc_FrameGiaOutputMiniLut(Abc_Frame_t *pAbc)
Definition giaMini.c:533
Gia_Man_t * Gia_MiniAigSuperDeriveGia(Vec_Wec_t *p, int nPis, int Multi)
Definition giaMini.c:1120
int * Abc_FrameReadMiniLutSwitching(Abc_Frame_t *pAbc)
Definition giaMini.c:727
Gia_Man_t * Gia_MiniAigSuperDerive(char *pFileName, int fVerbose)
Definition giaMini.c:1148
Mini_Lut_t * Gia_ManToMiniLut(Gia_Man_t *pGia)
Definition giaMini.c:411
void Gia_ManReadMiniAigNames(char *pFileName, Gia_Man_t *pGia)
Definition giaMini.c:185
Vec_Int_t * Gia_ManMapEquivAfterScorr(Gia_Man_t *p, Vec_Int_t *vMap)
Definition giaMini.c:796
void Abc_FrameRemapLits(int *pLits, int nLits, Vec_Int_t *vMap)
Definition giaMini.c:1348
Gia_Man_t * Gia_ManReadMiniAig(char *pFileName, int fGiaSimple)
Definition giaMini.c:220
void Gia_MiniAigGenerateFromFile()
Definition giaMini.c:1218
void Gia_MiniAigSuperPrintDouble(Vec_Int_t *p, int nPis)
Definition giaMini.c:1055
void Abc_FrameSetRetimingData(Abc_Frame_t *pAbc, int *pRst, int *pSet, int *pEna, int nRegs)
Definition giaMini.c:1353
void Gia_ManWriteMiniAig(Gia_Man_t *pGia, char *pFileName)
Definition giaMini.c:237
int * Abc_FrameReadMiniAigEquivClasses(Abc_Frame_t *pAbc)
Definition giaMini.c:835
Vec_Int_t * Gia_MiniAigProcessFile()
Definition giaMini.c:1170
void * Abc_FrameGiaOutputMiniAig(Abc_Frame_t *pAbc)
Definition giaMini.c:163
int * Gia_ManMapMiniLut2MiniAig(Gia_Man_t *p, Gia_Man_t *p1, Gia_Man_t *p2, Vec_Int_t *vMap1, Vec_Int_t *vMap2)
Definition giaMini.c:614
Gia_Man_t * Gia_ManFromMiniAig(Mini_Aig_t *p, Vec_Int_t **pvCopies, int fGiaSimple)
Definition giaMini.c:62
Gia_Man_t * Gia_ManFromMiniLut(Mini_Lut_t *p, Vec_Int_t **pvCopies)
Definition giaMini.c:259
int Gia_ObjFromMiniFanin0Copy(Gia_Man_t *pGia, Vec_Int_t *vCopies, Mini_Aig_t *p, int Id)
FUNCTION DEFINITIONS ///.
Definition giaMini.c:52
Gia_Man_t * Gia_ManFromMiniLut2(Mini_Lut_t *p, Vec_Int_t **pvCopies)
Definition giaMini.c:325
void Gia_ManNameMapVerify(Gia_Man_t *p, Gia_Man_t *p1, Gia_Man_t *p2, Vec_Int_t *vMap1, Vec_Int_t *vMap2, int *pMap)
Definition giaMini.c:670
char * Gia_ManToMiniLutAttr(Gia_Man_t *pGia, void *pMiniLut)
Definition giaMini.c:494
void Gia_MiniAigSuperGates_rec(Mini_Aig_t *p, int iObj, Vec_Int_t *vRes, Vec_Int_t *vMap)
Definition giaMini.c:1008
Vec_Bit_t * Gia_ManFindComplLuts(Gia_Man_t *pGia)
Definition giaMini.c:385
Vec_Str_t * Gia_ManRetimableB(Gia_Man_t *p, int *pRst, int *pSet, int *pEna)
Definition giaMini.c:1299
void Abc_FrameSetObjDelays(Abc_Frame_t *pAbc, int *pDelays, int nDelays)
Definition giaMini.c:569
Vec_Str_t * Gia_ManRetimableF(Gia_Man_t *p, int *pRst, int *pSet, int *pEna)
Definition giaMini.c:1276
void Gia_ManWriteMiniLut(Gia_Man_t *pGia, char *pFileName)
Definition giaMini.c:596
int Gia_MiniAigSuperPreprocess(Mini_Aig_t *p, Vec_Wec_t *vSuper, int nPis, int fVerbose)
Definition giaMini.c:1086
void Abc_FrameGiaInputMiniLut2(Abc_Frame_t *pAbc, void *p)
Definition giaMini.c:524
void Gia_MiniAigGenerate_rec(Mini_Aig_t *p, Vec_Int_t *vTriples, int iObj, Vec_Int_t *vDefs, Vec_Int_t *vMap)
Definition giaMini.c:1202
Gia_Man_t * Gia_MiniAigMiter(Mini_Aig_t *p, int *pEquivs)
Definition giaMini.c:913
ABC_NAMESPACE_IMPL_START int Kit_TruthToGia(Gia_Man_t *pMan, unsigned *pTruth, int nVars, Vec_Int_t *vMemory, Vec_Int_t *vLeaves, int fHash)
DECLARATIONS ///.
Definition kitHop.c:80
int Gia_MiniAigSuperMerge(Vec_Int_t *p, int nPis)
Definition giaMini.c:1063
Mini_Aig_t * Gia_ManToMiniAig(Gia_Man_t *pGia)
Definition giaMini.c:118
int * Abc_FrameGiaOutputMiniLutObj(Abc_Frame_t *pAbc)
Definition giaMini.c:558
int * Abc_FrameReadMiniLutSwitchingPo(Abc_Frame_t *pAbc)
Definition giaMini.c:761
void Abc_FrameGiaInputMiniLut(Abc_Frame_t *pAbc, void *p)
Definition giaMini.c:515
int Gia_ObjFromMiniFanin1Copy(Gia_Man_t *pGia, Vec_Int_t *vCopies, Mini_Aig_t *p, int Id)
Definition giaMini.c:57
Gia_Man_t * Gia_ManReadMiniLut(char *pFileName)
Definition giaMini.c:587
Vec_Wec_t * Gia_MiniAigSuperGates(Mini_Aig_t *p)
Definition giaMini.c:1024
char * Abc_FrameGiaOutputMiniLutAttr(Abc_Frame_t *pAbc, void *pMiniLut)
Definition giaMini.c:548
void Abc_FrameGiaInputMiniAig(Abc_Frame_t *pAbc, void *p)
Definition giaMini.c:151
int * Abc_FrameReadMiniLutSwitching2(Abc_Frame_t *pAbc, int fRandPiFactor)
Definition giaMini.c:744
int * Abc_FrameReadMiniLutNameMapping(Abc_Frame_t *pAbc)
Definition giaMini.c:699
void Gia_MiniAigVerify(Abc_Frame_t *pAbc, char *pFileName)
Definition giaMini.c:972
Gia_Man_t * Gia_MiniAigReduce(Mini_Aig_t *p, int *pEquivs)
Definition giaMini.c:877
void Gia_ManStop(Gia_Man_t *p)
Definition giaMan.c:82
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
Definition giaDup.c:720
word * Gia_ObjComputeTruthTableCut(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vLeaves)
Definition giaTruth.c:628
void Gia_ManStaticFanoutStart(Gia_Man_t *p)
Definition giaFanout.c:238
void Gia_ManStaticFanoutStop(Gia_Man_t *p)
Definition giaFanout.c:393
int Gia_ManIsNormalized(Gia_Man_t *p)
Definition giaTim.c:114
#define Gia_ManForEachAnd(p, pObj, i)
Definition gia.h:1214
#define Gia_ManForEachAndReverse(p, pObj, i)
Definition gia.h:1222
void Gia_ManStopP(Gia_Man_t **p)
Definition giaMan.c:224
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Definition giaMan.c:764
#define Gia_ManForEachCoDriverId(p, DriverId, i)
Definition gia.h:1246
Gia_Man_t * Gia_ManDup2(Gia_Man_t *p1, Gia_Man_t *p2)
Definition giaDup.c:751
int Gia_ManHashAndMulti2(Gia_Man_t *p, Vec_Int_t *vLits)
Definition giaHash.c:802
void Gia_ManHashAlloc(Gia_Man_t *p)
Definition giaHash.c:105
#define Gia_ManForEachLut(p, i)
Definition gia.h:1157
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
Definition giaMan.c:57
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
#define Gia_LutForEachFanin(p, i, iFan, k)
Definition gia.h:1161
int Gia_ManHashXor(Gia_Man_t *p, int iLit0, int iLit1)
Definition giaHash.c:668
void Gia_ManDupRemapLiterals(Vec_Int_t *vLits, Gia_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition giaDup.c:54
void Gia_ManFillValue(Gia_Man_t *p)
Definition giaUtil.c:369
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
Definition gia.h:1194
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
Definition giaScl.c:84
Gia_Man_t * Gia_ManComputeGiaEquivs(Gia_Man_t *pGia, int nConfs, int fVerbose)
Definition giaEquiv.c:183
void Gia_ObjComputeTruthTableStart(Gia_Man_t *p, int nVarsMax)
Definition giaTruth.c:552
int Gia_ManLutSizeMax(Gia_Man_t *p)
Definition giaIf.c:127
void Gia_ObjComputeTruthTableStop(Gia_Man_t *p)
Definition giaTruth.c:568
Gia_Man_t * Gia_ManDupNormalize(Gia_Man_t *p, int fHashMapping)
Definition giaTim.c:139
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
Definition giaHash.c:576
#define Gia_ObjForEachFanoutStaticId(p, Id, FanId, i)
Definition gia.h:1127
#define Gia_ManForEachCo(p, pObj, i)
Definition gia.h:1236
#define Gia_ManForEachCi(p, pObj, i)
Definition gia.h:1228
#define Gia_ManForEachRiRo(p, pObjRi, pObjRo, i)
Definition gia.h:1256
void Gia_ManSetPhase(Gia_Man_t *p)
Definition giaUtil.c:420
Vec_Int_t * Gia_ManComputeSwitchProbs(Gia_Man_t *pGia, int nFrames, int nPref, int fProbOne)
Definition giaSwitch.c:658
void Gia_ManHashStop(Gia_Man_t *p)
Definition giaHash.c:149
Vec_Int_t * Gia_ManComputeSwitchProbs2(Gia_Man_t *pGia, int nFrames, int nPref, int fProbOne, int nRandPiFactor)
Definition giaSwitch.c:684
Gia_Man_t * Gia_ManSeqCleanup(Gia_Man_t *p)
Definition giaScl.c:183
void Gia_AigerWrite(Gia_Man_t *p, char *pFileName, int fWriteSymbols, int fCompact, int fWriteNewLine)
Definition giaAiger.c:1595
unsigned __int64 word
DECLARATIONS ///.
Definition kitPerm.c:36
struct Mini_Aig_t_ Mini_Aig_t
BASIC TYPES ///.
Definition miniaig.h:48
#define Mini_AigForEachPi(p, i)
Definition miniaig.h:138
#define Mini_AigForEachPo(p, i)
Definition miniaig.h:139
#define Mini_LutForEachFanin(p, i, Fan, k)
Definition minilut.h:144
struct Mini_Lut_t_ Mini_Lut_t
BASIC TYPES ///.
Definition minilut.h:47
Vec_Ptr_t * vNamesIn
Definition gia.h:181
Vec_Str_t * vStopsF
Definition gia.h:245
Vec_Str_t * vStopsB
Definition gia.h:246
Vec_Wrd_t * vTtMemory
Definition gia.h:232
Vec_Ptr_t * vNamesOut
Definition gia.h:182
int fGiaSimple
Definition gia.h:116
char * pName
Definition gia.h:99
unsigned Value
Definition gia.h:89
unsigned fPhase
Definition gia.h:87
#define assert(ex)
Definition util_old.h:213
int strlen()
char * strtok()
char * memmove()
typedefABC_NAMESPACE_HEADER_START struct Vec_Bit_t_ Vec_Bit_t
INCLUDES ///.
Definition vecBit.h:42
typedefABC_NAMESPACE_HEADER_START struct Vec_Flt_t_ Vec_Flt_t
INCLUDES ///.
Definition vecFlt.h:42
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
#define Vec_IntForEachEntryTwo(vVec1, vVec2, Entry1, Entry2, i)
Definition vecInt.h:66
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55
#define Vec_WecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
Definition vecWec.h:55
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
Definition vecWec.h:42