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
27bdffd5
Commit
27bdffd5
authored
Feb 26, 2017
by
Yen-Sheng Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small tweaks
parent
cba376cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
11 deletions
+58
-11
src/base/wlc/wlcAbs.c
+58
-11
No files found.
src/base/wlc/wlcAbs.c
View file @
27bdffd5
...
...
@@ -410,25 +410,51 @@ static int Wlc_NtkProofRefine( Wlc_Ntk_t * p, Wlc_Par_t * pPars, Abc_Cex_t * pCe
Vec_IntFree
(
vCoreSels
);
if
(
pPars
->
fVerbose
)
Abc_Print
(
1
,
"Proof-based refinement reduces %d (out of %d) white boxes
\n
"
,
Vec_IntSize
(
*
pvRefine
)
-
Vec_IntSize
(
vRefine
),
Vec_IntSize
(
*
pvRefine
)
);
Vec_IntFree
(
*
pvRefine
);
*
pvRefine
=
vRefine
;
return
0
;
}
/**Function*************************************************************
static
int
Wlc_NtkUpdateBlacks
(
Wlc_Ntk_t
*
p
,
Wlc_Par_t
*
pPars
,
Vec_Int_t
**
pvBlacks
,
Vec_Bit_t
*
vUnmark
)
{
int
Entry
,
i
;
Wlc_Obj_t
*
pObj
;
int
Count
[
4
]
=
{
0
};
Vec_Int_t
*
vBlacks
=
Vec_IntAlloc
(
100
);
Synopsis [Mark operators that meet the abstraction criteria.]
assert
(
*
pvBlacks
);
Description [This procedure returns the array of objects (vLeaves) that
should be abstracted because of their high bit-width. It uses input array (vUnmark)
to not abstract those objects that have been refined in the previous rounds.]
SideEffects []
Vec_IntForEachEntry
(
*
pvBlacks
,
Entry
,
i
)
{
if
(
Vec_BitEntry
(
vUnmark
,
Entry
)
)
continue
;
Vec_IntPush
(
vBlacks
,
Entry
);
SeeAlso []
pObj
=
Wlc_NtkObj
(
p
,
Entry
);
if
(
pObj
->
Type
==
WLC_OBJ_ARI_ADD
||
pObj
->
Type
==
WLC_OBJ_ARI_SUB
||
pObj
->
Type
==
WLC_OBJ_ARI_MINUS
)
Count
[
0
]
++
;
else
if
(
pObj
->
Type
==
WLC_OBJ_ARI_MULTI
||
pObj
->
Type
==
WLC_OBJ_ARI_DIVIDE
||
pObj
->
Type
==
WLC_OBJ_ARI_REM
||
pObj
->
Type
==
WLC_OBJ_ARI_MODULUS
)
Count
[
1
]
++
;
else
if
(
pObj
->
Type
==
WLC_OBJ_MUX
)
Count
[
2
]
++
;
else
if
(
Wlc_ObjIsCi
(
pObj
)
&&
!
Wlc_ObjIsPi
(
pObj
)
)
Count
[
3
]
++
;
}
assert
(
Vec_IntSize
(
vBlacks
)
);
Vec_IntFree
(
*
pvBlacks
);
*
pvBlacks
=
vBlacks
;
if
(
pPars
->
fVerbose
)
printf
(
"Abstraction engine marked %d adds/subs, %d muls/divs, %d muxes, and %d flops to be abstracted away.
\n
"
,
Count
[
0
],
Count
[
1
],
Count
[
2
],
Count
[
3
]
);
return
0
;
}
***********************************************************************/
static
Vec_Int_t
*
Wlc_NtkGetBlacks
(
Wlc_Ntk_t
*
p
,
Wlc_Par_t
*
pPars
,
Vec_Bit_t
*
vUnmark
)
{
Vec_Int_t
*
vBlacks
=
Vec_IntAlloc
(
100
)
;
...
...
@@ -468,6 +494,20 @@ static Vec_Int_t * Wlc_NtkGetBlacks( Wlc_Ntk_t * p, Wlc_Par_t * pPars, Vec_Bit_t
return
vBlacks
;
}
/**Function*************************************************************
Synopsis [Mark operators that meet the abstraction criteria.]
Description [This procedure returns the array of objects (vLeaves) that
should be abstracted because of their high bit-width. It uses input array (vUnmark)
to not abstract those objects that have been refined in the previous rounds.]
SideEffects []
SeeAlso []
***********************************************************************/
static
Vec_Bit_t
*
Wlc_NtkAbsMarkOpers
(
Wlc_Ntk_t
*
p
,
Wlc_Par_t
*
pPars
,
Vec_Bit_t
*
vUnmark
,
int
fVerbose
)
{
Vec_Bit_t
*
vLeaves
=
Vec_BitStart
(
Wlc_NtkObjNumMax
(
p
)
);
...
...
@@ -797,6 +837,7 @@ int Wlc_NtkPdrAbs( Wlc_Ntk_t * p, Wlc_Par_t * pPars )
Pdr_Man_t
*
pPdr
;
Vec_Vec_t
*
vClauses
=
NULL
;
Vec_Int_t
*
vFfOld
=
NULL
,
*
vFfNew
=
NULL
,
*
vMap
=
NULL
;
Vec_Int_t
*
vBlacks
=
NULL
;
int
nIters
,
nNodes
,
nDcFlops
,
RetValue
=
-
1
,
nGiaFfNumOld
=
-
1
;
// start the bitmap to mark objects that cannot be abstracted because of refinement
// currently, this bitmap is empty because abstraction begins without refinement
...
...
@@ -831,8 +872,12 @@ int Wlc_NtkPdrAbs( Wlc_Ntk_t * p, Wlc_Par_t * pPars )
// get abstracted GIA and the set of pseudo-PIs (vPisNew)
if
(
pPars
->
fProofRefine
)
{
vPisNew
=
Wlc_NtkGetBlacks
(
p
,
pPars
,
vUnmark
);
pAbs
=
Wlc_NtkAbs2
(
p
,
vPisNew
,
&
vFfNew
);
if
(
vBlacks
==
NULL
)
vBlacks
=
Wlc_NtkGetBlacks
(
p
,
pPars
,
vUnmark
);
else
Wlc_NtkUpdateBlacks
(
p
,
pPars
,
&
vBlacks
,
vUnmark
);
pAbs
=
Wlc_NtkAbs2
(
p
,
vBlacks
,
&
vFfNew
);
vPisNew
=
Vec_IntDup
(
vBlacks
);
}
else
{
...
...
@@ -945,6 +990,8 @@ int Wlc_NtkPdrAbs( Wlc_Ntk_t * p, Wlc_Par_t * pPars )
Aig_ManStop
(
pAig
);
}
if
(
vBlacks
)
Vec_IntFree
(
vBlacks
);
Vec_IntFreeP
(
&
vFfOld
);
Vec_BitFree
(
vUnmark
);
// report the result
...
...
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