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
9c409add
Commit
9c409add
authored
Jan 14, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support computation experiments with different network data-structures.
parent
4748f698
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
127 additions
and
0 deletions
+127
-0
src/aig/aig/aigDfs.c
+23
-0
src/aig/gia/giaDfs.c
+40
-0
src/base/abc/abcDfs.c
+64
-0
No files found.
src/aig/aig/aigDfs.c
View file @
9c409add
...
@@ -764,6 +764,29 @@ int Aig_SupportSize( Aig_Man_t * p, Aig_Obj_t * pObj )
...
@@ -764,6 +764,29 @@ int Aig_SupportSize( Aig_Man_t * p, Aig_Obj_t * pObj )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Aig_SupportSizeTest
(
Aig_Man_t
*
p
)
{
Aig_Obj_t
*
pObj
;
int
i
,
Counter
=
0
,
clk
=
clock
();
Aig_ManForEachObj
(
p
,
pObj
,
i
)
if
(
Aig_ObjIsNode
(
pObj
)
)
Counter
+=
(
Aig_SupportSize
(
p
,
pObj
)
<=
16
);
printf
(
"Nodes with small support %d (out of %d)
\n
"
,
Counter
,
Aig_ManNodeNum
(
p
)
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
return
Counter
;
}
/**Function*************************************************************
Synopsis [Counts the support size of the node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Aig_Support_rec
(
Aig_Man_t
*
p
,
Aig_Obj_t
*
pObj
,
Vec_Ptr_t
*
vSupp
)
void
Aig_Support_rec
(
Aig_Man_t
*
p
,
Aig_Obj_t
*
pObj
,
Vec_Ptr_t
*
vSupp
)
{
{
if
(
Aig_ObjIsTravIdCurrent
(
p
,
pObj
)
)
if
(
Aig_ObjIsTravIdCurrent
(
p
,
pObj
)
)
...
...
src/aig/gia/giaDfs.c
View file @
9c409add
...
@@ -246,6 +246,46 @@ int Gia_ManSuppSize_rec( Gia_Man_t * p, Gia_Obj_t * pObj )
...
@@ -246,6 +246,46 @@ int Gia_ManSuppSize_rec( Gia_Man_t * p, Gia_Obj_t * pObj )
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Computes support size of the node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Gia_ManSuppSizeOne
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
Gia_ManIncrementTravId
(
p
);
return
Gia_ManSuppSize_rec
(
p
,
pObj
);
}
/**Function*************************************************************
Synopsis [Computes support size of the node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Gia_ManSuppSizeTest
(
Gia_Man_t
*
p
)
{
Gia_Obj_t
*
pObj
;
int
i
,
Counter
=
0
,
clk
=
clock
();
Gia_ManForEachObj
(
p
,
pObj
,
i
)
if
(
Gia_ObjIsAnd
(
pObj
)
)
Counter
+=
(
Gia_ManSuppSizeOne
(
p
,
pObj
)
<=
16
);
printf
(
"Nodes with small support %d (out of %d)
\n
"
,
Counter
,
Gia_ManAndNum
(
p
)
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
return
Counter
;
}
/**Function*************************************************************
Synopsis [Collects support nodes.]
Synopsis [Collects support nodes.]
Description []
Description []
...
...
src/base/abc/abcDfs.c
View file @
9c409add
...
@@ -782,6 +782,70 @@ Vec_Ptr_t * Abc_NtkNodeSupport( Abc_Ntk_t * pNtk, Abc_Obj_t ** ppNodes, int nNod
...
@@ -782,6 +782,70 @@ Vec_Ptr_t * Abc_NtkNodeSupport( Abc_Ntk_t * pNtk, Abc_Obj_t ** ppNodes, int nNod
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Computes support size of the node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_ObjSuppSize_rec
(
Abc_Obj_t
*
pObj
)
{
Abc_Obj_t
*
pFanin
;
int
i
,
Counter
=
0
;
if
(
Abc_NodeIsTravIdCurrent
(
pObj
)
)
return
0
;
Abc_NodeSetTravIdCurrent
(
pObj
);
if
(
Abc_ObjIsPi
(
pObj
)
)
return
1
;
assert
(
Abc_ObjIsNode
(
pObj
)
||
Abc_ObjIsBox
(
pObj
)
);
Abc_ObjForEachFanin
(
pObj
,
pFanin
,
i
)
Counter
+=
Abc_ObjSuppSize_rec
(
pFanin
);
return
Counter
;
}
/**Function*************************************************************
Synopsis [Computes support size of the node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_ObjSuppSize
(
Abc_Obj_t
*
pObj
)
{
Abc_NtkIncrementTravId
(
Abc_ObjNtk
(
pObj
)
);
return
Abc_ObjSuppSize_rec
(
pObj
);
}
/**Function*************************************************************
Synopsis [Computes support size of the node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_NtkSuppSizeTest
(
Abc_Ntk_t
*
p
)
{
Abc_Obj_t
*
pObj
;
int
i
,
Counter
=
0
,
clk
=
clock
();
Abc_NtkForEachObj
(
p
,
pObj
,
i
)
if
(
Abc_ObjIsNode
(
pObj
)
)
Counter
+=
(
Abc_ObjSuppSize
(
pObj
)
<=
16
);
printf
(
"Nodes with small support %d (out of %d)
\n
"
,
Counter
,
Abc_NtkNodeNum
(
p
)
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
return
Counter
;
}
/**Function*************************************************************
Synopsis [Computes the sum total of supports of all outputs.]
Synopsis [Computes the sum total of supports of all outputs.]
Description []
Description []
...
...
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