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
f7980905
Commit
f7980905
authored
Apr 10, 2020
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Procedures to explore structural support of an AIG.
parent
8eebe633
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
0 deletions
+96
-0
src/aig/gia/gia.c
+95
-0
src/base/abci/abc.c
+1
-0
No files found.
src/aig/gia/gia.c
View file @
f7980905
...
...
@@ -202,6 +202,101 @@ Gia_Man_t * Slv_ManToAig( Gia_Man_t * pGia )
return
pNew
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_ManCofPisVars
(
Gia_Man_t
*
p
,
int
nVars
)
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
;
int
i
,
m
;
pNew
=
Gia_ManStart
(
1000
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
Gia_ManForEachPi
(
p
,
pObj
,
i
)
Gia_ManAppendCi
(
pNew
);
Gia_ManHashStart
(
pNew
);
for
(
m
=
0
;
m
<
(
1
<<
nVars
);
m
++
)
{
Gia_ManFillValue
(
p
);
Gia_ManConst0
(
p
)
->
Value
=
0
;
Gia_ManForEachPi
(
p
,
pObj
,
i
)
{
if
(
i
<
nVars
)
pObj
->
Value
=
(
m
>>
i
)
&
1
;
else
pObj
->
Value
=
Gia_ObjToLit
(
pNew
,
Gia_ManCi
(
pNew
,
i
));
}
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
Gia_ManForEachPo
(
p
,
pObj
,
i
)
Gia_ManAppendCo
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
)
);
}
Gia_ManHashStop
(
pNew
);
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
Gia_ManStop
(
pTemp
);
return
pNew
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Gia_ManStructExperiment
(
Gia_Man_t
*
p
)
{
extern
int
Cec_ManVerifyTwo
(
Gia_Man_t
*
p0
,
Gia_Man_t
*
p1
,
int
fVerbose
);
Gia_Man_t
*
pTemp
,
*
pUsed
;
Vec_Ptr_t
*
vGias
=
Vec_PtrAlloc
(
100
);
Gia_Obj_t
*
pObj
;
int
i
,
k
;
Gia_ManForEachCo
(
p
,
pObj
,
i
)
{
int
iFan0
=
Gia_ObjFaninId0p
(
p
,
pObj
);
pTemp
=
Gia_ManDupAndCones
(
p
,
&
iFan0
,
1
,
1
);
Vec_PtrForEachEntry
(
Gia_Man_t
*
,
vGias
,
pUsed
,
k
)
if
(
Gia_ManCiNum
(
pTemp
)
==
Gia_ManCiNum
(
pUsed
)
&&
Cec_ManVerifyTwo
(
pTemp
,
pUsed
,
0
)
==
1
)
{
ABC_SWAP
(
void
*
,
Vec_PtrArray
(
vGias
)[
0
],
Vec_PtrArray
(
vGias
)[
k
]
);
break
;
}
else
ABC_FREE
(
pTemp
->
pCexComb
);
printf
(
"
\n
Out %6d : "
,
i
);
if
(
k
==
Vec_PtrSize
(
vGias
)
)
printf
(
"Equiv to none "
);
else
printf
(
"Equiv to %6d "
,
k
);
Gia_ManPrintStats
(
pTemp
,
NULL
);
if
(
k
==
Vec_PtrSize
(
vGias
)
)
Vec_PtrPush
(
vGias
,
pTemp
);
else
Gia_ManStop
(
pTemp
);
}
printf
(
"
\n
Computed %d classes.
\n\n
"
,
Vec_PtrSize
(
vGias
)
);
Vec_PtrForEachEntry
(
Gia_Man_t
*
,
vGias
,
pTemp
,
i
)
Gia_ManStop
(
pTemp
);
Vec_PtrFree
(
vGias
);
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/base/abci/abc.c
View file @
f7980905
...
...
@@ -47604,6 +47604,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// return 1;
// }
// Abc_FrameUpdateGia( pAbc, Abc_Procedure(pAbc->pGia) );
//Gia_ManStructExperiment( pAbc->pGia );
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &test [-FW num] [-svh]
\n
"
);
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