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
bb4897ab
Commit
bb4897ab
authored
Jan 15, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to the lazy man's synthesis code.
parent
1f0e5533
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
1 deletions
+44
-1
src/base/abci/abcRec.c
+44
-1
No files found.
src/base/abci/abcRec.c
View file @
bb4897ab
...
...
@@ -2181,6 +2181,32 @@ void Abc_NtkRecAddFromLib( Abc_Ntk_t* pNtk, Abc_Obj_t * pRoot, int nVars )
/**Function*************************************************************
Synopsis [Prints one AIG sugraph recursively.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_RecPrint_rec
(
Abc_Obj_t
*
pObj
)
{
if
(
Abc_ObjIsPi
(
pObj
)
)
{
printf
(
"%c"
,
'a'
+
pObj
->
Id
-
1
);
return
;
}
assert
(
Abc_ObjIsNode
(
pObj
)
);
printf
(
"(%s"
,
Abc_ObjFaninC0
(
pObj
)
?
"!"
:
""
);
Abc_RecPrint_rec
(
Abc_ObjFanin0
(
pObj
)
);
printf
(
"*%s"
,
Abc_ObjFaninC1
(
pObj
)
?
"!"
:
""
);
Abc_RecPrint_rec
(
Abc_ObjFanin1
(
pObj
)
);
printf
(
")"
);
}
/**Function*************************************************************
Synopsis [Computes the delay using library.]
Description []
...
...
@@ -2192,6 +2218,7 @@ void Abc_NtkRecAddFromLib( Abc_Ntk_t* pNtk, Abc_Obj_t * pRoot, int nVars )
***********************************************************************/
int
If_CutDelayRecCost
(
If_Man_t
*
p
,
If_Cut_t
*
pCut
)
{
int
fVerbose
=
0
;
int
timeDelayComput
,
timeTotal
=
clock
(),
timeCanonicize
;
int
nLeaves
,
i
,
DelayMin
=
ABC_INFINITY
,
Delay
=
-
ABC_INFINITY
;
char
pCanonPerm
[
16
];
...
...
@@ -2201,7 +2228,7 @@ int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut)
Abc_Ntk_t
*
pAig
=
s_pMan
->
pNtk
;
unsigned
*
pInOut
=
s_pMan
->
pTemp1
;
unsigned
*
pTemp
=
s_pMan
->
pTemp2
;
int
nVars
=
s_pMan
->
nVars
;
int
Counter
,
nVars
=
s_pMan
->
nVars
;
assert
(
s_pMan
!=
NULL
);
nLeaves
=
If_CutLeaveNum
(
pCut
);
s_pMan
->
nFunsTried
++
;
...
...
@@ -2251,9 +2278,22 @@ int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut)
DelayMin
=
ABC_INFINITY
;
pCandMin
=
NULL
;
timeDelayComput
=
clock
();
if
(
fVerbose
)
Kit_DsdPrintFromTruth
(
pInOut
,
nLeaves
),
printf
(
" Subgraphs: "
);
//find the best structure of the functional class.
Counter
=
0
;
for
(
pCand
=
*
ppSpot
;
pCand
;
pCand
=
pCand
->
pNext
)
{
Counter
++
;
if
(
fVerbose
)
{
printf
(
"%s("
,
Abc_ObjIsComplement
(
pCand
->
obj
)
?
"!"
:
""
);
Abc_RecPrint_rec
(
Abc_ObjRegular
(
pCand
->
obj
)
);
printf
(
") "
);
}
s_pMan
->
nFunsDelayComput
++
;
Delay
=
If_CutComputDelay
(
p
,
pCand
,
pCut
,
pCanonPerm
,
nLeaves
);
if
(
DelayMin
>
Delay
)
...
...
@@ -2268,6 +2308,9 @@ int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut)
pCandMin
=
pCand
;
}
}
if
(
fVerbose
)
printf
(
"Printed %d subgraphs.
\n
"
,
Counter
);
s_pMan
->
timeIfComputDelay
+=
clock
()
-
timeDelayComput
;
assert
(
pCandMin
!=
NULL
);
for
(
i
=
0
;
i
<
nLeaves
;
i
++
)
...
...
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