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
094bdc05
Commit
094bdc05
authored
Aug 08, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New command 'testnpn' to compare semi-canonical forms.
parent
c4b4ac70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
11 deletions
+32
-11
src/aig/gia/giaAbsGla2.c
+7
-4
src/aig/gia/giaAbsRef2.c
+25
-7
No files found.
src/aig/gia/giaAbsGla2.c
View file @
094bdc05
...
...
@@ -396,7 +396,7 @@ Ga2_Man_t * Ga2_ManStart( Gia_Man_t * pGia, Gia_ParVta_t * pPars )
Vec_IntPush
(
p
->
vAbs
,
0
);
// refinement
p
->
pRnm
=
Rnm_ManStart
(
pGia
);
//
p->pRf2 = Rf2_ManStart( pGia );
p
->
pRf2
=
Rf2_ManStart
(
pGia
);
// SAT solver and variables
p
->
vId2Lit
=
Vec_PtrAlloc
(
1000
);
// temporaries
...
...
@@ -459,7 +459,7 @@ void Ga2_ManStop( Ga2_Man_t * p )
Vec_IntFree
(
p
->
vLits
);
Vec_IntFree
(
p
->
vIsopMem
);
Rnm_ManStop
(
p
->
pRnm
,
p
->
pPars
->
fVerbose
);
//
Rf2_ManStop( p->pRf2, p->pPars->fVerbose );
Rf2_ManStop
(
p
->
pRf2
,
p
->
pPars
->
fVerbose
);
ABC_FREE
(
p
->
pTable
);
ABC_FREE
(
p
->
pSopSizes
);
ABC_FREE
(
p
->
pSops
[
1
]
);
...
...
@@ -1216,7 +1216,7 @@ Abc_Cex_t * Ga2_ManDeriveCex( Ga2_Man_t * p, Vec_Int_t * vPis )
Abc_InfoSetBit
(
pCex
->
pData
,
pCex
->
nRegs
+
f
*
pCex
->
nPis
+
Gia_ObjCioId
(
pObj
)
);
}
return
pCex
;
}
}
Vec_Int_t
*
Ga2_ManRefine
(
Ga2_Man_t
*
p
)
{
Abc_Cex_t
*
pCex
;
...
...
@@ -1224,8 +1224,11 @@ Vec_Int_t * Ga2_ManRefine( Ga2_Man_t * p )
Gia_Obj_t
*
pObj
;
int
i
;
Ga2_GlaPrepareCexAndMap
(
p
,
&
pCex
,
&
vMap
);
vVec
=
Rnm_ManRefine
(
p
->
pRnm
,
pCex
,
vMap
,
p
->
pPars
->
fPropFanout
,
1
);
// Rf2_ManRefine( p->pRf2, pCex, vMap, p->pPars->fPropFanout, 1 );
vVec
=
Rnm_ManRefine
(
p
->
pRnm
,
pCex
,
vMap
,
p
->
pPars
->
fPropFanout
,
1
);
// printf( "Refinement %d\n", Vec_IntSize(vVec) );
Abc_CexFree
(
pCex
);
if
(
Vec_IntSize
(
vVec
)
==
0
)
{
...
...
src/aig/gia/giaAbsRef2.c
View file @
094bdc05
...
...
@@ -385,8 +385,9 @@ void Rf2_ManGatherFanins_rec( Rf2_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vFani
return
;
if
(
Gia_ObjIsRo
(
p
->
pGia
,
pObj
)
)
{
assert
(
pObj
->
fPhase
);
pObj
=
Gia_ObjRoToRi
(
p
->
pGia
,
pObj
);
Rf2_ManGatherFanins_rec
(
p
,
Gia_ObjFanin0
(
pObj
),
vFanins
,
Depth
,
RootId
,
0
);
Rf2_ManGatherFanins_rec
(
p
,
Gia_ObjFanin0
(
pObj
),
vFanins
,
Depth
-
1
,
RootId
,
0
);
}
else
if
(
Gia_ObjIsAnd
(
pObj
)
)
{
...
...
@@ -397,9 +398,10 @@ void Rf2_ManGatherFanins_rec( Rf2_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vFani
}
void
Rf2_ManGatherFanins
(
Rf2_Man_t
*
p
,
int
Depth
)
{
Vec_Int_t
*
vUsed
;
Vec_Int_t
*
vVec
;
Gia_Obj_t
*
pObj
;
int
i
;
int
i
,
k
,
Entry
;
// mark PPIs
Gia_ManForEachObjVec
(
p
->
vMap
,
p
->
pGia
,
pObj
,
i
)
{
...
...
@@ -416,24 +418,40 @@ void Rf2_ManGatherFanins( Rf2_Man_t * p, int Depth )
Gia_ManIncrementTravId
(
p
->
pGia
);
Rf2_ManGatherFanins_rec
(
p
,
pObj
,
p
->
vFanins
,
Depth
,
i
,
1
);
}
vUsed
=
Vec_IntStart
(
Vec_IntSize
(
p
->
vMap
)
);
// evaluate collected
printf
(
"
\n
Map
: "
);
printf
(
"
\n
Map
(%d): "
,
Vec_IntSize
(
p
->
vMap
)
);
Gia_ManForEachObjVec
(
p
->
vMap
,
p
->
pGia
,
pObj
,
i
)
{
vVec
=
Rf2_ObjVec
(
p
,
pObj
);
printf
(
"%d=%d "
,
i
,
Vec_IntSize
(
vVec
)
-
1
);
if
(
Vec_IntSize
(
vVec
)
>
1
)
printf
(
"%d=%d "
,
i
,
Vec_IntSize
(
vVec
)
-
1
);
Vec_IntForEachEntryStart
(
vVec
,
Entry
,
k
,
1
)
Vec_IntAddToEntry
(
vUsed
,
Entry
,
1
);
Vec_IntClear
(
vVec
);
}
printf
(
"
\n
"
);
// evaluate internal
printf
(
"Int
: "
);
printf
(
"Int
(%d): "
,
Vec_IntSize
(
p
->
vFanins
)
);
Gia_ManForEachObjVec
(
p
->
vFanins
,
p
->
pGia
,
pObj
,
i
)
{
vVec
=
Rf2_ObjVec
(
p
,
pObj
);
printf
(
"%d=%d "
,
i
,
Vec_IntSize
(
vVec
)
);
if
(
Vec_IntSize
(
vVec
)
>
1
)
printf
(
"%d=%d "
,
i
,
Vec_IntSize
(
vVec
)
);
if
(
Vec_IntSize
(
vVec
)
>
1
)
Vec_IntForEachEntry
(
vVec
,
Entry
,
k
)
Vec_IntAddToEntry
(
vUsed
,
Entry
,
1
);
Vec_IntClear
(
vVec
);
}
printf
(
"
\n
"
);
// evaluate PPIs
Vec_IntForEachEntry
(
vUsed
,
Entry
,
k
)
printf
(
"%d "
,
Entry
);
printf
(
"
\n
"
);
Vec_IntFree
(
vUsed
);
}
...
...
@@ -461,7 +479,7 @@ Vec_Int_t * Rf2_ManRefine( Rf2_Man_t * p, Abc_Cex_t * pCex, Vec_Int_t * vMap, in
// collects used objects
Rf2_ManCollect
(
p
);
// collect reconvergence points
Rf2_ManGatherFanins
(
p
,
1
);
Rf2_ManGatherFanins
(
p
,
2
);
// propagate justification IDs
// select 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