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
7926d75e
Commit
7926d75e
authored
Mar 02, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding features related to the communication bridge.
parent
a6f363d4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
11 deletions
+33
-11
src/base/abci/abc.c
+6
-1
src/base/main/main.c
+11
-1
src/base/main/main.h
+2
-0
src/base/main/mainFrame.c
+3
-0
src/base/main/mainInt.h
+1
-0
src/base/main/mainUtils.c
+2
-1
src/misc/util/abc_global.h
+8
-8
src/misc/util/utilBridge.c
+0
-0
No files found.
src/base/abci/abc.c
View file @
7926d75e
...
...
@@ -379,6 +379,12 @@ extern int Abc_CommandAbcLivenessToSafetyWithLTL( Abc_Frame_t * pAbc, int argc,
***********************************************************************/
void
Abc_FrameReplaceCex
(
Abc_Frame_t
*
pAbc
,
Abc_Cex_t
**
ppCex
)
{
// update bridge
if
(
Abc_FrameIsBridgeMode
()
)
{
extern
int
Gia_ManToBridgeResult
(
FILE
*
pFile
,
int
Result
,
Abc_Cex_t
*
pCex
);
Gia_ManToBridgeResult
(
stdout
,
pAbc
->
Status
,
*
ppCex
);
}
// update CEX
ABC_FREE
(
pAbc
->
pCex
);
pAbc
->
pCex
=
*
ppCex
;
...
...
@@ -23473,7 +23479,6 @@ int Abc_CommandAbc9Equiv3( Abc_Frame_t * pAbc, int argc, char ** argv )
// else
// pAbc->Status = Ssw_RarSignalFilterGia2( pAbc->pGia, nFrames, nWords, nBinSize, nRounds, TimeOut, fUseCex? pAbc->pCex: NULL, fLatchOnly, fVerbose );
// pAbc->nFrames = pAbc->pGia->pCexSeq->iFrame;
if
(
pAbc
->
pGia
->
pCexSeq
)
Abc_FrameReplaceCex
(
pAbc
,
&
pAbc
->
pGia
->
pCexSeq
);
return
0
;
...
...
src/base/main/main.c
View file @
7926d75e
...
...
@@ -111,7 +111,7 @@ int Abc_RealMain( int argc, char * argv[] )
sprintf
(
sWriteCmd
,
"write"
);
Extra_UtilGetoptReset
();
while
((
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"c:hf:F:o:st:T:x"
))
!=
EOF
)
{
while
((
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"c:hf:F:o:st:T:x
b
"
))
!=
EOF
)
{
switch
(
c
)
{
case
'c'
:
strcpy
(
sCommandUsr
,
globalUtilOptarg
);
...
...
@@ -177,11 +177,21 @@ int Abc_RealMain( int argc, char * argv[] )
fBatch
=
1
;
break
;
case
'b'
:
Abc_FrameSetBridgeMode
();
break
;
default:
goto
usage
;
}
}
if
(
Abc_FrameIsBridgeMode
()
)
{
extern
Gia_Man_t
*
Gia_ManFromBridge
(
FILE
*
pFile
,
Vec_Int_t
**
pvInit
);
pAbc
->
pGia
=
Gia_ManFromBridge
(
stdin
,
NULL
);
}
if
(
fBatch
)
{
pAbc
->
fBatchMode
=
1
;
...
...
src/base/main/main.h
View file @
7926d75e
...
...
@@ -104,6 +104,8 @@ extern ABC_DLL void * Abc_FrameReadManDd();
extern
ABC_DLL
void
*
Abc_FrameReadManDec
();
extern
ABC_DLL
char
*
Abc_FrameReadFlag
(
char
*
pFlag
);
extern
ABC_DLL
int
Abc_FrameIsFlagEnabled
(
char
*
pFlag
);
extern
ABC_DLL
int
Abc_FrameIsBridgeMode
();
extern
ABC_DLL
void
Abc_FrameSetBridgeMode
();
extern
ABC_DLL
int
Abc_FrameReadBmcFrames
(
Abc_Frame_t
*
p
);
extern
ABC_DLL
int
Abc_FrameReadProbStatus
(
Abc_Frame_t
*
p
);
...
...
src/base/main/mainFrame.c
View file @
7926d75e
...
...
@@ -78,6 +78,9 @@ void Abc_FrameSetLibVer( void * pLib ) { s_GlobalFrame->pL
void
Abc_FrameSetFlag
(
char
*
pFlag
,
char
*
pValue
)
{
Cmd_FlagUpdateValue
(
s_GlobalFrame
,
pFlag
,
pValue
);
}
void
Abc_FrameSetCex
(
Abc_Cex_t
*
pCex
)
{
ABC_FREE
(
s_GlobalFrame
->
pCex
);
s_GlobalFrame
->
pCex
=
pCex
;
}
int
Abc_FrameIsBridgeMode
()
{
return
s_GlobalFrame
->
fBridgeMode
;
}
void
Abc_FrameSetBridgeMode
()
{
s_GlobalFrame
->
fBridgeMode
=
0
;
}
/**Function*************************************************************
Synopsis [Returns 1 if the flag is enabled without value or with value 1.]
...
...
src/base/main/mainInt.h
View file @
7926d75e
...
...
@@ -70,6 +70,7 @@ struct Abc_Frame_t_
int
nSteps
;
// the counter of different network processed
int
fAutoexac
;
// marks the autoexec mode
int
fBatchMode
;
// are we invoked in batch mode?
int
fBridgeMode
;
// are we invoked in bridge mode?
// output streams
FILE
*
Out
;
FILE
*
Err
;
...
...
src/base/main/mainUtils.c
View file @
7926d75e
...
...
@@ -120,7 +120,7 @@ void Abc_UtilsPrintUsage( Abc_Frame_t * pAbc, char * ProgName )
{
fprintf
(
pAbc
->
Err
,
"
\n
"
);
fprintf
(
pAbc
->
Err
,
"usage: %s [-c cmd] [-f script] [-h] [-o file] [-s] [-t type] [-T type] [-x] [file]
\n
"
,
"usage: %s [-c cmd] [-f script] [-h] [-o file] [-s] [-t type] [-T type] [-x] [
-b] [
file]
\n
"
,
ProgName
);
fprintf
(
pAbc
->
Err
,
" -c cmd
\t
execute commands `cmd'
\n
"
);
fprintf
(
pAbc
->
Err
,
" -F script
\t
execute commands from a script file and echo commands
\n
"
);
...
...
@@ -131,6 +131,7 @@ void Abc_UtilsPrintUsage( Abc_Frame_t * pAbc, char * ProgName )
fprintf
(
pAbc
->
Err
,
" -t type
\t
specify input type (blif_mv (default), blif_mvs, blif, or none)
\n
"
);
fprintf
(
pAbc
->
Err
,
" -T type
\t
specify output type (blif_mv (default), blif_mvs, blif, or none)
\n
"
);
fprintf
(
pAbc
->
Err
,
" -x
\t\t
equivalent to '-t none -T none'
\n
"
);
fprintf
(
pAbc
->
Err
,
" -b
\t\t
running in bridge mode
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\n
"
);
}
...
...
src/misc/util/abc_global.h
View file @
7926d75e
...
...
@@ -256,23 +256,19 @@ enum Abc_VerbLevel
ABC_VERBOSE
=
2
};
extern
int
Gia_ManToBridgeText
(
FILE
*
pFile
,
int
Size
,
unsigned
char
*
pBuffer
);
// string printing
extern
char
*
vnsprintf
(
const
char
*
format
,
va_list
args
);
extern
char
*
nsprintf
(
const
char
*
format
,
...);
static
inline
void
Abc_Print
(
int
level
,
const
char
*
format
,
...
)
{
extern
int
in_bridge_mode
;
extern
ABC_DLL
int
Abc_FrameIsBridgeMode
()
;
va_list
args
;
if
(
level
==
ABC_ERROR
)
printf
(
"Error: "
);
else
if
(
level
==
ABC_WARNING
)
printf
(
"Warning: "
);
va_start
(
args
,
format
);
if
(
in_bridge_mode
)
if
(
Abc_FrameIsBridgeMode
()
)
{
extern
int
Gia_ManToBridgeText
(
FILE
*
pFile
,
int
Size
,
unsigned
char
*
pBuffer
);
extern
char
*
vnsprintf
(
const
char
*
format
,
va_list
args
);
unsigned
char
*
tmp
=
vnsprintf
(
format
,
args
);
Gia_ManToBridgeText
(
stdout
,
strlen
(
tmp
),
tmp
);
free
(
tmp
);
...
...
@@ -345,6 +341,10 @@ extern void Abc_QuickSort3( word * pData, int nSize, int fDecrease );
extern
void
Abc_QuickSortCostData
(
int
*
pCosts
,
int
nSize
,
int
fDecrease
,
word
*
pData
,
int
*
pResult
);
extern
int
*
Abc_QuickSortCost
(
int
*
pCosts
,
int
nSize
,
int
fDecrease
);
// string printing
extern
char
*
vnsprintf
(
const
char
*
format
,
va_list
args
);
extern
char
*
nsprintf
(
const
char
*
format
,
...);
ABC_NAMESPACE_HEADER_END
...
...
src/misc/util/utilBridge.c
View file @
7926d75e
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