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
110bac43
Commit
110bac43
authored
Feb 08, 2023
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvement in truth table printout.
parent
c899a4cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
16 deletions
+36
-16
src/misc/util/utilTruth.h
+36
-16
No files found.
src/misc/util/utilTruth.h
View file @
110bac43
...
@@ -1396,30 +1396,45 @@ static inline void Abc_TtPrintHex( word * pTruth, int nVars )
...
@@ -1396,30 +1396,45 @@ static inline void Abc_TtPrintHex( word * pTruth, int nVars )
{
{
word
*
pThis
,
*
pLimit
=
pTruth
+
Abc_TtWordNum
(
nVars
);
word
*
pThis
,
*
pLimit
=
pTruth
+
Abc_TtWordNum
(
nVars
);
int
k
;
int
k
;
assert
(
nVars
>=
2
);
if
(
nVars
<
2
)
for
(
pThis
=
pTruth
;
pThis
<
pLimit
;
pThis
++
)
printf
(
"%c"
,
Abc_TtPrintDigit
((
int
)
pTruth
[
0
]
&
15
)
);
for
(
k
=
0
;
k
<
16
;
k
++
)
else
printf
(
"%c"
,
Abc_TtPrintDigit
((
int
)(
pThis
[
0
]
>>
(
k
<<
2
))
&
15
)
);
{
assert
(
nVars
>=
2
);
for
(
pThis
=
pTruth
;
pThis
<
pLimit
;
pThis
++
)
for
(
k
=
0
;
k
<
16
;
k
++
)
printf
(
"%c"
,
Abc_TtPrintDigit
((
int
)(
pThis
[
0
]
>>
(
k
<<
2
))
&
15
)
);
}
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
static
inline
void
Abc_TtPrintHexRev
(
FILE
*
pFile
,
word
*
pTruth
,
int
nVars
)
static
inline
void
Abc_TtPrintHexRev
(
FILE
*
pFile
,
word
*
pTruth
,
int
nVars
)
{
{
word
*
pThis
;
word
*
pThis
;
int
k
,
StartK
=
nVars
>=
6
?
16
:
(
1
<<
(
nVars
-
2
));
int
k
,
StartK
=
nVars
>=
6
?
16
:
(
1
<<
(
nVars
-
2
));
assert
(
nVars
>=
2
);
if
(
nVars
<
2
)
for
(
pThis
=
pTruth
+
Abc_TtWordNum
(
nVars
)
-
1
;
pThis
>=
pTruth
;
pThis
--
)
fprintf
(
pFile
,
"%c"
,
Abc_TtPrintDigit
((
int
)
pTruth
[
0
]
&
15
)
);
for
(
k
=
StartK
-
1
;
k
>=
0
;
k
--
)
else
fprintf
(
pFile
,
"%c"
,
Abc_TtPrintDigit
((
int
)(
pThis
[
0
]
>>
(
k
<<
2
))
&
15
)
);
{
assert
(
nVars
>=
2
);
for
(
pThis
=
pTruth
+
Abc_TtWordNum
(
nVars
)
-
1
;
pThis
>=
pTruth
;
pThis
--
)
for
(
k
=
StartK
-
1
;
k
>=
0
;
k
--
)
fprintf
(
pFile
,
"%c"
,
Abc_TtPrintDigit
((
int
)(
pThis
[
0
]
>>
(
k
<<
2
))
&
15
)
);
}
// printf( "\n" );
// printf( "\n" );
}
}
static
inline
void
Abc_TtPrintHexSpecial
(
word
*
pTruth
,
int
nVars
)
static
inline
void
Abc_TtPrintHexSpecial
(
word
*
pTruth
,
int
nVars
)
{
{
word
*
pThis
;
word
*
pThis
;
int
k
;
int
k
;
assert
(
nVars
>=
2
);
if
(
nVars
<
2
)
for
(
pThis
=
pTruth
+
Abc_TtWordNum
(
nVars
)
-
1
;
pThis
>=
pTruth
;
pThis
--
)
printf
(
"%c"
,
Abc_TtPrintDigit
((
int
)
pTruth
[
0
]
&
15
)
);
for
(
k
=
0
;
k
<
16
;
k
++
)
else
printf
(
"%c"
,
Abc_TtPrintDigit
((
int
)(
pThis
[
0
]
>>
(
k
<<
2
))
&
15
)
);
{
assert
(
nVars
>=
2
);
for
(
pThis
=
pTruth
+
Abc_TtWordNum
(
nVars
)
-
1
;
pThis
>=
pTruth
;
pThis
--
)
for
(
k
=
0
;
k
<
16
;
k
++
)
printf
(
"%c"
,
Abc_TtPrintDigit
((
int
)(
pThis
[
0
]
>>
(
k
<<
2
))
&
15
)
);
}
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
static
inline
int
Abc_TtWriteHexRev
(
char
*
pStr
,
word
*
pTruth
,
int
nVars
)
static
inline
int
Abc_TtWriteHexRev
(
char
*
pStr
,
word
*
pTruth
,
int
nVars
)
...
@@ -1427,10 +1442,15 @@ static inline int Abc_TtWriteHexRev( char * pStr, word * pTruth, int nVars )
...
@@ -1427,10 +1442,15 @@ static inline int Abc_TtWriteHexRev( char * pStr, word * pTruth, int nVars )
word
*
pThis
;
word
*
pThis
;
char
*
pStrInit
=
pStr
;
char
*
pStrInit
=
pStr
;
int
k
,
StartK
=
nVars
>=
6
?
16
:
(
1
<<
(
nVars
-
2
));
int
k
,
StartK
=
nVars
>=
6
?
16
:
(
1
<<
(
nVars
-
2
));
assert
(
nVars
>=
2
);
if
(
nVars
<
2
)
for
(
pThis
=
pTruth
+
Abc_TtWordNum
(
nVars
)
-
1
;
pThis
>=
pTruth
;
pThis
--
)
*
pStr
++
=
Abc_TtPrintDigit
((
int
)
pTruth
[
0
]
&
15
);
for
(
k
=
StartK
-
1
;
k
>=
0
;
k
--
)
else
*
pStr
++
=
Abc_TtPrintDigit
(
(
int
)(
pThis
[
0
]
>>
(
k
<<
2
))
&
15
);
{
assert
(
nVars
>=
2
);
for
(
pThis
=
pTruth
+
Abc_TtWordNum
(
nVars
)
-
1
;
pThis
>=
pTruth
;
pThis
--
)
for
(
k
=
StartK
-
1
;
k
>=
0
;
k
--
)
*
pStr
++
=
Abc_TtPrintDigit
(
(
int
)(
pThis
[
0
]
>>
(
k
<<
2
))
&
15
);
}
return
pStr
-
pStrInit
;
return
pStr
-
pStrInit
;
}
}
static
inline
void
Abc_TtPrintHexArrayRev
(
FILE
*
pFile
,
word
*
pTruth
,
int
nDigits
)
static
inline
void
Abc_TtPrintHexArrayRev
(
FILE
*
pFile
,
word
*
pTruth
,
int
nDigits
)
...
...
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