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
c42aeb81
Commit
c42aeb81
authored
Aug 05, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handling constant and buffer cut in exact synthesis.
parent
64010095
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
8 deletions
+24
-8
src/base/abc/abc.h
+1
-1
src/base/abci/abcExact.c
+22
-6
src/base/abci/abcIf.c
+1
-1
No files found.
src/base/abc/abc.h
View file @
c42aeb81
...
...
@@ -645,7 +645,7 @@ extern ABC_DLL Vec_Ptr_t * Abc_AigGetLevelizedOrder( Abc_Ntk_t * pNtk, in
/*=== abcExact.c ==========================================================*/
extern
ABC_DLL
int
Abc_ExactInputNum
();
extern
ABC_DLL
int
Abc_ExactIsRunning
();
extern
ABC_DLL
Abc_Obj_t
*
Abc_ExactBuildNode
(
word
*
pTruth
,
int
nVars
,
int
*
pArrTimeProfile
,
Abc_Obj_t
**
pFanins
);
extern
ABC_DLL
Abc_Obj_t
*
Abc_ExactBuildNode
(
word
*
pTruth
,
int
nVars
,
int
*
pArrTimeProfile
,
Abc_Obj_t
**
pFanins
,
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkFindExact
(
word
*
pTruth
,
int
nVars
,
int
nFunc
,
int
nMaxDepth
,
int
*
pArrivalTimes
,
int
fVerbose
);
/*=== abcFanio.c ==========================================================*/
extern
ABC_DLL
void
Abc_ObjAddFanin
(
Abc_Obj_t
*
pObj
,
Abc_Obj_t
*
pFanin
);
...
...
src/base/abci/abcExact.c
View file @
c42aeb81
...
...
@@ -1500,12 +1500,25 @@ int Abc_ExactDelayCost( word * pTruth, int nVars, int * pArrTimeProfile, char *
abctime
timeStart
;
/* some checks */
if
(
nVars
<
2
||
nVars
>
8
)
if
(
nVars
<
0
||
nVars
>
8
)
{
printf
(
"invalid truth table size %d
\n
"
,
nVars
);
assert
(
0
);
}
if
(
nVars
==
0
)
{
*
Cost
=
0
;
return
0
;
}
if
(
nVars
==
1
)
{
*
Cost
=
0
;
pPerm
[
0
]
=
(
char
)
0
;
return
pArrTimeProfile
[
0
];
}
/* statistics */
s_pSesStore
->
nCutCount
++
;
s_pSesStore
->
pCutCount
[
nVars
]
++
;
...
...
@@ -1566,7 +1579,7 @@ int Abc_ExactDelayCost( word * pTruth, int nVars, int * pArrTimeProfile, char *
}
// this procedure returns a new node whose output in terms of the given fanins
// has the smallest possible arrival time (in agreement with the above Abc_ExactDelayCost)
Abc_Obj_t
*
Abc_ExactBuildNode
(
word
*
pTruth
,
int
nVars
,
int
*
pArrTimeProfile
,
Abc_Obj_t
**
pFanins
)
Abc_Obj_t
*
Abc_ExactBuildNode
(
word
*
pTruth
,
int
nVars
,
int
*
pArrTimeProfile
,
Abc_Obj_t
**
pFanins
,
Abc_Ntk_t
*
pNtk
)
{
char
*
pSol
;
int
i
,
j
;
...
...
@@ -1576,7 +1589,10 @@ Abc_Obj_t * Abc_ExactBuildNode( word * pTruth, int nVars, int * pArrTimeProfile,
char
pGateTruth
[
5
];
char
*
pSopCover
;
Abc_Ntk_t
*
pNtk
=
Abc_ObjNtk
(
pFanins
[
0
]
);
if
(
nVars
==
0
)
return
(
pTruth
[
0
]
&
1
)
?
Abc_NtkCreateNodeConst1
(
pNtk
)
:
Abc_NtkCreateNodeConst0
(
pNtk
);
if
(
nVars
==
1
)
return
(
pTruth
[
0
]
&
1
)
?
Abc_NtkCreateNodeInv
(
pNtk
,
pFanins
[
0
])
:
Abc_NtkCreateNodeBuf
(
pNtk
,
pFanins
[
0
]);
pSol
=
Ses_StoreGetEntry
(
s_pSesStore
,
pTruth
,
nVars
,
pArrTimeProfile
);
if
(
!
pSol
)
...
...
@@ -1656,14 +1672,14 @@ void Abc_ExactStoreTest( int fVerbose )
Abc_ExactStart
(
10000
,
1
,
fVerbose
,
NULL
);
assert
(
!
Abc_ExactBuildNode
(
pTruth
,
4
,
pArrTimeProfile
,
pFanins
)
);
assert
(
!
Abc_ExactBuildNode
(
pTruth
,
4
,
pArrTimeProfile
,
pFanins
,
pNtk
)
);
assert
(
Abc_ExactDelayCost
(
pTruth
,
4
,
pArrTimeProfile
,
pPerm
,
&
Cost
,
12
)
==
1
);
assert
(
Abc_ExactBuildNode
(
pTruth
,
4
,
pArrTimeProfile
,
pFanins
)
);
assert
(
Abc_ExactBuildNode
(
pTruth
,
4
,
pArrTimeProfile
,
pFanins
,
pNtk
)
);
(
*
pArrTimeProfile
)
++
;
assert
(
!
Abc_ExactBuildNode
(
pTruth
,
4
,
pArrTimeProfile
,
pFanins
)
);
assert
(
!
Abc_ExactBuildNode
(
pTruth
,
4
,
pArrTimeProfile
,
pFanins
,
pNtk
)
);
(
*
pArrTimeProfile
)
--
;
Abc_ExactStop
(
NULL
);
...
...
src/base/abci/abcIf.c
View file @
c42aeb81
...
...
@@ -452,7 +452,7 @@ Abc_Obj_t * Abc_NodeFromIf_rec( Abc_Ntk_t * pNtkNew, If_Man_t * pIfMan, If_Obj_t
Abc_Obj_t
*
pFanins
[
IF_MAX_FUNC_LUTSIZE
];
If_CutForEachLeaf
(
pIfMan
,
pCutBest
,
pIfLeaf
,
i
)
pFanins
[
i
]
=
Abc_NodeFromIf_rec
(
pNtkNew
,
pIfMan
,
pIfLeaf
,
vCover
);
pNodeNew
=
Abc_ExactBuildNode
(
If_CutTruthW
(
pIfMan
,
pCutBest
),
If_CutLeaveNum
(
pCutBest
),
If_CutArrTimeProfile
(
pIfMan
,
pCutBest
),
pFanins
);
pNodeNew
=
Abc_ExactBuildNode
(
If_CutTruthW
(
pIfMan
,
pCutBest
),
If_CutLeaveNum
(
pCutBest
),
If_CutArrTimeProfile
(
pIfMan
,
pCutBest
),
pFanins
,
pNtkNew
);
If_ObjSetCopy
(
pIfObj
,
pNodeNew
);
return
pNodeNew
;
}
...
...
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