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
a819e33c
Commit
a819e33c
authored
Aug 08, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabled delay computation for the cut output using cut inputs.
parent
473012aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
2 deletions
+52
-2
src/map/if/if.h
+1
-0
src/map/if/ifMan.c
+2
-0
src/map/if/ifMap.c
+49
-2
No files found.
src/map/if/if.h
View file @
a819e33c
...
...
@@ -265,6 +265,7 @@ struct If_Man_t_
int
nCountNonDec
[
2
];
Vec_Int_t
*
vCutData
;
// cut data storage
int
pArrTimeProfile
[
IF_MAX_FUNC_LUTSIZE
];
Vec_Ptr_t
*
vVisited
;
// timing manager
Tim_Man_t
*
pManTim
;
...
...
src/map/if/ifMan.c
View file @
a819e33c
...
...
@@ -61,6 +61,7 @@ If_Man_t * If_ManStart( If_Par_t * pPars )
p
->
vCos
=
Vec_PtrAlloc
(
100
);
p
->
vObjs
=
Vec_PtrAlloc
(
100
);
p
->
vTemp
=
Vec_PtrAlloc
(
100
);
p
->
vVisited
=
Vec_PtrAlloc
(
100
);
// prepare the memory manager
if
(
p
->
pPars
->
fTruth
)
{
...
...
@@ -264,6 +265,7 @@ void If_ManStop( If_Man_t * p )
Vec_IntFreeP
(
&
p
->
vCutData
);
Vec_IntFreeP
(
&
p
->
vPairRes
);
Vec_StrFreeP
(
&
p
->
vPairPerms
);
Vec_PtrFreeP
(
&
p
->
vVisited
);
if
(
p
->
vPairHash
)
Hash_IntManStop
(
p
->
vPairHash
);
for
(
i
=
6
;
i
<=
Abc_MaxInt
(
6
,
p
->
pPars
->
nLutSize
);
i
++
)
...
...
src/map/if/ifMap.c
View file @
a819e33c
...
...
@@ -37,6 +37,53 @@ extern int Abc_ExactDelayCost( word * pTruth, int nVars, int * pArrTimeProfil
/**Function*************************************************************
Synopsis [Compute delay of the cut's output in terms of logic levels.]
Description [Uses the best arrival time of the fanins of the cut
to compute the arrival times of the output of the cut.]
SideEffects []
SeeAlso []
***********************************************************************/
int
If_ManCutAigDelay_rec
(
If_Man_t
*
p
,
If_Obj_t
*
pObj
,
Vec_Ptr_t
*
vVisited
)
{
int
Delay0
,
Delay1
;
if
(
pObj
->
fVisit
)
return
pObj
->
iCopy
;
if
(
If_ObjIsCi
(
pObj
)
||
If_ObjIsConst1
(
pObj
)
)
return
-
1
;
// store the node in the structure by level
assert
(
If_ObjIsAnd
(
pObj
)
);
pObj
->
fVisit
=
1
;
Vec_PtrPush
(
vVisited
,
pObj
);
Delay0
=
If_ManCutAigDelay_rec
(
p
,
pObj
->
pFanin0
,
vVisited
);
Delay1
=
If_ManCutAigDelay_rec
(
p
,
pObj
->
pFanin1
,
vVisited
);
pObj
->
iCopy
=
(
Delay0
>=
0
&&
Delay1
>=
0
)
?
1
+
Abc_MaxInt
(
Delay0
,
Delay1
)
:
-
1
;
return
pObj
->
iCopy
;
}
int
If_ManCutAigDelay
(
If_Man_t
*
p
,
If_Obj_t
*
pObj
,
If_Cut_t
*
pCut
)
{
If_Obj_t
*
pLeaf
;
int
i
,
Delay
;
Vec_PtrClear
(
p
->
vVisited
);
If_CutForEachLeaf
(
p
,
pCut
,
pLeaf
,
i
)
{
assert
(
pLeaf
->
fVisit
==
0
);
pLeaf
->
fVisit
=
1
;
Vec_PtrPush
(
p
->
vVisited
,
pLeaf
);
pLeaf
->
iCopy
=
If_ObjCutBest
(
pLeaf
)
->
Delay
;
}
Delay
=
If_ManCutAigDelay_rec
(
p
,
pObj
,
p
->
vVisited
);
Vec_PtrForEachEntry
(
If_Obj_t
*
,
p
->
vVisited
,
pLeaf
,
i
)
pLeaf
->
fVisit
=
0
;
// assert( Delay <= (int)pObj->Level );
return
Delay
;
}
/**Function*************************************************************
Synopsis [Counts the number of 1s in the signature.]
Description []
...
...
@@ -152,7 +199,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
{
int
Cost
=
0
;
pCut
->
fUser
=
1
;
pCut
->
Delay
=
(
float
)
Abc_ExactDelayCost
(
If_CutTruthW
(
p
,
pCut
),
If_CutLeaveNum
(
pCut
),
If_CutArrTimeProfile
(
p
,
pCut
),
If_CutPerm
(
pCut
),
&
Cost
,
(
int
)
pObj
->
Level
);
pCut
->
Delay
=
(
float
)
Abc_ExactDelayCost
(
If_CutTruthW
(
p
,
pCut
),
If_CutLeaveNum
(
pCut
),
If_CutArrTimeProfile
(
p
,
pCut
),
If_CutPerm
(
pCut
),
&
Cost
,
If_ManCutAigDelay
(
p
,
pObj
,
pCut
)
);
if
(
Cost
==
ABC_INFINITY
)
{
for
(
v
=
0
;
v
<
If_CutLeaveNum
(
pCut
);
v
++
)
...
...
@@ -376,7 +423,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
{
int
Cost
=
0
;
pCut
->
fUser
=
1
;
pCut
->
Delay
=
(
float
)
Abc_ExactDelayCost
(
If_CutTruthW
(
p
,
pCut
),
If_CutLeaveNum
(
pCut
),
If_CutArrTimeProfile
(
p
,
pCut
),
If_CutPerm
(
pCut
),
&
Cost
,
(
int
)
pObj
->
Level
);
pCut
->
Delay
=
(
float
)
Abc_ExactDelayCost
(
If_CutTruthW
(
p
,
pCut
),
If_CutLeaveNum
(
pCut
),
If_CutArrTimeProfile
(
p
,
pCut
),
If_CutPerm
(
pCut
),
&
Cost
,
If_ManCutAigDelay
(
p
,
pObj
,
pCut
)
);
if
(
Cost
==
ABC_INFINITY
)
{
for
(
v
=
0
;
v
<
If_CutLeaveNum
(
pCut
);
v
++
)
...
...
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