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
23af7f90
Commit
23af7f90
authored
Dec 12, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added command &read_blif to read hierarchical BLIF directly into the &-space.
parent
be874a7a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
src/base/abc/abcHieCec.c
+47
-0
No files found.
src/base/abc/abcHieCec.c
View file @
23af7f90
...
...
@@ -283,6 +283,49 @@ Gia_Man_t * Abc_NtkDeriveFlatGia( Abc_Ntk_t * pNtk )
return
pGia
;
}
/**Function*************************************************************
Synopsis [Count the number of instances and I/O pins in the hierarchy.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_NtkCountInstances_rec
(
Abc_Ntk_t
*
pNtk
,
int
*
pCountInst
,
int
*
pCountPins
)
{
Vec_Ptr_t
*
vOrder
=
(
Vec_Ptr_t
*
)
pNtk
->
pData
;
Abc_Obj_t
*
pObj
;
int
i
;
*
pCountInst
+=
1
;
*
pCountPins
+=
Abc_NtkPiNum
(
pNtk
)
+
Abc_NtkPoNum
(
pNtk
);
Vec_PtrForEachEntry
(
Abc_Obj_t
*
,
vOrder
,
pObj
,
i
)
if
(
Abc_ObjIsBox
(
pObj
)
)
Abc_NtkCountInstances_rec
(
(
Abc_Ntk_t
*
)
pObj
->
pData
,
pCountInst
,
pCountPins
);
}
/**Function*************************************************************
Synopsis [Count the number of instances and I/O pins in the hierarchy.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_NtkCountInstances
(
Abc_Ntk_t
*
pNtk
)
{
int
CountInst
=
0
,
CountPins
=
0
;
assert
(
Abc_NtkIsNetlist
(
pNtk
)
);
assert
(
!
Abc_NtkLatchNum
(
pNtk
)
);
// recursively flatten hierarchy
Abc_NtkCountInstances_rec
(
pNtk
,
&
CountInst
,
&
CountPins
);
printf
(
"Instances = %10d. I/O pins = %10d.
\n
"
,
CountInst
,
CountPins
);
}
/**Function*************************************************************
...
...
@@ -332,6 +375,10 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
pGia
=
Abc_NtkDeriveFlatGia
(
pNtk
);
Abc_PrintTime
(
1
,
"Deriving GIA"
,
clock
()
-
clk
);
clk
=
clock
();
Abc_NtkCountInstances
(
pNtk
);
Abc_PrintTime
(
1
,
"Gather stats"
,
clock
()
-
clk
);
// clean nodes/boxes of all nodes
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
vMods
,
pModel
,
i
)
Vec_PtrFree
(
(
Vec_Ptr_t
*
)
pModel
->
pData
);
...
...
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