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
743ab55f
Commit
743ab55f
authored
Jul 12, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgraded &equiv3 to periodically restart simulation from the init state.
parent
97d2c9a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
src/proof/ssw/sswRarity.c
+24
-7
No files found.
src/proof/ssw/sswRarity.c
View file @
743ab55f
...
...
@@ -961,7 +961,7 @@ int Ssw_RarSimulate( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize, in
}
}
// get initialization patterns
if
(
r
==
nRestart
)
if
(
nRestart
&&
r
==
nRestart
)
{
r
=
-
1
;
nSavedSeed
=
(
nSavedSeed
+
1
)
%
1000
;
...
...
@@ -986,7 +986,7 @@ finish:
if
(
r
==
nRounds
&&
f
==
nFrames
)
{
if
(
fVerbose
)
printf
(
"
\n
"
);
printf
(
"Simulation
did not assert POs in the first %d frames. "
,
nRounds
*
nFrames
);
printf
(
"Simulation
of %d frames for %d rounds with %d restarts did not assert POs. "
,
nFrames
,
nNumRestart
*
nRestart
+
r
,
nNumRestart
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clkTotal
);
}
// cleanup
...
...
@@ -1036,6 +1036,8 @@ int Ssw_RarSignalFilter( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize
int
r
,
f
=
-
1
,
i
,
k
;
clock_t
clkTotal
=
clock
();
clock_t
nTimeToStop
=
TimeOut
?
TimeOut
*
CLOCKS_PER_SEC
+
clock
()
:
0
;
int
nNumRestart
=
0
;
int
nSavedSeed
=
nRandSeed
;
int
RetValue
=
-
1
;
assert
(
Aig_ManRegNum
(
pAig
)
>
0
);
assert
(
Aig_ManConstrNum
(
pAig
)
==
0
);
...
...
@@ -1049,7 +1051,7 @@ int Ssw_RarSignalFilter( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize
printf
(
"Rarity equiv filtering with %d words, %d frames, %d rounds, %d seed, and %d sec timeout.
\n
"
,
nWords
,
nFrames
,
nRounds
,
nRandSeed
,
TimeOut
);
// reset random numbers
Ssw_RarManPrepareRandom
(
n
Ran
dSeed
);
Ssw_RarManPrepareRandom
(
n
Save
dSeed
);
// create manager
p
=
Ssw_RarManStart
(
pAig
,
nWords
,
nFrames
,
nBinSize
,
fVerbose
);
...
...
@@ -1081,7 +1083,7 @@ int Ssw_RarSignalFilter( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize
Ssw_ClassesPrint
(
p
->
ppClasses
,
0
);
}
// refine classes using BMC
for
(
r
=
0
;
!
nRounds
||
r
<
nRounds
;
r
++
)
for
(
r
=
0
;
!
nRounds
||
(
nNumRestart
*
nRestart
+
r
<
nRounds
)
;
r
++
)
{
// start filtering equivalence classes
if
(
Ssw_ClassesCand1Num
(
p
->
ppClasses
)
==
0
&&
Ssw_ClassesClassNum
(
p
->
ppClasses
)
==
0
)
...
...
@@ -1098,7 +1100,9 @@ int Ssw_RarSignalFilter( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize
if
(
!
fVerbose
)
printf
(
"%s"
,
Abc_FrameIsBatchMode
()
?
"
\n
"
:
"
\r
"
);
// printf( "Simulation asserted a PO in frame f: %d <= f < %d.\n", r * nFrames, (r+1) * nFrames );
Ssw_RarManPrepareRandom
(
nRandSeed
);
if
(
fVerbose
)
printf
(
"Simulated %d frames for %d rounds with %d restarts.
\n
"
,
nFrames
,
nNumRestart
*
nRestart
+
r
,
nNumRestart
);
Ssw_RarManPrepareRandom
(
nSavedSeed
);
Abc_CexFree
(
pAig
->
pSeqModel
);
pAig
->
pSeqModel
=
Ssw_RarDeriveCex
(
p
,
r
*
p
->
nFrames
+
f
,
p
->
iFailPo
,
p
->
iFailPat
,
1
);
// print final report
...
...
@@ -1111,12 +1115,25 @@ int Ssw_RarSignalFilter( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize
if
(
TimeOut
&&
clock
()
>
nTimeToStop
)
{
if
(
fVerbose
)
printf
(
"
\n
"
);
printf
(
"Simulated %d frames for %d rounds with %d restarts. "
,
nFrames
,
nNumRestart
*
nRestart
+
r
,
nNumRestart
);
printf
(
"Reached timeout (%d sec).
\n
"
,
TimeOut
);
goto
finish
;
}
}
// get initialization patterns
Ssw_RarTransferPatterns
(
p
,
p
->
vInits
);
if
(
pCex
==
NULL
&&
nRestart
&&
r
==
nRestart
)
{
r
=
-
1
;
nSavedSeed
=
(
nSavedSeed
+
1
)
%
1000
;
Ssw_RarManPrepareRandom
(
nSavedSeed
);
Vec_IntFill
(
p
->
vInits
,
Aig_ManRegNum
(
pAig
)
*
nWords
,
0
);
nNumRestart
++
;
Vec_IntClear
(
p
->
vPatBests
);
// clean rarity info
// memset( p->pRarity, 0, sizeof(int) * (1 << nBinSize) * p->nGroups );
}
else
Ssw_RarTransferPatterns
(
p
,
p
->
vInits
);
// printout
if
(
fVerbose
)
{
...
...
@@ -1134,7 +1151,7 @@ finish:
{
if
(
!
fVerbose
)
printf
(
"%s"
,
Abc_FrameIsBatchMode
()
?
"
\n
"
:
"
\r
"
);
printf
(
"Simulation
did not assert POs in the first %d frames. "
,
nRounds
*
nFrames
);
printf
(
"Simulation
of %d frames for %d rounds with %d restarts did not assert POs. "
,
nFrames
,
nNumRestart
*
nRestart
+
r
,
nNumRestart
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clkTotal
);
}
// cleanup
...
...
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