Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
ef20b0c5
Commit
ef20b0c5
authored
Apr 04, 2008
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version abc80404
parent
69b5bcad
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
300 additions
and
188 deletions
+300
-188
src/aig/dar/darBalance.c
+10
-2
src/aig/dar/darRefact.c
+12
-1
src/aig/ntl/ntlExtract.c
+1
-1
src/aig/ntl/ntlReadBlif.c
+2
-2
src/aig/ntl/ntlTime.c
+2
-2
src/aig/nwk/nwkDfs.c
+2
-2
src/aig/nwk/nwkMap.c
+1
-1
src/aig/nwk/nwkStrash.c
+2
-2
src/aig/nwk/nwkTiming.c
+52
-41
src/aig/tim/tim.c
+193
-115
src/aig/tim/tim.h
+14
-10
src/base/abci/abc.c
+1
-1
src/map/if/ifMap.c
+2
-2
src/map/if/ifUtil.c
+6
-6
No files found.
src/aig/dar/darBalance.c
View file @
ef20b0c5
...
@@ -199,6 +199,14 @@ void Dar_BalancePermute( Aig_Man_t * p, Vec_Ptr_t * vSuper, int LeftBound, int f
...
@@ -199,6 +199,14 @@ void Dar_BalancePermute( Aig_Man_t * p, Vec_Ptr_t * vSuper, int LeftBound, int f
Vec_PtrWriteEntry
(
vSuper
,
RightBound
,
pObj3
);
Vec_PtrWriteEntry
(
vSuper
,
RightBound
,
pObj3
);
return
;
return
;
}
}
if
(
Aig_Regular
(
pObj1
)
==
Aig_Regular
(
pObj3
)
)
{
if
(
pObj3
==
pObj2
)
return
;
Vec_PtrWriteEntry
(
vSuper
,
i
,
pObj2
);
Vec_PtrWriteEntry
(
vSuper
,
RightBound
,
pObj3
);
return
;
}
pGhost
=
Aig_ObjCreateGhost
(
p
,
pObj1
,
pObj3
,
fExor
?
AIG_OBJ_EXOR
:
AIG_OBJ_AND
);
pGhost
=
Aig_ObjCreateGhost
(
p
,
pObj1
,
pObj3
,
fExor
?
AIG_OBJ_EXOR
:
AIG_OBJ_AND
);
if
(
Aig_TableLookup
(
p
,
pGhost
)
)
if
(
Aig_TableLookup
(
p
,
pGhost
)
)
{
{
...
@@ -394,7 +402,7 @@ Aig_Man_t * Dar_ManBalance( Aig_Man_t * p, int fUpdateLevel )
...
@@ -394,7 +402,7 @@ Aig_Man_t * Dar_ManBalance( Aig_Man_t * p, int fUpdateLevel )
pObjNew
=
Aig_ObjCreatePi
(
pNew
);
pObjNew
=
Aig_ObjCreatePi
(
pNew
);
pObj
->
pData
=
pObjNew
;
pObj
->
pData
=
pObjNew
;
// set the arrival time of the new PI
// set the arrival time of the new PI
arrTime
=
Tim_ManGet
P
iArrival
(
p
->
pManTime
,
Aig_ObjPioNum
(
pObj
)
);
arrTime
=
Tim_ManGet
C
iArrival
(
p
->
pManTime
,
Aig_ObjPioNum
(
pObj
)
);
pObjNew
->
Level
=
(
int
)
arrTime
;
pObjNew
->
Level
=
(
int
)
arrTime
;
}
}
else
if
(
Aig_ObjIsPo
(
pObj
)
)
else
if
(
Aig_ObjIsPo
(
pObj
)
)
...
@@ -406,7 +414,7 @@ Aig_Man_t * Dar_ManBalance( Aig_Man_t * p, int fUpdateLevel )
...
@@ -406,7 +414,7 @@ Aig_Man_t * Dar_ManBalance( Aig_Man_t * p, int fUpdateLevel )
Aig_ObjCreatePo
(
pNew
,
pObjNew
);
Aig_ObjCreatePo
(
pNew
,
pObjNew
);
// save arrival time of the output
// save arrival time of the output
arrTime
=
(
float
)
Aig_Regular
(
pObjNew
)
->
Level
;
arrTime
=
(
float
)
Aig_Regular
(
pObjNew
)
->
Level
;
Tim_ManSet
P
oArrival
(
p
->
pManTime
,
Aig_ObjPioNum
(
pObj
),
arrTime
);
Tim_ManSet
C
oArrival
(
p
->
pManTime
,
Aig_ObjPioNum
(
pObj
),
arrTime
);
}
}
else
else
assert
(
0
);
assert
(
0
);
...
...
src/aig/dar/darRefact.c
View file @
ef20b0c5
...
@@ -600,10 +600,21 @@ p->timeOther = p->timeTotal - p->timeCuts - p->timeEval;
...
@@ -600,10 +600,21 @@ p->timeOther = p->timeTotal - p->timeCuts - p->timeEval;
Aig_ManFanoutStop
(
pAig
);
Aig_ManFanoutStop
(
pAig
);
if
(
p
->
pPars
->
fUpdateLevel
)
if
(
p
->
pPars
->
fUpdateLevel
)
Aig_ManStopReverseLevels
(
pAig
);
Aig_ManStopReverseLevels
(
pAig
);
/*
Aig_ManForEachObj( p->pAig, pObj, i )
if ( Aig_ObjIsNode(pObj) && Aig_ObjRefs(pObj) == 0 )
{
printf( "Unreferenced " );
Aig_ObjPrintVerbose( pObj, 0 );
printf( "\n" );
}
*/
// remove dangling nodes (they should not be here!)
Aig_ManCleanup
(
pAig
);
// stop the rewriting manager
// stop the rewriting manager
Dar_ManRefStop
(
p
);
Dar_ManRefStop
(
p
);
Aig_ManCheckPhase
(
pAig
);
//
Aig_ManCheckPhase( pAig );
if
(
!
Aig_ManCheck
(
pAig
)
)
if
(
!
Aig_ManCheck
(
pAig
)
)
{
{
printf
(
"Dar_ManRefactor: The network check has failed.
\n
"
);
printf
(
"Dar_ManRefactor: The network check has failed.
\n
"
);
...
...
src/aig/ntl/ntlExtract.c
View file @
ef20b0c5
...
@@ -387,7 +387,7 @@ int Ntl_ManExtract_rec( Ntl_Man_t * p, Ntl_Net_t * pNet )
...
@@ -387,7 +387,7 @@ int Ntl_ManExtract_rec( Ntl_Man_t * p, Ntl_Net_t * pNet )
// add box inputs/outputs to COs/CIs
// add box inputs/outputs to COs/CIs
if
(
Ntl_ObjIsBox
(
pObj
)
)
if
(
Ntl_ObjIsBox
(
pObj
)
)
{
{
int
LevelCur
,
LevelMax
=
-
TIM
E
_ETERNITY
;
int
LevelCur
,
LevelMax
=
-
TIM_ETERNITY
;
Vec_IntPush
(
p
->
vBox1Cos
,
Aig_ManPoNum
(
p
->
pAig
)
);
Vec_IntPush
(
p
->
vBox1Cos
,
Aig_ManPoNum
(
p
->
pAig
)
);
Ntl_ObjForEachFanin
(
pObj
,
pNetFanin
,
i
)
Ntl_ObjForEachFanin
(
pObj
,
pNetFanin
,
i
)
{
{
...
...
src/aig/ntl/ntlReadBlif.c
View file @
ef20b0c5
...
@@ -974,9 +974,9 @@ static int Ioa_ReadParseLineTimes( Ioa_ReadMod_t * p, char * pLine, int fOutput
...
@@ -974,9 +974,9 @@ static int Ioa_ReadParseLineTimes( Ioa_ReadMod_t * p, char * pLine, int fOutput
// find the delay number
// find the delay number
pTokenNum
=
Vec_PtrEntryLast
(
vTokens
);
pTokenNum
=
Vec_PtrEntryLast
(
vTokens
);
if
(
!
strcmp
(
pTokenNum
,
"-inf"
)
)
if
(
!
strcmp
(
pTokenNum
,
"-inf"
)
)
Delay
=
-
TIM
E
_ETERNITY
;
Delay
=
-
TIM_ETERNITY
;
else
if
(
!
strcmp
(
pTokenNum
,
"inf"
)
)
else
if
(
!
strcmp
(
pTokenNum
,
"inf"
)
)
Delay
=
TIM
E
_ETERNITY
;
Delay
=
TIM_ETERNITY
;
else
else
Delay
=
atof
(
pTokenNum
);
Delay
=
atof
(
pTokenNum
);
if
(
Delay
==
0
.
0
&&
pTokenNum
[
0
]
!=
'0'
)
if
(
Delay
==
0
.
0
&&
pTokenNum
[
0
]
!=
'0'
)
...
...
src/aig/ntl/ntlTime.c
View file @
ef20b0c5
...
@@ -90,11 +90,11 @@ Tim_Man_t * Ntl_ManCreateTiming( Ntl_Man_t * p )
...
@@ -90,11 +90,11 @@ Tim_Man_t * Ntl_ManCreateTiming( Ntl_Man_t * p )
// unpack the data in the arrival times
// unpack the data in the arrival times
if
(
pRoot
->
vArrivals
)
if
(
pRoot
->
vArrivals
)
Vec_IntForEachEntry
(
pRoot
->
vArrivals
,
Entry
,
i
)
Vec_IntForEachEntry
(
pRoot
->
vArrivals
,
Entry
,
i
)
Tim_ManInit
P
iArrival
(
pMan
,
Entry
,
Aig_Int2Float
(
Vec_IntEntry
(
pRoot
->
vArrivals
,
++
i
))
);
Tim_ManInit
C
iArrival
(
pMan
,
Entry
,
Aig_Int2Float
(
Vec_IntEntry
(
pRoot
->
vArrivals
,
++
i
))
);
// unpack the data in the required times
// unpack the data in the required times
if
(
pRoot
->
vRequireds
)
if
(
pRoot
->
vRequireds
)
Vec_IntForEachEntry
(
pRoot
->
vRequireds
,
Entry
,
i
)
Vec_IntForEachEntry
(
pRoot
->
vRequireds
,
Entry
,
i
)
Tim_ManInit
P
oRequired
(
pMan
,
Entry
,
Aig_Int2Float
(
Vec_IntEntry
(
pRoot
->
vRequireds
,
++
i
))
);
Tim_ManInit
C
oRequired
(
pMan
,
Entry
,
Aig_Int2Float
(
Vec_IntEntry
(
pRoot
->
vRequireds
,
++
i
))
);
// derive timing tables
// derive timing tables
vDelayTables
=
Vec_PtrAlloc
(
Vec_PtrSize
(
p
->
vModels
)
);
vDelayTables
=
Vec_PtrAlloc
(
Vec_PtrSize
(
p
->
vModels
)
);
Ntl_ManForEachModel
(
p
,
pModel
,
i
)
Ntl_ManForEachModel
(
p
,
pModel
,
i
)
...
...
src/aig/nwk/nwkDfs.c
View file @
ef20b0c5
...
@@ -114,14 +114,14 @@ int Nwk_ManLevelBackup( Nwk_Man_t * pNtk )
...
@@ -114,14 +114,14 @@ int Nwk_ManLevelBackup( Nwk_Man_t * pNtk )
{
{
if
(
Nwk_ObjIsCi
(
pObj
)
)
if
(
Nwk_ObjIsCi
(
pObj
)
)
{
{
Level
=
pManTimeUnit
?
(
int
)
Tim_ManGet
P
iArrival
(
pManTimeUnit
,
pObj
->
PioId
)
:
0
;
Level
=
pManTimeUnit
?
(
int
)
Tim_ManGet
C
iArrival
(
pManTimeUnit
,
pObj
->
PioId
)
:
0
;
Nwk_ObjSetLevel
(
pObj
,
Level
);
Nwk_ObjSetLevel
(
pObj
,
Level
);
}
}
else
if
(
Nwk_ObjIsCo
(
pObj
)
)
else
if
(
Nwk_ObjIsCo
(
pObj
)
)
{
{
Level
=
Nwk_ObjLevel
(
Nwk_ObjFanin0
(
pObj
)
);
Level
=
Nwk_ObjLevel
(
Nwk_ObjFanin0
(
pObj
)
);
if
(
pManTimeUnit
)
if
(
pManTimeUnit
)
Tim_ManSet
P
oArrival
(
pManTimeUnit
,
pObj
->
PioId
,
(
float
)
Level
);
Tim_ManSet
C
oArrival
(
pManTimeUnit
,
pObj
->
PioId
,
(
float
)
Level
);
Nwk_ObjSetLevel
(
pObj
,
Level
);
Nwk_ObjSetLevel
(
pObj
,
Level
);
if
(
LevelMax
<
Nwk_ObjLevel
(
pObj
)
)
if
(
LevelMax
<
Nwk_ObjLevel
(
pObj
)
)
LevelMax
=
Nwk_ObjLevel
(
pObj
);
LevelMax
=
Nwk_ObjLevel
(
pObj
);
...
...
src/aig/nwk/nwkMap.c
View file @
ef20b0c5
...
@@ -52,7 +52,7 @@ void Nwk_ManSetIfParsDefault( If_Par_t * pPars )
...
@@ -52,7 +52,7 @@ void Nwk_ManSetIfParsDefault( If_Par_t * pPars )
pPars
->
nFlowIters
=
1
;
pPars
->
nFlowIters
=
1
;
pPars
->
nAreaIters
=
2
;
pPars
->
nAreaIters
=
2
;
pPars
->
DelayTarget
=
-
1
;
pPars
->
DelayTarget
=
-
1
;
pPars
->
Epsilon
=
(
float
)
0
.
00
1
;
pPars
->
Epsilon
=
(
float
)
0
.
00
5
;
pPars
->
fPreprocess
=
1
;
pPars
->
fPreprocess
=
1
;
pPars
->
fArea
=
0
;
pPars
->
fArea
=
0
;
pPars
->
fFancy
=
0
;
pPars
->
fFancy
=
0
;
...
...
src/aig/nwk/nwkStrash.c
View file @
ef20b0c5
...
@@ -114,14 +114,14 @@ Aig_Man_t * Nwk_ManStrash( Nwk_Man_t * pNtk )
...
@@ -114,14 +114,14 @@ Aig_Man_t * Nwk_ManStrash( Nwk_Man_t * pNtk )
if
(
Nwk_ObjIsCi
(
pObj
)
)
if
(
Nwk_ObjIsCi
(
pObj
)
)
{
{
pObjNew
=
Aig_ObjCreatePi
(
pMan
);
pObjNew
=
Aig_ObjCreatePi
(
pMan
);
Level
=
Tim_ManGet
P
iArrival
(
pMan
->
pManTime
,
pObj
->
PioId
);
Level
=
Tim_ManGet
C
iArrival
(
pMan
->
pManTime
,
pObj
->
PioId
);
Aig_ObjSetLevel
(
pObjNew
,
Level
);
Aig_ObjSetLevel
(
pObjNew
,
Level
);
}
}
else
if
(
Nwk_ObjIsCo
(
pObj
)
)
else
if
(
Nwk_ObjIsCo
(
pObj
)
)
{
{
pObjNew
=
Aig_ObjCreatePo
(
pMan
,
Aig_NotCond
(
Nwk_ObjFanin0
(
pObj
)
->
pCopy
,
pObj
->
fCompl
)
);
pObjNew
=
Aig_ObjCreatePo
(
pMan
,
Aig_NotCond
(
Nwk_ObjFanin0
(
pObj
)
->
pCopy
,
pObj
->
fCompl
)
);
Level
=
Aig_ObjLevel
(
pObjNew
);
Level
=
Aig_ObjLevel
(
pObjNew
);
Tim_ManSet
P
oArrival
(
pMan
->
pManTime
,
pObj
->
PioId
,
(
float
)
Level
);
Tim_ManSet
C
oArrival
(
pMan
->
pManTime
,
pObj
->
PioId
,
(
float
)
Level
);
}
}
else
if
(
Nwk_ObjIsNode
(
pObj
)
)
else
if
(
Nwk_ObjIsNode
(
pObj
)
)
{
{
...
...
src/aig/nwk/nwkTiming.c
View file @
ef20b0c5
...
@@ -46,7 +46,7 @@ void Nwk_ManCleanTiming( Nwk_Man_t * pNtk )
...
@@ -46,7 +46,7 @@ void Nwk_ManCleanTiming( Nwk_Man_t * pNtk )
Nwk_ManForEachObj
(
pNtk
,
pObj
,
i
)
Nwk_ManForEachObj
(
pNtk
,
pObj
,
i
)
{
{
pObj
->
tArrival
=
pObj
->
tSlack
=
0
.
0
;
pObj
->
tArrival
=
pObj
->
tSlack
=
0
.
0
;
pObj
->
tRequired
=
TIM
E
_ETERNITY
;
pObj
->
tRequired
=
TIM_ETERNITY
;
}
}
}
}
...
@@ -138,7 +138,7 @@ float Nwk_NodeComputeArrival( Nwk_Obj_t * pObj, int fUseSorting )
...
@@ -138,7 +138,7 @@ float Nwk_NodeComputeArrival( Nwk_Obj_t * pObj, int fUseSorting )
return
Nwk_ObjArrival
(
pObj
);
return
Nwk_ObjArrival
(
pObj
);
if
(
Nwk_ObjIsCo
(
pObj
)
)
if
(
Nwk_ObjIsCo
(
pObj
)
)
return
Nwk_ObjArrival
(
Nwk_ObjFanin0
(
pObj
)
);
return
Nwk_ObjArrival
(
Nwk_ObjFanin0
(
pObj
)
);
tArrival
=
-
TIM
E
_ETERNITY
;
tArrival
=
-
TIM_ETERNITY
;
if
(
pLutLib
==
NULL
)
if
(
pLutLib
==
NULL
)
{
{
Nwk_ObjForEachFanin
(
pObj
,
pFanin
,
k
)
Nwk_ObjForEachFanin
(
pObj
,
pFanin
,
k
)
...
@@ -196,7 +196,7 @@ float Nwk_NodeComputeRequired( Nwk_Obj_t * pObj, int fUseSorting )
...
@@ -196,7 +196,7 @@ float Nwk_NodeComputeRequired( Nwk_Obj_t * pObj, int fUseSorting )
assert
(
Nwk_ObjIsNode
(
pObj
)
||
Nwk_ObjIsCi
(
pObj
)
||
Nwk_ObjIsCo
(
pObj
)
);
assert
(
Nwk_ObjIsNode
(
pObj
)
||
Nwk_ObjIsCi
(
pObj
)
||
Nwk_ObjIsCo
(
pObj
)
);
if
(
Nwk_ObjIsCo
(
pObj
)
)
if
(
Nwk_ObjIsCo
(
pObj
)
)
return
Nwk_ObjRequired
(
pObj
);
return
Nwk_ObjRequired
(
pObj
);
tRequired
=
TIM
E
_ETERNITY
;
tRequired
=
TIM_ETERNITY
;
if
(
pLutLib
==
NULL
)
if
(
pLutLib
==
NULL
)
{
{
Nwk_ObjForEachFanout
(
pObj
,
pFanout
,
k
)
Nwk_ObjForEachFanout
(
pObj
,
pFanout
,
k
)
...
@@ -321,6 +321,7 @@ float Nwk_NodePropagateRequired( Nwk_Obj_t * pObj, int fUseSorting )
...
@@ -321,6 +321,7 @@ float Nwk_NodePropagateRequired( Nwk_Obj_t * pObj, int fUseSorting )
***********************************************************************/
***********************************************************************/
float
Nwk_ManDelayTraceLut
(
Nwk_Man_t
*
pNtk
)
float
Nwk_ManDelayTraceLut
(
Nwk_Man_t
*
pNtk
)
{
{
Vec_Ptr_t
*
vObjs
;
int
fUseSorting
=
1
;
int
fUseSorting
=
1
;
If_Lib_t
*
pLutLib
=
pNtk
->
pLutLib
;
If_Lib_t
*
pLutLib
=
pNtk
->
pLutLib
;
Vec_Ptr_t
*
vNodes
;
Vec_Ptr_t
*
vNodes
;
...
@@ -333,7 +334,7 @@ float Nwk_ManDelayTraceLut( Nwk_Man_t * pNtk )
...
@@ -333,7 +334,7 @@ float Nwk_ManDelayTraceLut( Nwk_Man_t * pNtk )
{
{
printf
(
"The max LUT size (%d) is less than the max fanin count (%d).
\n
"
,
printf
(
"The max LUT size (%d) is less than the max fanin count (%d).
\n
"
,
pLutLib
->
LutMax
,
Nwk_ManGetFaninMax
(
pNtk
)
);
pLutLib
->
LutMax
,
Nwk_ManGetFaninMax
(
pNtk
)
);
return
-
TIM
E
_ETERNITY
;
return
-
TIM_ETERNITY
;
}
}
// compute the reverse order of all objects
// compute the reverse order of all objects
...
@@ -345,18 +346,21 @@ float Nwk_ManDelayTraceLut( Nwk_Man_t * pNtk )
...
@@ -345,18 +346,21 @@ float Nwk_ManDelayTraceLut( Nwk_Man_t * pNtk )
// propagate arrival times
// propagate arrival times
if
(
pNtk
->
pManTime
)
if
(
pNtk
->
pManTime
)
Tim_ManIncrementTravId
(
pNtk
->
pManTime
);
Tim_ManIncrementTravId
(
pNtk
->
pManTime
);
Nwk_ManForEachObj
(
pNtk
,
pObj
,
i
)
// Nwk_ManForEachObj( pNtk, pObj, i )
vObjs
=
Nwk_ManDfs
(
pNtk
);
Vec_PtrForEachEntry
(
vObjs
,
pObj
,
i
)
{
{
tArrival
=
Nwk_NodeComputeArrival
(
pObj
,
fUseSorting
);
tArrival
=
Nwk_NodeComputeArrival
(
pObj
,
fUseSorting
);
if
(
Nwk_ObjIsCo
(
pObj
)
&&
pNtk
->
pManTime
)
if
(
Nwk_ObjIsCo
(
pObj
)
&&
pNtk
->
pManTime
)
Tim_ManSet
P
oArrival
(
pNtk
->
pManTime
,
pObj
->
PioId
,
tArrival
);
Tim_ManSet
C
oArrival
(
pNtk
->
pManTime
,
pObj
->
PioId
,
tArrival
);
if
(
Nwk_ObjIsCi
(
pObj
)
&&
pNtk
->
pManTime
)
if
(
Nwk_ObjIsCi
(
pObj
)
&&
pNtk
->
pManTime
)
tArrival
=
Tim_ManGet
P
iArrival
(
pNtk
->
pManTime
,
pObj
->
PioId
);
tArrival
=
Tim_ManGet
C
iArrival
(
pNtk
->
pManTime
,
pObj
->
PioId
);
Nwk_ObjSetArrival
(
pObj
,
tArrival
);
Nwk_ObjSetArrival
(
pObj
,
tArrival
);
}
}
Vec_PtrFree
(
vObjs
);
// get the latest arrival times
// get the latest arrival times
tArrival
=
-
TIM
E
_ETERNITY
;
tArrival
=
-
TIM_ETERNITY
;
Nwk_ManForEachPo
(
pNtk
,
pObj
,
i
)
Nwk_ManForEachPo
(
pNtk
,
pObj
,
i
)
if
(
tArrival
<
Nwk_ObjArrival
(
pObj
)
)
if
(
tArrival
<
Nwk_ObjArrival
(
pObj
)
)
tArrival
=
Nwk_ObjArrival
(
pObj
);
tArrival
=
Nwk_ObjArrival
(
pObj
);
...
@@ -365,7 +369,7 @@ float Nwk_ManDelayTraceLut( Nwk_Man_t * pNtk )
...
@@ -365,7 +369,7 @@ float Nwk_ManDelayTraceLut( Nwk_Man_t * pNtk )
if
(
pNtk
->
pManTime
)
if
(
pNtk
->
pManTime
)
{
{
Tim_ManIncrementTravId
(
pNtk
->
pManTime
);
Tim_ManIncrementTravId
(
pNtk
->
pManTime
);
Tim_ManSet
P
oRequiredAll
(
pNtk
->
pManTime
,
tArrival
);
Tim_ManSet
C
oRequiredAll
(
pNtk
->
pManTime
,
tArrival
);
}
}
else
else
{
{
...
@@ -383,13 +387,13 @@ float Nwk_ManDelayTraceLut( Nwk_Man_t * pNtk )
...
@@ -383,13 +387,13 @@ float Nwk_ManDelayTraceLut( Nwk_Man_t * pNtk )
else
if
(
Nwk_ObjIsCi
(
pObj
)
)
else
if
(
Nwk_ObjIsCi
(
pObj
)
)
{
{
if
(
pNtk
->
pManTime
)
if
(
pNtk
->
pManTime
)
Tim_ManSet
P
iRequired
(
pNtk
->
pManTime
,
pObj
->
PioId
,
Nwk_ObjRequired
(
pObj
)
);
Tim_ManSet
C
iRequired
(
pNtk
->
pManTime
,
pObj
->
PioId
,
Nwk_ObjRequired
(
pObj
)
);
}
}
else
if
(
Nwk_ObjIsCo
(
pObj
)
)
else
if
(
Nwk_ObjIsCo
(
pObj
)
)
{
{
if
(
pNtk
->
pManTime
)
if
(
pNtk
->
pManTime
)
{
{
tRequired
=
Tim_ManGet
P
oRequired
(
pNtk
->
pManTime
,
pObj
->
PioId
);
tRequired
=
Tim_ManGet
C
oRequired
(
pNtk
->
pManTime
,
pObj
->
PioId
);
Nwk_ObjSetRequired
(
pObj
,
tRequired
);
Nwk_ObjSetRequired
(
pObj
,
tRequired
);
}
}
if
(
Nwk_ObjRequired
(
Nwk_ObjFanin0
(
pObj
))
>
Nwk_ObjRequired
(
pObj
)
)
if
(
Nwk_ObjRequired
(
Nwk_ObjFanin0
(
pObj
))
>
Nwk_ObjRequired
(
pObj
)
)
...
@@ -523,7 +527,6 @@ void Nwk_NodeUpdateAddToQueue( Vec_Ptr_t * vQueue, Nwk_Obj_t * pObj, int iCurren
...
@@ -523,7 +527,6 @@ void Nwk_NodeUpdateAddToQueue( Vec_Ptr_t * vQueue, Nwk_Obj_t * pObj, int iCurren
if
(
Nwk_ObjLevel
(
pTemp2
)
>=
Nwk_ObjLevel
(
pTemp1
)
)
if
(
Nwk_ObjLevel
(
pTemp2
)
>=
Nwk_ObjLevel
(
pTemp1
)
)
break
;
break
;
}
}
// assert( i-1 > iCurrent );
vQueue
->
pArray
[
i
-
1
]
=
pTemp1
;
vQueue
->
pArray
[
i
-
1
]
=
pTemp1
;
vQueue
->
pArray
[
i
]
=
pTemp2
;
vQueue
->
pArray
[
i
]
=
pTemp2
;
}
}
...
@@ -557,7 +560,7 @@ void Nwk_NodeUpdateArrival( Nwk_Obj_t * pObj )
...
@@ -557,7 +560,7 @@ void Nwk_NodeUpdateArrival( Nwk_Obj_t * pObj )
Vec_Ptr_t
*
vQueue
=
pObj
->
pMan
->
vTemp
;
Vec_Ptr_t
*
vQueue
=
pObj
->
pMan
->
vTemp
;
Nwk_Obj_t
*
pTemp
,
*
pNext
;
Nwk_Obj_t
*
pTemp
,
*
pNext
;
float
tArrival
;
float
tArrival
;
int
i
,
k
,
iBox
,
iTerm1
,
nTerms
;
int
i
Cur
,
k
,
iBox
,
iTerm1
,
nTerms
;
assert
(
Nwk_ObjIsNode
(
pObj
)
);
assert
(
Nwk_ObjIsNode
(
pObj
)
);
// verify the arrival time
// verify the arrival time
tArrival
=
Nwk_NodeComputeArrival
(
pObj
,
1
);
tArrival
=
Nwk_NodeComputeArrival
(
pObj
,
1
);
...
@@ -569,12 +572,12 @@ void Nwk_NodeUpdateArrival( Nwk_Obj_t * pObj )
...
@@ -569,12 +572,12 @@ void Nwk_NodeUpdateArrival( Nwk_Obj_t * pObj )
// process objects
// process objects
if
(
pManTime
)
if
(
pManTime
)
Tim_ManIncrementTravId
(
pManTime
);
Tim_ManIncrementTravId
(
pManTime
);
Vec_PtrForEachEntry
(
vQueue
,
pTemp
,
i
)
Vec_PtrForEachEntry
(
vQueue
,
pTemp
,
i
Cur
)
{
{
pTemp
->
MarkA
=
0
;
pTemp
->
MarkA
=
0
;
tArrival
=
Nwk_NodeComputeArrival
(
pTemp
,
1
);
tArrival
=
Nwk_NodeComputeArrival
(
pTemp
,
1
);
if
(
Nwk_ObjIsCi
(
pTemp
)
&&
pManTime
)
if
(
Nwk_ObjIsCi
(
pTemp
)
&&
pManTime
)
tArrival
=
Tim_ManGet
P
iArrival
(
pManTime
,
pTemp
->
PioId
);
tArrival
=
Tim_ManGet
C
iArrival
(
pManTime
,
pTemp
->
PioId
);
if
(
Nwk_ManTimeEqual
(
tArrival
,
Nwk_ObjArrival
(
pTemp
),
(
float
)
0
.
01
)
)
if
(
Nwk_ManTimeEqual
(
tArrival
,
Nwk_ObjArrival
(
pTemp
),
(
float
)
0
.
01
)
)
continue
;
continue
;
Nwk_ObjSetArrival
(
pTemp
,
tArrival
);
Nwk_ObjSetArrival
(
pTemp
,
tArrival
);
...
@@ -583,19 +586,23 @@ void Nwk_NodeUpdateArrival( Nwk_Obj_t * pObj )
...
@@ -583,19 +586,23 @@ void Nwk_NodeUpdateArrival( Nwk_Obj_t * pObj )
{
{
if
(
pManTime
)
if
(
pManTime
)
{
{
Tim_ManSetPoArrival
(
pManTime
,
pTemp
->
PioId
,
tArrival
);
// it may happen that a box-input (CO) was already marked as visited
iBox
=
Tim_ManBoxForCo
(
pManTime
,
pNext
->
PioId
);
// when some other box-input of the same box was visited - here we undo this
if
(
iBox
>=
0
)
// this is not a true PO
iBox
=
Tim_ManBoxForCo
(
pManTime
,
pTemp
->
PioId
);
if
(
Tim_ManIsCoTravIdCurrent
(
pManTime
,
pTemp
->
PioId
)
)
Tim_ManSetPreviousTravIdBoxInputs
(
pManTime
,
iBox
);
Tim_ManSetCoArrival
(
pManTime
,
pTemp
->
PioId
,
tArrival
);
if
(
iBox
>=
0
)
// this CO is an input of the box
{
{
Tim_ManSetCurrentTravIdBoxInputs
(
pManTime
,
iBox
);
Tim_ManSetCurrentTravIdBoxInputs
(
pManTime
,
iBox
);
iTerm1
=
Tim_ManBoxOutputFirst
(
pManTime
,
iBox
);
iTerm1
=
Tim_ManBoxOutputFirst
(
pManTime
,
iBox
);
nTerms
=
Tim_ManBoxOutputNum
(
pManTime
,
iBox
);
nTerms
=
Tim_ManBoxOutputNum
(
pManTime
,
iBox
);
for
(
i
=
0
;
i
<
nTerms
;
i
++
)
for
(
k
=
0
;
k
<
nTerms
;
k
++
)
{
{
pNext
=
Nwk_ManCi
(
pNext
->
pMan
,
iTerm1
+
i
);
pNext
=
Nwk_ManCi
(
pNext
->
pMan
,
iTerm1
+
k
);
if
(
pNext
->
MarkA
)
if
(
pNext
->
MarkA
)
continue
;
continue
;
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
,
1
);
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
Cur
,
1
);
pNext
->
MarkA
=
1
;
pNext
->
MarkA
=
1
;
}
}
}
}
...
@@ -607,7 +614,7 @@ void Nwk_NodeUpdateArrival( Nwk_Obj_t * pObj )
...
@@ -607,7 +614,7 @@ void Nwk_NodeUpdateArrival( Nwk_Obj_t * pObj )
{
{
if
(
pNext
->
MarkA
)
if
(
pNext
->
MarkA
)
continue
;
continue
;
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
,
1
);
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
Cur
,
1
);
pNext
->
MarkA
=
1
;
pNext
->
MarkA
=
1
;
}
}
}
}
...
@@ -632,7 +639,7 @@ void Nwk_NodeUpdateRequired( Nwk_Obj_t * pObj )
...
@@ -632,7 +639,7 @@ void Nwk_NodeUpdateRequired( Nwk_Obj_t * pObj )
Vec_Ptr_t
*
vQueue
=
pObj
->
pMan
->
vTemp
;
Vec_Ptr_t
*
vQueue
=
pObj
->
pMan
->
vTemp
;
Nwk_Obj_t
*
pTemp
,
*
pNext
;
Nwk_Obj_t
*
pTemp
,
*
pNext
;
float
tRequired
;
float
tRequired
;
int
i
,
k
,
iBox
,
iTerm1
,
nTerms
;
int
i
Cur
,
k
,
iBox
,
iTerm1
,
nTerms
;
assert
(
Nwk_ObjIsNode
(
pObj
)
);
assert
(
Nwk_ObjIsNode
(
pObj
)
);
// make sure the node's required time remained the same
// make sure the node's required time remained the same
tRequired
=
Nwk_NodeComputeRequired
(
pObj
,
1
);
tRequired
=
Nwk_NodeComputeRequired
(
pObj
,
1
);
...
@@ -649,12 +656,12 @@ void Nwk_NodeUpdateRequired( Nwk_Obj_t * pObj )
...
@@ -649,12 +656,12 @@ void Nwk_NodeUpdateRequired( Nwk_Obj_t * pObj )
// process objects
// process objects
if
(
pManTime
)
if
(
pManTime
)
Tim_ManIncrementTravId
(
pManTime
);
Tim_ManIncrementTravId
(
pManTime
);
Vec_PtrForEachEntry
(
vQueue
,
pTemp
,
i
)
Vec_PtrForEachEntry
(
vQueue
,
pTemp
,
i
Cur
)
{
{
pTemp
->
MarkA
=
0
;
pTemp
->
MarkA
=
0
;
tRequired
=
Nwk_NodeComputeRequired
(
pTemp
,
1
);
tRequired
=
Nwk_NodeComputeRequired
(
pTemp
,
1
);
if
(
Nwk_ObjIsCo
(
pTemp
)
&&
pManTime
)
if
(
Nwk_ObjIsCo
(
pTemp
)
&&
pManTime
)
tRequired
=
Tim_ManGet
P
oRequired
(
pManTime
,
pTemp
->
PioId
);
tRequired
=
Tim_ManGet
C
oRequired
(
pManTime
,
pTemp
->
PioId
);
if
(
Nwk_ManTimeEqual
(
tRequired
,
Nwk_ObjRequired
(
pTemp
),
(
float
)
0
.
01
)
)
if
(
Nwk_ManTimeEqual
(
tRequired
,
Nwk_ObjRequired
(
pTemp
),
(
float
)
0
.
01
)
)
continue
;
continue
;
Nwk_ObjSetRequired
(
pTemp
,
tRequired
);
Nwk_ObjSetRequired
(
pTemp
,
tRequired
);
...
@@ -663,19 +670,23 @@ void Nwk_NodeUpdateRequired( Nwk_Obj_t * pObj )
...
@@ -663,19 +670,23 @@ void Nwk_NodeUpdateRequired( Nwk_Obj_t * pObj )
{
{
if
(
pManTime
)
if
(
pManTime
)
{
{
Tim_ManSetPiRequired
(
pManTime
,
pTemp
->
PioId
,
tRequired
);
// it may happen that a box-output (CI) was already marked as visited
iBox
=
Tim_ManBoxForCi
(
pManTime
,
pNext
->
PioId
);
// when some other box-output of the same box was visited - here we undo this
if
(
iBox
>=
0
)
// this is not a true PO
iBox
=
Tim_ManBoxForCi
(
pManTime
,
pTemp
->
PioId
);
if
(
Tim_ManIsCiTravIdCurrent
(
pManTime
,
pTemp
->
PioId
)
)
Tim_ManSetPreviousTravIdBoxOutputs
(
pManTime
,
iBox
);
Tim_ManSetCiRequired
(
pManTime
,
pTemp
->
PioId
,
tRequired
);
if
(
iBox
>=
0
)
// this CI is an output of the box
{
{
Tim_ManSetCurrentTravIdBoxOutputs
(
pManTime
,
iBox
);
Tim_ManSetCurrentTravIdBoxOutputs
(
pManTime
,
iBox
);
iTerm1
=
Tim_ManBoxInputFirst
(
pManTime
,
iBox
);
iTerm1
=
Tim_ManBoxInputFirst
(
pManTime
,
iBox
);
nTerms
=
Tim_ManBoxInputNum
(
pManTime
,
iBox
);
nTerms
=
Tim_ManBoxInputNum
(
pManTime
,
iBox
);
for
(
i
=
0
;
i
<
nTerms
;
i
++
)
for
(
k
=
0
;
k
<
nTerms
;
k
++
)
{
{
pNext
=
Nwk_ManCo
(
pNext
->
pMan
,
iTerm1
+
i
);
pNext
=
Nwk_ManCo
(
pNext
->
pMan
,
iTerm1
+
k
);
if
(
pNext
->
MarkA
)
if
(
pNext
->
MarkA
)
continue
;
continue
;
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
,
0
);
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
Cur
,
0
);
pNext
->
MarkA
=
1
;
pNext
->
MarkA
=
1
;
}
}
}
}
...
@@ -687,7 +698,7 @@ void Nwk_NodeUpdateRequired( Nwk_Obj_t * pObj )
...
@@ -687,7 +698,7 @@ void Nwk_NodeUpdateRequired( Nwk_Obj_t * pObj )
{
{
if
(
pNext
->
MarkA
)
if
(
pNext
->
MarkA
)
continue
;
continue
;
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
,
0
);
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
Cur
,
0
);
pNext
->
MarkA
=
1
;
pNext
->
MarkA
=
1
;
}
}
}
}
...
@@ -715,7 +726,7 @@ int Nwk_ObjLevelNew( Nwk_Obj_t * pObj )
...
@@ -715,7 +726,7 @@ int Nwk_ObjLevelNew( Nwk_Obj_t * pObj )
if
(
pManTime
)
if
(
pManTime
)
{
{
iBox
=
Tim_ManBoxForCi
(
pManTime
,
pObj
->
PioId
);
iBox
=
Tim_ManBoxForCi
(
pManTime
,
pObj
->
PioId
);
if
(
iBox
>=
0
)
// this
is not a true PI
if
(
iBox
>=
0
)
// this
CI is an output of the box
{
{
iTerm1
=
Tim_ManBoxInputFirst
(
pManTime
,
iBox
);
iTerm1
=
Tim_ManBoxInputFirst
(
pManTime
,
iBox
);
nTerms
=
Tim_ManBoxInputNum
(
pManTime
,
iBox
);
nTerms
=
Tim_ManBoxInputNum
(
pManTime
,
iBox
);
...
@@ -751,14 +762,14 @@ void Nwk_ManUpdateLevel( Nwk_Obj_t * pObj )
...
@@ -751,14 +762,14 @@ void Nwk_ManUpdateLevel( Nwk_Obj_t * pObj )
Tim_Man_t
*
pManTime
=
pObj
->
pMan
->
pManTime
;
Tim_Man_t
*
pManTime
=
pObj
->
pMan
->
pManTime
;
Vec_Ptr_t
*
vQueue
=
pObj
->
pMan
->
vTemp
;
Vec_Ptr_t
*
vQueue
=
pObj
->
pMan
->
vTemp
;
Nwk_Obj_t
*
pTemp
,
*
pNext
;
Nwk_Obj_t
*
pTemp
,
*
pNext
;
int
LevelNew
,
i
,
k
,
iBox
,
iTerm1
,
nTerms
;
int
LevelNew
,
i
Cur
,
k
,
iBox
,
iTerm1
,
nTerms
;
assert
(
Nwk_ObjIsNode
(
pObj
)
);
assert
(
Nwk_ObjIsNode
(
pObj
)
);
// initialize the queue with the node
// initialize the queue with the node
Vec_PtrClear
(
vQueue
);
Vec_PtrClear
(
vQueue
);
Vec_PtrPush
(
vQueue
,
pObj
);
Vec_PtrPush
(
vQueue
,
pObj
);
pObj
->
MarkA
=
1
;
pObj
->
MarkA
=
1
;
// process objects
// process objects
Vec_PtrForEachEntry
(
vQueue
,
pTemp
,
i
)
Vec_PtrForEachEntry
(
vQueue
,
pTemp
,
i
Cur
)
{
{
pTemp
->
MarkA
=
0
;
pTemp
->
MarkA
=
0
;
LevelNew
=
Nwk_ObjLevelNew
(
pTemp
);
LevelNew
=
Nwk_ObjLevelNew
(
pTemp
);
...
@@ -770,18 +781,18 @@ void Nwk_ManUpdateLevel( Nwk_Obj_t * pObj )
...
@@ -770,18 +781,18 @@ void Nwk_ManUpdateLevel( Nwk_Obj_t * pObj )
{
{
if
(
pManTime
)
if
(
pManTime
)
{
{
iBox
=
Tim_ManBoxForCo
(
pManTime
,
p
Next
->
PioId
);
iBox
=
Tim_ManBoxForCo
(
pManTime
,
p
Temp
->
PioId
);
if
(
iBox
>=
0
)
// this is not a true PO
if
(
iBox
>=
0
)
// this is not a true PO
{
{
Tim_ManSetCurrentTravIdBoxInputs
(
pManTime
,
iBox
);
Tim_ManSetCurrentTravIdBoxInputs
(
pManTime
,
iBox
);
iTerm1
=
Tim_ManBoxOutputFirst
(
pManTime
,
iBox
);
iTerm1
=
Tim_ManBoxOutputFirst
(
pManTime
,
iBox
);
nTerms
=
Tim_ManBoxOutputNum
(
pManTime
,
iBox
);
nTerms
=
Tim_ManBoxOutputNum
(
pManTime
,
iBox
);
for
(
i
=
0
;
i
<
nTerms
;
i
++
)
for
(
k
=
0
;
k
<
nTerms
;
k
++
)
{
{
pNext
=
Nwk_ManCi
(
pNext
->
pMan
,
iTerm1
+
i
);
pNext
=
Nwk_ManCi
(
pNext
->
pMan
,
iTerm1
+
k
);
if
(
pNext
->
MarkA
)
if
(
pNext
->
MarkA
)
continue
;
continue
;
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
,
1
);
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
Cur
,
1
);
pNext
->
MarkA
=
1
;
pNext
->
MarkA
=
1
;
}
}
}
}
...
@@ -793,7 +804,7 @@ void Nwk_ManUpdateLevel( Nwk_Obj_t * pObj )
...
@@ -793,7 +804,7 @@ void Nwk_ManUpdateLevel( Nwk_Obj_t * pObj )
{
{
if
(
pNext
->
MarkA
)
if
(
pNext
->
MarkA
)
continue
;
continue
;
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
,
1
);
Nwk_NodeUpdateAddToQueue
(
vQueue
,
pNext
,
i
Cur
,
1
);
pNext
->
MarkA
=
1
;
pNext
->
MarkA
=
1
;
}
}
}
}
...
@@ -855,7 +866,7 @@ void Nwk_ManUpdate( Nwk_Obj_t * pObj, Nwk_Obj_t * pObjNew, Vec_Vec_t * vLevels )
...
@@ -855,7 +866,7 @@ void Nwk_ManUpdate( Nwk_Obj_t * pObj, Nwk_Obj_t * pObjNew, Vec_Vec_t * vLevels )
pObjNew
->
tArrival
=
pObj
->
tArrival
;
pObjNew
->
tArrival
=
pObj
->
tArrival
;
pObjNew
->
tRequired
=
pObj
->
tRequired
;
pObjNew
->
tRequired
=
pObj
->
tRequired
;
// update required times of the old fanins
// update required times of the old fanins
pObj
->
tRequired
=
TIM
E
_ETERNITY
;
pObj
->
tRequired
=
TIM_ETERNITY
;
Nwk_NodeUpdateRequired
(
pObj
);
Nwk_NodeUpdateRequired
(
pObj
);
// remove the old node
// remove the old node
Nwk_ManDeleteNode_rec
(
pObj
);
Nwk_ManDeleteNode_rec
(
pObj
);
...
...
src/aig/tim/tim.c
View file @
ef20b0c5
...
@@ -47,10 +47,10 @@ struct Tim_Man_t_
...
@@ -47,10 +47,10 @@ struct Tim_Man_t_
Mem_Flex_t
*
pMemObj
;
// memory manager for boxes
Mem_Flex_t
*
pMemObj
;
// memory manager for boxes
int
nTravIds
;
// traversal ID of the manager
int
nTravIds
;
// traversal ID of the manager
int
fUseTravId
;
// enables the use of traversal ID
int
fUseTravId
;
// enables the use of traversal ID
int
n
P
is
;
// the number of PIs
int
n
C
is
;
// the number of PIs
int
n
P
os
;
// the number of POs
int
n
C
os
;
// the number of POs
Tim_Obj_t
*
p
P
is
;
// timing info for the PIs
Tim_Obj_t
*
p
C
is
;
// timing info for the PIs
Tim_Obj_t
*
p
P
os
;
// timing info for the POs
Tim_Obj_t
*
p
C
os
;
// timing info for the POs
};
};
// timing box
// timing box
...
@@ -75,26 +75,26 @@ struct Tim_Obj_t_
...
@@ -75,26 +75,26 @@ struct Tim_Obj_t_
float
timeReq
;
// required time of the object
float
timeReq
;
// required time of the object
};
};
static
inline
Tim_Obj_t
*
Tim_Man
Pi
(
Tim_Man_t
*
p
,
int
i
)
{
assert
(
i
<
p
->
nPis
);
return
p
->
pP
is
+
i
;
}
static
inline
Tim_Obj_t
*
Tim_Man
Ci
(
Tim_Man_t
*
p
,
int
i
)
{
assert
(
i
<
p
->
nCis
);
return
p
->
pC
is
+
i
;
}
static
inline
Tim_Obj_t
*
Tim_Man
Po
(
Tim_Man_t
*
p
,
int
i
)
{
assert
(
i
<
p
->
nPos
);
return
p
->
pP
os
+
i
;
}
static
inline
Tim_Obj_t
*
Tim_Man
Co
(
Tim_Man_t
*
p
,
int
i
)
{
assert
(
i
<
p
->
nCos
);
return
p
->
pC
os
+
i
;
}
static
inline
Tim_Box_t
*
Tim_ManBox
(
Tim_Man_t
*
p
,
int
i
)
{
return
Vec_PtrEntry
(
p
->
vBoxes
,
i
);
}
static
inline
Tim_Box_t
*
Tim_ManBox
(
Tim_Man_t
*
p
,
int
i
)
{
return
Vec_PtrEntry
(
p
->
vBoxes
,
i
);
}
static
inline
Tim_Box_t
*
Tim_Man
PiBox
(
Tim_Man_t
*
p
,
int
i
)
{
return
Tim_ManPi
(
p
,
i
)
->
iObj2Box
<
0
?
NULL
:
Vec_PtrEntry
(
p
->
vBoxes
,
Tim_ManP
i
(
p
,
i
)
->
iObj2Box
);
}
static
inline
Tim_Box_t
*
Tim_Man
CiBox
(
Tim_Man_t
*
p
,
int
i
)
{
return
Tim_ManCi
(
p
,
i
)
->
iObj2Box
<
0
?
NULL
:
Vec_PtrEntry
(
p
->
vBoxes
,
Tim_ManC
i
(
p
,
i
)
->
iObj2Box
);
}
static
inline
Tim_Box_t
*
Tim_Man
PoBox
(
Tim_Man_t
*
p
,
int
i
)
{
return
Tim_ManPo
(
p
,
i
)
->
iObj2Box
<
0
?
NULL
:
Vec_PtrEntry
(
p
->
vBoxes
,
Tim_ManP
o
(
p
,
i
)
->
iObj2Box
);
}
static
inline
Tim_Box_t
*
Tim_Man
CoBox
(
Tim_Man_t
*
p
,
int
i
)
{
return
Tim_ManCo
(
p
,
i
)
->
iObj2Box
<
0
?
NULL
:
Vec_PtrEntry
(
p
->
vBoxes
,
Tim_ManC
o
(
p
,
i
)
->
iObj2Box
);
}
static
inline
Tim_Obj_t
*
Tim_ManBoxInput
(
Tim_Man_t
*
p
,
Tim_Box_t
*
pBox
,
int
i
)
{
assert
(
i
<
pBox
->
nInputs
);
return
p
->
p
P
os
+
pBox
->
Inouts
[
i
];
}
static
inline
Tim_Obj_t
*
Tim_ManBoxInput
(
Tim_Man_t
*
p
,
Tim_Box_t
*
pBox
,
int
i
)
{
assert
(
i
<
pBox
->
nInputs
);
return
p
->
p
C
os
+
pBox
->
Inouts
[
i
];
}
static
inline
Tim_Obj_t
*
Tim_ManBoxOutput
(
Tim_Man_t
*
p
,
Tim_Box_t
*
pBox
,
int
i
)
{
assert
(
i
<
pBox
->
nOutputs
);
return
p
->
p
P
is
+
pBox
->
Inouts
[
pBox
->
nInputs
+
i
];
}
static
inline
Tim_Obj_t
*
Tim_ManBoxOutput
(
Tim_Man_t
*
p
,
Tim_Box_t
*
pBox
,
int
i
)
{
assert
(
i
<
pBox
->
nOutputs
);
return
p
->
p
C
is
+
pBox
->
Inouts
[
pBox
->
nInputs
+
i
];
}
#define Tim_ManBoxForEachInput( p, pBox, pObj, i ) \
#define Tim_ManBoxForEachInput( p, pBox, pObj, i ) \
for ( i = 0; (i < (pBox)->nInputs) && ((pObj) = Tim_ManBoxInput(p, pBox, i)); i++ )
for ( i = 0; (i < (pBox)->nInputs) && ((pObj) = Tim_ManBoxInput(p, pBox, i)); i++ )
#define Tim_ManBoxForEachOutput( p, pBox, pObj, i ) \
#define Tim_ManBoxForEachOutput( p, pBox, pObj, i ) \
for ( i = 0; (i < (pBox)->nOutputs) && ((pObj) = Tim_ManBoxOutput(p, pBox, i)); i++ )
for ( i = 0; (i < (pBox)->nOutputs) && ((pObj) = Tim_ManBoxOutput(p, pBox, i)); i++ )
#define Tim_ManForEach
P
i( p, pObj, i ) \
#define Tim_ManForEach
C
i( p, pObj, i ) \
for ( i = 0; (i < (p)->n
Pis) && ((pObj) = (p)->pP
is + i); i++ ) \
for ( i = 0; (i < (p)->n
Cis) && ((pObj) = (p)->pC
is + i); i++ ) \
if ( pObj->iObj2Box >= 0 ) {} else
if ( pObj->iObj2Box >= 0 ) {} else
#define Tim_ManForEach
P
o( p, pObj, i ) \
#define Tim_ManForEach
C
o( p, pObj, i ) \
for ( i = 0; (i < (p)->n
Pos) && ((pObj) = (p)->pP
os + i); i++ ) \
for ( i = 0; (i < (p)->n
Cos) && ((pObj) = (p)->pC
os + i); i++ ) \
if ( pObj->iObj2Box >= 0 ) {} else
if ( pObj->iObj2Box >= 0 ) {} else
#define Tim_ManForEachBox( p, pBox, i ) \
#define Tim_ManForEachBox( p, pBox, i ) \
Vec_PtrForEachEntry( p->vBoxes, pBox, i )
Vec_PtrForEachEntry( p->vBoxes, pBox, i )
...
@@ -114,7 +114,7 @@ static inline Tim_Obj_t * Tim_ManBoxOutput( Tim_Man_t * p, Tim_Box_t * pBox, int
...
@@ -114,7 +114,7 @@ static inline Tim_Obj_t * Tim_ManBoxOutput( Tim_Man_t * p, Tim_Box_t * pBox, int
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
Tim_Man_t
*
Tim_ManStart
(
int
n
Pis
,
int
nP
os
)
Tim_Man_t
*
Tim_ManStart
(
int
n
Cis
,
int
nC
os
)
{
{
Tim_Man_t
*
p
;
Tim_Man_t
*
p
;
int
i
;
int
i
;
...
@@ -122,27 +122,27 @@ Tim_Man_t * Tim_ManStart( int nPis, int nPos )
...
@@ -122,27 +122,27 @@ Tim_Man_t * Tim_ManStart( int nPis, int nPos )
memset
(
p
,
0
,
sizeof
(
Tim_Man_t
)
);
memset
(
p
,
0
,
sizeof
(
Tim_Man_t
)
);
p
->
pMemObj
=
Mem_FlexStart
();
p
->
pMemObj
=
Mem_FlexStart
();
p
->
vBoxes
=
Vec_PtrAlloc
(
100
);
p
->
vBoxes
=
Vec_PtrAlloc
(
100
);
p
->
n
Pis
=
nP
is
;
p
->
n
Cis
=
nC
is
;
p
->
n
Pos
=
nP
os
;
p
->
n
Cos
=
nC
os
;
p
->
p
Pis
=
ALLOC
(
Tim_Obj_t
,
nP
is
);
p
->
p
Cis
=
ALLOC
(
Tim_Obj_t
,
nC
is
);
memset
(
p
->
p
Pis
,
0
,
sizeof
(
Tim_Obj_t
)
*
nP
is
);
memset
(
p
->
p
Cis
,
0
,
sizeof
(
Tim_Obj_t
)
*
nC
is
);
p
->
p
Pos
=
ALLOC
(
Tim_Obj_t
,
nP
os
);
p
->
p
Cos
=
ALLOC
(
Tim_Obj_t
,
nC
os
);
memset
(
p
->
p
Pos
,
0
,
sizeof
(
Tim_Obj_t
)
*
nP
os
);
memset
(
p
->
p
Cos
,
0
,
sizeof
(
Tim_Obj_t
)
*
nC
os
);
for
(
i
=
0
;
i
<
n
P
is
;
i
++
)
for
(
i
=
0
;
i
<
n
C
is
;
i
++
)
{
{
p
->
p
P
is
[
i
].
Id
=
i
;
p
->
p
C
is
[
i
].
Id
=
i
;
p
->
p
Pis
[
i
].
iObj2Box
=
p
->
pP
is
[
i
].
iObj2Num
=
-
1
;
p
->
p
Cis
[
i
].
iObj2Box
=
p
->
pC
is
[
i
].
iObj2Num
=
-
1
;
p
->
p
Pis
[
i
].
timeReq
=
TIME
_ETERNITY
;
p
->
p
Cis
[
i
].
timeReq
=
TIM
_ETERNITY
;
p
->
p
P
is
[
i
].
timeArr
=
0
.
0
;
p
->
p
C
is
[
i
].
timeArr
=
0
.
0
;
p
->
p
P
is
[
i
].
TravId
=
0
;
p
->
p
C
is
[
i
].
TravId
=
0
;
}
}
for
(
i
=
0
;
i
<
n
P
os
;
i
++
)
for
(
i
=
0
;
i
<
n
C
os
;
i
++
)
{
{
p
->
p
P
os
[
i
].
Id
=
i
;
p
->
p
C
os
[
i
].
Id
=
i
;
p
->
p
Pos
[
i
].
iObj2Box
=
p
->
pP
os
[
i
].
iObj2Num
=
-
1
;
p
->
p
Cos
[
i
].
iObj2Box
=
p
->
pC
os
[
i
].
iObj2Num
=
-
1
;
p
->
p
Pos
[
i
].
timeReq
=
TIME
_ETERNITY
;
p
->
p
Cos
[
i
].
timeReq
=
TIM
_ETERNITY
;
p
->
p
P
os
[
i
].
timeArr
=
0
.
0
;
p
->
p
C
os
[
i
].
timeArr
=
0
.
0
;
p
->
p
P
os
[
i
].
TravId
=
0
;
p
->
p
C
os
[
i
].
TravId
=
0
;
}
}
p
->
fUseTravId
=
1
;
p
->
fUseTravId
=
1
;
return
p
;
return
p
;
...
@@ -166,17 +166,17 @@ Tim_Man_t * Tim_ManDup( Tim_Man_t * p, int fDiscrete )
...
@@ -166,17 +166,17 @@ Tim_Man_t * Tim_ManDup( Tim_Man_t * p, int fDiscrete )
Tim_Box_t
*
pBox
;
Tim_Box_t
*
pBox
;
float
*
pDelayTableNew
;
float
*
pDelayTableNew
;
int
i
,
k
;
int
i
,
k
;
pNew
=
Tim_ManStart
(
p
->
n
Pis
,
p
->
nP
os
);
pNew
=
Tim_ManStart
(
p
->
n
Cis
,
p
->
nC
os
);
memcpy
(
pNew
->
p
Pis
,
p
->
pPis
,
sizeof
(
Tim_Obj_t
)
*
p
->
nP
is
);
memcpy
(
pNew
->
p
Cis
,
p
->
pCis
,
sizeof
(
Tim_Obj_t
)
*
p
->
nC
is
);
memcpy
(
pNew
->
p
Pos
,
p
->
pPos
,
sizeof
(
Tim_Obj_t
)
*
p
->
nP
os
);
memcpy
(
pNew
->
p
Cos
,
p
->
pCos
,
sizeof
(
Tim_Obj_t
)
*
p
->
nC
os
);
for
(
k
=
0
;
k
<
p
->
n
P
is
;
k
++
)
for
(
k
=
0
;
k
<
p
->
n
C
is
;
k
++
)
pNew
->
p
P
is
[
k
].
TravId
=
0
;
pNew
->
p
C
is
[
k
].
TravId
=
0
;
for
(
k
=
0
;
k
<
p
->
n
P
os
;
k
++
)
for
(
k
=
0
;
k
<
p
->
n
C
os
;
k
++
)
pNew
->
p
P
os
[
k
].
TravId
=
0
;
pNew
->
p
C
os
[
k
].
TravId
=
0
;
if
(
fDiscrete
)
if
(
fDiscrete
)
{
{
for
(
k
=
0
;
k
<
p
->
n
P
is
;
k
++
)
for
(
k
=
0
;
k
<
p
->
n
C
is
;
k
++
)
pNew
->
p
P
is
[
k
].
timeArr
=
0
.
0
;
// modify here
pNew
->
p
C
is
[
k
].
timeArr
=
0
.
0
;
// modify here
// modify the required times
// modify the required times
}
}
pNew
->
vDelayTables
=
Vec_PtrAlloc
(
100
);
pNew
->
vDelayTables
=
Vec_PtrAlloc
(
100
);
...
@@ -215,16 +215,16 @@ Tim_Man_t * Tim_ManDupUnit( Tim_Man_t * p )
...
@@ -215,16 +215,16 @@ Tim_Man_t * Tim_ManDupUnit( Tim_Man_t * p )
Tim_Box_t
*
pBox
;
Tim_Box_t
*
pBox
;
float
*
pDelayTableNew
;
float
*
pDelayTableNew
;
int
i
,
k
;
int
i
,
k
;
pNew
=
Tim_ManStart
(
p
->
n
Pis
,
p
->
nP
os
);
pNew
=
Tim_ManStart
(
p
->
n
Cis
,
p
->
nC
os
);
memcpy
(
pNew
->
p
Pis
,
p
->
pPis
,
sizeof
(
Tim_Obj_t
)
*
p
->
nP
is
);
memcpy
(
pNew
->
p
Cis
,
p
->
pCis
,
sizeof
(
Tim_Obj_t
)
*
p
->
nC
is
);
memcpy
(
pNew
->
p
Pos
,
p
->
pPos
,
sizeof
(
Tim_Obj_t
)
*
p
->
nP
os
);
memcpy
(
pNew
->
p
Cos
,
p
->
pCos
,
sizeof
(
Tim_Obj_t
)
*
p
->
nC
os
);
for
(
k
=
0
;
k
<
p
->
n
P
is
;
k
++
)
for
(
k
=
0
;
k
<
p
->
n
C
is
;
k
++
)
{
{
pNew
->
p
P
is
[
k
].
TravId
=
0
;
pNew
->
p
C
is
[
k
].
TravId
=
0
;
pNew
->
p
P
is
[
k
].
timeArr
=
0
.
0
;
pNew
->
p
C
is
[
k
].
timeArr
=
0
.
0
;
}
}
for
(
k
=
0
;
k
<
p
->
n
P
os
;
k
++
)
for
(
k
=
0
;
k
<
p
->
n
C
os
;
k
++
)
pNew
->
p
P
os
[
k
].
TravId
=
0
;
pNew
->
p
C
os
[
k
].
TravId
=
0
;
pNew
->
vDelayTables
=
Vec_PtrAlloc
(
100
);
pNew
->
vDelayTables
=
Vec_PtrAlloc
(
100
);
Tim_ManForEachBox
(
p
,
pBox
,
i
)
Tim_ManForEachBox
(
p
,
pBox
,
i
)
{
{
...
@@ -254,14 +254,14 @@ Tim_Man_t * Tim_ManDupApprox( Tim_Man_t * p )
...
@@ -254,14 +254,14 @@ Tim_Man_t * Tim_ManDupApprox( Tim_Man_t * p )
{
{
Tim_Man_t
*
pNew
;
Tim_Man_t
*
pNew
;
int
k
;
int
k
;
pNew
=
Tim_ManStart
(
p
->
n
Pis
,
p
->
nP
os
);
pNew
=
Tim_ManStart
(
p
->
n
Cis
,
p
->
nC
os
);
for
(
k
=
0
;
k
<
p
->
n
P
is
;
k
++
)
for
(
k
=
0
;
k
<
p
->
n
C
is
;
k
++
)
if
(
p
->
p
P
is
[
k
].
iObj2Box
==
-
1
)
if
(
p
->
p
C
is
[
k
].
iObj2Box
==
-
1
)
pNew
->
p
Pis
[
k
].
timeArr
=
p
->
pP
is
[
k
].
timeArr
;
pNew
->
p
Cis
[
k
].
timeArr
=
p
->
pC
is
[
k
].
timeArr
;
else
else
pNew
->
p
Pis
[
k
].
timeArr
=
p
->
pP
is
[
k
].
timeReq
;
pNew
->
p
Cis
[
k
].
timeArr
=
p
->
pC
is
[
k
].
timeReq
;
for
(
k
=
0
;
k
<
p
->
n
P
os
;
k
++
)
for
(
k
=
0
;
k
<
p
->
n
C
os
;
k
++
)
pNew
->
p
Pos
[
k
].
timeReq
=
p
->
pP
os
[
k
].
timeReq
;
pNew
->
p
Cos
[
k
].
timeReq
=
p
->
pC
os
[
k
].
timeReq
;
return
pNew
;
return
pNew
;
}
}
...
@@ -288,8 +288,8 @@ void Tim_ManStop( Tim_Man_t * p )
...
@@ -288,8 +288,8 @@ void Tim_ManStop( Tim_Man_t * p )
}
}
Vec_PtrFree
(
p
->
vBoxes
);
Vec_PtrFree
(
p
->
vBoxes
);
Mem_FlexStop
(
p
->
pMemObj
,
0
);
Mem_FlexStop
(
p
->
pMemObj
,
0
);
free
(
p
->
p
P
is
);
free
(
p
->
p
C
is
);
free
(
p
->
p
P
os
);
free
(
p
->
p
C
os
);
free
(
p
);
free
(
p
);
}
}
...
@@ -310,9 +310,9 @@ void Tim_ManPrint( Tim_Man_t * p )
...
@@ -310,9 +310,9 @@ void Tim_ManPrint( Tim_Man_t * p )
Tim_Obj_t
*
pObj
;
Tim_Obj_t
*
pObj
;
int
i
;
int
i
;
printf
(
"TIMING INFORMATION:
\n
"
);
printf
(
"TIMING INFORMATION:
\n
"
);
Tim_ManForEach
P
i
(
p
,
pObj
,
i
)
Tim_ManForEach
C
i
(
p
,
pObj
,
i
)
printf
(
"pi%5d : arr = %5.3f req = %5.3f
\n
"
,
i
,
pObj
->
timeArr
,
pObj
->
timeReq
);
printf
(
"pi%5d : arr = %5.3f req = %5.3f
\n
"
,
i
,
pObj
->
timeArr
,
pObj
->
timeReq
);
Tim_ManForEach
P
o
(
p
,
pObj
,
i
)
Tim_ManForEach
C
o
(
p
,
pObj
,
i
)
printf
(
"po%5d : arr = %5.3f req = %5.3f
\n
"
,
i
,
pObj
->
timeArr
,
pObj
->
timeReq
);
printf
(
"po%5d : arr = %5.3f req = %5.3f
\n
"
,
i
,
pObj
->
timeArr
,
pObj
->
timeReq
);
Tim_ManForEachBox
(
p
,
pBox
,
i
)
Tim_ManForEachBox
(
p
,
pBox
,
i
)
{
{
...
@@ -405,6 +405,84 @@ void Tim_ManSetCurrentTravIdBoxOutputs( Tim_Man_t * p, int iBox )
...
@@ -405,6 +405,84 @@ void Tim_ManSetCurrentTravIdBoxOutputs( Tim_Man_t * p, int iBox )
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Label box inputs.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Tim_ManSetPreviousTravIdBoxInputs
(
Tim_Man_t
*
p
,
int
iBox
)
{
Tim_Box_t
*
pBox
;
Tim_Obj_t
*
pObj
;
int
i
;
pBox
=
Tim_ManBox
(
p
,
iBox
);
Tim_ManBoxForEachInput
(
p
,
pBox
,
pObj
,
i
)
pObj
->
TravId
=
p
->
nTravIds
-
1
;
}
/**Function*************************************************************
Synopsis [Label box outputs.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Tim_ManSetPreviousTravIdBoxOutputs
(
Tim_Man_t
*
p
,
int
iBox
)
{
Tim_Box_t
*
pBox
;
Tim_Obj_t
*
pObj
;
int
i
;
pBox
=
Tim_ManBox
(
p
,
iBox
);
Tim_ManBoxForEachOutput
(
p
,
pBox
,
pObj
,
i
)
pObj
->
TravId
=
p
->
nTravIds
-
1
;
}
/**Function*************************************************************
Synopsis [Updates required time of the PO.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Tim_ManIsCiTravIdCurrent
(
Tim_Man_t
*
p
,
int
iCi
)
{
assert
(
iCi
<
p
->
nCis
);
assert
(
p
->
fUseTravId
);
return
p
->
pCis
[
iCi
].
TravId
==
p
->
nTravIds
;
}
/**Function*************************************************************
Synopsis [Updates required time of the PO.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Tim_ManIsCoTravIdCurrent
(
Tim_Man_t
*
p
,
int
iCo
)
{
assert
(
iCo
<
p
->
nCos
);
assert
(
p
->
fUseTravId
);
return
p
->
pCos
[
iCo
].
TravId
==
p
->
nTravIds
;
}
/**Function*************************************************************
Synopsis [Sets the vector of timing tables associated with the manager.]
Synopsis [Sets the vector of timing tables associated with the manager.]
Description []
Description []
...
@@ -444,17 +522,17 @@ void Tim_ManCreateBox( Tim_Man_t * p, int * pIns, int nIns, int * pOuts, int nOu
...
@@ -444,17 +522,17 @@ void Tim_ManCreateBox( Tim_Man_t * p, int * pIns, int nIns, int * pOuts, int nOu
pBox
->
nOutputs
=
nOuts
;
pBox
->
nOutputs
=
nOuts
;
for
(
i
=
0
;
i
<
nIns
;
i
++
)
for
(
i
=
0
;
i
<
nIns
;
i
++
)
{
{
assert
(
pIns
[
i
]
<
p
->
n
P
os
);
assert
(
pIns
[
i
]
<
p
->
n
C
os
);
pBox
->
Inouts
[
i
]
=
pIns
[
i
];
pBox
->
Inouts
[
i
]
=
pIns
[
i
];
p
->
p
P
os
[
pIns
[
i
]].
iObj2Box
=
pBox
->
iBox
;
p
->
p
C
os
[
pIns
[
i
]].
iObj2Box
=
pBox
->
iBox
;
p
->
p
P
os
[
pIns
[
i
]].
iObj2Num
=
i
;
p
->
p
C
os
[
pIns
[
i
]].
iObj2Num
=
i
;
}
}
for
(
i
=
0
;
i
<
nOuts
;
i
++
)
for
(
i
=
0
;
i
<
nOuts
;
i
++
)
{
{
assert
(
pOuts
[
i
]
<
p
->
n
P
is
);
assert
(
pOuts
[
i
]
<
p
->
n
C
is
);
pBox
->
Inouts
[
nIns
+
i
]
=
pOuts
[
i
];
pBox
->
Inouts
[
nIns
+
i
]
=
pOuts
[
i
];
p
->
p
P
is
[
pOuts
[
i
]].
iObj2Box
=
pBox
->
iBox
;
p
->
p
C
is
[
pOuts
[
i
]].
iObj2Box
=
pBox
->
iBox
;
p
->
p
P
is
[
pOuts
[
i
]].
iObj2Num
=
i
;
p
->
p
C
is
[
pOuts
[
i
]].
iObj2Num
=
i
;
}
}
}
}
...
@@ -482,17 +560,17 @@ void Tim_ManCreateBoxFirst( Tim_Man_t * p, int firstIn, int nIns, int firstOut,
...
@@ -482,17 +560,17 @@ void Tim_ManCreateBoxFirst( Tim_Man_t * p, int firstIn, int nIns, int firstOut,
pBox
->
nOutputs
=
nOuts
;
pBox
->
nOutputs
=
nOuts
;
for
(
i
=
0
;
i
<
nIns
;
i
++
)
for
(
i
=
0
;
i
<
nIns
;
i
++
)
{
{
assert
(
firstIn
+
i
<
p
->
n
P
os
);
assert
(
firstIn
+
i
<
p
->
n
C
os
);
pBox
->
Inouts
[
i
]
=
firstIn
+
i
;
pBox
->
Inouts
[
i
]
=
firstIn
+
i
;
p
->
p
P
os
[
firstIn
+
i
].
iObj2Box
=
pBox
->
iBox
;
p
->
p
C
os
[
firstIn
+
i
].
iObj2Box
=
pBox
->
iBox
;
p
->
p
P
os
[
firstIn
+
i
].
iObj2Num
=
i
;
p
->
p
C
os
[
firstIn
+
i
].
iObj2Num
=
i
;
}
}
for
(
i
=
0
;
i
<
nOuts
;
i
++
)
for
(
i
=
0
;
i
<
nOuts
;
i
++
)
{
{
assert
(
firstOut
+
i
<
p
->
n
P
is
);
assert
(
firstOut
+
i
<
p
->
n
C
is
);
pBox
->
Inouts
[
nIns
+
i
]
=
firstOut
+
i
;
pBox
->
Inouts
[
nIns
+
i
]
=
firstOut
+
i
;
p
->
p
P
is
[
firstOut
+
i
].
iObj2Box
=
pBox
->
iBox
;
p
->
p
C
is
[
firstOut
+
i
].
iObj2Box
=
pBox
->
iBox
;
p
->
p
P
is
[
firstOut
+
i
].
iObj2Num
=
i
;
p
->
p
C
is
[
firstOut
+
i
].
iObj2Num
=
i
;
}
}
}
}
...
@@ -515,10 +593,10 @@ void Tim_ManIncrementTravId( Tim_Man_t * p )
...
@@ -515,10 +593,10 @@ void Tim_ManIncrementTravId( Tim_Man_t * p )
if
(
p
->
nTravIds
>=
(
1
<<
30
)
-
1
)
if
(
p
->
nTravIds
>=
(
1
<<
30
)
-
1
)
{
{
p
->
nTravIds
=
0
;
p
->
nTravIds
=
0
;
for
(
i
=
0
;
i
<
p
->
n
P
is
;
i
++
)
for
(
i
=
0
;
i
<
p
->
n
C
is
;
i
++
)
p
->
p
P
is
[
i
].
TravId
=
0
;
p
->
p
C
is
[
i
].
TravId
=
0
;
for
(
i
=
0
;
i
<
p
->
n
P
os
;
i
++
)
for
(
i
=
0
;
i
<
p
->
n
C
os
;
i
++
)
p
->
p
P
os
[
i
].
TravId
=
0
;
p
->
p
C
os
[
i
].
TravId
=
0
;
}
}
assert
(
p
->
nTravIds
<
(
1
<<
30
)
-
1
);
assert
(
p
->
nTravIds
<
(
1
<<
30
)
-
1
);
p
->
nTravIds
++
;
p
->
nTravIds
++
;
...
@@ -535,10 +613,10 @@ void Tim_ManIncrementTravId( Tim_Man_t * p )
...
@@ -535,10 +613,10 @@ void Tim_ManIncrementTravId( Tim_Man_t * p )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Tim_ManInit
PiArrival
(
Tim_Man_t
*
p
,
int
iP
i
,
float
Delay
)
void
Tim_ManInit
CiArrival
(
Tim_Man_t
*
p
,
int
iC
i
,
float
Delay
)
{
{
assert
(
i
Pi
<
p
->
nP
is
);
assert
(
i
Ci
<
p
->
nC
is
);
p
->
p
Pis
[
iP
i
].
timeArr
=
Delay
;
p
->
p
Cis
[
iC
i
].
timeArr
=
Delay
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -552,10 +630,10 @@ void Tim_ManInitPiArrival( Tim_Man_t * p, int iPi, float Delay )
...
@@ -552,10 +630,10 @@ void Tim_ManInitPiArrival( Tim_Man_t * p, int iPi, float Delay )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Tim_ManInit
PoRequired
(
Tim_Man_t
*
p
,
int
iP
o
,
float
Delay
)
void
Tim_ManInit
CoRequired
(
Tim_Man_t
*
p
,
int
iC
o
,
float
Delay
)
{
{
assert
(
i
Po
<
p
->
nP
os
);
assert
(
i
Co
<
p
->
nC
os
);
p
->
p
Pos
[
iP
o
].
timeReq
=
Delay
;
p
->
p
Cos
[
iC
o
].
timeReq
=
Delay
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -569,12 +647,12 @@ void Tim_ManInitPoRequired( Tim_Man_t * p, int iPo, float Delay )
...
@@ -569,12 +647,12 @@ void Tim_ManInitPoRequired( Tim_Man_t * p, int iPo, float Delay )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Tim_ManSet
PoArrival
(
Tim_Man_t
*
p
,
int
iP
o
,
float
Delay
)
void
Tim_ManSet
CoArrival
(
Tim_Man_t
*
p
,
int
iC
o
,
float
Delay
)
{
{
assert
(
i
Po
<
p
->
nP
os
);
assert
(
i
Co
<
p
->
nC
os
);
assert
(
!
p
->
fUseTravId
||
p
->
p
Pos
[
iP
o
].
TravId
!=
p
->
nTravIds
);
assert
(
!
p
->
fUseTravId
||
p
->
p
Cos
[
iC
o
].
TravId
!=
p
->
nTravIds
);
p
->
p
Pos
[
iP
o
].
timeArr
=
Delay
;
p
->
p
Cos
[
iC
o
].
timeArr
=
Delay
;
p
->
p
Pos
[
iP
o
].
TravId
=
p
->
nTravIds
;
p
->
p
Cos
[
iC
o
].
TravId
=
p
->
nTravIds
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -588,12 +666,12 @@ void Tim_ManSetPoArrival( Tim_Man_t * p, int iPo, float Delay )
...
@@ -588,12 +666,12 @@ void Tim_ManSetPoArrival( Tim_Man_t * p, int iPo, float Delay )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Tim_ManSet
PiRequired
(
Tim_Man_t
*
p
,
int
iP
i
,
float
Delay
)
void
Tim_ManSet
CiRequired
(
Tim_Man_t
*
p
,
int
iC
i
,
float
Delay
)
{
{
assert
(
i
Pi
<
p
->
nP
is
);
assert
(
i
Ci
<
p
->
nC
is
);
assert
(
!
p
->
fUseTravId
||
p
->
p
Pis
[
iP
i
].
TravId
!=
p
->
nTravIds
);
assert
(
!
p
->
fUseTravId
||
p
->
p
Cis
[
iC
i
].
TravId
!=
p
->
nTravIds
);
p
->
p
Pis
[
iP
i
].
timeReq
=
Delay
;
p
->
p
Cis
[
iC
i
].
timeReq
=
Delay
;
p
->
p
Pis
[
iP
i
].
TravId
=
p
->
nTravIds
;
p
->
p
Cis
[
iC
i
].
TravId
=
p
->
nTravIds
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -607,12 +685,12 @@ void Tim_ManSetPiRequired( Tim_Man_t * p, int iPi, float Delay )
...
@@ -607,12 +685,12 @@ void Tim_ManSetPiRequired( Tim_Man_t * p, int iPi, float Delay )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Tim_ManSet
PoRequired
(
Tim_Man_t
*
p
,
int
iP
o
,
float
Delay
)
void
Tim_ManSet
CoRequired
(
Tim_Man_t
*
p
,
int
iC
o
,
float
Delay
)
{
{
assert
(
i
Po
<
p
->
nP
os
);
assert
(
i
Co
<
p
->
nC
os
);
assert
(
!
p
->
fUseTravId
||
p
->
p
Pos
[
iP
o
].
TravId
!=
p
->
nTravIds
);
assert
(
!
p
->
fUseTravId
||
p
->
p
Cos
[
iC
o
].
TravId
!=
p
->
nTravIds
);
p
->
p
Pos
[
iP
o
].
timeReq
=
Delay
;
p
->
p
Cos
[
iC
o
].
timeReq
=
Delay
;
p
->
p
Pos
[
iP
o
].
TravId
=
p
->
nTravIds
;
p
->
p
Cos
[
iC
o
].
TravId
=
p
->
nTravIds
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -626,12 +704,12 @@ void Tim_ManSetPoRequired( Tim_Man_t * p, int iPo, float Delay )
...
@@ -626,12 +704,12 @@ void Tim_ManSetPoRequired( Tim_Man_t * p, int iPo, float Delay )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Tim_ManSet
P
oRequiredAll
(
Tim_Man_t
*
p
,
float
Delay
)
void
Tim_ManSet
C
oRequiredAll
(
Tim_Man_t
*
p
,
float
Delay
)
{
{
Tim_Obj_t
*
pObj
;
Tim_Obj_t
*
pObj
;
int
i
;
int
i
;
Tim_ManForEach
P
o
(
p
,
pObj
,
i
)
Tim_ManForEach
C
o
(
p
,
pObj
,
i
)
Tim_ManSet
P
oRequired
(
p
,
i
,
Delay
);
Tim_ManSet
C
oRequired
(
p
,
i
,
Delay
);
}
}
...
@@ -646,19 +724,19 @@ void Tim_ManSetPoRequiredAll( Tim_Man_t * p, float Delay )
...
@@ -646,19 +724,19 @@ void Tim_ManSetPoRequiredAll( Tim_Man_t * p, float Delay )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
float
Tim_ManGet
PiArrival
(
Tim_Man_t
*
p
,
int
iP
i
)
float
Tim_ManGet
CiArrival
(
Tim_Man_t
*
p
,
int
iC
i
)
{
{
Tim_Box_t
*
pBox
;
Tim_Box_t
*
pBox
;
Tim_Obj_t
*
pObjThis
,
*
pObj
,
*
pObjRes
;
Tim_Obj_t
*
pObjThis
,
*
pObj
,
*
pObjRes
;
float
*
pDelays
,
DelayBest
;
float
*
pDelays
,
DelayBest
;
int
i
,
k
;
int
i
,
k
;
// consider the already processed PI
// consider the already processed PI
pObjThis
=
Tim_Man
Pi
(
p
,
iP
i
);
pObjThis
=
Tim_Man
Ci
(
p
,
iC
i
);
if
(
p
->
fUseTravId
&&
pObjThis
->
TravId
==
p
->
nTravIds
)
if
(
p
->
fUseTravId
&&
pObjThis
->
TravId
==
p
->
nTravIds
)
return
pObjThis
->
timeArr
;
return
pObjThis
->
timeArr
;
pObjThis
->
TravId
=
p
->
nTravIds
;
pObjThis
->
TravId
=
p
->
nTravIds
;
// consider the main PI
// consider the main PI
pBox
=
Tim_Man
PiBox
(
p
,
iP
i
);
pBox
=
Tim_Man
CiBox
(
p
,
iC
i
);
if
(
pBox
==
NULL
)
if
(
pBox
==
NULL
)
return
pObjThis
->
timeArr
;
return
pObjThis
->
timeArr
;
// update box timing
// update box timing
...
@@ -667,12 +745,12 @@ float Tim_ManGetPiArrival( Tim_Man_t * p, int iPi )
...
@@ -667,12 +745,12 @@ float Tim_ManGetPiArrival( Tim_Man_t * p, int iPi )
if
(
p
->
fUseTravId
)
if
(
p
->
fUseTravId
)
Tim_ManBoxForEachInput
(
p
,
pBox
,
pObj
,
i
)
Tim_ManBoxForEachInput
(
p
,
pBox
,
pObj
,
i
)
if
(
pObj
->
TravId
!=
p
->
nTravIds
)
if
(
pObj
->
TravId
!=
p
->
nTravIds
)
printf
(
"Tim_ManGet
P
iArrival(): Input arrival times of the box are not up to date!
\n
"
);
printf
(
"Tim_ManGet
C
iArrival(): Input arrival times of the box are not up to date!
\n
"
);
// compute the arrival times for each output of the box (PIs)
// compute the arrival times for each output of the box (PIs)
Tim_ManBoxForEachOutput
(
p
,
pBox
,
pObjRes
,
i
)
Tim_ManBoxForEachOutput
(
p
,
pBox
,
pObjRes
,
i
)
{
{
pDelays
=
pBox
->
pDelayTable
+
i
*
pBox
->
nInputs
;
pDelays
=
pBox
->
pDelayTable
+
i
*
pBox
->
nInputs
;
DelayBest
=
-
TIM
E
_ETERNITY
;
DelayBest
=
-
TIM_ETERNITY
;
Tim_ManBoxForEachInput
(
p
,
pBox
,
pObj
,
k
)
Tim_ManBoxForEachInput
(
p
,
pBox
,
pObj
,
k
)
DelayBest
=
AIG_MAX
(
DelayBest
,
pObj
->
timeArr
+
pDelays
[
k
]
);
DelayBest
=
AIG_MAX
(
DelayBest
,
pObj
->
timeArr
+
pDelays
[
k
]
);
pObjRes
->
timeArr
=
DelayBest
;
pObjRes
->
timeArr
=
DelayBest
;
...
@@ -692,19 +770,19 @@ float Tim_ManGetPiArrival( Tim_Man_t * p, int iPi )
...
@@ -692,19 +770,19 @@ float Tim_ManGetPiArrival( Tim_Man_t * p, int iPi )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
float
Tim_ManGet
PoRequired
(
Tim_Man_t
*
p
,
int
iP
o
)
float
Tim_ManGet
CoRequired
(
Tim_Man_t
*
p
,
int
iC
o
)
{
{
Tim_Box_t
*
pBox
;
Tim_Box_t
*
pBox
;
Tim_Obj_t
*
pObjThis
,
*
pObj
,
*
pObjRes
;
Tim_Obj_t
*
pObjThis
,
*
pObj
,
*
pObjRes
;
float
*
pDelays
,
DelayBest
;
float
*
pDelays
,
DelayBest
;
int
i
,
k
;
int
i
,
k
;
// consider the already processed PO
// consider the already processed PO
pObjThis
=
Tim_Man
Po
(
p
,
iP
o
);
pObjThis
=
Tim_Man
Co
(
p
,
iC
o
);
if
(
p
->
fUseTravId
&&
pObjThis
->
TravId
==
p
->
nTravIds
)
if
(
p
->
fUseTravId
&&
pObjThis
->
TravId
==
p
->
nTravIds
)
return
pObjThis
->
timeReq
;
return
pObjThis
->
timeReq
;
pObjThis
->
TravId
=
p
->
nTravIds
;
pObjThis
->
TravId
=
p
->
nTravIds
;
// consider the main PO
// consider the main PO
pBox
=
Tim_Man
PoBox
(
p
,
iP
o
);
pBox
=
Tim_Man
CoBox
(
p
,
iC
o
);
if
(
pBox
==
NULL
)
if
(
pBox
==
NULL
)
return
pObjThis
->
timeReq
;
return
pObjThis
->
timeReq
;
// update box timing
// update box timing
...
@@ -713,11 +791,11 @@ float Tim_ManGetPoRequired( Tim_Man_t * p, int iPo )
...
@@ -713,11 +791,11 @@ float Tim_ManGetPoRequired( Tim_Man_t * p, int iPo )
if
(
p
->
fUseTravId
)
if
(
p
->
fUseTravId
)
Tim_ManBoxForEachOutput
(
p
,
pBox
,
pObj
,
i
)
Tim_ManBoxForEachOutput
(
p
,
pBox
,
pObj
,
i
)
if
(
pObj
->
TravId
!=
p
->
nTravIds
)
if
(
pObj
->
TravId
!=
p
->
nTravIds
)
printf
(
"Tim_ManGet
P
oRequired(): Output required times of the box are not up to date!
\n
"
);
printf
(
"Tim_ManGet
C
oRequired(): Output required times of the box are not up to date!
\n
"
);
// compute the required times for each input of the box (POs)
// compute the required times for each input of the box (POs)
Tim_ManBoxForEachInput
(
p
,
pBox
,
pObjRes
,
i
)
Tim_ManBoxForEachInput
(
p
,
pBox
,
pObjRes
,
i
)
{
{
DelayBest
=
TIM
E
_ETERNITY
;
DelayBest
=
TIM_ETERNITY
;
Tim_ManBoxForEachOutput
(
p
,
pBox
,
pObj
,
k
)
Tim_ManBoxForEachOutput
(
p
,
pBox
,
pObj
,
k
)
{
{
pDelays
=
pBox
->
pDelayTable
+
k
*
pBox
->
nInputs
;
pDelays
=
pBox
->
pDelayTable
+
k
*
pBox
->
nInputs
;
...
@@ -742,9 +820,9 @@ float Tim_ManGetPoRequired( Tim_Man_t * p, int iPo )
...
@@ -742,9 +820,9 @@ float Tim_ManGetPoRequired( Tim_Man_t * p, int iPo )
***********************************************************************/
***********************************************************************/
int
Tim_ManBoxForCi
(
Tim_Man_t
*
p
,
int
iCi
)
int
Tim_ManBoxForCi
(
Tim_Man_t
*
p
,
int
iCi
)
{
{
if
(
iCi
>=
p
->
n
P
is
)
if
(
iCi
>=
p
->
n
C
is
)
return
-
1
;
return
-
1
;
return
p
->
p
P
is
[
iCi
].
iObj2Box
;
return
p
->
p
C
is
[
iCi
].
iObj2Box
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -760,9 +838,9 @@ int Tim_ManBoxForCi( Tim_Man_t * p, int iCi )
...
@@ -760,9 +838,9 @@ int Tim_ManBoxForCi( Tim_Man_t * p, int iCi )
***********************************************************************/
***********************************************************************/
int
Tim_ManBoxForCo
(
Tim_Man_t
*
p
,
int
iCo
)
int
Tim_ManBoxForCo
(
Tim_Man_t
*
p
,
int
iCo
)
{
{
if
(
iCo
>=
p
->
n
P
os
)
if
(
iCo
>=
p
->
n
C
os
)
return
-
1
;
return
-
1
;
return
p
->
p
P
os
[
iCo
].
iObj2Box
;
return
p
->
p
C
os
[
iCo
].
iObj2Box
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
...
src/aig/tim/tim.h
View file @
ef20b0c5
...
@@ -43,7 +43,7 @@ typedef struct Tim_Man_t_ Tim_Man_t;
...
@@ -43,7 +43,7 @@ typedef struct Tim_Man_t_ Tim_Man_t;
/// MACRO DEFINITIONS ///
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#define TIM
E
_ETERNITY 10000
#define TIM_ETERNITY 10000
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// ITERATORS ///
/// ITERATORS ///
...
@@ -58,7 +58,7 @@ typedef struct Tim_Man_t_ Tim_Man_t;
...
@@ -58,7 +58,7 @@ typedef struct Tim_Man_t_ Tim_Man_t;
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/*=== time.c ===========================================================*/
/*=== time.c ===========================================================*/
extern
Tim_Man_t
*
Tim_ManStart
(
int
n
Pis
,
int
nP
os
);
extern
Tim_Man_t
*
Tim_ManStart
(
int
n
Cis
,
int
nC
os
);
extern
Tim_Man_t
*
Tim_ManDup
(
Tim_Man_t
*
p
,
int
fDiscrete
);
extern
Tim_Man_t
*
Tim_ManDup
(
Tim_Man_t
*
p
,
int
fDiscrete
);
extern
Tim_Man_t
*
Tim_ManDupUnit
(
Tim_Man_t
*
p
);
extern
Tim_Man_t
*
Tim_ManDupUnit
(
Tim_Man_t
*
p
);
extern
Tim_Man_t
*
Tim_ManDupApprox
(
Tim_Man_t
*
p
);
extern
Tim_Man_t
*
Tim_ManDupApprox
(
Tim_Man_t
*
p
);
...
@@ -68,18 +68,22 @@ extern void Tim_ManTravIdDisable( Tim_Man_t * p );
...
@@ -68,18 +68,22 @@ extern void Tim_ManTravIdDisable( Tim_Man_t * p );
extern
void
Tim_ManTravIdEnable
(
Tim_Man_t
*
p
);
extern
void
Tim_ManTravIdEnable
(
Tim_Man_t
*
p
);
extern
void
Tim_ManSetCurrentTravIdBoxInputs
(
Tim_Man_t
*
p
,
int
iBox
);
extern
void
Tim_ManSetCurrentTravIdBoxInputs
(
Tim_Man_t
*
p
,
int
iBox
);
extern
void
Tim_ManSetCurrentTravIdBoxOutputs
(
Tim_Man_t
*
p
,
int
iBox
);
extern
void
Tim_ManSetCurrentTravIdBoxOutputs
(
Tim_Man_t
*
p
,
int
iBox
);
extern
void
Tim_ManSetPreviousTravIdBoxInputs
(
Tim_Man_t
*
p
,
int
iBox
);
extern
void
Tim_ManSetPreviousTravIdBoxOutputs
(
Tim_Man_t
*
p
,
int
iBox
);
extern
int
Tim_ManIsCiTravIdCurrent
(
Tim_Man_t
*
p
,
int
iCi
);
extern
int
Tim_ManIsCoTravIdCurrent
(
Tim_Man_t
*
p
,
int
iCo
);
extern
void
Tim_ManSetDelayTables
(
Tim_Man_t
*
p
,
Vec_Ptr_t
*
vDelayTables
);
extern
void
Tim_ManSetDelayTables
(
Tim_Man_t
*
p
,
Vec_Ptr_t
*
vDelayTables
);
extern
void
Tim_ManCreateBox
(
Tim_Man_t
*
p
,
int
*
pIns
,
int
nIns
,
int
*
pOuts
,
int
nOuts
,
float
*
pDelayTable
);
extern
void
Tim_ManCreateBox
(
Tim_Man_t
*
p
,
int
*
pIns
,
int
nIns
,
int
*
pOuts
,
int
nOuts
,
float
*
pDelayTable
);
extern
void
Tim_ManCreateBoxFirst
(
Tim_Man_t
*
p
,
int
firstIn
,
int
nIns
,
int
firstOut
,
int
nOuts
,
float
*
pDelayTable
);
extern
void
Tim_ManCreateBoxFirst
(
Tim_Man_t
*
p
,
int
firstIn
,
int
nIns
,
int
firstOut
,
int
nOuts
,
float
*
pDelayTable
);
extern
void
Tim_ManIncrementTravId
(
Tim_Man_t
*
p
);
extern
void
Tim_ManIncrementTravId
(
Tim_Man_t
*
p
);
extern
void
Tim_ManInit
PiArrival
(
Tim_Man_t
*
p
,
int
iP
i
,
float
Delay
);
extern
void
Tim_ManInit
CiArrival
(
Tim_Man_t
*
p
,
int
iC
i
,
float
Delay
);
extern
void
Tim_ManInit
PoRequired
(
Tim_Man_t
*
p
,
int
iP
o
,
float
Delay
);
extern
void
Tim_ManInit
CoRequired
(
Tim_Man_t
*
p
,
int
iC
o
,
float
Delay
);
extern
void
Tim_ManSet
PoArrival
(
Tim_Man_t
*
p
,
int
iP
o
,
float
Delay
);
extern
void
Tim_ManSet
CoArrival
(
Tim_Man_t
*
p
,
int
iC
o
,
float
Delay
);
extern
void
Tim_ManSet
PiRequired
(
Tim_Man_t
*
p
,
int
iP
i
,
float
Delay
);
extern
void
Tim_ManSet
CiRequired
(
Tim_Man_t
*
p
,
int
iC
i
,
float
Delay
);
extern
void
Tim_ManSet
PoRequired
(
Tim_Man_t
*
p
,
int
iP
o
,
float
Delay
);
extern
void
Tim_ManSet
CoRequired
(
Tim_Man_t
*
p
,
int
iC
o
,
float
Delay
);
extern
void
Tim_ManSet
P
oRequiredAll
(
Tim_Man_t
*
p
,
float
Delay
);
extern
void
Tim_ManSet
C
oRequiredAll
(
Tim_Man_t
*
p
,
float
Delay
);
extern
float
Tim_ManGet
PiArrival
(
Tim_Man_t
*
p
,
int
iP
i
);
extern
float
Tim_ManGet
CiArrival
(
Tim_Man_t
*
p
,
int
iC
i
);
extern
float
Tim_ManGet
PoRequired
(
Tim_Man_t
*
p
,
int
iP
o
);
extern
float
Tim_ManGet
CoRequired
(
Tim_Man_t
*
p
,
int
iC
o
);
extern
int
Tim_ManBoxForCi
(
Tim_Man_t
*
p
,
int
iCo
);
extern
int
Tim_ManBoxForCi
(
Tim_Man_t
*
p
,
int
iCo
);
extern
int
Tim_ManBoxForCo
(
Tim_Man_t
*
p
,
int
iCi
);
extern
int
Tim_ManBoxForCo
(
Tim_Man_t
*
p
,
int
iCi
);
extern
int
Tim_ManBoxInputFirst
(
Tim_Man_t
*
p
,
int
iBox
);
extern
int
Tim_ManBoxInputFirst
(
Tim_Man_t
*
p
,
int
iBox
);
...
...
src/base/abci/abc.c
View file @
ef20b0c5
...
@@ -15780,7 +15780,7 @@ int Abc_CommandAbc8Cec( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -15780,7 +15780,7 @@ int Abc_CommandAbc8Cec( Abc_Frame_t * pAbc, int argc, char ** argv )
nConfLimit
=
10000
;
nConfLimit
=
10000
;
nPartSize
=
100
;
nPartSize
=
100
;
fSmart
=
0
;
fSmart
=
0
;
fVerbose
=
0
;
fVerbose
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"CPsvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"CPsvh"
)
)
!=
EOF
)
{
{
...
...
src/map/if/ifMap.c
View file @
ef20b0c5
...
@@ -293,13 +293,13 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPrepr
...
@@ -293,13 +293,13 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPrepr
}
}
else
if
(
If_ObjIsCi
(
pObj
)
)
else
if
(
If_ObjIsCi
(
pObj
)
)
{
{
arrTime
=
Tim_ManGet
P
iArrival
(
p
->
pManTim
,
pObj
->
IdPio
);
arrTime
=
Tim_ManGet
C
iArrival
(
p
->
pManTim
,
pObj
->
IdPio
);
If_ObjSetArrTime
(
pObj
,
arrTime
);
If_ObjSetArrTime
(
pObj
,
arrTime
);
}
}
else
if
(
If_ObjIsCo
(
pObj
)
)
else
if
(
If_ObjIsCo
(
pObj
)
)
{
{
arrTime
=
If_ObjArrTime
(
If_ObjFanin0
(
pObj
)
);
arrTime
=
If_ObjArrTime
(
If_ObjFanin0
(
pObj
)
);
Tim_ManSet
P
oArrival
(
p
->
pManTim
,
pObj
->
IdPio
,
arrTime
);
Tim_ManSet
C
oArrival
(
p
->
pManTim
,
pObj
->
IdPio
,
arrTime
);
}
}
else
if
(
If_ObjIsConst1
(
pObj
)
)
else
if
(
If_ObjIsConst1
(
pObj
)
)
{
{
...
...
src/map/if/ifUtil.c
View file @
ef20b0c5
...
@@ -234,15 +234,15 @@ void If_ManComputeRequired( If_Man_t * p )
...
@@ -234,15 +234,15 @@ void If_ManComputeRequired( If_Man_t * p )
{
{
assert
(
0
);
assert
(
0
);
If_ManForEachPo
(
p
,
pObj
,
i
)
If_ManForEachPo
(
p
,
pObj
,
i
)
Tim_ManSet
P
oRequired
(
p
->
pManTim
,
pObj
->
IdPio
,
IF_FLOAT_LARGE
);
Tim_ManSet
C
oRequired
(
p
->
pManTim
,
pObj
->
IdPio
,
IF_FLOAT_LARGE
);
If_ManForEachLatchInput
(
p
,
pObj
,
i
)
If_ManForEachLatchInput
(
p
,
pObj
,
i
)
Tim_ManSet
P
oRequired
(
p
->
pManTim
,
pObj
->
IdPio
,
p
->
RequiredGlo
);
Tim_ManSet
C
oRequired
(
p
->
pManTim
,
pObj
->
IdPio
,
p
->
RequiredGlo
);
}
}
else
else
{
{
Tim_ManSet
P
oRequiredAll
(
p
->
pManTim
,
p
->
RequiredGlo
);
Tim_ManSet
C
oRequiredAll
(
p
->
pManTim
,
p
->
RequiredGlo
);
// If_ManForEachCo( p, pObj, i )
// If_ManForEachCo( p, pObj, i )
// Tim_ManSet
P
oRequired( p->pManTim, pObj->IdPio, p->RequiredGlo );
// Tim_ManSet
C
oRequired( p->pManTim, pObj->IdPio, p->RequiredGlo );
}
}
// go through the nodes in the reverse topological order
// go through the nodes in the reverse topological order
If_ManForEachObjReverse
(
p
,
pObj
,
i
)
If_ManForEachObjReverse
(
p
,
pObj
,
i
)
...
@@ -256,11 +256,11 @@ void If_ManComputeRequired( If_Man_t * p )
...
@@ -256,11 +256,11 @@ void If_ManComputeRequired( If_Man_t * p )
else
if
(
If_ObjIsCi
(
pObj
)
)
else
if
(
If_ObjIsCi
(
pObj
)
)
{
{
reqTime
=
pObj
->
Required
;
reqTime
=
pObj
->
Required
;
Tim_ManSet
P
iRequired
(
p
->
pManTim
,
pObj
->
IdPio
,
reqTime
);
Tim_ManSet
C
iRequired
(
p
->
pManTim
,
pObj
->
IdPio
,
reqTime
);
}
}
else
if
(
If_ObjIsCo
(
pObj
)
)
else
if
(
If_ObjIsCo
(
pObj
)
)
{
{
reqTime
=
Tim_ManGet
P
oRequired
(
p
->
pManTim
,
pObj
->
IdPio
);
reqTime
=
Tim_ManGet
C
oRequired
(
p
->
pManTim
,
pObj
->
IdPio
);
If_ObjFanin0
(
pObj
)
->
Required
=
IF_MIN
(
reqTime
,
If_ObjFanin0
(
pObj
)
->
Required
);
If_ObjFanin0
(
pObj
)
->
Required
=
IF_MIN
(
reqTime
,
If_ObjFanin0
(
pObj
)
->
Required
);
}
}
else
if
(
If_ObjIsConst1
(
pObj
)
)
else
if
(
If_ObjIsConst1
(
pObj
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment