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
116c35a0
Commit
116c35a0
authored
Apr 10, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving K-map printout.
parent
17c382c3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
src/misc/extra/extraBddKmap.c
+30
-0
No files found.
src/misc/extra/extraBddKmap.c
View file @
116c35a0
...
...
@@ -22,6 +22,10 @@
#include "extraBdd.h"
#ifdef WIN32
#include <windows.h>
#endif
ABC_NAMESPACE_IMPL_START
...
...
@@ -119,7 +123,11 @@ ABC_NAMESPACE_IMPL_START
#define UNDERSCORE (char)95
//#define SYMBOL_ZERO (char)248 // degree sign
//#define SYMBOL_ZERO (char)'o'
#ifdef WIN32
#define SYMBOL_ZERO (char)'0'
#else
#define SYMBOL_ZERO (char)' '
#endif
#define SYMBOL_ONE (char)'1'
#define SYMBOL_DC (char)'-'
#define SYMBOL_OVERLAP (char)'?'
...
...
@@ -418,6 +426,26 @@ void Extra_PrintKMap(
ValueOffSet
=
Cudd_Cofactor
(
dd
,
OffSet
,
Prod
);
Cudd_Ref
(
ValueOffSet
);
Cudd_RecursiveDeref
(
dd
,
Prod
);
#ifdef WIN32
{
HANDLE
hConsole
=
GetStdHandle
(
STD_OUTPUT_HANDLE
);
char
Symb
=
0
,
Color
=
0
;
if
(
ValueOnSet
==
b1
&&
ValueOffSet
==
b0
)
Symb
=
SYMBOL_ONE
,
Color
=
14
;
// yellow
else
if
(
ValueOnSet
==
b0
&&
ValueOffSet
==
b1
)
Symb
=
SYMBOL_ZERO
,
Color
=
11
;
// blue
else
if
(
ValueOnSet
==
b0
&&
ValueOffSet
==
b0
)
Symb
=
SYMBOL_DC
,
Color
=
10
;
// green
else
if
(
ValueOnSet
==
b1
&&
ValueOffSet
==
b1
)
Symb
=
SYMBOL_OVERLAP
,
Color
=
12
;
// red
else
assert
(
0
);
SetConsoleTextAttribute
(
hConsole
,
Color
);
fprintf
(
Output
,
"%c"
,
Symb
);
SetConsoleTextAttribute
(
hConsole
,
7
);
}
#else
{
if
(
ValueOnSet
==
b1
&&
ValueOffSet
==
b0
)
fprintf
(
Output
,
"%c"
,
SYMBOL_ONE
);
else
if
(
ValueOnSet
==
b0
&&
ValueOffSet
==
b1
)
...
...
@@ -428,6 +456,8 @@ void Extra_PrintKMap(
fprintf
(
Output
,
"%c"
,
SYMBOL_OVERLAP
);
else
assert
(
0
);
}
#endif
Cudd_RecursiveDeref
(
dd
,
ValueOnSet
);
Cudd_RecursiveDeref
(
dd
,
ValueOffSet
);
...
...
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