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
519b9fdf
Commit
519b9fdf
authored
Sep 08, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating &gla_refine to perform suffix refinement.
parent
002117c0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
src/aig/gia/giaAbsGla2.c
+1
-1
src/aig/gia/giaAbsOut.c
+14
-8
No files found.
src/aig/gia/giaAbsGla2.c
View file @
519b9fdf
...
@@ -1781,7 +1781,7 @@ finish:
...
@@ -1781,7 +1781,7 @@ finish:
Abc_Print
(
1
,
"
\n
"
);
Abc_Print
(
1
,
"
\n
"
);
if
(
!
Gia_ManVerifyCex
(
pAig
,
pAig
->
pCexSeq
,
0
)
)
if
(
!
Gia_ManVerifyCex
(
pAig
,
pAig
->
pCexSeq
,
0
)
)
Abc_Print
(
1
,
" Gia_GlaPerform(): CEX verification has failed!
\n
"
);
Abc_Print
(
1
,
" Gia_GlaPerform(): CEX verification has failed!
\n
"
);
Abc_Print
(
1
,
"
C
ounter-example detected in frame %d. "
,
f
);
Abc_Print
(
1
,
"
True c
ounter-example detected in frame %d. "
,
f
);
p
->
pPars
->
iFrame
=
f
-
1
;
p
->
pPars
->
iFrame
=
f
-
1
;
Vec_IntFreeP
(
&
pAig
->
vGateClasses
);
Vec_IntFreeP
(
&
pAig
->
vGateClasses
);
RetValue
=
0
;
RetValue
=
0
;
...
...
src/aig/gia/giaAbsOut.c
View file @
519b9fdf
...
@@ -324,9 +324,9 @@ void Gia_ManCheckCex( Gia_Man_t * pAig, Abc_Cex_t * p, int iFrame )
...
@@ -324,9 +324,9 @@ void Gia_ManCheckCex( Gia_Man_t * pAig, Abc_Cex_t * p, int iFrame )
RetValue
=
Gia_ManPo
(
pAig
,
p
->
iPo
)
->
fMark0
;
RetValue
=
Gia_ManPo
(
pAig
,
p
->
iPo
)
->
fMark0
;
Gia_ManCleanMark0
(
pAig
);
Gia_ManCleanMark0
(
pAig
);
if
(
RetValue
==
1
)
if
(
RetValue
==
1
)
printf
(
"
CEX holds for the transform
ed model.
\n
"
);
printf
(
"
Shortened CEX holds for the abstraction of the fast-forward
ed model.
\n
"
);
else
else
printf
(
"
CEX does not hold for the transform
ed model.
\n
"
);
printf
(
"
Shortened CEX does not hold for the abstraction of the fast-forward
ed model.
\n
"
);
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -376,7 +376,8 @@ Gia_Man_t * Gia_ManTransformFlops( Gia_Man_t * p, Vec_Int_t * vFlops, Vec_Int_t
...
@@ -376,7 +376,8 @@ Gia_Man_t * Gia_ManTransformFlops( Gia_Man_t * p, Vec_Int_t * vFlops, Vec_Int_t
int
Gia_ManNewRefine
(
Gia_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrameStart
,
int
iFrameExtra
,
int
fVerbose
)
int
Gia_ManNewRefine
(
Gia_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrameStart
,
int
iFrameExtra
,
int
fVerbose
)
{
{
Gia_Man_t
*
pAbs
,
*
pNew
;
Gia_Man_t
*
pAbs
,
*
pNew
;
Vec_Int_t
*
vPis
,
*
vPPis
,
*
vFlops
,
*
vInit
;
Vec_Int_t
*
vFlops
,
*
vInit
;
Vec_Int_t
*
vCopy
;
clock_t
clk
=
clock
();
clock_t
clk
=
clock
();
int
RetValue
;
int
RetValue
;
ABC_FREE
(
p
->
pCexSeq
);
ABC_FREE
(
p
->
pCexSeq
);
...
@@ -385,6 +386,7 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
...
@@ -385,6 +386,7 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
Abc_Print
(
1
,
"Gia_ManNewRefine(): Abstraction gate map is missing.
\n
"
);
Abc_Print
(
1
,
"Gia_ManNewRefine(): Abstraction gate map is missing.
\n
"
);
return
-
1
;
return
-
1
;
}
}
vCopy
=
Vec_IntDup
(
p
->
vGateClasses
);
Abc_Print
(
1
,
"Refining with %d-frame CEX, starting in frame %d, with %d extra frames.
\n
"
,
pCex
->
iFrame
,
iFrameStart
,
iFrameExtra
);
Abc_Print
(
1
,
"Refining with %d-frame CEX, starting in frame %d, with %d extra frames.
\n
"
,
pCex
->
iFrame
,
iFrameStart
,
iFrameExtra
);
// derive abstraction
// derive abstraction
pAbs
=
Gia_ManDupAbsGates
(
p
,
p
->
vGateClasses
);
pAbs
=
Gia_ManDupAbsGates
(
p
,
p
->
vGateClasses
);
...
@@ -394,6 +396,7 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
...
@@ -394,6 +396,7 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
{
{
Abc_Print
(
1
,
"Gia_ManNewRefine(): The PI counts in GLA and in CEX do not match.
\n
"
);
Abc_Print
(
1
,
"Gia_ManNewRefine(): The PI counts in GLA and in CEX do not match.
\n
"
);
Gia_ManStop
(
pAbs
);
Gia_ManStop
(
pAbs
);
Vec_IntFree
(
vCopy
);
return
-
1
;
return
-
1
;
}
}
// get the state in frame iFrameStart
// get the state in frame iFrameStart
...
@@ -402,30 +405,27 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
...
@@ -402,30 +405,27 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
{
{
Abc_Print
(
1
,
"Gia_ManNewRefine(): The initial counter-example is invalid.
\n
"
);
Abc_Print
(
1
,
"Gia_ManNewRefine(): The initial counter-example is invalid.
\n
"
);
Gia_ManStop
(
pAbs
);
Gia_ManStop
(
pAbs
);
Vec_IntFree
(
vCopy
);
return
-
1
;
return
-
1
;
}
}
if
(
fVerbose
)
if
(
fVerbose
)
Abc_Print
(
1
,
"Gia_ManNewRefine(): The initial counter-example is correct.
\n
"
);
Abc_Print
(
1
,
"Gia_ManNewRefine(): The initial counter-example is correct.
\n
"
);
// get inputs
// get inputs
Gia_ManGlaCollect
(
p
,
p
->
vGateClasses
,
&
vPis
,
&
vPPis
,
&
vFlops
,
NULL
);
Gia_ManGlaCollect
(
p
,
p
->
vGateClasses
,
NULL
,
NULL
,
&
vFlops
,
NULL
);
assert
(
Vec_IntSize
(
vPis
)
+
Vec_IntSize
(
vPPis
)
==
Gia_ManPiNum
(
pAbs
)
);
assert
(
Vec_IntSize
(
vPis
)
+
Vec_IntSize
(
vPPis
)
==
Gia_ManPiNum
(
pAbs
)
);
Gia_ManStop
(
pAbs
);
Gia_ManStop
(
pAbs
);
//Vec_IntPrint( vFlops );
//Vec_IntPrint( vFlops );
//Vec_IntPrint( vInit );
//Vec_IntPrint( vInit );
// transform the manager to have new init state
// transform the manager to have new init state
pNew
=
Gia_ManTransformFlops
(
p
,
vFlops
,
vInit
);
pNew
=
Gia_ManTransformFlops
(
p
,
vFlops
,
vInit
);
Vec_IntFree
(
vPis
);
Vec_IntFree
(
vPPis
);
Vec_IntFree
(
vFlops
);
Vec_IntFree
(
vFlops
);
Vec_IntFree
(
vInit
);
Vec_IntFree
(
vInit
);
// verify abstraction
// verify abstraction
/*
{
{
Gia_Man_t
*
pAbs
=
Gia_ManDupAbsGates
(
pNew
,
p
->
vGateClasses
);
Gia_Man_t
*
pAbs
=
Gia_ManDupAbsGates
(
pNew
,
p
->
vGateClasses
);
Gia_ManCheckCex
(
pAbs
,
pCex
,
iFrameStart
);
Gia_ManCheckCex
(
pAbs
,
pCex
,
iFrameStart
);
Gia_ManStop
(
pAbs
);
Gia_ManStop
(
pAbs
);
}
}
*/
// transfer abstraction
// transfer abstraction
assert
(
pNew
->
vGateClasses
==
NULL
);
assert
(
pNew
->
vGateClasses
==
NULL
);
pNew
->
vGateClasses
=
Vec_IntDup
(
p
->
vGateClasses
);
pNew
->
vGateClasses
=
Vec_IntDup
(
p
->
vGateClasses
);
...
@@ -436,6 +436,11 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
...
@@ -436,6 +436,11 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
pPars
->
nFramesMax
=
pCex
->
iFrame
-
iFrameStart
+
1
+
iFrameExtra
;
pPars
->
nFramesMax
=
pCex
->
iFrame
-
iFrameStart
+
1
+
iFrameExtra
;
pPars
->
fVerbose
=
fVerbose
;
pPars
->
fVerbose
=
fVerbose
;
RetValue
=
Ga2_ManPerform
(
pNew
,
pPars
);
RetValue
=
Ga2_ManPerform
(
pNew
,
pPars
);
if
(
RetValue
==
0
)
// spurious SAT
{
Vec_IntFreeP
(
&
pNew
->
vGateClasses
);
pNew
->
vGateClasses
=
Vec_IntDup
(
vCopy
);
}
}
}
// move the abstraction map
// move the abstraction map
Vec_IntFreeP
(
&
p
->
vGateClasses
);
Vec_IntFreeP
(
&
p
->
vGateClasses
);
...
@@ -443,6 +448,7 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
...
@@ -443,6 +448,7 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
pNew
->
vGateClasses
=
NULL
;
pNew
->
vGateClasses
=
NULL
;
// cleanup
// cleanup
Gia_ManStop
(
pNew
);
Gia_ManStop
(
pNew
);
Vec_IntFree
(
vCopy
);
return
-
1
;
return
-
1
;
}
}
...
...
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