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

Go to the source code of this file.

Functions

void Rwt_ManPreprocess (Rwt_Man_t *p)
 FUNCTION DEFINITIONS ///.
 

Function Documentation

◆ Rwt_ManPreprocess()

void Rwt_ManPreprocess ( Rwt_Man_t * p)

FUNCTION DEFINITIONS ///.

MACRO DEFINITIONS ///.

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

Synopsis [Preprocesses computed library of subgraphs.]

Description []

SideEffects []

SeeAlso []

Definition at line 49 of file rwtDec.c.

50{
51 Dec_Graph_t * pGraph;
52 Rwt_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 ); // Always >= 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( Rwt_Node_t *, p->vClasses, pNode, i, k )
73 {
74 pGraph = Rwt_NodePreprocess( p, pNode );
75 pNode->pNext = (Rwt_Node_t *)pGraph;
76// assert( pNode->uTruth == (Dec_GraphDeriveTruth(pGraph) & 0xFFFF) );
77 }
78}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
struct Dec_Graph_t_ Dec_Graph_t
Definition dec.h:68
Cube * p
Definition exorList.c:222
struct Rwt_Node_t_ Rwt_Node_t
Definition rwt.h:56
unsigned uTruth
Definition rwt.h:111
Rwt_Node_t * pNext
Definition rwt.h:118
#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: