src/base/abci/abcReorder.c File Reference

#include "abc.h"
#include "reo.h"
Include dependency graph for abcReorder.c:

Go to the source code of this file.

Functions

void Abc_NodeBddReorder (reo_man *p, Abc_Obj_t *pNode)
void Abc_NtkBddReorder (Abc_Ntk_t *pNtk, int fVerbose)

Function Documentation

void Abc_NodeBddReorder ( reo_man p,
Abc_Obj_t pNode 
)

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

FileName [abcReorder.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Network and node package.]

Synopsis [Reordering local BDDs of the nodes.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [Reorders BDD of the local function of the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file abcReorder.c.

00044 {
00045     Abc_Obj_t * pFanin;
00046     DdNode * bFunc;
00047     int * pOrder, i;
00048     // create the temporary array for the variable order
00049     pOrder = ALLOC( int, Abc_ObjFaninNum(pNode) );
00050     for ( i = 0; i < Abc_ObjFaninNum(pNode); i++ )
00051         pOrder[i] = -1;
00052     // reorder the BDD
00053     bFunc = Extra_Reorder( p, pNode->pNtk->pManFunc, pNode->pData, pOrder ); Cudd_Ref( bFunc );
00054     Cudd_RecursiveDeref( pNode->pNtk->pManFunc, pNode->pData );
00055     pNode->pData = bFunc;
00056     // update the fanin order
00057     Abc_ObjForEachFanin( pNode, pFanin, i )
00058         pOrder[i] = pNode->vFanins.pArray[ pOrder[i] ];
00059     Abc_ObjForEachFanin( pNode, pFanin, i )
00060         pNode->vFanins.pArray[i] = pOrder[i];
00061     free( pOrder );
00062 }

void Abc_NtkBddReorder ( Abc_Ntk_t pNtk,
int  fVerbose 
)

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

Synopsis [Reorders BDDs of the local functions.]

Description []

SideEffects []

SeeAlso []

Definition at line 75 of file abcReorder.c.

00076 {
00077         reo_man * p;
00078     Abc_Obj_t * pNode;
00079     int i;
00080     p = Extra_ReorderInit( Abc_NtkGetFaninMax(pNtk), 100 );
00081     Abc_NtkForEachNode( pNtk, pNode, i )
00082     {
00083         if ( Abc_ObjFaninNum(pNode) < 3 )
00084             continue;
00085         if ( fVerbose )
00086             fprintf( stdout, "%10s: ", Abc_ObjName(pNode) );
00087         if ( fVerbose )
00088             fprintf( stdout, "Before = %5d  BDD nodes.  ", Cudd_DagSize(pNode->pData) );
00089         Abc_NodeBddReorder( p, pNode );
00090         if ( fVerbose )
00091             fprintf( stdout, "After = %5d  BDD nodes.\n", Cudd_DagSize(pNode->pData) );
00092     }
00093     Extra_ReorderQuit( p );
00094 }


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