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
716b8cc6
Commit
716b8cc6
authored
Mar 10, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to print-outs.
parent
397a8c47
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
2 deletions
+69
-2
src/base/abci/abc.c
+1
-0
src/map/if/ifDsd.c
+66
-0
src/opt/dau/dau.h
+1
-1
src/opt/dau/dauNonDsd.c
+1
-1
No files found.
src/base/abci/abc.c
View file @
716b8cc6
...
...
@@ -15470,6 +15470,7 @@ int Abc_CommandDsdLoad( Abc_Frame_t * pAbc, int argc, char ** argv )
return
1
;
}
fclose
(
pFile
);
Abc_FrameSetManDsd
(
NULL
);
pDsdMan
=
If_DsdManLoad
(
FileName
);
if
(
pDsdMan
==
NULL
)
return
1
;
src/map/if/ifDsd.c
View file @
716b8cc6
...
...
@@ -374,6 +374,71 @@ void If_DsdManPrintOne( FILE * pFile, If_DsdMan_t * p, int iObjId, unsigned char
fprintf
(
pFile
,
"
\n
"
);
assert
(
nSupp
==
If_DsdVecObjSuppSize
(
p
->
vObjs
,
iObjId
)
);
}
#define DSD_ARRAY_LIMIT 16
void
If_DsdManPrintDecs
(
FILE
*
pFile
,
If_DsdMan_t
*
p
)
{
Vec_Int_t
*
vDecs
;
int
i
,
k
,
nSuppSize
,
nDecMax
=
0
;
int
pDecMax
[
IF_MAX_FUNC_LUTSIZE
]
=
{
0
};
int
pCountsAll
[
IF_MAX_FUNC_LUTSIZE
]
=
{
0
};
int
pCountsSSizes
[
IF_MAX_FUNC_LUTSIZE
]
=
{
0
};
int
pCounts
[
IF_MAX_FUNC_LUTSIZE
][
DSD_ARRAY_LIMIT
+
2
]
=
{{
0
}};
word
*
pTruth
;
assert
(
Vec_MemEntryNum
(
p
->
vTtMem
)
==
Vec_PtrSize
(
p
->
vTtDecs
)
);
// find max number of decompositions
Vec_PtrForEachEntry
(
Vec_Int_t
*
,
p
->
vTtDecs
,
vDecs
,
i
)
{
pTruth
=
Vec_MemReadEntry
(
p
->
vTtMem
,
i
);
nSuppSize
=
Abc_TtSupportSize
(
pTruth
,
p
->
nVars
);
pDecMax
[
nSuppSize
]
=
Abc_MaxInt
(
pDecMax
[
nSuppSize
],
Vec_IntSize
(
vDecs
)
);
nDecMax
=
Abc_MaxInt
(
nDecMax
,
Vec_IntSize
(
vDecs
)
);
}
// fill up
Vec_PtrForEachEntry
(
Vec_Int_t
*
,
p
->
vTtDecs
,
vDecs
,
i
)
{
pTruth
=
Vec_MemReadEntry
(
p
->
vTtMem
,
i
);
nSuppSize
=
Abc_TtSupportSize
(
pTruth
,
p
->
nVars
);
pCountsAll
[
nSuppSize
]
++
;
pCountsSSizes
[
nSuppSize
]
+=
Vec_IntSize
(
vDecs
);
pCounts
[
nSuppSize
][
Abc_MinInt
(
DSD_ARRAY_LIMIT
+
1
,
Vec_IntSize
(
vDecs
))]
++
;
// pCounts[nSuppSize][Abc_MinInt(DSD_ARRAY_LIMIT+1,Vec_IntSize(vDecs)?1+(Vec_IntSize(vDecs)/10):0)]++;
/*
if ( nSuppSize == 6 && Vec_IntSize(vDecs) == pDecMax[6] )
{
fprintf( pFile, "0x" );
Abc_TtPrintHex( pTruth, nSuppSize );
Dau_DecPrintSets( vDecs, nSuppSize );
}
*/
}
// print header
fprintf
(
pFile
,
" N : "
);
fprintf
(
pFile
,
" Total "
);
for
(
k
=
0
;
k
<=
DSD_ARRAY_LIMIT
;
k
++
)
fprintf
(
pFile
,
"%6d"
,
k
);
fprintf
(
pFile
,
" "
);
fprintf
(
pFile
,
" More"
);
fprintf
(
pFile
,
" Ave"
);
fprintf
(
pFile
,
" Max"
);
fprintf
(
pFile
,
"
\n
"
);
// print rows
for
(
i
=
0
;
i
<=
p
->
nVars
;
i
++
)
{
fprintf
(
pFile
,
"%2d : "
,
i
);
fprintf
(
pFile
,
"%6d "
,
pCountsAll
[
i
]
);
for
(
k
=
0
;
k
<=
DSD_ARRAY_LIMIT
;
k
++
)
// fprintf( pFile, "%6d", pCounts[i][k] );
fprintf
(
pFile
,
"%6.1f"
,
100
.
0
*
pCounts
[
i
][
k
]
/
Abc_MaxInt
(
1
,
pCountsAll
[
i
])
);
fprintf
(
pFile
,
" "
);
// fprintf( pFile, "%6d", pCounts[i][k] );
fprintf
(
pFile
,
"%6.1f"
,
100
.
0
*
pCounts
[
i
][
k
]
/
Abc_MaxInt
(
1
,
pCountsAll
[
i
])
);
fprintf
(
pFile
,
" "
);
fprintf
(
pFile
,
"%6.1f"
,
1
.
0
*
pCountsSSizes
[
i
]
/
Abc_MaxInt
(
1
,
pCountsAll
[
i
])
);
fprintf
(
pFile
,
" "
);
fprintf
(
pFile
,
"%6d"
,
pDecMax
[
i
]
);
fprintf
(
pFile
,
"
\n
"
);
}
}
void
If_DsdManPrintOccurs
(
FILE
*
pFile
,
If_DsdMan_t
*
p
)
{
char
Buffer
[
100
];
...
...
@@ -507,6 +572,7 @@ void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int Number, int Support,
If_DsdManDumpDsd
(
p
,
Support
);
if
(
fTtDump
)
If_DsdManDumpAll
(
p
,
Support
);
// If_DsdManPrintDecs( stdout, p );
if
(
!
fVerbose
)
return
;
If_DsdVecForEachObj
(
p
->
vObjs
,
pObj
,
i
)
...
...
src/opt/dau/dau.h
View file @
716b8cc6
...
...
@@ -40,7 +40,7 @@
ABC_NAMESPACE_HEADER_START
#define DAU_MAX_VAR 12 // should be 6 or more
#define DAU_MAX_STR
1
000
#define DAU_MAX_STR
2
000
#define DAU_MAX_WORD (1<<(DAU_MAX_VAR-6))
////////////////////////////////////////////////////////////////////////
...
...
src/opt/dau/dauNonDsd.c
View file @
716b8cc6
...
...
@@ -434,7 +434,7 @@ unsigned Dau_DecReadSet( char * pStr )
void
Dau_DecPrintSets
(
Vec_Int_t
*
vSets
,
int
nVars
)
{
int
i
,
Entry
;
printf
(
"The
set contains %d entries:
\n
"
,
Vec_IntSize
(
vSets
)
);
printf
(
"The
%d-variable set family contains %d sets:
\n
"
,
nVars
,
Vec_IntSize
(
vSets
)
);
Vec_IntForEachEntry
(
vSets
,
Entry
,
i
)
Dau_DecPrintSet
(
(
unsigned
)
Entry
,
nVars
,
1
);
printf
(
"
\n
"
);
...
...
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