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
21dfaede
Commit
21dfaede
authored
Aug 20, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with SPFD-based decomposition + new K-map print-out.
parent
b71b5bbc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
1 deletions
+118
-1
src/aig/bdc/bdcSpfd.c
+0
-0
src/base/abc/abc.h
+1
-0
src/base/abci/abc.c
+5
-1
src/base/abci/abcPrint.c
+112
-0
No files found.
src/aig/bdc/bdcSpfd.c
View file @
21dfaede
This diff is collapsed.
Click to expand it.
src/base/abc/abc.h
View file @
21dfaede
...
@@ -766,6 +766,7 @@ extern ABC_DLL void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * p
...
@@ -766,6 +766,7 @@ extern ABC_DLL void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * p
extern
ABC_DLL
void
Abc_NodePrintLevel
(
FILE
*
pFile
,
Abc_Obj_t
*
pNode
);
extern
ABC_DLL
void
Abc_NodePrintLevel
(
FILE
*
pFile
,
Abc_Obj_t
*
pNode
);
extern
ABC_DLL
void
Abc_NtkPrintSkews
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
,
int
fPrintAll
);
extern
ABC_DLL
void
Abc_NtkPrintSkews
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
,
int
fPrintAll
);
extern
ABC_DLL
void
Abc_ObjPrint
(
FILE
*
pFile
,
Abc_Obj_t
*
pObj
);
extern
ABC_DLL
void
Abc_ObjPrint
(
FILE
*
pFile
,
Abc_Obj_t
*
pObj
);
extern
ABC_DLL
void
Abc_NtkShow6VarFunc
(
char
*
pF0
,
char
*
pF1
);
/*=== abcProve.c ==========================================================*/
/*=== abcProve.c ==========================================================*/
extern
ABC_DLL
int
Abc_NtkMiterProve
(
Abc_Ntk_t
**
ppNtk
,
void
*
pParams
);
extern
ABC_DLL
int
Abc_NtkMiterProve
(
Abc_Ntk_t
**
ppNtk
,
void
*
pParams
);
extern
ABC_DLL
int
Abc_NtkIvyProve
(
Abc_Ntk_t
**
ppNtk
,
void
*
pPars
);
extern
ABC_DLL
int
Abc_NtkIvyProve
(
Abc_Ntk_t
**
ppNtk
,
void
*
pPars
);
...
...
src/base/abci/abc.c
View file @
21dfaede
...
@@ -1878,13 +1878,17 @@ int Abc_CommandPrintKMap( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -1878,13 +1878,17 @@ int Abc_CommandPrintKMap( Abc_Frame_t * pAbc, int argc, char ** argv )
goto
usage
;
goto
usage
;
}
}
}
}
if
(
argc
==
globalUtilOptind
+
2
)
{
Abc_NtkShow6VarFunc
(
argv
[
globalUtilOptind
],
argv
[
globalUtilOptind
+
1
]
);
return
0
;
}
if
(
pNtk
==
NULL
)
if
(
pNtk
==
NULL
)
{
{
Abc_Print
(
-
1
,
"Empty network.
\n
"
);
Abc_Print
(
-
1
,
"Empty network.
\n
"
);
return
1
;
return
1
;
}
}
if
(
!
Abc_NtkIsLogic
(
pNtk
)
)
if
(
!
Abc_NtkIsLogic
(
pNtk
)
)
{
{
Abc_Print
(
-
1
,
"Visualization of Karnaugh maps works for logic networks.
\n
"
);
Abc_Print
(
-
1
,
"Visualization of Karnaugh maps works for logic networks.
\n
"
);
...
...
src/base/abci/abcPrint.c
View file @
21dfaede
...
@@ -1384,6 +1384,118 @@ float Abc_NtkMfsTotalGlitching( Abc_Ntk_t * pNtk )
...
@@ -1384,6 +1384,118 @@ float Abc_NtkMfsTotalGlitching( Abc_Ntk_t * pNtk )
return
nSwitches
?
100
.
0
*
(
nGlitches
-
nSwitches
)
/
nSwitches
:
0
.
0
;
return
nSwitches
?
100
.
0
*
(
nGlitches
-
nSwitches
)
/
nSwitches
:
0
.
0
;
}
}
/**Function*************************************************************
Synopsis [Prints K-map of 6-var function represented by truth table.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_Show6VarFunc
(
word
F0
,
word
F1
)
{
// order of cells in the Karnaugh map
// int Cells[8] = { 0, 1, 3, 2, 6, 7, 5, 4 };
int
Cells
[
8
]
=
{
0
,
4
,
6
,
2
,
3
,
7
,
5
,
1
};
// intermediate variables
int
s
;
// symbol counter
int
h
;
// horizontal coordinate;
int
v
;
// vertical coordinate;
assert
(
(
F0
&
F1
)
==
0
);
// output minterms above
for
(
s
=
0
;
s
<
4
;
s
++
)
printf
(
" "
);
printf
(
" "
);
for
(
h
=
0
;
h
<
8
;
h
++
)
{
for
(
s
=
0
;
s
<
3
;
s
++
)
printf
(
"%d"
,
((
Cells
[
h
]
>>
(
2
-
s
))
&
1
)
);
printf
(
" "
);
}
printf
(
"
\n
"
);
// output horizontal line above
for
(
s
=
0
;
s
<
4
;
s
++
)
printf
(
" "
);
printf
(
"+"
);
for
(
h
=
0
;
h
<
8
;
h
++
)
{
for
(
s
=
0
;
s
<
3
;
s
++
)
printf
(
"-"
);
printf
(
"+"
);
}
printf
(
"
\n
"
);
// output lines with function values
for
(
v
=
0
;
v
<
8
;
v
++
)
{
for
(
s
=
0
;
s
<
3
;
s
++
)
printf
(
"%d"
,
((
Cells
[
v
]
>>
(
2
-
s
))
&
1
)
);
printf
(
" |"
);
for
(
h
=
0
;
h
<
8
;
h
++
)
{
printf
(
" "
);
if
(
((
F0
>>
((
Cells
[
v
]
*
8
)
+
Cells
[
h
]))
&
1
)
)
printf
(
"0"
);
else
if
(
((
F1
>>
((
Cells
[
v
]
*
8
)
+
Cells
[
h
]))
&
1
)
)
printf
(
"1"
);
else
printf
(
" "
);
printf
(
" |"
);
}
printf
(
"
\n
"
);
// output horizontal line above
for
(
s
=
0
;
s
<
4
;
s
++
)
printf
(
" "
);
// printf( "%c", v == 7 ? '+' : '|' );
printf
(
"+"
);
for
(
h
=
0
;
h
<
8
;
h
++
)
{
for
(
s
=
0
;
s
<
3
;
s
++
)
printf
(
"-"
);
// printf( "%c", v == 7 ? '+' : '|' );
printf
(
"%c"
,
(
v
==
7
||
h
==
7
)
?
'+'
:
'|'
);
}
printf
(
"
\n
"
);
}
}
/**Function*************************************************************
Synopsis [Prints K-map of 6-var function represented by truth table.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_NtkShow6VarFunc
(
char
*
pF0
,
char
*
pF1
)
{
word
F0
,
F1
;
if
(
strlen
(
pF0
)
!=
16
)
{
printf
(
"Wrong length (%d) of 6-var truth table (%s).
\n
"
,
strlen
(
pF0
),
pF0
);
return
;
}
if
(
strlen
(
pF1
)
!=
16
)
{
printf
(
"Wrong length (%d) of 6-var truth table (%s).
\n
"
,
strlen
(
pF1
),
pF1
);
return
;
}
Extra_ReadHexadecimal
(
(
unsigned
*
)
&
F0
,
pF0
,
6
);
Extra_ReadHexadecimal
(
(
unsigned
*
)
&
F1
,
pF1
,
6
);
Abc_Show6VarFunc
(
F0
,
F1
);
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
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