summaryrefslogtreecommitdiffstats
path: root/src/base/abci
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-04-04 20:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2008-04-04 20:01:00 -0700
commit0c4d314ef0460b94c3ccc4f8ddeedc8e49e35e96 (patch)
tree386f5fc8af56d55a7532e2b9bd09b3c081a5bcac /src/base/abci
parentef20b0c5336e28a3e09db9f0accfc072db1559cc (diff)
downloadabc-0c4d314ef0460b94c3ccc4f8ddeedc8e49e35e96.tar.gz
abc-0c4d314ef0460b94c3ccc4f8ddeedc8e49e35e96.tar.bz2
abc-0c4d314ef0460b94c3ccc4f8ddeedc8e49e35e96.zip
Version abc80404_2
Diffstat (limited to 'src/base/abci')
-rw-r--r--src/base/abci/abc.c29
-rw-r--r--src/base/abci/abcDelay.c92
2 files changed, 72 insertions, 49 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 405559cc..fb0a6bd6 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -215,6 +215,7 @@ static int Abc_CommandAbc8Mfs ( Abc_Frame_t * pAbc, int argc, char ** arg
static int Abc_CommandAbc8Lutpack ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc8Balance ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc8Speedup ( Abc_Frame_t * pAbc, int argc, char ** argv );
+static int Abc_CommandAbc8Fraig ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc8Cec ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc8Scl ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc8Lcorr ( Abc_Frame_t * pAbc, int argc, char ** argv );
@@ -450,6 +451,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "ABC8", "*lp", Abc_CommandAbc8Lutpack, 0 );
Cmd_CommandAdd( pAbc, "ABC8", "*b", Abc_CommandAbc8Balance, 0 );
Cmd_CommandAdd( pAbc, "ABC8", "*speedup", Abc_CommandAbc8Speedup, 0 );
+ Cmd_CommandAdd( pAbc, "ABC8", "*fraig", Abc_CommandAbc8Fraig, 0 );
Cmd_CommandAdd( pAbc, "ABC8", "*cec", Abc_CommandAbc8Cec, 0 );
Cmd_CommandAdd( pAbc, "ABC8", "*scl", Abc_CommandAbc8Scl, 0 );
Cmd_CommandAdd( pAbc, "ABC8", "*lcorr", Abc_CommandAbc8Lcorr, 0 );
@@ -15674,9 +15676,14 @@ int Abc_CommandAbc8Speedup( Abc_Frame_t * pAbc, int argc, char ** argv )
int Degree;
int fVerbose;
int fVeryVerbose;
- extern Aig_Man_t * Nwk_ManSpeedup( void * pNtk );
+ extern Aig_Man_t * Nwk_ManSpeedup( void * pNtk, int fUseLutLib, int Percentage, int Degree, int fVerbose, int fVeryVerbose );
// set defaults
+ fUseLutLib = 0;
+ Percentage = 3;
+ Degree = 2;
+ fVerbose = 0;
+ fVeryVerbose = 0;
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "PNlvwh" ) ) != EOF )
{
@@ -15724,8 +15731,8 @@ int Abc_CommandAbc8Speedup( Abc_Frame_t * pAbc, int argc, char ** argv )
printf( "Abc_CommandAbc8DChoice(): There is no mapped network to strash.\n" );
return 1;
}
-
- pAigNew = Nwk_ManSpeedup( pAbc->pAbc8Nwk );
+
+ pAigNew = Nwk_ManSpeedup( pAbc->pAbc8Nwk, fUseLutLib, Percentage, Degree, fVerbose, fVeryVerbose );
if ( pAigNew == NULL )
{
printf( "Abc_CommandAbc8Speedup(): Tranformation of the AIG has failed.\n" );
@@ -15759,6 +15766,22 @@ usage:
SeeAlso []
***********************************************************************/
+int Abc_CommandAbc8Fraig( Abc_Frame_t * pAbc, int argc, char ** argv )
+{
+ return 0;
+}
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
int Abc_CommandAbc8Cec( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Aig_Man_t * pAig1, * pAig2;
diff --git a/src/base/abci/abcDelay.c b/src/base/abci/abcDelay.c
index 847f1c75..3c28e6a6 100644
--- a/src/base/abci/abcDelay.c
+++ b/src/base/abci/abcDelay.c
@@ -229,52 +229,6 @@ float Abc_NtkDelayTraceLut( Abc_Ntk_t * pNtk, int fUseLutLib )
/**Function*************************************************************
- Synopsis [Determines timing-critical edges of the node.]
-
- Description []
-
- SideEffects []
-
- SeeAlso []
-
-***********************************************************************/
-unsigned Abc_NtkDelayTraceTCEdges( Abc_Ntk_t * pNtk, Abc_Obj_t * pNode, float tDelta, int fUseLutLib )
-{
- int pPinPerm[32];
- float pPinDelays[32];
- If_Lib_t * pLutLib;
- Abc_Obj_t * pFanin;
- unsigned uResult = 0;
- float tRequired, * pDelays;
- int k;
- pLutLib = fUseLutLib? Abc_FrameReadLibLut() : NULL;
- tRequired = Abc_ObjRequired(pNode);
- if ( pLutLib == NULL )
- {
- Abc_ObjForEachFanin( pNode, pFanin, k )
- if ( tRequired < Abc_ObjArrival(pFanin) + 1.0 + tDelta )
- uResult |= (1 << k);
- }
- else if ( !pLutLib->fVarPinDelays )
- {
- pDelays = pLutLib->pLutDelays[Abc_ObjFaninNum(pNode)];
- Abc_ObjForEachFanin( pNode, pFanin, k )
- if ( tRequired < Abc_ObjArrival(pFanin) + pDelays[0] + tDelta )
- uResult |= (1 << k);
- }
- else
- {
- pDelays = pLutLib->pLutDelays[Abc_ObjFaninNum(pNode)];
- Abc_NtkDelayTraceSortPins( pNode, pPinPerm, pPinDelays );
- Abc_ObjForEachFanin( pNode, pFanin, k )
- if ( tRequired < Abc_ObjArrival(Abc_ObjFanin(pNode,pPinPerm[k])) + pDelays[k] + tDelta )
- uResult |= (1 << pPinPerm[k]);
- }
- return uResult;
-}
-
-/**Function*************************************************************
-
Synopsis [Delay tracing of the LUT mapped network.]
Description []
@@ -497,6 +451,52 @@ void Abc_NtkSpeedupNode( Abc_Ntk_t * pNtk, Abc_Ntk_t * pAig, Abc_Obj_t * pNode,
/**Function*************************************************************
+ Synopsis [Determines timing-critical edges of the node.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+unsigned Abc_NtkDelayTraceTCEdges( Abc_Ntk_t * pNtk, Abc_Obj_t * pNode, float tDelta, int fUseLutLib )
+{
+ int pPinPerm[32];
+ float pPinDelays[32];
+ If_Lib_t * pLutLib;
+ Abc_Obj_t * pFanin;
+ unsigned uResult = 0;
+ float tRequired, * pDelays;
+ int k;
+ pLutLib = fUseLutLib? Abc_FrameReadLibLut() : NULL;
+ tRequired = Abc_ObjRequired(pNode);
+ if ( pLutLib == NULL )
+ {
+ Abc_ObjForEachFanin( pNode, pFanin, k )
+ if ( tRequired < Abc_ObjArrival(pFanin) + 1.0 + tDelta )
+ uResult |= (1 << k);
+ }
+ else if ( !pLutLib->fVarPinDelays )
+ {
+ pDelays = pLutLib->pLutDelays[Abc_ObjFaninNum(pNode)];
+ Abc_ObjForEachFanin( pNode, pFanin, k )
+ if ( tRequired < Abc_ObjArrival(pFanin) + pDelays[0] + tDelta )
+ uResult |= (1 << k);
+ }
+ else
+ {
+ pDelays = pLutLib->pLutDelays[Abc_ObjFaninNum(pNode)];
+ Abc_NtkDelayTraceSortPins( pNode, pPinPerm, pPinDelays );
+ Abc_ObjForEachFanin( pNode, pFanin, k )
+ if ( tRequired < Abc_ObjArrival(Abc_ObjFanin(pNode,pPinPerm[k])) + pDelays[k] + tDelta )
+ uResult |= (1 << pPinPerm[k]);
+ }
+ return uResult;
+}
+
+/**Function*************************************************************
+
Synopsis [Adds choices to speed up the network by the given percentage.]
Description []