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
64bdbe1a
Commit
64bdbe1a
authored
Nov 22, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding switch '-c' to generate only stuck-at faults in 'faultclasses -g'.
parent
b483c97f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
src/base/abci/abc.c
+9
-5
src/base/abci/abcDetect.c
+5
-3
No files found.
src/base/abci/abc.c
View file @
64bdbe1a
...
...
@@ -7241,18 +7241,21 @@ usage:
int
Abc_CommandFaultClasses
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Abc_NtkDetectClassesTest
(
Abc_Ntk_t
*
pNtk
,
int
fSeq
,
int
fVerbose
,
int
fVeryVerbose
);
extern
void
Abc_NtkGenFaultList
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
);
extern
void
Abc_NtkGenFaultList
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
,
int
fStuckAt
);
Abc_Ntk_t
*
pNtk
;
int
c
,
fGen
=
0
,
fSeq
=
0
,
fVerbose
=
0
,
fVeryVerbose
=
0
;
int
c
,
fGen
=
0
,
fS
tuckAt
=
0
,
fS
eq
=
0
,
fVerbose
=
0
,
fVeryVerbose
=
0
;
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"gsvwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"g
c
svwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'g'
:
fGen
^=
1
;
break
;
case
'c'
:
fStuckAt
^=
1
;
break
;
case
's'
:
fSeq
^=
1
;
break
;
...
...
@@ -7281,18 +7284,19 @@ int Abc_CommandFaultClasses( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
fGen
)
{
char
*
pFileName
=
Extra_FileNameGenericAppend
(
Abc_NtkSpec
(
pNtk
),
"_faults.txt"
);
Abc_NtkGenFaultList
(
pNtk
,
pFileName
);
Abc_NtkGenFaultList
(
pNtk
,
pFileName
,
fStuckAt
);
}
else
Abc_NtkDetectClassesTest
(
pNtk
,
fSeq
,
fVerbose
,
fVeryVerbose
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: faultclasses [-gsvwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: faultclasses [-g
c
svwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
computes equivalence classes of faults in the given mapped netlist;
\n
"
);
Abc_Print
(
-
2
,
"
\t
the fault list with faults in the format: <fault_id> <node_name> <fault_name>
\n
"
);
Abc_Print
(
-
2
,
"
\t
should be read by command
\"
read_fins
\"
before calling this command
\n
"
);
Abc_Print
(
-
2
,
"
\t
-g : toggle generating a fault list for the current mapped network [default = %s]
\n
"
,
fGen
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle using only stuck-at faults in the generated fault list [default = %s]
\n
"
,
fStuckAt
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle detecting sequential equivalence classes [default = %s]
\n
"
,
fSeq
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose printout during computation [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggle printing of resulting fault equivalence classes [default = %s]
\n
"
,
fVeryVerbose
?
"yes"
:
"no"
);
src/base/abci/abcDetect.c
View file @
64bdbe1a
...
...
@@ -63,7 +63,7 @@ typedef enum {
SeeAlso []
***********************************************************************/
void
Abc_NtkGenFaultList
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
)
void
Abc_NtkGenFaultList
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
,
int
fStuckAt
)
{
Mio_Library_t
*
pLib
=
(
Mio_Library_t
*
)
pNtk
->
pManFunc
;
Mio_Gate_t
*
pGate
;
...
...
@@ -84,14 +84,16 @@ void Abc_NtkGenFaultList( Abc_Ntk_t * pNtk, char * pFileName )
fprintf
(
pFile
,
"%d %s %s
\n
"
,
Count
,
Abc_ObjName
(
pObj
),
"SA0"
),
Count
++
;
fprintf
(
pFile
,
"%d %s %s
\n
"
,
Count
,
Abc_ObjName
(
pObj
),
"SA1"
),
Count
++
;
fprintf
(
pFile
,
"%d %s %s
\n
"
,
Count
,
Abc_ObjName
(
pObj
),
"NEG"
),
Count
++
;
if
(
fStuckAt
)
continue
;
// add other faults, which correspond to changing the given gate
// by another gate with the same support-size from the same library
Mio_LibraryForEachGate
(
pLib
,
pGate
)
if
(
pGate
!=
pGateObj
&&
Mio_GateReadPinNum
(
pGate
)
==
nInputs
)
fprintf
(
pFile
,
"%d %s %s
\n
"
,
Count
,
Abc_ObjName
(
pObj
),
Mio_GateReadName
(
pGate
)
),
Count
++
;
}
printf
(
"Generated fault list
\"
%s
\"
for network
\"
%s
\"
with %d nodes and %d faults.
\n
"
,
pFileName
,
Abc_NtkName
(
pNtk
),
Abc_NtkNodeNum
(
pNtk
),
Count
-
1
);
printf
(
"Generated fault list
\"
%s
\"
for network
\"
%s
\"
with %d nodes and %d
%s
faults.
\n
"
,
pFileName
,
Abc_NtkName
(
pNtk
),
Abc_NtkNodeNum
(
pNtk
),
Count
-
1
,
fStuckAt
?
"stuck-at "
:
""
);
fclose
(
pFile
);
}
...
...
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