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
4e247281
Commit
4e247281
authored
Jun 29, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating new mapper.
parent
2d6d5a0f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
src/aig/gia/giaTest.c
+0
-0
src/base/abci/abc.c
+5
-4
src/misc/mem/mem2.h
+15
-4
No files found.
src/aig/gia/giaTest.c
View file @
4e247281
This diff is collapsed.
Click to expand it.
src/base/abci/abc.c
View file @
4e247281
...
@@ -32303,7 +32303,7 @@ usage:
...
@@ -32303,7 +32303,7 @@ usage:
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9Test
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Test
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
//
Gia_Man_t * pTemp = NULL;
Gia_Man_t
*
pTemp
=
NULL
;
int
c
,
fVerbose
=
0
;
int
c
,
fVerbose
=
0
;
int
nFrames
=
3
;
int
nFrames
=
3
;
int
fSwitch
=
0
;
int
fSwitch
=
0
;
...
@@ -32314,8 +32314,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -32314,8 +32314,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// extern void Ga2_ManComputeTest( Gia_Man_t * p );
// extern void Ga2_ManComputeTest( Gia_Man_t * p );
// extern void Bmc_CexTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose );
// extern void Bmc_CexTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose );
// extern void Gia_IsoTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose );
// extern void Gia_IsoTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose );
// extern void Unr_ManTest( Gia_Man_t * pGia );
// extern void Unr_ManTest( Gia_Man_t * pGia );
extern
void
Mig_ManTest
(
Gia_Man_t
*
pGia
);
// extern int Gia_ManVerify( Gia_Man_t * pGia );
// extern int Gia_ManVerify( Gia_Man_t * pGia );
// extern Gia_Man_t * Gia_ManOptimizeRing( Gia_Man_t * p );
// extern Gia_Man_t * Gia_ManOptimizeRing( Gia_Man_t * p );
// extern void Gia_ManCollectSeqTest( Gia_Man_t * p );
// extern void Gia_ManCollectSeqTest( Gia_Man_t * p );
...
@@ -32323,6 +32322,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -32323,6 +32322,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// extern Gia_Man_t * Bmc_CexDepthTest( Gia_Man_t * p, Abc_Cex_t * pCex, int nFrames, int fVerbose );
// extern Gia_Man_t * Bmc_CexDepthTest( Gia_Man_t * p, Abc_Cex_t * pCex, int nFrames, int fVerbose );
// extern Gia_Man_t * Bmc_CexTarget( Gia_Man_t * p, int nFrames );
// extern Gia_Man_t * Bmc_CexTarget( Gia_Man_t * p, int nFrames );
// extern void Gia_ManMuxProfiling( Gia_Man_t * p );
// extern void Gia_ManMuxProfiling( Gia_Man_t * p );
extern
Gia_Man_t
*
Mig_ManTest
(
Gia_Man_t
*
pGia
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Fsvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Fsvh"
)
)
!=
EOF
)
...
@@ -32383,7 +32383,6 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -32383,7 +32383,6 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Bmc_CexTest( pAbc->pGia, pAbc->pCex, fVerbose );
// Bmc_CexTest( pAbc->pGia, pAbc->pCex, fVerbose );
// Gia_IsoTest( pAbc->pGia, pAbc->pCex, 0 );
// Gia_IsoTest( pAbc->pGia, pAbc->pCex, 0 );
// Unr_ManTest( pAbc->pGia );
// Unr_ManTest( pAbc->pGia );
Mig_ManTest
(
pAbc
->
pGia
);
// Gia_ManVerifyWithBoxes( pAbc->pGia );
// Gia_ManVerifyWithBoxes( pAbc->pGia );
// Gia_ManCollectSeqTest( pAbc->pGia );
// Gia_ManCollectSeqTest( pAbc->pGia );
// pTemp = Gia_ManOptimizeRing( pAbc->pGia );
// pTemp = Gia_ManOptimizeRing( pAbc->pGia );
...
@@ -32393,6 +32392,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -32393,6 +32392,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// pTemp = Bmc_CexTarget( pAbc->pGia, nFrames );
// pTemp = Bmc_CexTarget( pAbc->pGia, nFrames );
// Abc_FrameUpdateGia( pAbc, pTemp );
// Abc_FrameUpdateGia( pAbc, pTemp );
// Gia_ManMuxProfiling( pAbc->pGia );
// Gia_ManMuxProfiling( pAbc->pGia );
pTemp
=
Mig_ManTest
(
pAbc
->
pGia
);
Abc_FrameUpdateGia
(
pAbc
,
pTemp
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &test [-F num] [-svh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &test [-F num] [-svh]
\n
"
);
src/misc/mem/mem2.h
View file @
4e247281
...
@@ -93,8 +93,8 @@ static inline void Mmr_FlexStop( Mmr_Flex_t * p )
...
@@ -93,8 +93,8 @@ static inline void Mmr_FlexStop( Mmr_Flex_t * p )
{
{
word
*
pPage
;
word
*
pPage
;
int
i
;
int
i
;
if
(
1
&&
Vec_PtrSize
(
&
p
->
vPages
)
)
if
(
0
&&
Vec_PtrSize
(
&
p
->
vPages
)
)
printf
(
"Using %3d pages of %6d words each with %6d entries (max = %6d). Total memory %5.2f MB.
\n
"
,
printf
(
"Using %3d pages of %6d words each with %6d entries (max = %6d). Total memory
=
%5.2f MB.
\n
"
,
Vec_PtrSize
(
&
p
->
vPages
),
p
->
nPageBase
?
1
<<
p
->
nPageBase
:
0
,
p
->
nEntries
,
p
->
nEntriesMax
,
Vec_PtrSize
(
&
p
->
vPages
),
p
->
nPageBase
?
1
<<
p
->
nPageBase
:
0
,
p
->
nEntries
,
p
->
nEntriesMax
,
1
.
0
*
Vec_PtrSize
(
&
p
->
vPages
)
*
(
1
<<
p
->
nPageBase
)
*
8
/
(
1
<<
20
)
);
1
.
0
*
Vec_PtrSize
(
&
p
->
vPages
)
*
(
1
<<
p
->
nPageBase
)
*
8
/
(
1
<<
20
)
);
Vec_PtrForEachEntry
(
word
*
,
&
p
->
vPages
,
pPage
,
i
)
Vec_PtrForEachEntry
(
word
*
,
&
p
->
vPages
,
pPage
,
i
)
...
@@ -162,8 +162,8 @@ static inline void Mmr_FixedStop( Mmr_Fixed_t * p, int fFreeLast )
...
@@ -162,8 +162,8 @@ static inline void Mmr_FixedStop( Mmr_Fixed_t * p, int fFreeLast )
{
{
word
*
pPage
;
word
*
pPage
;
int
i
;
int
i
;
if
(
1
&&
Vec_PtrSize
(
&
p
->
vPages
)
)
if
(
0
&&
Vec_PtrSize
(
&
p
->
vPages
)
)
printf
(
"Using %3d pages of %6d words each with %6d entries (max = %6d) of size %d. Total memory %5.2f MB.
\n
"
,
printf
(
"Using %3d pages of %6d words each with %6d entries (max = %6d) of size %d. Total memory
=
%5.2f MB.
\n
"
,
Vec_PtrSize
(
&
p
->
vPages
),
p
->
nPageBase
?
1
<<
p
->
nPageBase
:
0
,
p
->
nEntries
,
p
->
nEntriesMax
,
p
->
nEntryWords
,
Vec_PtrSize
(
&
p
->
vPages
),
p
->
nPageBase
?
1
<<
p
->
nPageBase
:
0
,
p
->
nEntries
,
p
->
nEntriesMax
,
p
->
nEntryWords
,
1
.
0
*
Vec_PtrSize
(
&
p
->
vPages
)
*
(
1
<<
p
->
nPageBase
)
*
8
/
(
1
<<
20
)
);
1
.
0
*
Vec_PtrSize
(
&
p
->
vPages
)
*
(
1
<<
p
->
nPageBase
)
*
8
/
(
1
<<
20
)
);
Vec_PtrForEachEntry
(
word
*
,
&
p
->
vPages
,
pPage
,
i
)
Vec_PtrForEachEntry
(
word
*
,
&
p
->
vPages
,
pPage
,
i
)
...
@@ -198,6 +198,10 @@ static inline void Mmr_FixedRecycle( Mmr_Fixed_t * p, int h )
...
@@ -198,6 +198,10 @@ static inline void Mmr_FixedRecycle( Mmr_Fixed_t * p, int h )
memset
(
Mmr_FixedEntry
(
p
,
h
),
0xFF
,
sizeof
(
word
)
*
p
->
nEntryWords
);
memset
(
Mmr_FixedEntry
(
p
,
h
),
0xFF
,
sizeof
(
word
)
*
p
->
nEntryWords
);
Vec_IntPush
(
&
p
->
vFrees
,
h
);
Vec_IntPush
(
&
p
->
vFrees
,
h
);
}
}
static
inline
int
Mmr_FixedMemory
(
Mmr_Fixed_t
*
p
)
{
return
Vec_PtrSize
(
&
p
->
vPages
)
*
(
p
->
PageMask
+
1
);
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -247,6 +251,13 @@ static inline void Mmr_StepRecycle( Mmr_Step_t * p, int h )
...
@@ -247,6 +251,13 @@ static inline void Mmr_StepRecycle( Mmr_Step_t * p, int h )
p
->
nEntries
--
;
p
->
nEntries
--
;
Mmr_FixedRecycle
(
p
->
pMems
+
(
h
&
p
->
uMask
),
(
h
>>
p
->
nBits
)
);
Mmr_FixedRecycle
(
p
->
pMems
+
(
h
&
p
->
uMask
),
(
h
>>
p
->
nBits
)
);
}
}
static
inline
int
Mmr_StepMemory
(
Mmr_Step_t
*
p
)
{
int
i
,
Mem
=
0
;
for
(
i
=
1
;
i
<=
p
->
uMask
;
i
++
)
Mem
+=
Mmr_FixedMemory
(
p
->
pMems
+
i
);
return
Mem
;
}
ABC_NAMESPACE_HEADER_END
ABC_NAMESPACE_HEADER_END
...
...
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