diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2007-12-25 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2007-12-25 08:01:00 -0800 |
commit | 00e9c3d06b590b0aac04bafddfd14115d14760f8 (patch) | |
tree | ac9b977538874c9f3b16ac03de0fd7265d19e025 /src/map | |
parent | 14c01eaccab87d14d1bd0eaa3fc491026349665e (diff) | |
download | abc-00e9c3d06b590b0aac04bafddfd14115d14760f8.tar.gz abc-00e9c3d06b590b0aac04bafddfd14115d14760f8.tar.bz2 abc-00e9c3d06b590b0aac04bafddfd14115d14760f8.zip |
Version abc71225
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/fpga/fpga.h | 3 | ||||
-rw-r--r-- | src/map/fpga/fpgaCreate.c | 2 | ||||
-rw-r--r-- | src/map/fpga/fpgaCut.c | 22 | ||||
-rw-r--r-- | src/map/fpga/fpgaSwitch.c | 4 | ||||
-rw-r--r-- | src/map/if/if.h | 1 |
5 files changed, 30 insertions, 2 deletions
diff --git a/src/map/fpga/fpga.h b/src/map/fpga/fpga.h index 188420b1..708cf385 100644 --- a/src/map/fpga/fpga.h +++ b/src/map/fpga/fpga.h @@ -78,7 +78,9 @@ extern Fpga_Node_t ** Fpga_ManReadOutputs( Fpga_Man_t * p ); extern Fpga_Node_t * Fpga_ManReadConst1 ( Fpga_Man_t * p ); extern float * Fpga_ManReadInputArrivals( Fpga_Man_t * p ); 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 ); @@ -141,6 +143,7 @@ extern int Fpga_Mapping( Fpga_Man_t * p ); /*=== fpgaCut.c ===============================================================*/ extern void Fpga_MappingCreatePiCuts( Fpga_Man_t * p ); extern void Fpga_CutsCleanSign( Fpga_Man_t * pMan ); +extern void Fpga_CutsCleanRoot( Fpga_Man_t * pMan ); /*=== fpgaCutUtils.c =============================================================*/ extern void Fpga_CutCreateFromNode( Fpga_Man_t * p, int iRoot, int * pLeaves, int nLeaves ); extern void Fpga_MappingSetUsedCuts( Fpga_Man_t * p ); diff --git a/src/map/fpga/fpgaCreate.c b/src/map/fpga/fpgaCreate.c index fa0f80d1..be71d74e 100644 --- a/src/map/fpga/fpgaCreate.c +++ b/src/map/fpga/fpgaCreate.c @@ -52,7 +52,9 @@ Fpga_Node_t ** Fpga_ManReadOutputs( Fpga_Man_t * p ) { retu Fpga_Node_t * Fpga_ManReadConst1 ( Fpga_Man_t * p ) { return p->pConst1; } float * Fpga_ManReadInputArrivals( Fpga_Man_t * p ) { return p->pInputArrivals;} int Fpga_ManReadVerbose( Fpga_Man_t * p ) { return p->fVerbose; } +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; } diff --git a/src/map/fpga/fpgaCut.c b/src/map/fpga/fpgaCut.c index a5505e72..ce688179 100644 --- a/src/map/fpga/fpgaCut.c +++ b/src/map/fpga/fpgaCut.c @@ -802,6 +802,28 @@ void Fpga_CutsCleanSign( Fpga_Man_t * pMan ) pCut->uSign = 0; } +/**Function************************************************************* + + Synopsis [Clean the signatures.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Fpga_CutsCleanRoot( Fpga_Man_t * pMan ) +{ + Fpga_Node_t * pNode; + Fpga_Cut_t * pCut; + int i; + for ( i = 0; i < pMan->nBins; i++ ) + for ( pNode = pMan->pBins[i]; pNode; pNode = pNode->pNext ) + for ( pCut = pNode->pCuts; pCut; pCut = pCut->pNext ) + pCut->pRoot = NULL; +} + /**Function************************************************************* diff --git a/src/map/fpga/fpgaSwitch.c b/src/map/fpga/fpgaSwitch.c index c93e0de4..5e881959 100644 --- a/src/map/fpga/fpgaSwitch.c +++ b/src/map/fpga/fpgaSwitch.c @@ -139,8 +139,8 @@ float Fpga_MappingGetSwitching( Fpga_Man_t * pMan, Fpga_NodeVec_t * vMapping ) } // add buffer for each CO driven by a CI for ( i = 0; i < pMan->nOutputs; i++ ) - if ( Fpga_NodeIsVar(pMan->pOutputs[i]) && !Fpga_IsComplement(pMan->pOutputs[i]) ) - Switch += pMan->pOutputs[i]->Switching; + if ( Fpga_NodeIsVar(Fpga_Regular(pMan->pOutputs[i])) && !Fpga_IsComplement(pMan->pOutputs[i]) ) + Switch += Fpga_Regular(pMan->pOutputs[i])->Switching; return Switch; } diff --git a/src/map/if/if.h b/src/map/if/if.h index 3f3badf6..1b82f9a0 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -261,6 +261,7 @@ static inline void * If_CutData( If_Cut_t * pCut ) { r static inline void If_CutSetData( If_Cut_t * pCut, void * pData ) { *(void **)pCut = pData; } static inline int If_CutLeaveNum( If_Cut_t * pCut ) { return pCut->nLeaves; } +static inline int * If_CutLeaves( If_Cut_t * pCut ) { return pCut->pLeaves; } static inline unsigned * If_CutTruth( If_Cut_t * pCut ) { return pCut->pTruth; } static inline unsigned If_CutSuppMask( If_Cut_t * pCut ) { return (~(unsigned)0) >> (32-pCut->nLeaves); } static inline int If_CutTruthWords( int nVarsMax ) { return nVarsMax <= 5 ? 1 : (1 << (nVarsMax - 5)); } |