#include "abc.h"
Go to the source code of this file.
Functions | |
static void | Abc_NtkPrintUnateBdd (Abc_Ntk_t *pNtk, int fUseNaive, int fVerbose) |
static void | Abc_NtkPrintUnateSat (Abc_Ntk_t *pNtk, int fVerbose) |
void | Abc_NtkPrintUnate (Abc_Ntk_t *pNtk, int fUseBdds, int fUseNaive, int fVerbose) |
void Abc_NtkPrintUnate | ( | Abc_Ntk_t * | pNtk, | |
int | fUseBdds, | |||
int | fUseNaive, | |||
int | fVerbose | |||
) |
FUNCTION DEFINITIONS ///Function*************************************************************
Synopsis [Detects unate variables of the multi-output function.]
Description []
SideEffects []
SeeAlso []
Definition at line 45 of file abcUnate.c.
00046 { 00047 if ( fUseBdds || fUseNaive ) 00048 Abc_NtkPrintUnateBdd( pNtk, fUseNaive, fVerbose ); 00049 else 00050 Abc_NtkPrintUnateSat( pNtk, fVerbose ); 00051 }
void Abc_NtkPrintUnateBdd | ( | Abc_Ntk_t * | pNtk, | |
int | fUseNaive, | |||
int | fVerbose | |||
) | [static] |
CFile****************************************************************
FileName [abcUnate.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Network and node package.]
Synopsis []
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
] DECLARATIONS ///
Function*************************************************************
Synopsis [Detects unate variables using BDDs.]
Description []
SideEffects []
SeeAlso []
Definition at line 64 of file abcUnate.c.
00065 { 00066 Abc_Obj_t * pNode; 00067 Extra_UnateInfo_t * p; 00068 DdManager * dd; // the BDD manager used to hold shared BDDs 00069 // DdNode ** pbGlobal; // temporary storage for global BDDs 00070 int TotalSupps = 0; 00071 int TotalUnate = 0; 00072 int i, clk = clock(); 00073 int clkBdd, clkUnate; 00074 00075 // compute the global BDDs 00076 dd = Abc_NtkBuildGlobalBdds(pNtk, 10000000, 1, 1, fVerbose); 00077 if ( dd == NULL ) 00078 return; 00079 clkBdd = clock() - clk; 00080 00081 // get information about the network 00082 // dd = pNtk->pManGlob; 00083 // dd = Abc_NtkGlobalBddMan( pNtk ); 00084 // pbGlobal = (DdNode **)Vec_PtrArray( pNtk->vFuncsGlob ); 00085 00086 // print the size of the BDDs 00087 printf( "Shared BDD size = %6d nodes.\n", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) ); 00088 00089 // perform naive BDD-based computation 00090 if ( fUseNaive ) 00091 { 00092 Abc_NtkForEachCo( pNtk, pNode, i ) 00093 { 00094 // p = Extra_UnateComputeSlow( dd, pbGlobal[i] ); 00095 p = Extra_UnateComputeSlow( dd, Abc_ObjGlobalBdd(pNode) ); 00096 if ( fVerbose ) 00097 Extra_UnateInfoPrint( p ); 00098 TotalSupps += p->nVars; 00099 TotalUnate += p->nUnate; 00100 Extra_UnateInfoDissolve( p ); 00101 } 00102 } 00103 // perform smart BDD-based computation 00104 else 00105 { 00106 // create ZDD variables in the manager 00107 Cudd_zddVarsFromBddVars( dd, 2 ); 00108 Abc_NtkForEachCo( pNtk, pNode, i ) 00109 { 00110 // p = Extra_UnateComputeFast( dd, pbGlobal[i] ); 00111 p = Extra_UnateComputeFast( dd, Abc_ObjGlobalBdd(pNode) ); 00112 if ( fVerbose ) 00113 Extra_UnateInfoPrint( p ); 00114 TotalSupps += p->nVars; 00115 TotalUnate += p->nUnate; 00116 Extra_UnateInfoDissolve( p ); 00117 } 00118 } 00119 clkUnate = clock() - clk - clkBdd; 00120 00121 // print stats 00122 printf( "Ins/Outs = %4d/%4d. Total supp = %5d. Total unate = %5d.\n", 00123 Abc_NtkCiNum(pNtk), Abc_NtkCoNum(pNtk), TotalSupps, TotalUnate ); 00124 PRT( "Glob BDDs", clkBdd ); 00125 PRT( "Unateness", clkUnate ); 00126 PRT( "Total ", clock() - clk ); 00127 00128 // deref the PO functions 00129 // Abc_NtkFreeGlobalBdds( pNtk ); 00130 // stop the global BDD manager 00131 // Extra_StopManager( pNtk->pManGlob ); 00132 // pNtk->pManGlob = NULL; 00133 Abc_NtkFreeGlobalBdds( pNtk, 1 ); 00134 }
void Abc_NtkPrintUnateSat | ( | Abc_Ntk_t * | pNtk, | |
int | fVerbose | |||
) | [static] |
Function*************************************************************
Synopsis [Detects unate variables using SAT.]
Description []
SideEffects []
SeeAlso []
Definition at line 147 of file abcUnate.c.