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
debe4450
Commit
debe4450
authored
Jan 18, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New hierarchy manager.
parent
fe6d1ff7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
src/base/abc/abcHieNew.c
+36
-2
No files found.
src/base/abc/abcHieNew.c
View file @
debe4450
...
...
@@ -89,6 +89,9 @@ struct Au_Ntk_t_
double
nBoxes
;
double
nNodes
;
double
nPorts
;
double
nNodeAnds
;
double
nNodeXors
;
double
nNodeMuxs
;
};
struct
Au_Man_t_
...
...
@@ -207,6 +210,8 @@ static inline int Au_ObjIsTravIdCurrentId( Au_Ntk_t * p, int Id ) { re
for ( i = 0; (i < Vec_IntSize(&p->vPos)) && (((pObj) = Au_NtkPo(p, i)), 1); i++ )
#define Au_NtkForEachObj( p, pObj, i ) \
for ( i = 0; (i < Vec_IntSize(&p->vObjs)) && (((pObj) = Au_NtkObjI(p, i)), 1); i++ )
#define Au_NtkForEachNode( p, pObj, i ) \
for ( i = 0; (i < Vec_IntSize(&p->vObjs)) && (((pObj) = Au_NtkObjI(p, i)), 1); i++ ) if ( !Au_ObjIsNode(pObj) ) {} else
#define Au_NtkForEachBox( p, pObj, i ) \
for ( i = 0; (i < Vec_IntSize(&p->vObjs)) && (((pObj) = Au_NtkObjI(p, i)), 1); i++ ) if ( !Au_ObjIsBox(pObj) ) {} else
...
...
@@ -285,6 +290,20 @@ void Au_NtkCleanCopy( Au_Ntk_t * p )
{
Vec_IntFill
(
&
p
->
vCopies
,
Au_NtkObjNumMax
(
p
),
-
1
);
}
int
Au_NtkNodeNumFunc
(
Au_Ntk_t
*
p
,
int
Func
)
{
Au_Obj_t
*
pObj
;
int
i
,
Counter
=
0
;
if
(
p
->
pMan
&&
p
->
pMan
->
pFuncs
)
return
0
;
Au_NtkForEachNode
(
p
,
pObj
,
i
)
{
Counter
+=
(
pObj
->
Func
==
(
unsigned
)
Func
);
// printf( "%d ", pObj->Func );
}
// printf( "\n" );
return
Counter
;
}
/**Function*************************************************************
...
...
@@ -459,12 +478,16 @@ void Au_ManCountThings( Au_Man_t * p )
{
Au_Ntk_t
*
pNtk
,
*
pBoxModel
;
Au_Obj_t
*
pBox
;
int
i
,
k
;
int
i
,
k
,
clk
=
clock
()
;
Au_ManForEachNtkReverse
(
p
,
pNtk
,
i
)
{
pNtk
->
nBoxes
=
Au_NtkBoxNum
(
pNtk
);
pNtk
->
nNodes
=
Au_NtkNodeNum
(
pNtk
);
pNtk
->
nPorts
=
Au_NtkPiNum
(
pNtk
)
+
Au_NtkPoNum
(
pNtk
);
pNtk
->
nNodeAnds
=
Au_NtkNodeNumFunc
(
pNtk
,
1
);
pNtk
->
nNodeXors
=
Au_NtkNodeNumFunc
(
pNtk
,
2
);
pNtk
->
nNodeMuxs
=
Au_NtkNodeNumFunc
(
pNtk
,
3
);
// assert( pNtk->nNodes == pNtk->nNodeAnds + pNtk->nNodeXors + pNtk->nNodeMuxs );
// printf( "adding %.0f nodes of model %s\n", pNtk->nNodes, Au_NtkName(pNtk) );
Au_NtkForEachBox
(
pNtk
,
pBox
,
k
)
{
...
...
@@ -478,13 +501,24 @@ void Au_ManCountThings( Au_Man_t * p )
pNtk
->
nBoxes
+=
pBoxModel
->
nBoxes
;
pNtk
->
nNodes
+=
pBoxModel
->
nNodes
;
pNtk
->
nPorts
+=
pBoxModel
->
nPorts
;
pNtk
->
nNodeAnds
+=
pBoxModel
->
nNodeAnds
;
pNtk
->
nNodeXors
+=
pBoxModel
->
nNodeXors
;
pNtk
->
nNodeMuxs
+=
pBoxModel
->
nNodeMuxs
;
// printf( " adding %.0f nodes of model %s\n", pBoxModel->nNodes, Au_NtkName(pBoxModel) );
}
// printf( "total %.0f nodes in model %s\n", pNtk->nNodes, Au_NtkName(pNtk) );
}
pNtk
=
Au_ManNtkRoot
(
p
);
printf
(
"Total nodes = %12.0f. Total instances = %12.0f. Total ports = %12.0f.
\n
"
,
printf
(
"Total nodes = %15.0f. Total instances = %15.0f. Total ports = %15.0f.
\n
"
,
// printf( "Total nodes = %.2e. Total instances = %.2e. Total ports = %.2e.\n",
pNtk
->
nNodes
,
pNtk
->
nBoxes
,
pNtk
->
nPorts
);
// printf( "Total ANDs = %15.0f. Total XORs = %15.0f. Total MUXes = %15.0f.\n",
// printf( "Total ANDs = %.2e. Total XORs = %.2e. Total MUXes = %.2e. ",
// pNtk->nNodeAnds, pNtk->nNodeXors, pNtk->nNodeMuxs );
printf
(
"Total ANDs = %15.0f.
\n
"
,
pNtk
->
nNodeAnds
);
printf
(
"Total XORs = %15.0f.
\n
"
,
pNtk
->
nNodeXors
);
printf
(
"Total MUXes = %15.0f.
\n
"
,
pNtk
->
nNodeMuxs
);
// Abc_PrintTime( 1, "Time", clock() - clk );
}
int
Au_NtkCompareNames
(
Au_Ntk_t
**
p1
,
Au_Ntk_t
**
p2
)
...
...
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