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
ee72a4ca
Commit
ee72a4ca
authored
Feb 12, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with inductive don't-cares.
parent
646b2169
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
src/base/abci/abc.c
+16
-4
src/base/abci/abcMfs.c
+6
-5
No files found.
src/base/abci/abc.c
View file @
ee72a4ca
...
...
@@ -4585,14 +4585,14 @@ usage:
int
Abc_CommandMfs2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
int
Abc_NtkPerformMfs
(
Abc_Ntk_t
*
pNtk
,
Sfm_Par_t
*
pPars
);
extern
int
Abc_NtkMfsAfterICheck
(
Abc_Ntk_t
*
p
,
int
nFrames
,
Vec_Int_t
*
vFlops
,
Sfm_Par_t
*
pPars
);
extern
int
Abc_NtkMfsAfterICheck
(
Abc_Ntk_t
*
p
,
int
nFrames
,
int
nFramesAdd
,
Vec_Int_t
*
vFlops
,
Sfm_Par_t
*
pPars
);
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Sfm_Par_t
Pars
,
*
pPars
=
&
Pars
;
int
c
,
fIndDCs
=
0
;
int
c
,
fIndDCs
=
0
,
nFramesAdd
=
0
;
// set defaults
Sfm_ParSetDefault
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"WFDMLCZNdaeivwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"WFDMLCZN
I
daeivwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -4684,6 +4684,17 @@ int Abc_CommandMfs2( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
pPars
->
nNodesMax
<
0
)
goto
usage
;
break
;
case
'I'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-I
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nFramesAdd
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nFramesAdd
<
0
)
goto
usage
;
break
;
case
'd'
:
pPars
->
fRrOnly
^=
1
;
break
;
...
...
@@ -4737,7 +4748,7 @@ int Abc_CommandMfs2( Abc_Frame_t * pAbc, int argc, char ** argv )
return
1
;
}
// modify the current network
if
(
!
Abc_NtkMfsAfterICheck
(
pNtk
,
pAbc
->
nIndFrames
,
pAbc
->
vIndFlops
,
pPars
)
)
if
(
!
Abc_NtkMfsAfterICheck
(
pNtk
,
pAbc
->
nIndFrames
,
nFramesAdd
,
pAbc
->
vIndFlops
,
pPars
)
)
{
Abc_Print
(
-
1
,
"Resynthesis has failed.
\n
"
);
return
1
;
...
...
@@ -4769,6 +4780,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-a : toggle minimizing area or area+edges [default = %s]
\n
"
,
pPars
->
fArea
?
"area"
:
"area+edges"
);
Abc_Print
(
-
2
,
"
\t
-e : toggle high-effort resubstitution [default = %s]
\n
"
,
pPars
->
fMoreEffort
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-i : toggle using inductive don't-cares [default = %s]
\n
"
,
fIndDCs
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-I : the number of additional frames inserted [default = %d]
\n
"
,
nFramesAdd
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing optimization summary [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggle printing detailed stats for each node [default = %s]
\n
"
,
pPars
->
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
src/base/abci/abcMfs.c
View file @
ee72a4ca
...
...
@@ -298,12 +298,13 @@ int Abc_NtkPerformMfs( Abc_Ntk_t * pNtk, Sfm_Par_t * pPars )
SeeAlso []
***********************************************************************/
Abc_Ntk_t
*
Abc_NtkUnrollAndDrop
(
Abc_Ntk_t
*
p
,
int
nFrames
,
Vec_Int_t
*
vFlops
,
int
*
piPivot
)
Abc_Ntk_t
*
Abc_NtkUnrollAndDrop
(
Abc_Ntk_t
*
p
,
int
nFrames
,
int
nFramesAdd
,
Vec_Int_t
*
vFlops
,
int
*
piPivot
)
{
Abc_Ntk_t
*
pNtk
;
Abc_Obj_t
*
pFanin
,
*
pNode
;
Vec_Ptr_t
*
vNodes
;
int
i
,
k
,
f
,
Value
;
assert
(
nFramesAdd
>=
0
);
assert
(
Abc_NtkIsLogic
(
p
)
);
assert
(
Vec_IntSize
(
vFlops
)
==
Abc_NtkLatchNum
(
p
)
);
*
piPivot
=
-
1
;
...
...
@@ -315,7 +316,7 @@ Abc_Ntk_t * Abc_NtkUnrollAndDrop( Abc_Ntk_t * p, int nFrames, Vec_Int_t * vFlops
pNode
->
pCopy
=
Abc_NtkCreatePi
(
pNtk
);
// iterate unrolling
vNodes
=
Abc_NtkDfs
(
p
,
0
);
for
(
f
=
0
;
f
<=
nFrames
;
f
++
)
for
(
f
=
0
;
f
<=
nFrames
+
nFramesAdd
;
f
++
)
{
if
(
f
>
0
)
{
...
...
@@ -343,7 +344,7 @@ Abc_Ntk_t * Abc_NtkUnrollAndDrop( Abc_Ntk_t * p, int nFrames, Vec_Int_t * vFlops
Abc_NtkForEachLatch
(
p
,
pNode
,
i
)
Abc_ObjFanout0
(
pNode
)
->
pCopy
=
Abc_ObjFanin0
(
pNode
)
->
pCopy
;
// add final POs
if
(
f
>
0
)
if
(
f
>
nFramesAdd
)
{
Vec_IntForEachEntry
(
vFlops
,
Value
,
i
)
{
...
...
@@ -427,7 +428,7 @@ void Abc_NtkReinsertNodes( Abc_Ntk_t * p, Abc_Ntk_t * pNtk, int iPivot )
SeeAlso []
***********************************************************************/
int
Abc_NtkMfsAfterICheck
(
Abc_Ntk_t
*
p
,
int
nFrames
,
Vec_Int_t
*
vFlops
,
Sfm_Par_t
*
pPars
)
int
Abc_NtkMfsAfterICheck
(
Abc_Ntk_t
*
p
,
int
nFrames
,
int
nFramesAdd
,
Vec_Int_t
*
vFlops
,
Sfm_Par_t
*
pPars
)
{
Sfm_Ntk_t
*
pp
;
int
nFaninMax
,
nNodes
;
...
...
@@ -444,7 +445,7 @@ int Abc_NtkMfsAfterICheck( Abc_Ntk_t * p, int nFrames, Vec_Int_t * vFlops, Sfm_P
if
(
!
Abc_NtkHasSop
(
p
)
)
Abc_NtkToSop
(
p
,
0
);
// derive unfolded network
pNtk
=
Abc_NtkUnrollAndDrop
(
p
,
nFrames
,
vFlops
,
&
iPivot
);
pNtk
=
Abc_NtkUnrollAndDrop
(
p
,
nFrames
,
nFramesAdd
,
vFlops
,
&
iPivot
);
Io_WriteBlifLogic
(
pNtk
,
"unroll_dump.blif"
,
0
);
// collect information
pp
=
Abc_NtkExtractMfs2
(
pNtk
,
iPivot
);
...
...
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