src/aig/bdc/bdcTable.c File Reference

#include "bdcInt.h"
Include dependency graph for bdcTable.c:

Go to the source code of this file.

Functions

void Bdc_SuppMinimize (Bdc_Man_t *p, Bdc_Isf_t *pIsf)
int Bdc_TableCheckContainment (Bdc_Man_t *p, Bdc_Isf_t *pIsf, unsigned *puTruth)
Bdc_Fun_tBdc_TableLookup (Bdc_Man_t *p, Bdc_Isf_t *pIsf)
void Bdc_TableAdd (Bdc_Man_t *p, Bdc_Fun_t *pFunc)
void Bdc_TableClear (Bdc_Man_t *p)

Function Documentation

void Bdc_SuppMinimize ( Bdc_Man_t p,
Bdc_Isf_t pIsf 
)

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

FileName [bdcTable.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Truth-table-based bi-decomposition engine.]

Synopsis [Hash table for intermediate nodes.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - January 30, 2007.]

Revision [

Id
bdcTable.c,v 1.00 2007/01/30 00:00:00 alanmi Exp

] DECLARATIONS /// FUNCTION DEFINITIONS ///Function*************************************************************

Synopsis [Minimizes the support of the ISF.]

Description []

SideEffects []

SeeAlso []

Definition at line 42 of file bdcTable.c.

00043 {
00044     int v;
00045     // go through the support variables
00046     for ( v = 0; v < p->nVars; v++ )
00047     {
00048         if ( (pIsf->uSupp & (1 << v)) == 0 )
00049             continue;
00050         Kit_TruthExistNew( p->puTemp1, pIsf->puOn, p->nVars, v );
00051         Kit_TruthExistNew( p->puTemp2, pIsf->puOff, p->nVars, v );
00052         if ( !Kit_TruthIsDisjoint( p->puTemp1, p->puTemp2, p->nVars ) )
00053             continue;
00054         // remove the variable
00055         Kit_TruthCopy( pIsf->puOn, p->puTemp1, p->nVars );
00056         Kit_TruthCopy( pIsf->puOff, p->puTemp2, p->nVars );
00057         pIsf->uSupp &= ~(1 << v);
00058     }
00059 }

void Bdc_TableAdd ( Bdc_Man_t p,
Bdc_Fun_t pFunc 
)

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

Synopsis [Adds the new entry to the hash table.]

Description []

SideEffects []

SeeAlso []

Definition at line 109 of file bdcTable.c.

00110 {
00111     if ( p->pTable[pFunc->uSupp] == NULL )
00112         Vec_IntPush( p->vSpots, pFunc->uSupp );
00113     pFunc->pNext = p->pTable[pFunc->uSupp];
00114     p->pTable[pFunc->uSupp] = pFunc;
00115 }

int Bdc_TableCheckContainment ( Bdc_Man_t p,
Bdc_Isf_t pIsf,
unsigned *  puTruth 
)

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

Synopsis [Checks containment of the function in the ISF.]

Description []

SideEffects []

SeeAlso []

Definition at line 72 of file bdcTable.c.

00073 {
00074     return Kit_TruthIsImply( pIsf->puOn, puTruth, p->nVars ) &&
00075          Kit_TruthIsDisjoint( pIsf->puOff, puTruth, p->nVars );
00076 }

void Bdc_TableClear ( Bdc_Man_t p  ) 

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

Synopsis [Adds the new entry to the hash table.]

Description []

SideEffects []

SeeAlso []

Definition at line 128 of file bdcTable.c.

00129 {
00130     int Spot, i;
00131     Vec_IntForEachEntry( p->vSpots, Spot, i )
00132         p->pTable[Spot] = NULL;
00133     Vec_IntClear( p->vSpots );
00134 }

Bdc_Fun_t* Bdc_TableLookup ( Bdc_Man_t p,
Bdc_Isf_t pIsf 
)

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

Synopsis [Adds the new entry to the hash table.]

Description []

SideEffects []

SeeAlso []

Definition at line 89 of file bdcTable.c.

00090 {
00091     Bdc_Fun_t * pFunc;
00092     for ( pFunc = p->pTable[pIsf->uSupp]; pFunc; pFunc = pFunc->pNext )
00093         if ( Bdc_TableCheckContainment( p, pIsf, pFunc->puFunc ) )
00094              return pFunc;
00095     return NULL;
00096 }


Generated on Tue Jan 5 12:18:14 2010 for abc70930 by  doxygen 1.6.1