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
1451e455
Commit
1451e455
authored
Mar 14, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding flop-input-only switch -f in &fftest.
parent
e89fe16b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
15 deletions
+41
-15
src/base/abci/abc.c
+6
-2
src/sat/bmc/bmc.h
+1
-0
src/sat/bmc/bmcFault.c
+34
-13
No files found.
src/base/abci/abc.c
View file @
1451e455
...
@@ -36217,7 +36217,7 @@ int Abc_CommandAbc9FFTest( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -36217,7 +36217,7 @@ int Abc_CommandAbc9FFTest( Abc_Frame_t * pAbc, int argc, char ** argv )
int
c
;
int
c
;
Gia_ParFfSetDefault
(
pPars
);
Gia_ParFfSetDefault
(
pPars
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"ATNSGsbduvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"ATNSGsb
f
duvh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -36278,6 +36278,9 @@ int Abc_CommandAbc9FFTest( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -36278,6 +36278,9 @@ int Abc_CommandAbc9FFTest( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'b'
:
case
'b'
:
pPars
->
fBasic
^=
1
;
pPars
->
fBasic
^=
1
;
break
;
break
;
case
'f'
:
pPars
->
fFfOnly
^=
1
;
break
;
case
'd'
:
case
'd'
:
pPars
->
fDump
^=
1
;
pPars
->
fDump
^=
1
;
break
;
break
;
...
@@ -36362,7 +36365,7 @@ int Abc_CommandAbc9FFTest( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -36362,7 +36365,7 @@ int Abc_CommandAbc9FFTest( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &fftest [-ATN num] [-sbduvh] <file> [-G file] [-S str]
\n
"
);
Abc_Print
(
-
2
,
"usage: &fftest [-ATN num] [-sb
f
duvh] <file> [-G file] [-S str]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs functional fault test generation
\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
-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
"
);
Abc_Print
(
-
2
,
"
\t
0: fault model is not selected (use -S str)
\n
"
);
...
@@ -36374,6 +36377,7 @@ usage:
...
@@ -36374,6 +36377,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-N num : specifies iteration to check for fixed parameters [default = %d]
\n
"
,
pPars
->
nIterCheck
);
Abc_Print
(
-
2
,
"
\t
-N num : specifies iteration to check for fixed parameters [default = %d]
\n
"
,
pPars
->
nIterCheck
);
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
-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
-b : toggles testing for single faults only [default = %s]
\n
"
,
pPars
->
fBasic
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-f : toggles using flop inputs only with
\"
-A 1
\"
[default = %s]
\n
"
,
pPars
->
fFfOnly
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggles dumping test patterns into file
\"
tests.txt
\"
[default = %s]
\n
"
,
pPars
->
fDump
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggles dumping test patterns into file
\"
tests.txt
\"
[default = %s]
\n
"
,
pPars
->
fDump
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-u : toggles dumping untestable faults into
\"
untest.txt
\"
[default = %s]
\n
"
,
pPars
->
fDumpUntest
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-u : toggles dumping untestable faults into
\"
untest.txt
\"
[default = %s]
\n
"
,
pPars
->
fDumpUntest
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggles printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggles printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
src/sat/bmc/bmc.h
View file @
1451e455
...
@@ -131,6 +131,7 @@ struct Bmc_ParFf_t_
...
@@ -131,6 +131,7 @@ struct Bmc_ParFf_t_
int
nTimeOut
;
int
nTimeOut
;
int
nIterCheck
;
int
nIterCheck
;
int
fBasic
;
int
fBasic
;
int
fFfOnly
;
int
fDump
;
int
fDump
;
int
fDumpUntest
;
int
fDumpUntest
;
int
fVerbose
;
int
fVerbose
;
...
...
src/sat/bmc/bmcFault.c
View file @
1451e455
...
@@ -57,6 +57,7 @@ void Gia_ParFfSetDefault( Bmc_ParFf_t * p )
...
@@ -57,6 +57,7 @@ void Gia_ParFfSetDefault( Bmc_ParFf_t * p )
p
->
nTimeOut
=
0
;
p
->
nTimeOut
=
0
;
p
->
nIterCheck
=
0
;
p
->
nIterCheck
=
0
;
p
->
fBasic
=
0
;
p
->
fBasic
=
0
;
p
->
fFfOnly
=
0
;
p
->
fDump
=
0
;
p
->
fDump
=
0
;
p
->
fDumpUntest
=
0
;
p
->
fDumpUntest
=
0
;
p
->
fVerbose
=
0
;
p
->
fVerbose
=
0
;
...
@@ -178,7 +179,7 @@ static inline void Cnf_DataLiftGia( Cnf_Dat_t * p, Gia_Man_t * pGia, int nVarsPl
...
@@ -178,7 +179,7 @@ static inline void Cnf_DataLiftGia( Cnf_Dat_t * p, Gia_Man_t * pGia, int nVarsPl
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
Gia_Man_t
*
Gia_ManFaultUnfold
(
Gia_Man_t
*
p
,
int
fUseMuxes
)
Gia_Man_t
*
Gia_ManFaultUnfold
(
Gia_Man_t
*
p
,
int
fUseMuxes
,
int
fFfOnly
)
{
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
;
...
@@ -201,20 +202,40 @@ Gia_Man_t * Gia_ManFaultUnfold( Gia_Man_t * p, int fUseMuxes )
...
@@ -201,20 +202,40 @@ Gia_Man_t * Gia_ManFaultUnfold( Gia_Man_t * p, int fUseMuxes )
pObj
->
Value
=
Gia_ObjRoToRi
(
p
,
pObj
)
->
Value
;
pObj
->
Value
=
Gia_ObjRoToRi
(
p
,
pObj
)
->
Value
;
Gia_ManForEachPi
(
p
,
pObj
,
i
)
Gia_ManForEachPi
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
if
(
fFfOnly
)
{
{
iCtrl
=
Gia_ManAppendCi
(
pNew
);
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
iThis
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
if
(
fUseMuxes
)
Gia_ManForEachPo
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashMux
(
pNew
,
iCtrl
,
pObj
->
Value
,
iThis
);
pObj
->
Value
=
Gia_ManAppendCo
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
)
);
else
Gia_ManForEachRi
(
p
,
pObj
,
i
)
pObj
->
Value
=
iThis
;
{
iCtrl
=
Gia_ManAppendCi
(
pNew
);
iThis
=
Gia_ObjFanin0Copy
(
pObj
);
if
(
fUseMuxes
)
pObj
->
Value
=
Gia_ManHashMux
(
pNew
,
iCtrl
,
pObj
->
Value
,
iThis
);
else
pObj
->
Value
=
iThis
;
pObj
->
Value
=
Gia_ManAppendCo
(
pNew
,
pObj
->
Value
);
}
}
else
{
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
{
iCtrl
=
Gia_ManAppendCi
(
pNew
);
iThis
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
if
(
fUseMuxes
)
pObj
->
Value
=
Gia_ManHashMux
(
pNew
,
iCtrl
,
pObj
->
Value
,
iThis
);
else
pObj
->
Value
=
iThis
;
}
Gia_ManForEachCo
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCo
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
)
);
}
}
Gia_ManForEachCo
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCo
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
)
);
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
Gia_ManStop
(
pTemp
);
Gia_ManStop
(
pTemp
);
assert
(
Gia_ManPiNum
(
pNew
)
==
Gia_ManRegNum
(
p
)
+
2
*
Gia_ManPiNum
(
p
)
+
Gia_ManAndNum
(
p
)
);
assert
(
Gia_ManPiNum
(
pNew
)
==
Gia_ManRegNum
(
p
)
+
2
*
Gia_ManPiNum
(
p
)
+
(
fFfOnly
?
Gia_ManRegNum
(
p
)
:
Gia_ManAndNum
(
p
)
)
);
return
pNew
;
return
pNew
;
}
}
...
@@ -922,8 +943,8 @@ int Gia_ManFaultPrepare( Gia_Man_t * p, Gia_Man_t * pG, Bmc_ParFf_t * pPars, int
...
@@ -922,8 +943,8 @@ int Gia_ManFaultPrepare( Gia_Man_t * p, Gia_Man_t * pG, Bmc_ParFf_t * pPars, int
else
if
(
pPars
->
Algo
==
1
)
else
if
(
pPars
->
Algo
==
1
)
{
{
assert
(
Gia_ManRegNum
(
p
)
>
0
);
assert
(
Gia_ManRegNum
(
p
)
>
0
);
p0
=
Gia_ManFaultUnfold
(
pG
,
0
);
p0
=
Gia_ManFaultUnfold
(
pG
,
0
,
pPars
->
fFfOnly
);
p1
=
Gia_ManFaultUnfold
(
p
,
1
);
p1
=
Gia_ManFaultUnfold
(
p
,
1
,
pPars
->
fFfOnly
);
}
}
else
if
(
pPars
->
Algo
==
2
)
else
if
(
pPars
->
Algo
==
2
)
p1
=
Gia_ManStuckAtUnfold
(
p
,
vMap
);
p1
=
Gia_ManStuckAtUnfold
(
p
,
vMap
);
...
...
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