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
9f99f08d
Commit
9f99f08d
authored
Nov 16, 2016
by
Vinicius Callegaro
Browse files
Options
Browse Files
Download
Plain Diff
Merged alanmi/abc into default
parents
faf8d6ec
71a52ae9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
11 deletions
+33
-11
src/base/abci/abc.c
+28
-11
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 @
9f99f08d
...
...
@@ -134,7 +134,7 @@ static int Abc_CommandRr ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandCascade
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandExtract
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandVarMin
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_Command
Detect
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_Command
FaultClasses
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandExact
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandBmsStart
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandBmsStop
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
...
@@ -778,7 +778,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"cascade"
,
Abc_CommandCascade
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"extract"
,
Abc_CommandExtract
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"varmin"
,
Abc_CommandVarMin
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"
detect"
,
Abc_CommandDetect
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"
faultclasses"
,
Abc_CommandFaultClasses
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"exact"
,
Abc_CommandExact
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Exact synthesis"
,
"bms_start"
,
Abc_CommandBmsStart
,
0
);
...
...
@@ -7238,23 +7238,30 @@ usage:
SeeAlso []
***********************************************************************/
int
Abc_Command
Detect
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_Command
FaultClasses
(
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
;
int
c
,
f
Seq
=
0
,
f
Verbose
=
0
;
int
c
,
f
Gen
=
0
,
fSeq
=
0
,
fVerbose
=
0
,
fVery
Verbose
=
0
;
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
sv
h"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
gsvw
h"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'g'
:
fGen
^=
1
;
break
;
case
's'
:
fSeq
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'w'
:
fVeryVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
...
...
@@ -7271,14 +7278,24 @@ int Abc_CommandDetect( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Only applicable to a logic network.
\n
"
);
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
;
usage:
Abc_Print
(
-
2
,
"usage: detect [-svh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
detects properties of internal nodes
\n
"
);
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
,
"usage: faultclasses [-gsvwh]
\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
-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"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
src/base/abci/abcDetect.c
View file @
9f99f08d
This diff is collapsed.
Click to expand it.
src/map/mio/mio.h
View file @
9f99f08d
...
...
@@ -112,6 +112,7 @@ extern char * Mio_LibraryReadName ( 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_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
char
*
Mio_LibraryReadSopByName
(
Mio_Library_t
*
pLib
,
char
*
pName
);
extern
Mio_Gate_t
*
Mio_LibraryReadGateByTruth
(
Mio_Library_t
*
pLib
,
word
t
);
...
...
src/map/mio/mioApi.c
View file @
9f99f08d
...
...
@@ -44,6 +44,7 @@ char * Mio_LibraryReadName ( Mio_Library_t * pLib ) { retur
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_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_LibraryReadInv
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGateInv
;
}
Mio_Gate_t
*
Mio_LibraryReadConst0
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGate0
;
}
...
...
src/map/mio/mioRead.c
View file @
9f99f08d
...
...
@@ -586,7 +586,10 @@ void Mio_LibrarySortGates( Mio_Library_t * pLib )
int
i
=
0
;
ppGates
=
ABC_ALLOC
(
Mio_Gate_t
*
,
pLib
->
nGates
);
Mio_LibraryForEachGate
(
pLib
,
pGate
)
{
pGate
->
Cell
=
i
;
ppGates
[
i
++
]
=
pGate
;
}
assert
(
i
==
pLib
->
nGates
);
// sort gates by name
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