#include "abc.h"
#include "mainInt.h"
#include "mvc.h"
#include "mio.h"
#include "stmm.h"
#include "super.h"
Go to the source code of this file.
Functions | |
void | Super2_Precompute (int nInputs, int nLevels, int fVerbose) |
void | Super_Precompute (Mio_Library_t *pLibGen, int nInputs, int nLevels, float tDelayMax, float tAreaMax, int TimeLimit, bool fSkipInv, bool fWriteOldFormat, int fVerbose) |
void Super2_Precompute | ( | int | nInputs, | |
int | nLevels, | |||
int | fVerbose | |||
) |
CFile****************************************************************
FileName [superInt.h]
PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]
Synopsis [Pre-computation of supergates.]
Author [MVSIS Group]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - September 8, 2003.]
Revision [
] INCLUDES /// PARAMETERS /// STRUCTURE DEFINITIONS /// GLOBAL VARIABLES /// MACRO DEFINITIONS /// FUNCTION DEFINITIONS ///
FUNCTION DEFINITIONS ///Function*************************************************************
Synopsis [Precomputes the library of AND2 gates.]
Description []
SideEffects []
SeeAlso []
Definition at line 110 of file superAnd.c.
00111 { 00112 Super2_Man_t * pMan; 00113 Super2_Lib_t * pLibCur, * pLibNext; 00114 int Level; 00115 int clk; 00116 00117 assert( nInputs < 6 ); 00118 00119 // start the manager 00120 pMan = Super2_ManStart(); 00121 00122 // get the starting supergates 00123 pLibCur = Super2_LibFirst( pMan, nInputs ); 00124 00125 // perform the computation of supergates 00126 printf( "Computing supergates for %d inputs and %d levels:\n", nInputs, nLevels ); 00127 for ( Level = 1; Level <= nLevels; Level++ ) 00128 { 00129 clk = clock(); 00130 pLibNext = Super2_LibCompute( pMan, pLibCur ); 00131 pLibNext->nLevels = Level; 00132 Super2_LibStop( pLibCur ); 00133 pLibCur = pLibNext; 00134 printf( "Level %d: Tried = %7d. Computed = %7d. ", Level, pMan->nTried, pLibCur->nGates ); 00135 PRT( "Runtime", clock() - clk ); 00136 fflush( stdout ); 00137 } 00138 00139 printf( "Writing the output file...\n" ); 00140 fflush( stdout ); 00141 // write them into a file 00142 Super2_LibWrite( pLibCur ); 00143 Super2_LibStop( pLibCur ); 00144 00145 // stop the manager 00146 Super2_ManStop( pMan ); 00147 }
void Super_Precompute | ( | Mio_Library_t * | pLibGen, | |
int | nVarsMax, | |||
int | nLevels, | |||
float | tDelayMax, | |||
float | tAreaMax, | |||
int | TimeLimit, | |||
bool | fSkipInv, | |||
bool | fWriteOldFormat, | |||
int | fVerbose | |||
) |
FUNCTION DEFINITIONS ///Function*************************************************************
Synopsis [Precomputes the library of supergates.]
Description []
SideEffects []
SeeAlso []
Definition at line 137 of file superGate.c.
00138 { 00139 Super_Man_t * pMan; 00140 Mio_Gate_t ** ppGates; 00141 int nGates, Level, clk, clockStart; 00142 00143 assert( nVarsMax < 7 ); 00144 00145 // get the root gates 00146 ppGates = Mio_CollectRoots( pLibGen, nVarsMax, tDelayMax, 0, &nGates ); 00147 00148 // start the manager 00149 pMan = Super_ManStart(); 00150 pMan->pName = Mio_LibraryReadName(pLibGen); 00151 pMan->fSkipInv = fSkipInv; 00152 pMan->tDelayMax = tDelayMax; 00153 pMan->tAreaMax = tAreaMax; 00154 pMan->TimeLimit = TimeLimit; // in seconds 00155 pMan->TimeStop = TimeLimit * CLOCKS_PER_SEC + clock(); // in CPU ticks 00156 pMan->fWriteOldFormat = fWriteOldFormat; 00157 pMan->fVerbose = fVerbose; 00158 00159 if ( nGates == 0 ) 00160 { 00161 fprintf( stderr, "Error: No genlib gates satisfy the limits criteria. Stop.\n"); 00162 fprintf( stderr, "Limits: max delay = %.2f, max area = %.2f, time limit = %d sec.\n", 00163 pMan->tDelayMax, pMan->tAreaMax, pMan->TimeLimit ); 00164 00165 // stop the manager 00166 Super_ManStop( pMan ); 00167 free( ppGates ); 00168 00169 return; 00170 } 00171 00172 // get the starting supergates 00173 Super_First( pMan, nVarsMax ); 00174 00175 // perform the computation of supergates 00176 clockStart = clock(); 00177 if ( fVerbose ) 00178 { 00179 printf( "Computing supergates with %d inputs and %d levels.\n", 00180 pMan->nVarsMax, nLevels ); 00181 printf( "Limits: max delay = %.2f, max area = %.2f, time limit = %d sec.\n", 00182 pMan->tDelayMax, pMan->tAreaMax, pMan->TimeLimit ); 00183 } 00184 00185 for ( Level = 1; Level <= nLevels; Level++ ) 00186 { 00187 if ( clock() > pMan->TimeStop ) 00188 break; 00189 clk = clock(); 00190 Super_Compute( pMan, ppGates, nGates, fSkipInv ); 00191 pMan->nLevels = Level; 00192 if ( fVerbose ) 00193 { 00194 printf( "Lev %d: Try =%12d. Add =%6d. Rem =%5d. Save =%6d. Lookups =%12d. Aliases =%12d. ", 00195 Level, pMan->nTried, pMan->nAdded, pMan->nRemoved, pMan->nAdded - pMan->nRemoved, pMan->nLookups, pMan->nAliases ); 00196 PRT( "Time", clock() - clk ); 00197 fflush( stdout ); 00198 } 00199 } 00200 pMan->Time = clock() - clockStart; 00201 00202 if ( fVerbose ) 00203 { 00204 printf( "Writing the output file...\n" ); 00205 fflush( stdout ); 00206 } 00207 // write them into a file 00208 Super_Write( pMan ); 00209 00210 // stop the manager 00211 Super_ManStop( pMan ); 00212 free( ppGates ); 00213 }