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
51fbf37c
Commit
51fbf37c
authored
Mar 19, 2017
by
Yen-Sheng Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
%pdra: working on bmc3
parent
3bddf938
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
src/base/wlc/wlcAbs.c
+11
-4
src/sat/bmc/bmc.h
+2
-0
src/sat/bmc/bmcBmc3.c
+6
-0
No files found.
src/base/wlc/wlcAbs.c
View file @
51fbf37c
...
...
@@ -87,6 +87,7 @@ typedef struct Bmc3_ThData_t_
Aig_Man_t
*
pAig
;
Abc_Cex_t
**
ppCex
;
int
RunId
;
int
fVerbose
;
}
Bmc3_ThData_t
;
// mutext to control access to shared variables
...
...
@@ -1334,6 +1335,8 @@ void * Wla_Bmc3Thread ( void * pArg )
Abc_Ntk_t
*
pAbcNtk
=
Abc_NtkFromAigPhase
(
pData
->
pAig
);
Saig_ParBmc_t
BmcPars
,
*
pBmcPars
=
&
BmcPars
;
Saig_ParBmcSetDefaultParams
(
pBmcPars
);
pBmcPars
->
pFuncStop
=
Wla_CallBackToStop
;
pBmcPars
->
RunId
=
pData
->
RunId
;
RetValue
=
Abc_NtkDarBmc3
(
pAbcNtk
,
pBmcPars
,
0
);
...
...
@@ -1342,7 +1345,9 @@ void * Wla_Bmc3Thread ( void * pArg )
assert
(
pAbcNtk
->
pSeqModel
);
*
(
pData
->
ppCex
)
=
pAbcNtk
->
pSeqModel
;
pAbcNtk
->
pSeqModel
=
NULL
;
Abc_Print
(
1
,
"BMC3 found CEX. RunId=%d.
\n
"
,
pData
->
RunId
);
if
(
pData
->
fVerbose
)
Abc_Print
(
1
,
"Bmc3 found CEX. RunId=%d.
\n
"
,
pData
->
RunId
);
status
=
pthread_mutex_lock
(
&
g_mutex
);
assert
(
status
==
0
);
++
g_nRunIds
;
...
...
@@ -1350,7 +1355,8 @@ void * Wla_Bmc3Thread ( void * pArg )
}
else
{
Abc_Print
(
1
,
"BMC3 got cancelled. RunId=%d.
\n
"
,
pData
->
RunId
);
if
(
pData
->
fVerbose
)
Abc_Print
(
1
,
"Bmc3 was cancelled. RunId=%d.
\n
"
,
pData
->
RunId
);
}
// free memory
...
...
@@ -1364,7 +1370,7 @@ void * Wla_Bmc3Thread ( void * pArg )
return
NULL
;
}
void
Wla_ManConcurrentBmc3
(
pthread_t
*
pThread
,
Aig_Man_t
*
pAig
,
Abc_Cex_t
**
ppCex
)
void
Wla_ManConcurrentBmc3
(
pthread_t
*
pThread
,
Aig_Man_t
*
pAig
,
Abc_Cex_t
**
ppCex
,
int
fVerbose
)
{
int
status
;
...
...
@@ -1373,6 +1379,7 @@ void Wla_ManConcurrentBmc3( pthread_t * pThread, Aig_Man_t * pAig, Abc_Cex_t **
pData
->
pAig
=
pAig
;
pData
->
ppCex
=
ppCex
;
pData
->
RunId
=
g_nRunIds
;
pData
->
fVerbose
=
fVerbose
;
status
=
pthread_create
(
pThread
,
NULL
,
Wla_Bmc3Thread
,
pData
);
assert
(
status
==
0
);
...
...
@@ -1410,7 +1417,7 @@ int Wla_ManSolve( Wla_Man_t * pWla, Aig_Man_t * pAig )
pWla
->
pPdrPars
->
pFuncStop
=
Wla_CallBackToStop
;
pBmc3Thread
=
ABC_CALLOC
(
pthread_t
,
1
);
Wla_ManConcurrentBmc3
(
pBmc3Thread
,
Aig_ManDupSimple
(
pAig
),
&
pBmcCex
);
Wla_ManConcurrentBmc3
(
pBmc3Thread
,
Aig_ManDupSimple
(
pAig
),
&
pBmcCex
,
pWla
->
pPars
->
fVerbose
);
}
clk
=
Abc_Clock
();
...
...
src/sat/bmc/bmc.h
View file @
51fbf37c
...
...
@@ -73,6 +73,8 @@ struct Saig_ParBmc_t_
int
nDropOuts
;
// the number of dropped outputs
abctime
timeLastSolved
;
// the time when the last output was solved
int
(
*
pFuncOnFail
)(
int
,
Abc_Cex_t
*
);
// called for a failed output in MO mode
int
RunId
;
// BMC id in this run
int
(
*
pFuncStop
)(
int
);
// callback to terminate
};
...
...
src/sat/bmc/bmcBmc3.c
View file @
51fbf37c
...
...
@@ -1533,6 +1533,12 @@ clkOther += Abc_Clock() - clk2;
Abc_Print
(
1
,
"Reached timeout (%d seconds).
\n
"
,
pPars
->
nTimeOut
);
goto
finish
;
}
if
(
p
->
pPars
->
pFuncStop
&&
p
->
pPars
->
pFuncStop
(
p
->
pPars
->
RunId
)
)
{
if
(
!
pPars
->
fSilent
)
Abc_Print
(
1
,
"Bmc3 got callbacks.
\n
"
);
goto
finish
;
}
// skip solved outputs
if
(
p
->
vCexes
&&
Vec_PtrEntry
(
p
->
vCexes
,
i
)
)
continue
;
...
...
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