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
6de48109
Commit
6de48109
authored
Oct 05, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for binary input file in 'testdec' and 'testnpn'.
parent
369b5f47
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
src/base/abci/abc.c
+13
-2
src/base/abci/abcDec.c
+2
-1
No files found.
src/base/abci/abc.c
View file @
6de48109
...
...
@@ -818,6 +818,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"Liveness"
,
"l3s"
,
Abc_CommandAbcLivenessToSafetyWithLTL
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&test"
,
Abc_CommandAbc9Test
,
0
);
{
extern
void
Dar_LibStart
();
Dar_LibStart
();
...
...
@@ -4802,7 +4803,12 @@ int Abc_CommandTestDec( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
argc
!=
globalUtilOptind
+
1
)
{
printf
(
"Input file is not given.
\n
"
);
goto
usage
;
return
0
;
}
if
(
nVarNum
>=
0
&&
nVarNum
<
6
)
{
printf
(
"The number of variables cannot be less than 6.
\n
"
);
return
0
;
}
// get the output file name
pFileName
=
argv
[
globalUtilOptind
];
...
...
@@ -4889,7 +4895,12 @@ int Abc_CommandTestNpn( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
argc
!=
globalUtilOptind
+
1
)
{
printf
(
"Input file is not given.
\n
"
);
goto
usage
;
return
0
;
}
if
(
nVarNum
>=
0
&&
nVarNum
<
6
)
{
printf
(
"The number of variables cannot be less than 6.
\n
"
);
return
0
;
}
// get the output file name
pFileName
=
argv
[
globalUtilOptind
];
...
...
src/base/abci/abcDec.c
View file @
6de48109
...
...
@@ -402,10 +402,11 @@ Abc_TtStore_t * Abc_TtStoreLoad( char * pFileName, int nVarNum )
{
char
*
pBuffer
;
int
nFileSize
=
Abc_FileSize
(
pFileName
);
int
nBytes
=
(
1
<<
nVarNum
);
int
nBytes
=
(
1
<<
(
nVarNum
-
3
)
);
int
nTruths
=
nFileSize
/
nBytes
;
if
(
nFileSize
==
-
1
)
return
NULL
;
assert
(
nVarNum
>=
6
);
if
(
nFileSize
%
nBytes
!=
0
)
Abc_Print
(
0
,
"The file size (%d) is divided by the truth table size (%d) with remainder (%d).
\n
"
,
nFileSize
,
nBytes
,
nFileSize
%
nBytes
);
...
...
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