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
781c66cb
Commit
781c66cb
authored
Sep 29, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with mini AIG manager.
parent
73d68a08
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
12 deletions
+41
-12
src/base/abc/miniaig.h
+6
-6
src/base/abci/abcMini.c
+35
-2
src/base/main/main.h
+0
-4
No files found.
src/base/abc/miniaig.h
View file @
781c66cb
...
...
@@ -139,14 +139,14 @@ static void Mini_AigStop( Mini_Aig_t * p )
// (constant node is created when AIG manager is created)
static
int
Mini_AigCreatePi
(
Mini_Aig_t
*
p
)
{
int
Lit
=
Mini_AigNodeNum
(
p
)
;
int
Lit
=
p
->
nSize
;
Mini_AigPush
(
p
,
MINI_AIG_NULL
,
MINI_AIG_NULL
);
return
Lit
;
}
static
int
Mini_AigCreatePo
(
Mini_Aig_t
*
p
,
int
Lit0
)
{
int
Lit
=
Mini_AigNodeNum
(
p
)
;
assert
(
Lit0
>=
0
&&
Lit0
<
2
*
Mini_AigNodeNum
(
p
)
);
int
Lit
=
p
->
nSize
;
assert
(
Lit0
>=
0
&&
Lit0
<
Lit
);
Mini_AigPush
(
p
,
Lit0
,
MINI_AIG_NULL
);
return
Lit
;
}
...
...
@@ -154,9 +154,9 @@ static int Mini_AigCreatePo( Mini_Aig_t * p, int Lit0 )
// boolean operations
static
int
Mini_AigAnd
(
Mini_Aig_t
*
p
,
int
Lit0
,
int
Lit1
)
{
int
Lit
=
Mini_AigNodeNum
(
p
)
;
assert
(
Lit0
>=
0
&&
Lit0
<
2
*
Mini_AigNodeNum
(
p
)
);
assert
(
Lit1
>=
0
&&
Lit1
<
2
*
Mini_AigNodeNum
(
p
)
);
int
Lit
=
p
->
nSize
;
assert
(
Lit0
>=
0
&&
Lit0
<
Lit
);
assert
(
Lit1
>=
0
&&
Lit1
<
Lit
);
Mini_AigPush
(
p
,
Lit0
,
Lit1
);
return
Lit
;
}
...
...
src/base/abci/abcMini.c
View file @
781c66cb
...
...
@@ -66,6 +66,7 @@ Abc_Ntk_t * Abc_NtkFromMiniAig( Mini_Aig_t * p )
nNodes
=
Mini_AigNodeNum
(
p
);
// create ABC network
pNtk
=
Abc_NtkAlloc
(
ABC_NTK_STRASH
,
ABC_FUNC_AIG
,
1
);
pNtk
->
pName
=
Abc_UtilStrsav
(
"MiniAig"
);
// create mapping from MiniAIG objects into ABC objects
vCopies
=
Vec_IntAlloc
(
nNodes
);
Vec_IntPush
(
vCopies
,
Abc_LitNot
(
Abc_ObjToLit
(
Abc_AigConst1
(
pNtk
)))
);
...
...
@@ -81,6 +82,7 @@ Abc_Ntk_t * Abc_NtkFromMiniAig( Mini_Aig_t * p )
else
assert
(
0
);
Vec_IntPush
(
vCopies
,
Abc_ObjToLit
(
pObj
)
);
}
assert
(
Vec_IntSize
(
vCopies
)
==
nNodes
);
Abc_AigCleanup
(
(
Abc_Aig_t
*
)
pNtk
->
pManFunc
);
Vec_IntFree
(
vCopies
);
Abc_NtkAddDummyPiNames
(
pNtk
);
...
...
@@ -92,7 +94,7 @@ Abc_Ntk_t * Abc_NtkFromMiniAig( Mini_Aig_t * p )
/**Function*************************************************************
Synopsis [Converts the network from
the AIG manager into ABC
.]
Synopsis [Converts the network from
ABC into the AIG manager
.]
Description []
...
...
@@ -134,7 +136,7 @@ Mini_Aig_t * Abc_NtkToMiniAig( Abc_Ntk_t * pNtk )
/**Function*************************************************************
Synopsis []
Synopsis [
Procedures to update internal ABC network using AIG node array.
]
Description []
...
...
@@ -164,6 +166,37 @@ void * Abc_NtkOutputMiniAig( Abc_Frame_t * pAbc )
}
/**Function*************************************************************
Synopsis [Testing the above code.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_NtkMiniAigTest
(
Abc_Ntk_t
*
pNtk
)
{
Abc_Ntk_t
*
pNtkNew
;
Mini_Aig_t
*
p
;
p
=
Abc_NtkToMiniAig
(
pNtk
);
pNtkNew
=
Abc_NtkFromMiniAig
(
p
);
Mini_AigStop
(
p
);
Abc_NtkPrintStats
(
pNtkNew
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
Abc_NtkDelete
(
pNtkNew
);
}
/*
if ( pNtk )
{
extern void Abc_NtkMiniAigTest( Abc_Ntk_t * pNtk );
Abc_NtkMiniAigTest( pNtk );
}
*/
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/base/main/main.h
View file @
781c66cb
...
...
@@ -131,10 +131,6 @@ extern ABC_DLL void Abc_FrameSetCex( Abc_Cex_t * pCex );
extern
ABC_DLL
void
Abc_FrameSetNFrames
(
int
nFrames
);
extern
ABC_DLL
void
Abc_FrameSetStatus
(
int
Status
);
/*=== mainFrame.c ===========================================================*/
extern
ABC_DLL
void
Abc_NtkInputMiniAig
(
Abc_Frame_t
*
pAbc
,
void
*
p
);
extern
ABC_DLL
void
*
Abc_NtkOutputMiniAig
(
Abc_Frame_t
*
pAbc
);
ABC_NAMESPACE_HEADER_END
...
...
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