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
ed1a925c
Commit
ed1a925c
authored
May 23, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding symbolic fault representation in &fftest.
parent
fee0da23
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
7 deletions
+46
-7
src/base/abci/abc.c
+46
-7
src/sat/bmc/bmcFault.c
+0
-0
No files found.
src/base/abci/abc.c
View file @
ed1a925c
...
...
@@ -33250,12 +33250,14 @@ usage:
int
Abc_CommandAbc9FFTest
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Gia_ParFfSetDefault
(
Bmc_ParFf_t
*
p
);
extern
void
Gia_ManFaultTest
(
Gia_Man_t
*
p
,
Bmc_ParFf_t
*
pPars
);
extern
void
Gia_ManFaultTest
(
Gia_Man_t
*
p
,
Gia_Man_t
*
pG
,
Bmc_ParFf_t
*
pPars
);
Bmc_ParFf_t
Pars
,
*
pPars
=
&
Pars
;
char
*
pFileName
=
NULL
;
Gia_Man_t
*
pGold
=
NULL
;
int
c
;
Gia_ParFfSetDefault
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"ATS
c
sbduvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"ATS
G
sbduvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -33290,8 +33292,14 @@ int Abc_CommandAbc9FFTest( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars
->
pFormStr
=
argv
[
globalUtilOptind
];
globalUtilOptind
++
;
break
;
case
'c'
:
pPars
->
fComplVars
^=
1
;
case
'G'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-G
\"
should be followed by string.
\n
"
);
goto
usage
;
}
pFileName
=
argv
[
globalUtilOptind
];
globalUtilOptind
++
;
break
;
case
's'
:
pPars
->
fStartPats
^=
1
;
...
...
@@ -33348,11 +33356,42 @@ int Abc_CommandAbc9FFTest( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Abc_CommandAbc9FFTest(): For delay testing, AIG should be sequential.
\n
"
);
return
0
;
}
Gia_ManFaultTest
(
pAbc
->
pGia
,
pPars
);
// check if the file is valid
if
(
pFileName
)
{
FILE
*
pFile
=
fopen
(
pFileName
,
"r"
);
if
(
pFile
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9FFTest(): File name
\"
%s
\"
with golden model is invalid.
\n
"
,
pFileName
);
return
0
;
}
fclose
(
pFile
);
pGold
=
Gia_AigerRead
(
pFileName
,
0
,
0
);
if
(
pGold
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9FFTest(): Cannot read file
\"
%s
\"
with golden model.
\n
"
,
pFileName
);
return
0
;
}
if
(
Gia_ManPiNum
(
pAbc
->
pGia
)
!=
Gia_ManPiNum
(
pGold
)
)
{
Gia_ManStop
(
pGold
);
Abc_Print
(
-
1
,
"Abc_CommandAbc9FFTest(): Old model and gold model have different number of PIs.
\n
"
);
return
0
;
}
if
(
Gia_ManPoNum
(
pAbc
->
pGia
)
!=
Gia_ManPoNum
(
pGold
)
)
{
Gia_ManStop
(
pGold
);
Abc_Print
(
-
1
,
"Abc_CommandAbc9FFTest(): Old model and gold model have different number of POs.
\n
"
);
return
0
;
}
printf
(
"Entered spec AIG from file
\"
%s
\"
.
\n
"
,
pFileName
);
}
Gia_ManFaultTest
(
pAbc
->
pGia
,
pGold
?
pGold
:
pAbc
->
pGia
,
pPars
);
Gia_ManStopP
(
&
pGold
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &fftest [-AT num] [-
csbduvh] <file>
[-S str]
\n
"
);
Abc_Print
(
-
2
,
"usage: &fftest [-AT num] [-
sbduvh] <file> [-G file]
[-S str]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs functional fault test generation
\n
"
);
Abc_Print
(
-
2
,
"
\t
-A num : selects fault model for all gates [default = %d]
\n
"
,
pPars
->
Algo
);
Abc_Print
(
-
2
,
"
\t
0: fault model is not selected (use -S str)
\n
"
);
...
...
@@ -33361,7 +33400,6 @@ usage:
Abc_Print
(
-
2
,
"
\t
3: complement fault: -S ((a&b)^p)
\n
"
);
Abc_Print
(
-
2
,
"
\t
4: functionally observable fault
\n
"
);
Abc_Print
(
-
2
,
"
\t
-T num : specifies approximate runtime limit in seconds [default = %d]
\n
"
,
pPars
->
nTimeOut
);
Abc_Print
(
-
2
,
"
\t
-c : toggles complementing control variables [default = %s]
\n
"
,
pPars
->
fComplVars
?
"active-high"
:
"active-low"
);
Abc_Print
(
-
2
,
"
\t
-s : toggles starting with the all-0 and all-1 patterns [default = %s]
\n
"
,
pPars
->
fStartPats
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggles testing for single faults only [default = %s]
\n
"
,
pPars
->
fBasic
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggles dumping test patterns into file
\"
tests.txt
\"
[default = %s]
\n
"
,
pPars
->
fDump
?
"yes"
:
"no"
);
...
...
@@ -33369,6 +33407,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-v : toggles printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
<file> : (optional) file name with input test patterns
\n\n
"
);
Abc_Print
(
-
2
,
"
\t
-G file : (optional) file name with the golden model
\n\n
"
);
Abc_Print
(
-
2
,
"
\t
-S str : (optional) string representing the fault model
\n
"
);
Abc_Print
(
-
2
,
"
\t
The following notations are used:
\n
"
);
Abc_Print
(
-
2
,
"
\t
Functional variables: {a,b} (both a and b are always present)
\n
"
);
src/sat/bmc/bmcFault.c
View file @
ed1a925c
This diff is collapsed.
Click to expand it.
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