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
c6afb9db
Commit
c6afb9db
authored
Nov 09, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Equivalent fault detection code.
parent
6cd66183
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
5 deletions
+25
-5
src/base/abci/abc.c
+20
-5
src/base/abci/abcDetect.c
+0
-0
src/map/mio/mio.h
+1
-0
src/map/mio/mioApi.c
+1
-0
src/map/mio/mioRead.c
+3
-0
No files found.
src/base/abci/abc.c
View file @
c6afb9db
...
@@ -7237,21 +7237,28 @@ usage:
...
@@ -7237,21 +7237,28 @@ usage:
***********************************************************************/
***********************************************************************/
int
Abc_CommandDetect
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandDetect
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
void
Abc_NtkDetectClassesTest
(
Abc_Ntk_t
*
pNtk
,
int
fSeq
,
int
fVerbose
);
extern
void
Abc_NtkDetectClassesTest
(
Abc_Ntk_t
*
pNtk
,
int
fSeq
,
int
fVerbose
,
int
fVeryVerbose
);
extern
void
Abc_NtkGenFaultList
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
);
Abc_Ntk_t
*
pNtk
;
Abc_Ntk_t
*
pNtk
;
int
c
,
f
Seq
=
0
,
f
Verbose
=
0
;
int
c
,
f
Gen
=
0
,
fSeq
=
0
,
fVerbose
=
0
,
fVery
Verbose
=
0
;
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
sv
h"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
gsvw
h"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
case
'g'
:
fGen
^=
1
;
break
;
case
's'
:
case
's'
:
fSeq
^=
1
;
fSeq
^=
1
;
break
;
break
;
case
'v'
:
case
'v'
:
fVerbose
^=
1
;
fVerbose
^=
1
;
break
;
break
;
case
'w'
:
fVeryVerbose
^=
1
;
break
;
case
'h'
:
case
'h'
:
goto
usage
;
goto
usage
;
default:
default:
...
@@ -7268,14 +7275,22 @@ int Abc_CommandDetect( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -7268,14 +7275,22 @@ int Abc_CommandDetect( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Only applicable to a logic network.
\n
"
);
Abc_Print
(
-
1
,
"Only applicable to a logic network.
\n
"
);
return
1
;
return
1
;
}
}
Abc_NtkDetectClassesTest
(
pNtk
,
fSeq
,
fVerbose
);
if
(
fGen
)
{
char
*
pFileName
=
Extra_FileNameGenericAppend
(
Abc_NtkSpec
(
pNtk
),
"_faults.txt"
);
Abc_NtkGenFaultList
(
pNtk
,
pFileName
);
}
else
Abc_NtkDetectClassesTest
(
pNtk
,
fSeq
,
fVerbose
,
fVeryVerbose
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: detect [-
sv
h]
\n
"
);
Abc_Print
(
-
2
,
"usage: detect [-
gsvw
h]
\n
"
);
Abc_Print
(
-
2
,
"
\t
detects properties of internal nodes
\n
"
);
Abc_Print
(
-
2
,
"
\t
detects properties of internal nodes
\n
"
);
Abc_Print
(
-
2
,
"
\t
-g : toggle generating fault list for the given network [default = %s]
\n
"
,
fGen
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle using sequential circuit information [default = %s]
\n
"
,
fSeq
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle using sequential circuit information [default = %s]
\n
"
,
fSeq
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose printout [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose printout [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggle printing equivalence classes [default = %s]
\n
"
,
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
}
}
src/base/abci/abcDetect.c
View file @
c6afb9db
This diff is collapsed.
Click to expand it.
src/map/mio/mio.h
View file @
c6afb9db
...
@@ -112,6 +112,7 @@ extern char * Mio_LibraryReadName ( Mio_Library_t * pLib );
...
@@ -112,6 +112,7 @@ extern char * Mio_LibraryReadName ( Mio_Library_t * pLib );
extern
int
Mio_LibraryReadGateNum
(
Mio_Library_t
*
pLib
);
extern
int
Mio_LibraryReadGateNum
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
*
Mio_LibraryReadGates
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
*
Mio_LibraryReadGates
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
**
Mio_LibraryReadGateArray
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
**
Mio_LibraryReadGateArray
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
*
Mio_LibraryReadGateById
(
Mio_Library_t
*
pLib
,
int
iD
);
extern
Mio_Gate_t
*
Mio_LibraryReadGateByName
(
Mio_Library_t
*
pLib
,
char
*
pName
,
char
*
pOutName
);
extern
Mio_Gate_t
*
Mio_LibraryReadGateByName
(
Mio_Library_t
*
pLib
,
char
*
pName
,
char
*
pOutName
);
extern
char
*
Mio_LibraryReadSopByName
(
Mio_Library_t
*
pLib
,
char
*
pName
);
extern
char
*
Mio_LibraryReadSopByName
(
Mio_Library_t
*
pLib
,
char
*
pName
);
extern
Mio_Gate_t
*
Mio_LibraryReadGateByTruth
(
Mio_Library_t
*
pLib
,
word
t
);
extern
Mio_Gate_t
*
Mio_LibraryReadGateByTruth
(
Mio_Library_t
*
pLib
,
word
t
);
...
...
src/map/mio/mioApi.c
View file @
c6afb9db
...
@@ -44,6 +44,7 @@ char * Mio_LibraryReadName ( Mio_Library_t * pLib ) { retur
...
@@ -44,6 +44,7 @@ char * Mio_LibraryReadName ( Mio_Library_t * pLib ) { retur
int
Mio_LibraryReadGateNum
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
nGates
;
}
int
Mio_LibraryReadGateNum
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
nGates
;
}
Mio_Gate_t
*
Mio_LibraryReadGates
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGates
;
}
Mio_Gate_t
*
Mio_LibraryReadGates
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGates
;
}
Mio_Gate_t
**
Mio_LibraryReadGateArray
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
ppGatesName
;}
Mio_Gate_t
**
Mio_LibraryReadGateArray
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
ppGatesName
;}
Mio_Gate_t
*
Mio_LibraryReadGateById
(
Mio_Library_t
*
pLib
,
int
Id
)
{
assert
(
pLib
->
ppGates0
[
Id
]
->
Cell
==
Id
);
return
pLib
->
ppGates0
[
Id
];}
Mio_Gate_t
*
Mio_LibraryReadBuf
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGateBuf
;
}
Mio_Gate_t
*
Mio_LibraryReadBuf
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGateBuf
;
}
Mio_Gate_t
*
Mio_LibraryReadInv
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGateInv
;
}
Mio_Gate_t
*
Mio_LibraryReadInv
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGateInv
;
}
Mio_Gate_t
*
Mio_LibraryReadConst0
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGate0
;
}
Mio_Gate_t
*
Mio_LibraryReadConst0
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGate0
;
}
...
...
src/map/mio/mioRead.c
View file @
c6afb9db
...
@@ -586,7 +586,10 @@ void Mio_LibrarySortGates( Mio_Library_t * pLib )
...
@@ -586,7 +586,10 @@ void Mio_LibrarySortGates( Mio_Library_t * pLib )
int
i
=
0
;
int
i
=
0
;
ppGates
=
ABC_ALLOC
(
Mio_Gate_t
*
,
pLib
->
nGates
);
ppGates
=
ABC_ALLOC
(
Mio_Gate_t
*
,
pLib
->
nGates
);
Mio_LibraryForEachGate
(
pLib
,
pGate
)
Mio_LibraryForEachGate
(
pLib
,
pGate
)
{
pGate
->
Cell
=
i
;
ppGates
[
i
++
]
=
pGate
;
ppGates
[
i
++
]
=
pGate
;
}
assert
(
i
==
pLib
->
nGates
);
assert
(
i
==
pLib
->
nGates
);
// sort gates by name
// sort gates by name
pLib
->
ppGates0
=
ABC_ALLOC
(
Mio_Gate_t
*
,
pLib
->
nGates
);
pLib
->
ppGates0
=
ABC_ALLOC
(
Mio_Gate_t
*
,
pLib
->
nGates
);
...
...
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