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
f74fb87d
Commit
f74fb87d
authored
Feb 08, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved timeout in &reachp.
parent
ed253df7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
149 additions
and
32 deletions
+149
-32
src/aig/llb/llb2Core.c
+102
-18
src/aig/llb/llb2Driver.c
+12
-2
src/aig/llb/llb2Image.c
+33
-10
src/aig/llb/llbInt.h
+2
-2
No files found.
src/aig/llb/llb2Core.c
View file @
f74fb87d
This diff is collapsed.
Click to expand it.
src/aig/llb/llb2Driver.c
View file @
f74fb87d
...
@@ -157,7 +157,7 @@ DdNode * Llb_DriverPhaseCube( Aig_Man_t * pAig, Vec_Int_t * vDriRefs, DdManager
...
@@ -157,7 +157,7 @@ DdNode * Llb_DriverPhaseCube( Aig_Man_t * pAig, Vec_Int_t * vDriRefs, DdManager
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
DdManager
*
Llb_DriverLastPartition
(
Aig_Man_t
*
p
,
Vec_Int_t
*
vVarsNs
)
DdManager
*
Llb_DriverLastPartition
(
Aig_Man_t
*
p
,
Vec_Int_t
*
vVarsNs
,
int
TimeTarget
)
{
{
int
fVerbose
=
1
;
int
fVerbose
=
1
;
DdManager
*
dd
;
DdManager
*
dd
;
...
@@ -166,6 +166,7 @@ DdManager * Llb_DriverLastPartition( Aig_Man_t * p, Vec_Int_t * vVarsNs )
...
@@ -166,6 +166,7 @@ DdManager * Llb_DriverLastPartition( Aig_Man_t * p, Vec_Int_t * vVarsNs )
int
i
;
int
i
;
dd
=
Cudd_Init
(
Aig_ManObjNumMax
(
p
),
0
,
CUDD_UNIQUE_SLOTS
,
CUDD_CACHE_SLOTS
,
0
);
dd
=
Cudd_Init
(
Aig_ManObjNumMax
(
p
),
0
,
CUDD_UNIQUE_SLOTS
,
CUDD_CACHE_SLOTS
,
0
);
Cudd_AutodynEnable
(
dd
,
CUDD_REORDER_SYMM_SIFT
);
Cudd_AutodynEnable
(
dd
,
CUDD_REORDER_SYMM_SIFT
);
dd
->
TimeStop
=
TimeTarget
;
bRes
=
Cudd_ReadOne
(
dd
);
Cudd_Ref
(
bRes
);
bRes
=
Cudd_ReadOne
(
dd
);
Cudd_Ref
(
bRes
);
// mark the duplicated flop inputs
// mark the duplicated flop inputs
...
@@ -179,7 +180,15 @@ DdManager * Llb_DriverLastPartition( Aig_Man_t * p, Vec_Int_t * vVarsNs )
...
@@ -179,7 +180,15 @@ DdManager * Llb_DriverLastPartition( Aig_Man_t * p, Vec_Int_t * vVarsNs )
bVar2
=
Cudd_ReadOne
(
dd
);
bVar2
=
Cudd_ReadOne
(
dd
);
bVar2
=
Cudd_NotCond
(
bVar2
,
Aig_ObjFaninC0
(
pObj
)
);
bVar2
=
Cudd_NotCond
(
bVar2
,
Aig_ObjFaninC0
(
pObj
)
);
bProd
=
Cudd_bddXnor
(
dd
,
bVar1
,
bVar2
);
Cudd_Ref
(
bProd
);
bProd
=
Cudd_bddXnor
(
dd
,
bVar1
,
bVar2
);
Cudd_Ref
(
bProd
);
bRes
=
Cudd_bddAnd
(
dd
,
bTemp
=
bRes
,
bProd
);
Cudd_Ref
(
bRes
);
// bRes = Cudd_bddAnd( dd, bTemp = bRes, bProd ); Cudd_Ref( bRes );
bRes
=
Extra_bddAndTime
(
dd
,
bTemp
=
bRes
,
bProd
,
TimeTarget
);
if
(
bRes
==
NULL
)
{
Cudd_RecursiveDeref
(
dd
,
bTemp
);
Cudd_RecursiveDeref
(
dd
,
bProd
);
return
NULL
;
}
Cudd_Ref
(
bRes
);
Cudd_RecursiveDeref
(
dd
,
bTemp
);
Cudd_RecursiveDeref
(
dd
,
bTemp
);
Cudd_RecursiveDeref
(
dd
,
bProd
);
Cudd_RecursiveDeref
(
dd
,
bProd
);
}
}
...
@@ -196,6 +205,7 @@ DdManager * Llb_DriverLastPartition( Aig_Man_t * p, Vec_Int_t * vVarsNs )
...
@@ -196,6 +205,7 @@ DdManager * Llb_DriverLastPartition( Aig_Man_t * p, Vec_Int_t * vVarsNs )
// Cudd_RecursiveDeref( dd, bRes );
// Cudd_RecursiveDeref( dd, bRes );
// Extra_StopManager( dd );
// Extra_StopManager( dd );
dd
->
bFunc
=
bRes
;
dd
->
bFunc
=
bRes
;
dd
->
TimeStop
=
0
;
return
dd
;
return
dd
;
}
}
...
...
src/aig/llb/llb2Image.c
View file @
f74fb87d
...
@@ -179,7 +179,7 @@ void Llb_ImgSchedule( Vec_Ptr_t * vSupps, Vec_Ptr_t ** pvQuant0, Vec_Ptr_t ** pv
...
@@ -179,7 +179,7 @@ void Llb_ImgSchedule( Vec_Ptr_t * vSupps, Vec_Ptr_t ** pvQuant0, Vec_Ptr_t ** pv
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
DdManager
*
Llb_ImgPartition
(
Aig_Man_t
*
p
,
Vec_Ptr_t
*
vLower
,
Vec_Ptr_t
*
vUpper
)
DdManager
*
Llb_ImgPartition
(
Aig_Man_t
*
p
,
Vec_Ptr_t
*
vLower
,
Vec_Ptr_t
*
vUpper
,
int
TimeTarget
)
{
{
Vec_Ptr_t
*
vNodes
,
*
vRange
;
Vec_Ptr_t
*
vNodes
,
*
vRange
;
Aig_Obj_t
*
pObj
;
Aig_Obj_t
*
pObj
;
...
@@ -189,6 +189,7 @@ DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUp
...
@@ -189,6 +189,7 @@ DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUp
dd
=
Cudd_Init
(
Aig_ManObjNumMax
(
p
),
0
,
CUDD_UNIQUE_SLOTS
,
CUDD_CACHE_SLOTS
,
0
);
dd
=
Cudd_Init
(
Aig_ManObjNumMax
(
p
),
0
,
CUDD_UNIQUE_SLOTS
,
CUDD_CACHE_SLOTS
,
0
);
Cudd_AutodynEnable
(
dd
,
CUDD_REORDER_SYMM_SIFT
);
Cudd_AutodynEnable
(
dd
,
CUDD_REORDER_SYMM_SIFT
);
dd
->
TimeStop
=
TimeTarget
;
Vec_PtrForEachEntry
(
Aig_Obj_t
*
,
vLower
,
pObj
,
i
)
Vec_PtrForEachEntry
(
Aig_Obj_t
*
,
vLower
,
pObj
,
i
)
pObj
->
pData
=
Cudd_bddIthVar
(
dd
,
Aig_ObjId
(
pObj
)
);
pObj
->
pData
=
Cudd_bddIthVar
(
dd
,
Aig_ObjId
(
pObj
)
);
...
@@ -198,7 +199,15 @@ DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUp
...
@@ -198,7 +199,15 @@ DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUp
{
{
bBdd0
=
Cudd_NotCond
(
(
DdNode
*
)
Aig_ObjFanin0
(
pObj
)
->
pData
,
Aig_ObjFaninC0
(
pObj
)
);
bBdd0
=
Cudd_NotCond
(
(
DdNode
*
)
Aig_ObjFanin0
(
pObj
)
->
pData
,
Aig_ObjFaninC0
(
pObj
)
);
bBdd1
=
Cudd_NotCond
(
(
DdNode
*
)
Aig_ObjFanin1
(
pObj
)
->
pData
,
Aig_ObjFaninC1
(
pObj
)
);
bBdd1
=
Cudd_NotCond
(
(
DdNode
*
)
Aig_ObjFanin1
(
pObj
)
->
pData
,
Aig_ObjFaninC1
(
pObj
)
);
pObj
->
pData
=
Cudd_bddAnd
(
dd
,
bBdd0
,
bBdd1
);
Cudd_Ref
(
(
DdNode
*
)
pObj
->
pData
);
// pObj->pData = Cudd_bddAnd( dd, bBdd0, bBdd1 ); Cudd_Ref( (DdNode *)pObj->pData );
pObj
->
pData
=
Extra_bddAndTime
(
dd
,
bBdd0
,
bBdd1
,
TimeTarget
);
if
(
pObj
->
pData
==
NULL
)
{
Cudd_Quit
(
dd
);
Vec_PtrFree
(
vNodes
);
return
NULL
;
}
Cudd_Ref
(
(
DdNode
*
)
pObj
->
pData
);
}
}
vRange
=
Llb_ManCutRange
(
p
,
vLower
,
vUpper
);
vRange
=
Llb_ManCutRange
(
p
,
vLower
,
vUpper
);
...
@@ -207,7 +216,16 @@ DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUp
...
@@ -207,7 +216,16 @@ DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUp
{
{
assert
(
Aig_ObjIsNode
(
pObj
)
);
assert
(
Aig_ObjIsNode
(
pObj
)
);
bProd
=
Cudd_bddXnor
(
dd
,
Cudd_bddIthVar
(
dd
,
Aig_ObjId
(
pObj
)),
(
DdNode
*
)
pObj
->
pData
);
Cudd_Ref
(
bProd
);
bProd
=
Cudd_bddXnor
(
dd
,
Cudd_bddIthVar
(
dd
,
Aig_ObjId
(
pObj
)),
(
DdNode
*
)
pObj
->
pData
);
Cudd_Ref
(
bProd
);
bRes
=
Cudd_bddAnd
(
dd
,
bTemp
=
bRes
,
bProd
);
Cudd_Ref
(
bRes
);
// bRes = Cudd_bddAnd( dd, bTemp = bRes, bProd ); Cudd_Ref( bRes );
bRes
=
Extra_bddAndTime
(
dd
,
bTemp
=
bRes
,
bProd
,
TimeTarget
);
if
(
bRes
==
NULL
)
{
Cudd_Quit
(
dd
);
Vec_PtrFree
(
vRange
);
Vec_PtrFree
(
vNodes
);
return
NULL
;
}
Cudd_Ref
(
bRes
);
Cudd_RecursiveDeref
(
dd
,
bTemp
);
Cudd_RecursiveDeref
(
dd
,
bTemp
);
Cudd_RecursiveDeref
(
dd
,
bProd
);
Cudd_RecursiveDeref
(
dd
,
bProd
);
}
}
...
@@ -220,6 +238,7 @@ DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUp
...
@@ -220,6 +238,7 @@ DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUp
// Cudd_RecursiveDeref( dd, bRes );
// Cudd_RecursiveDeref( dd, bRes );
// Extra_StopManager( dd );
// Extra_StopManager( dd );
dd
->
bFunc
=
bRes
;
dd
->
bFunc
=
bRes
;
dd
->
TimeStop
=
0
;
return
dd
;
return
dd
;
}
}
...
@@ -373,7 +392,17 @@ if ( fVerbose )
...
@@ -373,7 +392,17 @@ if ( fVerbose )
printf
(
"Pt0 =%6d. Pt1 =%6d. "
,
Cudd_DagSize
(
ddPart
->
bFunc
),
Cudd_DagSize
(
bGroup
)
);
printf
(
"Pt0 =%6d. Pt1 =%6d. "
,
Cudd_DagSize
(
ddPart
->
bFunc
),
Cudd_DagSize
(
bGroup
)
);
// perform partial product
// perform partial product
bCube
=
Llb_ImgComputeCube
(
pAig
,
(
Vec_Int_t
*
)
Vec_PtrEntry
(
vQuant1
,
i
+
1
),
dd
);
Cudd_Ref
(
bCube
);
bCube
=
Llb_ImgComputeCube
(
pAig
,
(
Vec_Int_t
*
)
Vec_PtrEntry
(
vQuant1
,
i
+
1
),
dd
);
Cudd_Ref
(
bCube
);
bImage
=
Cudd_bddAndAbstract
(
dd
,
bTemp
=
bImage
,
bGroup
,
bCube
);
Cudd_Ref
(
bImage
);
// bImage = Cudd_bddAndAbstract( dd, bTemp = bImage, bGroup, bCube );
bImage
=
Extra_bddAndAbstractTime
(
dd
,
bTemp
=
bImage
,
bGroup
,
bCube
,
TimeTarget
);
if
(
bImage
==
NULL
)
{
Cudd_RecursiveDeref
(
dd
,
bTemp
);
Cudd_RecursiveDeref
(
dd
,
bCube
);
Cudd_RecursiveDeref
(
dd
,
bGroup
);
return
NULL
;
}
Cudd_Ref
(
bImage
);
if
(
fVerbose
)
if
(
fVerbose
)
printf
(
"Im0 =%6d. Im1 =%6d. "
,
Cudd_DagSize
(
bTemp
),
Cudd_DagSize
(
bImage
)
);
printf
(
"Im0 =%6d. Im1 =%6d. "
,
Cudd_DagSize
(
bTemp
),
Cudd_DagSize
(
bImage
)
);
//printf("\n"); Extra_bddPrintSupport(dd, bImage); printf("\n");
//printf("\n"); Extra_bddPrintSupport(dd, bImage); printf("\n");
...
@@ -384,12 +413,6 @@ printf( "Im0 =%6d. Im1 =%6d. ", Cudd_DagSize(bTemp), Cudd_DagSize(bImage) );
...
@@ -384,12 +413,6 @@ printf( "Im0 =%6d. Im1 =%6d. ", Cudd_DagSize(bTemp), Cudd_DagSize(bImage) );
// Cudd_ReduceHeap( dd, CUDD_REORDER_SYMM_SIFT, 100 );
// Cudd_ReduceHeap( dd, CUDD_REORDER_SYMM_SIFT, 100 );
// Abc_Print( 1, "Reo =%6d. ", Cudd_DagSize(bImage) );
// Abc_Print( 1, "Reo =%6d. ", Cudd_DagSize(bImage) );
// chech runtime
if
(
TimeTarget
&&
clock
()
>=
TimeTarget
)
{
Cudd_RecursiveDeref
(
dd
,
bImage
);
return
NULL
;
}
if
(
fVerbose
)
if
(
fVerbose
)
printf
(
"Supp =%3d. "
,
Cudd_SupportSize
(
dd
,
bImage
)
);
printf
(
"Supp =%3d. "
,
Cudd_SupportSize
(
dd
,
bImage
)
);
if
(
fVerbose
)
if
(
fVerbose
)
...
...
src/aig/llb/llbInt.h
View file @
f74fb87d
...
@@ -155,11 +155,11 @@ extern Vec_Int_t * Llb_DriverCountRefs( Aig_Man_t * p );
...
@@ -155,11 +155,11 @@ extern Vec_Int_t * Llb_DriverCountRefs( Aig_Man_t * p );
extern
Vec_Int_t
*
Llb_DriverCollectNs
(
Aig_Man_t
*
pAig
,
Vec_Int_t
*
vDriRefs
);
extern
Vec_Int_t
*
Llb_DriverCollectNs
(
Aig_Man_t
*
pAig
,
Vec_Int_t
*
vDriRefs
);
extern
Vec_Int_t
*
Llb_DriverCollectCs
(
Aig_Man_t
*
pAig
);
extern
Vec_Int_t
*
Llb_DriverCollectCs
(
Aig_Man_t
*
pAig
);
extern
DdNode
*
Llb_DriverPhaseCube
(
Aig_Man_t
*
pAig
,
Vec_Int_t
*
vDriRefs
,
DdManager
*
dd
);
extern
DdNode
*
Llb_DriverPhaseCube
(
Aig_Man_t
*
pAig
,
Vec_Int_t
*
vDriRefs
,
DdManager
*
dd
);
extern
DdManager
*
Llb_DriverLastPartition
(
Aig_Man_t
*
p
,
Vec_Int_t
*
vVarsNs
);
extern
DdManager
*
Llb_DriverLastPartition
(
Aig_Man_t
*
p
,
Vec_Int_t
*
vVarsNs
,
int
TimeTarget
);
/*=== llb2Image.c ======================================================*/
/*=== llb2Image.c ======================================================*/
extern
Vec_Ptr_t
*
Llb_ImgSupports
(
Aig_Man_t
*
p
,
Vec_Ptr_t
*
vDdMans
,
Vec_Int_t
*
vStart
,
Vec_Int_t
*
vStop
,
int
fAddPis
,
int
fVerbose
);
extern
Vec_Ptr_t
*
Llb_ImgSupports
(
Aig_Man_t
*
p
,
Vec_Ptr_t
*
vDdMans
,
Vec_Int_t
*
vStart
,
Vec_Int_t
*
vStop
,
int
fAddPis
,
int
fVerbose
);
extern
void
Llb_ImgSchedule
(
Vec_Ptr_t
*
vSupps
,
Vec_Ptr_t
**
pvQuant0
,
Vec_Ptr_t
**
pvQuant1
,
int
fVerbose
);
extern
void
Llb_ImgSchedule
(
Vec_Ptr_t
*
vSupps
,
Vec_Ptr_t
**
pvQuant0
,
Vec_Ptr_t
**
pvQuant1
,
int
fVerbose
);
extern
DdManager
*
Llb_ImgPartition
(
Aig_Man_t
*
p
,
Vec_Ptr_t
*
vLower
,
Vec_Ptr_t
*
vUpper
);
extern
DdManager
*
Llb_ImgPartition
(
Aig_Man_t
*
p
,
Vec_Ptr_t
*
vLower
,
Vec_Ptr_t
*
vUpper
,
int
TimeTarget
);
extern
void
Llb_ImgQuantifyFirst
(
Aig_Man_t
*
pAig
,
Vec_Ptr_t
*
vDdMans
,
Vec_Ptr_t
*
vQuant0
,
int
fVerbose
);
extern
void
Llb_ImgQuantifyFirst
(
Aig_Man_t
*
pAig
,
Vec_Ptr_t
*
vDdMans
,
Vec_Ptr_t
*
vQuant0
,
int
fVerbose
);
extern
void
Llb_ImgQuantifyReset
(
Vec_Ptr_t
*
vDdMans
);
extern
void
Llb_ImgQuantifyReset
(
Vec_Ptr_t
*
vDdMans
);
extern
DdNode
*
Llb_ImgComputeImage
(
Aig_Man_t
*
pAig
,
Vec_Ptr_t
*
vDdMans
,
DdManager
*
dd
,
DdNode
*
bInit
,
extern
DdNode
*
Llb_ImgComputeImage
(
Aig_Man_t
*
pAig
,
Vec_Ptr_t
*
vDdMans
,
DdManager
*
dd
,
DdNode
*
bInit
,
...
...
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