#include "retInt.h"
Go to the source code of this file.
Functions | |
int | Abc_NtkRetime (Abc_Ntk_t *pNtk, int Mode, int fForwardOnly, int fBackwardOnly, int fOneStep, int fVerbose) |
int | Abc_NtkRetimeDebug (Abc_Ntk_t *pNtk) |
Variables | |
int | timeRetime = 0 |
int Abc_NtkRetime | ( | Abc_Ntk_t * | pNtk, | |
int | Mode, | |||
int | fForwardOnly, | |||
int | fBackwardOnly, | |||
int | fOneStep, | |||
int | fVerbose | |||
) |
FUNCTION DEFINITIONS ///Function*************************************************************
Synopsis [Implementation of retiming.]
Description []
SideEffects []
SeeAlso []
Definition at line 44 of file retCore.c.
00045 { 00046 int nLatches = Abc_NtkLatchNum(pNtk); 00047 int nLevels = Abc_NtkLevel(pNtk); 00048 int RetValue = 0, clkTotal = clock(); 00049 int nNodesOld, nLatchesOld; 00050 assert( Mode > 0 && Mode < 7 ); 00051 assert( !fForwardOnly || !fBackwardOnly ); 00052 00053 // cleanup the network 00054 nNodesOld = Abc_NtkNodeNum(pNtk); 00055 nLatchesOld = Abc_NtkLatchNum(pNtk); 00056 Abc_NtkCleanupSeq(pNtk, 0, 0, 0); 00057 if ( nNodesOld > Abc_NtkNodeNum(pNtk) || nLatchesOld > Abc_NtkLatchNum(pNtk) ) 00058 printf( "Cleanup before retiming removed %d dangling nodes and %d dangling latches.\n", 00059 nNodesOld - Abc_NtkNodeNum(pNtk), nLatchesOld - Abc_NtkLatchNum(pNtk) ); 00060 00061 // perform retiming 00062 switch ( Mode ) 00063 { 00064 case 1: // forward 00065 RetValue = Abc_NtkRetimeIncremental( pNtk, 1, 0, 0, fVerbose ); 00066 break; 00067 case 2: // backward 00068 RetValue = Abc_NtkRetimeIncremental( pNtk, 0, 0, 0, fVerbose ); 00069 break; 00070 case 3: // min-area 00071 RetValue = Abc_NtkRetimeMinArea( pNtk, fForwardOnly, fBackwardOnly, fVerbose ); 00072 break; 00073 case 4: // min-delay 00074 if ( !fBackwardOnly ) 00075 RetValue += Abc_NtkRetimeIncremental( pNtk, 1, 1, fOneStep, fVerbose ); 00076 if ( !fForwardOnly ) 00077 RetValue += Abc_NtkRetimeIncremental( pNtk, 0, 1, fOneStep, fVerbose ); 00078 break; 00079 case 5: // min-area + min-delay 00080 RetValue = Abc_NtkRetimeMinArea( pNtk, fForwardOnly, fBackwardOnly, fVerbose ); 00081 if ( !fBackwardOnly ) 00082 RetValue += Abc_NtkRetimeIncremental( pNtk, 1, 1, 0, fVerbose ); 00083 if ( !fForwardOnly ) 00084 RetValue += Abc_NtkRetimeIncremental( pNtk, 0, 1, 0, fVerbose ); 00085 break; 00086 case 6: // Pan's algorithm 00087 RetValue = Abc_NtkRetimeLValue( pNtk, 500, fVerbose ); 00088 break; 00089 default: 00090 printf( "Unknown retiming option.\n" ); 00091 break; 00092 } 00093 if ( fVerbose ) 00094 { 00095 printf( "Reduction in area = %3d. Reduction in delay = %3d. ", 00096 nLatches - Abc_NtkLatchNum(pNtk), nLevels - Abc_NtkLevel(pNtk) ); 00097 PRT( "Total runtime", clock() - clkTotal ); 00098 } 00099 timeRetime = clock() - clkTotal; 00100 return RetValue; 00101 }
int Abc_NtkRetimeDebug | ( | Abc_Ntk_t * | pNtk | ) |
Function*************************************************************
Synopsis [Used for automated debugging.]
Description []
SideEffects []
SeeAlso []
Definition at line 114 of file retCore.c.
00115 { 00116 extern int Abc_NtkSecFraig( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nSeconds, int nFrames, int fVerbose ); 00117 Abc_Ntk_t * pNtkRet; 00118 assert( Abc_NtkIsLogic(pNtk) ); 00119 Abc_NtkToSop( pNtk, 0 ); 00120 // if ( !Abc_NtkCheck( pNtk ) ) 00121 // fprintf( stdout, "Abc_NtkRetimeDebug(): Network check has failed.\n" ); 00122 // Io_WriteBlifLogic( pNtk, "debug_temp.blif", 1 ); 00123 pNtkRet = Abc_NtkDup( pNtk ); 00124 Abc_NtkRetime( pNtkRet, 3, 0, 1, 0, 0 ); // debugging backward flow 00125 return !Abc_NtkSecFraig( pNtk, pNtkRet, 10000, 3, 0 ); 00126 }
int timeRetime = 0 |
CFile****************************************************************
FileName [retCore.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Retiming package.]
Synopsis [The core retiming procedures.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Oct 31, 2006.]
Revision [
] DECLARATIONS ///