ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
rwrDec.c File Reference
#include "rwr.h"
#include "bool/dec/dec.h"
Include dependency graph for rwrDec.c:

Go to the source code of this file.

Functions

void Rwr_ManPreprocess (Rwr_Man_t *p)
 FUNCTION DEFINITIONS ///.
 

Function Documentation

◆ Rwr_ManPreprocess()

void Rwr_ManPreprocess ( Rwr_Man_t * p)

FUNCTION DEFINITIONS ///.

MACRO DEFINITIONS ///.

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

Synopsis [Preprocesses computed library of subgraphs.]

Description []

SideEffects []

SeeAlso []

Definition at line 49 of file rwrDec.c.

50{
51 Dec_Graph_t * pGraph;
52 Rwr_Node_t * pNode;
53 int i, k;
54 // put the nodes into the structure
55 p->pMapInv = ABC_ALLOC( unsigned short, 222 );
56 memset( p->pMapInv, 0, sizeof(unsigned short) * 222 );
57 p->vClasses = Vec_VecStart( 222 );
58 for ( i = 0; i < p->nFuncs; i++ )
59 {
60 if ( p->pTable[i] == NULL )
61 continue;
62 // consider all implementations of this function
63 for ( pNode = p->pTable[i]; pNode; pNode = pNode->pNext )
64 {
65 assert( pNode->uTruth == p->pTable[i]->uTruth );
66 assert( p->pMap[pNode->uTruth] < 222 ); // Guaranteed to be >=0 b/c unsigned
67 Vec_VecPush( p->vClasses, p->pMap[pNode->uTruth], pNode );
68 p->pMapInv[ p->pMap[pNode->uTruth] ] = p->puCanons[pNode->uTruth];
69 }
70 }
71 // compute decomposition forms for each node and verify them
72 Vec_VecForEachEntry( Rwr_Node_t *, p->vClasses, pNode, i, k )
73 {
74 pGraph = Rwr_NodePreprocess( p, pNode );
75 pNode->pNext = (Rwr_Node_t *)pGraph;
76 assert( pNode->uTruth == (Dec_GraphDeriveTruth(pGraph) & 0xFFFF) );
77 }
78}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
unsigned Dec_GraphDeriveTruth(Dec_Graph_t *pGraph)
DECLARATIONS ///.
Definition decUtil.c:102
struct Dec_Graph_t_ Dec_Graph_t
Definition dec.h:68
Cube * p
Definition exorList.c:222
struct Rwr_Node_t_ Rwr_Node_t
Definition rwr.h:48
Rwr_Node_t * pNext
Definition rwr.h:112
unsigned uTruth
Definition rwr.h:105
#define assert(ex)
Definition util_old.h:213
char * memset()
#define Vec_VecForEachEntry(Type, vGlob, pEntry, i, k)
Definition vecVec.h:87
Here is the call graph for this function:
Here is the caller graph for this function: