abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
aigTest.c
Go to the documentation of this file.
1 
2 
3 #include "aig.h"
4 
6 
7 
9 {
10  Aig_Man_t * p;
11  Aig_Obj_t * pA, * pB, * pC;
12  Aig_Obj_t * pFunc;
13  Aig_Obj_t * pFunc2;
14 
15  p = Aig_ManStart( 1000 );
16 
17  pA = Aig_IthVar( p, 0 );
18  pB = Aig_IthVar( p, 1 );
19  pC = Aig_IthVar( p, 2 );
20 
21  pFunc = Aig_Mux( p, pA, pB, pC );
22  pFunc2 = Aig_And( p, pA, pB );
23 
24  Aig_ObjCreatePo( p, pFunc );
25  Aig_ObjCreatePo( p, pFunc2 );
26 
27  Aig_ManSetRegNum( p, 1 );
28 
29  Aig_ManCleanup( p );
30 
31  if ( !Aig_ManCheck( p ) )
32  {
33  printf( "Check has failed\n" );
34  }
35 
36  Aig_ManDumpBlif( p, "aig_test_file.blif", NULL, NULL );
37  Aig_ManStop( p );
39 
ABC_DLL int Aig_ManCheck(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
Definition: aigCheck.c:45
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Definition: aigMan.c:47
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition: aigOper.c:104
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
Definition: aigMan.c:438
Aig_Obj_t * Aig_IthVar(Aig_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
Definition: aigOper.c:63
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
Definition: aig.h:69
void Aig_ManDumpBlif(Aig_Man_t *p, char *pFileName, Vec_Ptr_t *vPiNames, Vec_Ptr_t *vPoNames)
Definition: aigUtil.c:733
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
Aig_Obj_t * Aig_Mux(Aig_Man_t *p, Aig_Obj_t *pC, Aig_Obj_t *p1, Aig_Obj_t *p0)
Definition: aigOper.c:317
ABC_NAMESPACE_IMPL_START void Aig_ProcedureTest()
Definition: aigTest.c:8
int Aig_ManCleanup(Aig_Man_t *p)
Definition: aigMan.c:265