ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
giaResub6.c File Reference
#include "gia.h"
#include "misc/util/utilTruth.h"
#include "base/io/ioResub.h"
Include dependency graph for giaResub6.c:

Go to the source code of this file.

Classes

struct  Res6_Man_t_
 

Macros

#define MAX_NODE   100
 DECLARATIONS ///.
 

Typedefs

typedef struct Res6_Man_t_ Res6_Man_t
 

Functions

void Dau_DsdPrintFromTruth2 (word *pTruth, int nVarsInit)
 
Res6_Man_tRes6_ManReadPla (char *pFileName)
 
Res6_Man_tRes6_ManRead (char *pFileName)
 
void Res6_ManWrite (char *pFileName, Res6_Man_t *p)
 
void Res6_ManPrintProblem (Res6_Man_t *p, int fVerbose)
 
Vec_Int_tRes6_FindSupport (Vec_Int_t *vSol, int nDivs)
 
void Res6_PrintSuppSims (Vec_Int_t *vSol, word **ppLits, int nWords, int nDivs)
 
int Res6_FindSupportSize (Vec_Int_t *vSol, int nDivs)
 
void Res6_PrintSolution (Vec_Int_t *vSol, int nDivs)
 
int Res6_FindGetCost (Res6_Man_t *p, int iDiv)
 
int Res6_FindBestDiv (Res6_Man_t *p, int *pCost)
 
int Res6_FindBestEval (Res6_Man_t *p, Vec_Int_t *vSol, int Start)
 
void Res6_ManResubVerify (Res6_Man_t *p, Vec_Int_t *vSol)
 
void Res6_ManResubCheck (char *pFileNameRes, char *pFileNameSol, int fVerbose)
 
int Res6_FindBestEvalPla (Res6_Man_t *p, Vec_Int_t *vSol)
 
void Res6_ManResubVerifyPla (Res6_Man_t *p, Vec_Int_t *vSol)
 
void Res6_PrintSolutionPla (Vec_Int_t *vSol, int nSuppSize, int nDivs)
 
void Res6_ManResubCheckPla (char *pFileName, int fVerbose)
 

Macro Definition Documentation

◆ MAX_NODE

#define MAX_NODE   100

DECLARATIONS ///.

CFile****************************************************************

FileName [giaResub6.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Scalable AIG package.]

Synopsis [Resubstitution.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

Id
giaResub6.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]

Definition at line 31 of file giaResub6.c.

Typedef Documentation

◆ Res6_Man_t

typedef struct Res6_Man_t_ Res6_Man_t

Definition at line 33 of file giaResub6.c.

Function Documentation

◆ Dau_DsdPrintFromTruth2()

void Dau_DsdPrintFromTruth2 ( word * pTruth,
int nVarsInit )
extern

Definition at line 1976 of file dauDsd.c.

1977{
1978 char pRes[DAU_MAX_STR];
1979 word pTemp[DAU_MAX_WORD];
1980 Abc_TtCopy( pTemp, pTruth, Abc_TtWordNum(nVarsInit), 0 );
1981 Dau_DsdDecompose( pTemp, nVarsInit, 0, 1, pRes );
1982 fprintf( stdout, "%s", pRes );
1983}
int Dau_DsdDecompose(word *pTruth, int nVarsInit, int fSplitPrime, int fWriteTruth, char *pRes)
Definition dauDsd.c:1912
#define DAU_MAX_WORD
Definition dau.h:44
#define DAU_MAX_STR
Definition dau.h:43
unsigned __int64 word
DECLARATIONS ///.
Definition kitPerm.c:36
Here is the caller graph for this function:

◆ Res6_FindBestDiv()

int Res6_FindBestDiv ( Res6_Man_t * p,
int * pCost )

Definition at line 397 of file giaResub6.c.

398{
399 int d, dBest = -1, CostBest = ABC_INFINITY;
400 for ( d = 0; d < 2*p->nDivs; d++ )
401 {
402 int Cost = Res6_FindGetCost( p, d );
403 printf( "Div = %d Cost = %d\n", d, Cost );
404 if ( CostBest >= Cost )
405 CostBest = Cost, dBest = d;
406 }
407 if ( pCost )
408 *pCost = CostBest;
409 return dBest;
410}
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition abc_global.h:250
Cube * p
Definition exorList.c:222
int Res6_FindGetCost(Res6_Man_t *p, int iDiv)
Definition giaResub6.c:384
Here is the call graph for this function:

◆ Res6_FindBestEval()

int Res6_FindBestEval ( Res6_Man_t * p,
Vec_Int_t * vSol,
int Start )

Definition at line 411 of file giaResub6.c.

412{
413 int i, iLit0, iLit1;
414 assert( Vec_IntSize(vSol) % 2 == 0 );
415 Vec_IntForEachEntryDoubleStart( vSol, iLit0, iLit1, i, 2*Start )
416 {
417 if ( iLit0 > iLit1 )
418 {
419 Abc_TtXor( p->ppLits[2*p->nDivs+i+0], p->ppLits[iLit0], p->ppLits[iLit1], p->nWords, 0 );
420 Abc_TtXor( p->ppLits[2*p->nDivs+i+1], p->ppLits[iLit0], p->ppLits[iLit1], p->nWords, 1 );
421 }
422 else
423 {
424 Abc_TtAnd( p->ppLits[2*p->nDivs+i+0], p->ppLits[iLit0], p->ppLits[iLit1], p->nWords, 0 );
425 Abc_TtOr ( p->ppLits[2*p->nDivs+i+1], p->ppLits[iLit0^1], p->ppLits[iLit1^1], p->nWords );
426 }
427
428 //printf( "Node %d\n", i/2 );
429 //Abc_TtPrintBinary1( stdout, p->ppLits[2*p->nDivs+i+0], 6 ); printf( "\n" );
430 //Abc_TtPrintBinary1( stdout, p->ppLits[2*p->nDivs+i+1], 6 ); printf( "\n" );
431 }
432 return Res6_FindGetCost( p, Vec_IntEntryLast(vSol) );
433}
#define assert(ex)
Definition util_old.h:213
#define Vec_IntForEachEntryDoubleStart(vVec, Entry1, Entry2, i, Start)
Definition vecInt.h:74
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Res6_FindBestEvalPla()

int Res6_FindBestEvalPla ( Res6_Man_t * p,
Vec_Int_t * vSol )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 493 of file giaResub6.c.

494{
495 int i, n, iObj, iLit0, iLit1, iOffset = 2*(1+Vec_IntSize(&p->vSupp));
496 assert( Vec_IntSize(vSol) % 2 == 0 );
497 Vec_IntForEachEntry( &p->vSupp, iObj, i )
498 for ( n = 0; n < 2; n++ )
499 Abc_TtCopy( p->ppLits[2*(1+i)+n], p->ppLits[2*iObj+n], p->nWords, 0 );
500 Vec_IntForEachEntryDouble( vSol, iLit0, iLit1, i )
501 {
502 if ( iLit0 > iLit1 )
503 {
504 Abc_TtXor( p->ppLits[iOffset+i+0], p->ppLits[iLit0], p->ppLits[iLit1], p->nWords, 0 );
505 Abc_TtXor( p->ppLits[iOffset+i+1], p->ppLits[iLit0], p->ppLits[iLit1], p->nWords, 1 );
506 }
507 else
508 {
509 Abc_TtAnd( p->ppLits[iOffset+i+0], p->ppLits[iLit0], p->ppLits[iLit1], p->nWords, 0 );
510 Abc_TtOr ( p->ppLits[iOffset+i+1], p->ppLits[iLit0^1], p->ppLits[iLit1^1], p->nWords );
511 }
512 }
513 return Res6_FindGetCost( p, Vec_IntEntryLast(vSol) );
514}
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
Definition vecInt.h:72
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Res6_FindGetCost()

int Res6_FindGetCost ( Res6_Man_t * p,
int iDiv )

Definition at line 384 of file giaResub6.c.

385{
386 int w, Cost = 0;
387 //printf( "DivLit = %d\n", iDiv );
388 //Abc_TtPrintBinary1( stdout, p->ppLits[iDiv], p->nIns ); printf( "\n" );
389 //printf( "Set0\n" );
390 //Abc_TtPrintBinary1( stdout, p->ppSets[0], p->nIns ); printf( "\n" );
391 //printf( "Set1\n" );
392 //Abc_TtPrintBinary1( stdout, p->ppSets[1], p->nIns ); printf( "\n" );
393 for ( w = 0; w < p->nWords; w++ )
394 Cost += Abc_TtCountOnes( (p->ppLits[iDiv][w] & p->ppSets[0][w]) | (p->ppLits[iDiv^1][w] & p->ppSets[1][w]) );
395 return Cost;
396}
Here is the caller graph for this function:

◆ Res6_FindSupport()

Vec_Int_t * Res6_FindSupport ( Vec_Int_t * vSol,
int nDivs )

Definition at line 320 of file giaResub6.c.

321{
322 int i, iLit;
323 Vec_Int_t * vSupp = Vec_IntAlloc( 10 );
324 Vec_IntForEachEntry( vSol, iLit, i )
325 if ( iLit >= 2 && iLit < 2*nDivs )
326 Vec_IntPushUnique( vSupp, Abc_Lit2Var(iLit) );
327 return vSupp;
328}
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
Here is the caller graph for this function:

◆ Res6_FindSupportSize()

int Res6_FindSupportSize ( Vec_Int_t * vSol,
int nDivs )

Definition at line 359 of file giaResub6.c.

360{
361 Vec_Int_t * vSupp = Res6_FindSupport( vSol, nDivs );
362 int Res = Vec_IntSize(vSupp);
363 Vec_IntFree( vSupp );
364 return Res;
365}
Vec_Int_t * Res6_FindSupport(Vec_Int_t *vSol, int nDivs)
Definition giaResub6.c:320
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Res6_ManPrintProblem()

void Res6_ManPrintProblem ( Res6_Man_t * p,
int fVerbose )

Definition at line 235 of file giaResub6.c.

236{
237 int i, nInputs = (p->nIns && p->nIns < 6) ? p->nIns : 6;
238 printf( "Problem: In = %d Div = %d Out = %d Pat = %d\n", p->nIns, p->nDivs - p->nIns - 1, p->nOuts, p->nPats );
239 if ( !fVerbose )
240 return;
241 printf( "%02d : %s\n", 0, "const0" );
242 printf( "%02d : %s\n", 1, "const1" );
243 for ( i = 1; i < p->nDivs; i++ )
244 {
245 if ( nInputs < 6 )
246 {
247 *p->ppLits[2*i+0] = Abc_Tt6Stretch( *p->ppLits[2*i+0], nInputs );
248 *p->ppLits[2*i+1] = Abc_Tt6Stretch( *p->ppLits[2*i+1], nInputs );
249 }
250 printf("%02d : ", 2*i+0), Dau_DsdPrintFromTruth2(p->ppLits[2*i+0], nInputs), printf( "\n" );
251 printf("%02d : ", 2*i+1), Dau_DsdPrintFromTruth2(p->ppLits[2*i+1], nInputs), printf( "\n" );
252 }
253 for ( i = 0; i < (1 << p->nOuts); i++ )
254 {
255 if ( nInputs < 6 )
256 *p->ppSets[i] = Abc_Tt6Stretch( *p->ppSets[i], nInputs );
257 printf("%02d : ", i), Dau_DsdPrintFromTruth2(p->ppSets[i], nInputs), printf( "\n" );
258 }
259}
void Dau_DsdPrintFromTruth2(word *pTruth, int nVarsInit)
Definition dauDsd.c:1976
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Res6_ManRead()

Res6_Man_t * Res6_ManRead ( char * pFileName)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 152 of file giaResub6.c.

153{
154 Res6_Man_t * p = NULL;
155 FILE * pFile = fopen( pFileName, "rb" );
156 if ( pFile == NULL )
157 printf( "Cannot open input file \"%s\".\n", pFileName );
158 else
159 {
160 int i, k, nIns, nNodes, nOuts, nPats;
161 char Temp[100], Buffer[100];
162 char * pLine = fgets( Buffer, 100, pFile );
163 if ( pLine == NULL )
164 {
165 printf( "Cannot read the header line of input file \"%s\".\n", pFileName );
166 return NULL;
167 }
168 if ( 5 != sscanf(pLine, "%s %d %d %d %d", Temp, &nIns, &nNodes, &nOuts, &nPats) )
169 {
170 printf( "Cannot read the parameters from the header of input file \"%s\".\n", pFileName );
171 return NULL;
172 }
173 p = Res6_ManStart( nIns, nNodes, nOuts, nPats );
174 pLine = ABC_ALLOC( char, nPats + 100 );
175 for ( i = 1; i < p->nDivs; i++ )
176 {
177 char * pNext = fgets( pLine, nPats + 100, pFile );
178 if ( pNext == NULL )
179 {
180 printf( "Cannot read line %d of input file \"%s\".\n", i, pFileName );
181 Res6_ManStop( p );
182 ABC_FREE( pLine );
183 fclose( pFile );
184 return NULL;
185 }
186 for ( k = 0; k < p->nPats; k++ )
187 if ( pNext[k] == '0' )
188 Abc_TtSetBit( p->ppLits[2*i+1], k );
189 else if ( pNext[k] == '1' )
190 Abc_TtSetBit( p->ppLits[2*i], k );
191 }
192 for ( i = 0; i < (1 << p->nOuts); i++ )
193 {
194 char * pNext = fgets( pLine, nPats + 100, pFile );
195 if ( pNext == NULL )
196 {
197 printf( "Cannot read line %d of input file \"%s\".\n", i, pFileName );
198 Res6_ManStop( p );
199 ABC_FREE( pLine );
200 fclose( pFile );
201 return NULL;
202 }
203 for ( k = 0; k < p->nPats; k++ )
204 if ( pNext[k] == '1' )
205 Abc_TtSetBit( p->ppSets[i], k );
206 }
207 ABC_FREE( pLine );
208 fclose( pFile );
209 }
210 return p;
211}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
#define ABC_FREE(obj)
Definition abc_global.h:267
struct Res6_Man_t_ Res6_Man_t
Definition giaResub6.c:33
Here is the caller graph for this function:

◆ Res6_ManReadPla()

Res6_Man_t * Res6_ManReadPla ( char * pFileName)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 117 of file giaResub6.c.

118{
119 int i, n;
120 Abc_RData_t * pData = Abc_ReadPla( pFileName ); assert( pData->nOuts == 1 );
121 Res6_Man_t * p = pData ? Res6_ManStart( 0, pData->nIns, pData->nOuts, pData->nPats ) : NULL;
122 if ( p == NULL ) return NULL;
123 assert( pData->nSimWords == p->nWords );
124 for ( i = 1; i < p->nDivs; i++ )
125 for ( n = 0; n < 2; n++ )
126 Abc_TtCopy( p->ppLits[2*i+n], Vec_WrdEntryP(pData->vSimsIn, (i-1)*pData->nSimWords), pData->nSimWords, n );
127 for ( i = 0; i < (1 << p->nOuts); i++ )
128 Abc_TtCopy( p->ppSets[i], Vec_WrdEntryP(pData->vSimsOut, i*pData->nSimWords), pData->nSimWords, 0 );
129 if ( pData->vDivs )
130 Vec_IntForEachEntry( pData->vDivs, n, i )
131 Vec_IntPush( &p->vSupp, 1+n );
132 if ( pData->vSol ) {
133 Vec_IntForEachEntry( pData->vSol, n, i )
134 Vec_IntPush( &p->vSol, n );
135 Vec_IntPush( &p->vSol, Vec_IntEntryLast(&p->vSol) );
136 }
137 Abc_RDataStop( pData );
138 return p;
139}
typedefABC_NAMESPACE_HEADER_START struct Abc_RData_t_ Abc_RData_t
INCLUDES ///.
Definition ioResub.h:40
Here is the caller graph for this function:

◆ Res6_ManResubCheck()

void Res6_ManResubCheck ( char * pFileNameRes,
char * pFileNameSol,
int fVerbose )

Definition at line 454 of file giaResub6.c.

455{
456 char FileNameSol[1000];
457 if ( pFileNameSol )
458 strcpy( FileNameSol, pFileNameSol );
459 else
460 {
461 strcpy( FileNameSol, pFileNameRes );
462 strcpy( FileNameSol + strlen(FileNameSol) - strlen(".resub"), ".sol" );
463 }
464 {
465 Res6_Man_t * p = Res6_ManRead( pFileNameRes );
466 Vec_Int_t * vSol = Res6_ManReadSol( FileNameSol );
467 //Vec_IntPrint( vSol );
468 if ( p == NULL || vSol == NULL )
469 return;
470 if ( fVerbose )
472 if ( fVerbose )
473 Res6_PrintSolution( vSol, p->nDivs );
474 //if ( fVerbose )
475 // Res6_PrintSuppSims( vSol, p->ppLits, p->nWords, p->nDivs );
476 Res6_ManResubVerify( p, vSol );
477 Vec_IntFree( vSol );
478 Res6_ManStop( p );
479 }
480}
Res6_Man_t * Res6_ManRead(char *pFileName)
Definition giaResub6.c:152
void Res6_ManPrintProblem(Res6_Man_t *p, int fVerbose)
Definition giaResub6.c:235
void Res6_ManResubVerify(Res6_Man_t *p, Vec_Int_t *vSol)
Definition giaResub6.c:446
void Res6_PrintSolution(Vec_Int_t *vSol, int nDivs)
Definition giaResub6.c:366
int strlen()
char * strcpy()
Here is the call graph for this function:

◆ Res6_ManResubCheckPla()

void Res6_ManResubCheckPla ( char * pFileName,
int fVerbose )

Definition at line 541 of file giaResub6.c.

542{
543 Res6_Man_t * p = Res6_ManReadPla( pFileName );
544 if ( p == NULL ) return;
545 //Vec_IntPrint( &p->vSupp );
546 //Vec_IntPrint( &p->vSol );
547 if ( fVerbose )
549 if ( fVerbose )
550 Res6_PrintSolutionPla( &p->vSol, Vec_IntSize(&p->vSupp), p->nDivs );
551 //if ( fVerbose )
552 // Res6_PrintSuppSims( vSol, p->ppLits, p->nWords, p->nDivs );
553 Res6_ManResubVerifyPla( p, &p->vSol );
554 Res6_ManStop( p );
555}
void Res6_ManResubVerifyPla(Res6_Man_t *p, Vec_Int_t *vSol)
Definition giaResub6.c:515
Res6_Man_t * Res6_ManReadPla(char *pFileName)
Definition giaResub6.c:117
void Res6_PrintSolutionPla(Vec_Int_t *vSol, int nSuppSize, int nDivs)
Definition giaResub6.c:523
Here is the call graph for this function:

◆ Res6_ManResubVerify()

void Res6_ManResubVerify ( Res6_Man_t * p,
Vec_Int_t * vSol )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 446 of file giaResub6.c.

447{
448 int Cost = Res6_FindBestEval( p, vSol, 0 );
449 if ( Cost == 0 )
450 printf( "Verification successful.\n" );
451 else
452 printf( "Verification FAILED with %d errors on %d patterns.\n", Cost, p->nPats );
453}
int Res6_FindBestEval(Res6_Man_t *p, Vec_Int_t *vSol, int Start)
Definition giaResub6.c:411
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Res6_ManResubVerifyPla()

void Res6_ManResubVerifyPla ( Res6_Man_t * p,
Vec_Int_t * vSol )

Definition at line 515 of file giaResub6.c.

516{
517 int Cost = Res6_FindBestEvalPla( p, vSol );
518 if ( Cost == 0 )
519 printf( "Verification successful.\n" );
520 else
521 printf( "Verification FAILED with %d errors on %d patterns.\n", Cost, p->nPats );
522}
int Res6_FindBestEvalPla(Res6_Man_t *p, Vec_Int_t *vSol)
Definition giaResub6.c:493
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Res6_ManWrite()

void Res6_ManWrite ( char * pFileName,
Res6_Man_t * p )

Definition at line 212 of file giaResub6.c.

213{
214 FILE * pFile = fopen( pFileName, "wb" );
215 if ( pFile == NULL )
216 printf( "Cannot open output file \"%s\".\n", pFileName );
217 else
218 {
219 int i, k;
220 fprintf( pFile, "resyn %d %d %d %d\n", p->nIns, p->nDivs - p->nIns - 1, p->nOuts, p->nPats );
221 for ( i = 1; i < p->nDivs; i++, fputc('\n', pFile) )
222 for ( k = 0; k < p->nPats; k++ )
223 if ( Abc_TtGetBit(p->ppLits[2*i+1], k) )
224 fputc( '0', pFile );
225 else if ( Abc_TtGetBit(p->ppLits[2*i], k) )
226 fputc( '1', pFile );
227 else
228 fputc( '-', pFile );
229 for ( i = 0; i < (1 << p->nOuts); i++, fputc('\n', pFile) )
230 for ( k = 0; k < p->nPats; k++ )
231 fputc( '0' + Abc_TtGetBit(p->ppSets[i], k), pFile );
232 fclose( pFile );
233 }
234}

◆ Res6_PrintSolution()

void Res6_PrintSolution ( Vec_Int_t * vSol,
int nDivs )

Definition at line 366 of file giaResub6.c.

367{
368 int iNode, nNodes = Vec_IntSize(vSol)/2-1;
369 assert( Vec_IntSize(vSol) % 2 == 0 );
370 printf( "Solution: In = %d Div = %d Node = %d Out = %d\n", Res6_FindSupportSize(vSol, nDivs), nDivs-1, nNodes, 1 );
371 for ( iNode = 0; iNode <= nNodes; iNode++ )
372 {
373 int * pLits = Vec_IntEntryP( vSol, 2*iNode );
374 printf( "x%-2d = ", nDivs + iNode );
375 Res6_LitPrint( pLits[0], nDivs );
376 if ( pLits[0] != pLits[1] )
377 {
378 printf( " %c ", pLits[0] < pLits[1] ? '&' : '^' );
379 Res6_LitPrint( pLits[1], nDivs );
380 }
381 printf( "\n" );
382 }
383}
int Res6_FindSupportSize(Vec_Int_t *vSol, int nDivs)
Definition giaResub6.c:359
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Res6_PrintSolutionPla()

void Res6_PrintSolutionPla ( Vec_Int_t * vSol,
int nSuppSize,
int nDivs )

Definition at line 523 of file giaResub6.c.

524{
525 int iNode, nNodes = Vec_IntSize(vSol)/2-1;
526 assert( Vec_IntSize(vSol) % 2 == 0 );
527 printf( "Solution: In = %d Div = %d Node = %d Out = %d\n", nSuppSize, nDivs-1, nNodes, 1 );
528 for ( iNode = 0; iNode <= nNodes; iNode++ )
529 {
530 int * pLits = Vec_IntEntryP( vSol, 2*iNode );
531 printf( "x%-2d = ", 1+nSuppSize+iNode );
532 Res6_LitPrint( pLits[0], 1+nSuppSize );
533 if ( pLits[0] != pLits[1] )
534 {
535 printf( " %c ", pLits[0] < pLits[1] ? '&' : '^' );
536 Res6_LitPrint( pLits[1], 1+nSuppSize );
537 }
538 printf( "\n" );
539 }
540}
Here is the caller graph for this function:

◆ Res6_PrintSuppSims()

void Res6_PrintSuppSims ( Vec_Int_t * vSol,
word ** ppLits,
int nWords,
int nDivs )

Definition at line 329 of file giaResub6.c.

330{
331 Vec_Int_t * vSupp = Res6_FindSupport( vSol, nDivs );
332 int i, k, iObj;
333 Vec_IntForEachEntry( vSupp, iObj, i )
334 {
335 for ( k = 0; k < 64*nWords; k++ )
336 if ( Abc_TtGetBit(ppLits[2*iObj+1], k) )
337 printf( "0" );
338 else if ( Abc_TtGetBit(ppLits[2*iObj], k) )
339 printf( "1" );
340 else
341 printf( "-" );
342 printf( "\n" );
343 }
344 for ( k = 0; k < 64*nWords; k++ )
345 {
346 Vec_IntForEachEntry( vSupp, iObj, i )
347 if ( Abc_TtGetBit(ppLits[2*iObj+1], k) )
348 printf( "0" );
349 else if ( Abc_TtGetBit(ppLits[2*iObj+0], k) )
350 printf( "1" );
351 else
352 printf( "-" );
353 printf( "\n" );
354 if ( k == 9 )
355 break;
356 }
357 Vec_IntFree( vSupp );
358}
int nWords
Definition abcNpn.c:127
Here is the call graph for this function: