ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
intDup.c File Reference
#include "intInt.h"
Include dependency graph for intDup.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START Aig_Man_tInter_ManStartInitState (int nRegs)
 DECLARATIONS ///.
 
Aig_Man_tInter_ManStartDuplicated (Aig_Man_t *p)
 
Aig_Man_tInter_ManStartOneOutput (Aig_Man_t *p, int fAddFirstPo)
 

Function Documentation

◆ Inter_ManStartDuplicated()

Aig_Man_t * Inter_ManStartDuplicated ( Aig_Man_t * p)

Function*************************************************************

Synopsis [Duplicate the AIG w/o POs.]

Description []

SideEffects []

SeeAlso []

Definition at line 73 of file intDup.c.

74{
75 Aig_Man_t * pNew;
76 Aig_Obj_t * pObj;
77 int i;
78 assert( Aig_ManRegNum(p) > 0 );
79 // create the new manager
80 pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
81 pNew->pName = Abc_UtilStrsav( p->pName );
82 pNew->pSpec = Abc_UtilStrsav( p->pSpec );
83 // create the PIs
85 Aig_ManConst1(p)->pData = Aig_ManConst1(pNew);
86 Aig_ManForEachCi( p, pObj, i )
87 pObj->pData = Aig_ObjCreateCi( pNew );
88 // set registers
89 pNew->nTruePis = p->nTruePis;
90 pNew->nTruePos = Saig_ManConstrNum(p);
91 pNew->nRegs = p->nRegs;
92 // duplicate internal nodes
93 Aig_ManForEachNode( p, pObj, i )
94 pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) );
95
96 // create constraint outputs
97 Saig_ManForEachPo( p, pObj, i )
98 {
99 if ( i < Saig_ManPoNum(p)-Saig_ManConstrNum(p) )
100 continue;
101 Aig_ObjCreateCo( pNew, Aig_Not( Aig_ObjChild0Copy(pObj) ) );
102 }
103
104 // create register inputs with MUXes
105 Saig_ManForEachLi( p, pObj, i )
106 Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) );
107 Aig_ManCleanup( pNew );
108 return pNew;
109}
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition aig.h:393
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition aigOper.c:104
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Definition aigObj.c:66
struct Aig_Obj_t_ Aig_Obj_t
Definition aig.h:51
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Definition aigMan.c:47
#define Aig_ManForEachNode(p, pObj, i)
Definition aig.h:413
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
int Aig_ManCleanup(Aig_Man_t *p)
Definition aigMan.c:265
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
Definition aigObj.c:45
void Aig_ManCleanData(Aig_Man_t *p)
Definition aigUtil.c:205
Cube * p
Definition exorList.c:222
#define Saig_ManForEachLi(p, pObj, i)
Definition saig.h:98
#define Saig_ManForEachPo(p, pObj, i)
Definition saig.h:93
void * pData
Definition aig.h:87
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Inter_ManStartInitState()

ABC_NAMESPACE_IMPL_START Aig_Man_t * Inter_ManStartInitState ( int nRegs)

DECLARATIONS ///.

CFile****************************************************************

FileName [intDup.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Interpolation engine.]

Synopsis [Specialized AIG duplication procedures.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 24, 2008.]

Revision [

Id
intDup.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Create trivial AIG manager for the init state.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file intDup.c.

46{
47 Aig_Man_t * p;
48 Aig_Obj_t * pRes;
49 Aig_Obj_t ** ppInputs;
50 int i;
51 assert( nRegs > 0 );
52 ppInputs = ABC_ALLOC( Aig_Obj_t *, nRegs );
53 p = Aig_ManStart( nRegs );
54 for ( i = 0; i < nRegs; i++ )
55 ppInputs[i] = Aig_Not( Aig_ObjCreateCi(p) );
56 pRes = Aig_Multi( p, ppInputs, nRegs, AIG_OBJ_AND );
57 Aig_ObjCreateCo( p, pRes );
58 ABC_FREE( ppInputs );
59 return p;
60}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
#define ABC_FREE(obj)
Definition abc_global.h:267
Aig_Obj_t * Aig_Multi(Aig_Man_t *p, Aig_Obj_t **pArgs, int nArgs, Aig_Type_t Type)
Definition aigOper.c:413
@ AIG_OBJ_AND
Definition aig.h:63
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Inter_ManStartOneOutput()

Aig_Man_t * Inter_ManStartOneOutput ( Aig_Man_t * p,
int fAddFirstPo )

Function*************************************************************

Synopsis [Duplicate the AIG w/o POs and transforms to transit into init state.]

Description []

SideEffects []

SeeAlso []

Definition at line 122 of file intDup.c.

123{
124 Aig_Man_t * pNew;
125 Aig_Obj_t * pObj, * pObjLi, * pObjLo;
126 Aig_Obj_t * pCtrl = NULL; // Suppress "might be used uninitialized"
127 int i;
128 assert( Aig_ManRegNum(p) > 0 );
129 // create the new manager
130 pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
131 pNew->pName = Abc_UtilStrsav( p->pName );
132 pNew->pSpec = Abc_UtilStrsav( p->pSpec );
133 // create the PIs
135 Aig_ManConst1(p)->pData = Aig_ManConst1(pNew);
136 Aig_ManForEachCi( p, pObj, i )
137 {
138 if ( i == Saig_ManPiNum(p) )
139 pCtrl = Aig_ObjCreateCi( pNew );
140 pObj->pData = Aig_ObjCreateCi( pNew );
141 }
142 // set registers
143 pNew->nRegs = fAddFirstPo? 0 : p->nRegs;
144 pNew->nTruePis = fAddFirstPo? Aig_ManCiNum(p) + 1 : p->nTruePis + 1;
145 pNew->nTruePos = fAddFirstPo + Saig_ManConstrNum(p);
146 // duplicate internal nodes
147 Aig_ManForEachNode( p, pObj, i )
148 pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) );
149
150 // create constraint outputs
151 Saig_ManForEachPo( p, pObj, i )
152 {
153 if ( i < Saig_ManPoNum(p)-Saig_ManConstrNum(p) )
154 continue;
155 Aig_ObjCreateCo( pNew, Aig_Not( Aig_ObjChild0Copy(pObj) ) );
156 }
157
158 // add the PO
159 if ( fAddFirstPo )
160 {
161 pObj = Aig_ManCo( p, 0 );
162 Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) );
163 }
164 else
165 {
166 // create register inputs with MUXes
167 Saig_ManForEachLiLo( p, pObjLi, pObjLo, i )
168 {
169 pObj = Aig_Mux( pNew, pCtrl, (Aig_Obj_t *)pObjLo->pData, Aig_ObjChild0Copy(pObjLi) );
170 // pObj = Aig_Mux( pNew, pCtrl, Aig_ManConst0(pNew), Aig_ObjChild0Copy(pObjLi) );
171 Aig_ObjCreateCo( pNew, pObj );
172 }
173 }
174 Aig_ManCleanup( pNew );
175 return pNew;
176}
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
#define Saig_ManForEachLiLo(p, pObjLi, pObjLo, i)
Definition saig.h:101
Here is the call graph for this function:
Here is the caller graph for this function: