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
c7e215ca
Commit
c7e215ca
authored
Jan 14, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New hierarchy manager.
parent
9c409add
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
19 deletions
+45
-19
src/aig/gia/giaMan.c
+1
-1
src/base/abc/abcHieCec.c
+36
-16
src/base/abc/abcHieNew.c
+0
-0
src/base/abci/abc.c
+8
-2
No files found.
src/aig/gia/giaMan.c
View file @
c7e215ca
...
@@ -70,7 +70,7 @@ Gia_Man_t * Gia_ManStart( int nObjsMax )
...
@@ -70,7 +70,7 @@ Gia_Man_t * Gia_ManStart( int nObjsMax )
***********************************************************************/
***********************************************************************/
void
Gia_ManStop
(
Gia_Man_t
*
p
)
void
Gia_ManStop
(
Gia_Man_t
*
p
)
{
{
printf
(
"Hash table hits = %12u. Hash table misses = %12u.
\n
"
,
(
int
)
p
->
nHashHit
,
(
int
)
p
->
nHashMiss
);
//
printf( "Hash table hits = %12u. Hash table misses = %12u.\n", (int)p->nHashHit, (int)p->nHashMiss );
Tim_ManStopP
(
(
Tim_Man_t
**
)
&
p
->
pManTime
);
Tim_ManStopP
(
(
Tim_Man_t
**
)
&
p
->
pManTime
);
assert
(
p
->
pManTime
==
NULL
);
assert
(
p
->
pManTime
==
NULL
);
Vec_PtrFreeFree
(
p
->
vNamesIn
);
Vec_PtrFreeFree
(
p
->
vNamesIn
);
...
...
src/base/abc/abcHieCec.c
View file @
c7e215ca
...
@@ -503,11 +503,17 @@ Vec_Ptr_t * Abc_NtkCollectHie( Abc_Ntk_t * pNtk )
...
@@ -503,11 +503,17 @@ Vec_Ptr_t * Abc_NtkCollectHie( Abc_Ntk_t * pNtk )
assert
(
Abc_NtkIsNetlist
(
pNtk
)
);
assert
(
Abc_NtkIsNetlist
(
pNtk
)
);
assert
(
!
Abc_NtkLatchNum
(
pNtk
)
);
assert
(
!
Abc_NtkLatchNum
(
pNtk
)
);
vResult
=
Vec_PtrAlloc
(
1000
);
if
(
pNtk
->
pDesign
==
NULL
)
{
Vec_PtrPush
(
vResult
,
pNtk
);
return
vResult
;
}
vMods
=
pNtk
->
pDesign
->
vModules
;
vMods
=
pNtk
->
pDesign
->
vModules
;
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
vMods
,
pModel
,
i
)
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
vMods
,
pModel
,
i
)
pModel
->
iStep
=
-
1
;
pModel
->
iStep
=
-
1
;
vResult
=
Vec_PtrAlloc
(
1000
);
Abc_NtkCollectHie_rec
(
pNtk
,
vResult
);
Abc_NtkCollectHie_rec
(
pNtk
,
vResult
);
return
vResult
;
return
vResult
;
}
}
...
@@ -544,11 +550,15 @@ void Abc_NtkCountInst( Abc_Ntk_t * pNtk )
...
@@ -544,11 +550,15 @@ void Abc_NtkCountInst( Abc_Ntk_t * pNtk )
Abc_Ntk_t
*
pModel
;
Abc_Ntk_t
*
pModel
;
int
i
,
Counter
;
int
i
,
Counter
;
vMods
=
pNtk
->
pDesign
->
vModules
;
if
(
pNtk
->
pDesign
==
NULL
)
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
vMods
,
pModel
,
i
)
Counter
=
Abc_NtkNodeNum
(
pNtk
);
pModel
->
iStep
=
-
1
;
else
{
Counter
=
Abc_NtkCountInst_rec
(
pNtk
);
vMods
=
pNtk
->
pDesign
->
vModules
;
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
vMods
,
pModel
,
i
)
pModel
->
iStep
=
-
1
;
Counter
=
Abc_NtkCountInst_rec
(
pNtk
);
}
printf
(
"Instances = %10d.
\n
"
,
Counter
);
printf
(
"Instances = %10d.
\n
"
,
Counter
);
}
}
...
@@ -588,11 +598,15 @@ void Abc_NtkCountNodes( Abc_Ntk_t * pNtk )
...
@@ -588,11 +598,15 @@ void Abc_NtkCountNodes( Abc_Ntk_t * pNtk )
double
Counter
;
double
Counter
;
int
i
;
int
i
;
vMods
=
pNtk
->
pDesign
->
vModules
;
if
(
pNtk
->
pDesign
==
NULL
)
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
vMods
,
pModel
,
i
)
Counter
=
Abc_NtkNodeNum
(
pNtk
);
pModel
->
dTemp
=
-
1
;
else
{
Counter
=
Abc_NtkCountNodes_rec
(
pNtk
);
vMods
=
pNtk
->
pDesign
->
vModules
;
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
vMods
,
pModel
,
i
)
pModel
->
dTemp
=
-
1
;
Counter
=
Abc_NtkCountNodes_rec
(
pNtk
);
}
printf
(
"Nodes = %.0f
\n
"
,
Counter
);
printf
(
"Nodes = %.0f
\n
"
,
Counter
);
}
}
...
@@ -617,6 +631,9 @@ int Abc_NtkCheckRecursive( Abc_Ntk_t * pNtk )
...
@@ -617,6 +631,9 @@ int Abc_NtkCheckRecursive( Abc_Ntk_t * pNtk )
assert
(
Abc_NtkIsNetlist
(
pNtk
)
);
assert
(
Abc_NtkIsNetlist
(
pNtk
)
);
assert
(
!
Abc_NtkLatchNum
(
pNtk
)
);
assert
(
!
Abc_NtkLatchNum
(
pNtk
)
);
if
(
pNtk
->
pDesign
==
NULL
)
return
RetValue
;
vMods
=
pNtk
->
pDesign
->
vModules
;
vMods
=
pNtk
->
pDesign
->
vModules
;
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
vMods
,
pModel
,
i
)
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
vMods
,
pModel
,
i
)
{
{
...
@@ -662,17 +679,20 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
...
@@ -662,17 +679,20 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
if
(
pNtk
->
pDesign
==
NULL
||
pNtk
->
pDesign
->
vModules
==
NULL
)
if
(
pNtk
->
pDesign
==
NULL
||
pNtk
->
pDesign
->
vModules
==
NULL
)
{
{
printf
(
"There is no hierarchy information.
\n
"
);
printf
(
"There is no hierarchy information.
\n
"
);
Abc_NtkDelete
(
pNtk
);
//
Abc_NtkDelete( pNtk );
return
NULL
;
//
return NULL;
}
}
Abc_PrintTime
(
1
,
"Reading file"
,
clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Reading file"
,
clock
()
-
clk
);
assert
(
Abc_NtkIsNetlist
(
pNtk
)
);
assert
(
Abc_NtkIsNetlist
(
pNtk
)
);
assert
(
!
Abc_NtkLatchNum
(
pNtk
)
);
assert
(
!
Abc_NtkLatchNum
(
pNtk
)
);
clk
=
clock
();
if
(
pNtk
->
pDesign
!=
NULL
)
Abc_NtkCountNodes
(
pNtk
);
{
Abc_PrintTime
(
1
,
"Count nodes"
,
clock
()
-
clk
);
clk
=
clock
();
Abc_NtkCountNodes
(
pNtk
);
Abc_PrintTime
(
1
,
"Count nodes"
,
clock
()
-
clk
);
}
// print stats
// print stats
if
(
fVerbose
)
if
(
fVerbose
)
...
...
src/base/abc/abcHieNew.c
View file @
c7e215ca
This diff is collapsed.
Click to expand it.
src/base/abci/abc.c
View file @
c7e215ca
...
@@ -8928,12 +8928,16 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -8928,12 +8928,16 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
extern
void
Aig_ManInterRepar
(
Aig_Man_t
*
pMan
,
int
fVerbose
);
extern
void
Aig_ManInterRepar
(
Aig_Man_t
*
pMan
,
int
fVerbose
);
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
extern
void
Aig_ManSupportsTest
(
Aig_Man_t
*
pMan
);
extern
void
Aig_ManSupportsTest
(
Aig_Man_t
*
pMan
);
extern
int
Aig_SupportSizeTest
(
Aig_Man_t
*
pMan
);
extern
int
Abc_NtkSuppSizeTest
(
Abc_Ntk_t
*
p
);
if
(
pNtk
)
if
(
pNtk
)
{
{
Aig_Man_t
*
pAig
=
Abc_NtkToDar
(
pNtk
,
0
,
1
);
Aig_Man_t
*
pAig
=
Abc_NtkToDar
(
pNtk
,
0
,
1
);
// Aig_ManInterRepar( pAig, 1 );
// Aig_ManInterRepar( pAig, 1 );
// Aig_ManInterTest( pAig, 1 );
// Aig_ManInterTest( pAig, 1 );
Aig_ManSupportsTest
(
pAig
);
// Aig_ManSupportsTest( pAig );
// Aig_SupportSizeTest( pAig );
Abc_NtkSuppSizeTest
(
pNtk
);
Aig_ManStop
(
pAig
);
Aig_ManStop
(
pAig
);
}
}
}
}
...
@@ -30323,6 +30327,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -30323,6 +30327,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
int
fSwitch
=
0
;
int
fSwitch
=
0
;
// extern Gia_Man_t * Gia_VtaTest( Gia_Man_t * p );
// extern Gia_Man_t * Gia_VtaTest( Gia_Man_t * p );
extern
void
Gia_VtaTest
(
Gia_Man_t
*
p
,
int
nFramesMax
,
int
nConfMax
,
int
nTimeMax
,
int
fVerbose
);
extern
void
Gia_VtaTest
(
Gia_Man_t
*
p
,
int
nFramesMax
,
int
nConfMax
,
int
nTimeMax
,
int
fVerbose
);
extern
int
Gia_ManSuppSizeTest
(
Gia_Man_t
*
p
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"svh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"svh"
)
)
!=
EOF
)
...
@@ -30359,7 +30364,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -30359,7 +30364,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// pAbc->pGia = Gia_VtaTest( pTemp = pAbc->pGia );
// pAbc->pGia = Gia_VtaTest( pTemp = pAbc->pGia );
// Gia_ManStopP( &pTemp );
// Gia_ManStopP( &pTemp );
Gia_VtaTest
(
pAbc
->
pGia
,
100000
,
0
,
0
,
1
);
// Gia_VtaTest( pAbc->pGia, 100000, 0, 0, 1 );
Gia_ManSuppSizeTest
(
pAbc
->
pGia
);
return
0
;
return
0
;
...
...
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