diff options
Diffstat (limited to 'src/map/fpga')
-rw-r--r-- | src/map/fpga/fpga.h | 4 | ||||
-rw-r--r-- | src/map/fpga/fpgaCore.c | 9 | ||||
-rw-r--r-- | src/map/fpga/fpgaCreate.c | 7 | ||||
-rw-r--r-- | src/map/fpga/fpgaCut.c | 2 | ||||
-rw-r--r-- | src/map/fpga/fpgaInt.h | 18 | ||||
-rw-r--r-- | src/map/fpga/fpgaMatch.c | 6 |
6 files changed, 20 insertions, 26 deletions
diff --git a/src/map/fpga/fpga.h b/src/map/fpga/fpga.h index b63d2448..22982b4e 100644 --- a/src/map/fpga/fpga.h +++ b/src/map/fpga/fpga.h @@ -83,15 +83,11 @@ extern int Fpga_ManReadVerbose( Fpga_Man_t * p ); extern int Fpga_ManReadVarMax( Fpga_Man_t * p ); extern float * Fpga_ManReadLutAreas( Fpga_Man_t * p ); extern Fpga_NodeVec_t* Fpga_ManReadMapping( Fpga_Man_t * p ); -extern void Fpga_ManSetTimeToMap( Fpga_Man_t * p, int Time ); -extern void Fpga_ManSetTimeToNet( Fpga_Man_t * p, int Time ); -extern void Fpga_ManSetTimeTotal( Fpga_Man_t * p, int Time ); extern void Fpga_ManSetOutputNames( Fpga_Man_t * p, char ** ppNames ); extern void Fpga_ManSetInputArrivals( Fpga_Man_t * p, float * pArrivals ); extern void Fpga_ManSetAreaRecovery( Fpga_Man_t * p, int fAreaRecovery ); extern void Fpga_ManSetDelayLimit( Fpga_Man_t * p, float DelayLimit ); extern void Fpga_ManSetAreaLimit( Fpga_Man_t * p, float AreaLimit ); -extern void Fpga_ManSetTimeLimit( Fpga_Man_t * p, float TimeLimit ); extern void Fpga_ManSetObeyFanoutLimits( Fpga_Man_t * p, int fObeyFanoutLimits ); extern void Fpga_ManSetNumIterations( Fpga_Man_t * p, int nNumIterations ); extern int Fpga_ManReadFanoutViolations( Fpga_Man_t * p ); diff --git a/src/map/fpga/fpgaCore.c b/src/map/fpga/fpgaCore.c index 74739852..64b26689 100644 --- a/src/map/fpga/fpgaCore.c +++ b/src/map/fpga/fpgaCore.c @@ -27,8 +27,8 @@ ABC_NAMESPACE_IMPL_START static int Fpga_MappingPostProcess( Fpga_Man_t * p ); -extern int s_MappingTime; -extern int s_MappingMem; +extern clock_t s_MappingTime; +extern clock_t s_MappingMem; //////////////////////////////////////////////////////////////////////// @@ -52,7 +52,7 @@ extern int s_MappingMem; ***********************************************************************/ int Fpga_Mapping( Fpga_Man_t * p ) { - int clk, clkTotal = clock(); + clock_t clk, clkTotal = clock(); // collect the nodes reachable from POs in the DFS order (including the choices) p->vAnds = Fpga_MappingDfs( p, 1 ); @@ -112,7 +112,8 @@ int Fpga_MappingPostProcess( Fpga_Man_t * p ) int fRecoverAreaFlow = 1; int fRecoverArea = 1; float aAreaTotalCur, aAreaTotalCur2; - int Iter, clk; + int Iter; + clock_t clk; //if ( p->fVerbose ) // printf( "Best clock period = %5.2f\n", Fpga_TimeComputeArrivalMax(p) ); diff --git a/src/map/fpga/fpgaCreate.c b/src/map/fpga/fpgaCreate.c index 64f6d750..e3079ad7 100644 --- a/src/map/fpga/fpgaCreate.c +++ b/src/map/fpga/fpgaCreate.c @@ -58,15 +58,11 @@ int Fpga_ManReadVerbose( Fpga_Man_t * p ) { retu int Fpga_ManReadVarMax( Fpga_Man_t * p ) { return p->pLutLib->LutMax; } float * Fpga_ManReadLutAreas( Fpga_Man_t * p ) { return p->pLutLib->pLutAreas; } Fpga_NodeVec_t* Fpga_ManReadMapping( Fpga_Man_t * p ) { return p->vMapping; } -void Fpga_ManSetTimeToMap( Fpga_Man_t * p, int Time ) { p->timeToMap = Time; } -void Fpga_ManSetTimeToNet( Fpga_Man_t * p, int Time ) { p->timeToNet = Time; } -void Fpga_ManSetTimeTotal( Fpga_Man_t * p, int Time ) { p->timeTotal = Time; } void Fpga_ManSetOutputNames( Fpga_Man_t * p, char ** ppNames ) { p->ppOutputNames = ppNames; } void Fpga_ManSetInputArrivals( Fpga_Man_t * p, float * pArrivals ) { p->pInputArrivals = pArrivals; } void Fpga_ManSetAreaRecovery( Fpga_Man_t * p, int fAreaRecovery ) { p->fAreaRecovery = fAreaRecovery;} void Fpga_ManSetDelayLimit( Fpga_Man_t * p, float DelayLimit ) { p->DelayLimit = DelayLimit; } void Fpga_ManSetAreaLimit( Fpga_Man_t * p, float AreaLimit ) { p->AreaLimit = AreaLimit; } -void Fpga_ManSetTimeLimit( Fpga_Man_t * p, float TimeLimit ) { p->TimeLimit = TimeLimit; } void Fpga_ManSetChoiceNodeNum( Fpga_Man_t * p, int nChoiceNodes ) { p->nChoiceNodes = nChoiceNodes; } void Fpga_ManSetChoiceNum( Fpga_Man_t * p, int nChoices ) { p->nChoices = nChoices; } void Fpga_ManSetVerbose( Fpga_Man_t * p, int fVerbose ) { p->fVerbose = fVerbose; } @@ -425,7 +421,8 @@ void Fpga_TableResize( Fpga_Man_t * pMan ) { Fpga_Node_t ** pBinsNew; Fpga_Node_t * pEnt, * pEnt2; - int nBinsNew, Counter, i, clk; + int nBinsNew, Counter, i; + clock_t clk; unsigned Key; clk = clock(); diff --git a/src/map/fpga/fpgaCut.c b/src/map/fpga/fpgaCut.c index 2e9ea77e..75007888 100644 --- a/src/map/fpga/fpgaCut.c +++ b/src/map/fpga/fpgaCut.c @@ -133,7 +133,7 @@ void Fpga_MappingCuts( Fpga_Man_t * p ) Fpga_CutTable_t * pTable; Fpga_Node_t * pNode; int nCuts, nNodes, i; - int clk = clock(); + clock_t clk = clock(); // set the elementary cuts for the PI variables assert( p->nVarsMax > 1 && p->nVarsMax < 11 ); diff --git a/src/map/fpga/fpgaInt.h b/src/map/fpga/fpgaInt.h index c9272154..f2c482af 100644 --- a/src/map/fpga/fpgaInt.h +++ b/src/map/fpga/fpgaInt.h @@ -155,15 +155,15 @@ struct Fpga_ManStruct_t_ float TimeLimit; // for resynthesis // runtime statistics - int timeToMap; // time to transfer to the mapping structure - int timeCuts; // time to compute k-feasible cuts - int timeTruth; // time to compute the truth table for each cut - int timeMatch; // time to perform matching for each node - int timeRecover; // time to perform area recovery - int timeToNet; // time to transfer back to the network - int timeTotal; // the total mapping time - int time1; // time to transfer to the mapping structure - int time2; // time to transfer to the mapping structure + clock_t timeToMap; // time to transfer to the mapping structure + clock_t timeCuts; // time to compute k-feasible cuts + clock_t timeTruth; // time to compute the truth table for each cut + clock_t timeMatch; // time to perform matching for each node + clock_t timeRecover; // time to perform area recovery + clock_t timeToNet; // time to transfer back to the network + clock_t timeTotal; // the total mapping time + clock_t time1; // time to transfer to the mapping structure + clock_t time2; // time to transfer to the mapping structure }; // the LUT library diff --git a/src/map/fpga/fpgaMatch.c b/src/map/fpga/fpgaMatch.c index 08db4bb1..dd04e562 100644 --- a/src/map/fpga/fpgaMatch.c +++ b/src/map/fpga/fpgaMatch.c @@ -119,7 +119,7 @@ int Fpga_MappingMatches( Fpga_Man_t * p, int fDelayOriented ) int Fpga_MatchNode( Fpga_Man_t * p, Fpga_Node_t * pNode, int fDelayOriented ) { Fpga_Cut_t * pCut, * pCutBestOld; - int clk; + clock_t clk; // make sure that at least one cut other than the trivial is present if ( pNode->pCuts->pNext == NULL ) { @@ -269,7 +269,7 @@ int Fpga_MatchNodeArea( Fpga_Man_t * p, Fpga_Node_t * pNode ) { Fpga_Cut_t * pCut, * pCutBestOld; float aAreaCutBest; - int clk; + clock_t clk; // make sure that at least one cut other than the trivial is present if ( pNode->pCuts->pNext == NULL ) { @@ -390,7 +390,7 @@ int Fpga_MatchNodeSwitch( Fpga_Man_t * p, Fpga_Node_t * pNode ) { Fpga_Cut_t * pCut, * pCutBestOld; float aAreaCutBest = FPGA_FLOAT_LARGE; - int clk; + clock_t clk; // make sure that at least one cut other than the trivial is present if ( pNode->pCuts->pNext == NULL ) { |