Go to the source code of this file.
◆ Ssc_GiaCountCaresSim()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 343 of file sscSim.c.
344{
346 int nWords = Gia_ObjSimWords(
p );
347 int Count = Ssc_SimCountBits( pRes,
nWords );
349 return Count;
350}
unsigned __int64 word
DECLARATIONS ///.
word * Ssc_GiaGetCareMask(Gia_Man_t *p)
◆ Ssc_GiaEstimateCare()
| int Ssc_GiaEstimateCare |
( |
Gia_Man_t * | p, |
|
|
int | nWords ) |
Definition at line 351 of file sscSim.c.
352{
356}
int Ssc_GiaCountCaresSim(Gia_Man_t *p)
void Ssc_GiaSimRound(Gia_Man_t *p)
void Ssc_GiaRandomPiPattern(Gia_Man_t *p, int nWords, Vec_Int_t *vPivot)
◆ Ssc_GiaFindPivotSim()
Definition at line 323 of file sscSim.c.
324{
329 return vInit;
330}
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Vec_Int_t * Ssc_GiaGetOneSim(Gia_Man_t *p)
◆ Ssc_GiaGetCareMask()
Function*************************************************************
Synopsis [Returns one SAT assignment of the PIs.]
Description []
SideEffects []
SeeAlso []
Definition at line 299 of file sscSim.c.
300{
302 int i,
nWords = Gia_ObjSimWords(
p );
305 Ssc_SimAnd( pRes, pRes, Gia_ObjSimObj(
p, pObj),
nWords, 0, 0 );
306 return pRes;
307}
#define ABC_FALLOC(type, num)
#define Gia_ManForEachPo(p, pObj, i)
struct Gia_Obj_t_ Gia_Obj_t
◆ Ssc_GiaGetOneSim()
Definition at line 308 of file sscSim.c.
309{
312 int i, iBit,
nWords = Gia_ObjSimWords(
p );
314 iBit = Ssc_SimFindBit( pRes,
nWords );
316 if ( iBit == -1 )
317 return NULL;
318 vInit = Vec_IntAlloc( 100 );
320 Vec_IntPush( vInit, Abc_InfoHasBit((
unsigned *)Gia_ObjSimObj(
p, pObj), iBit) );
321 return vInit;
322}
#define Gia_ManForEachCi(p, pObj, i)
◆ Ssc_GiaPrintPiPatterns()
Definition at line 178 of file sscSim.c.
179{
182 int i;
184 {
185 pSimAig = Gia_ObjSimObj(
p, pObj );
186
187 }
188}
◆ Ssc_GiaRandomPiPattern()
Definition at line 163 of file sscSim.c.
164{
166 int i, w;
168 pSimPi = Gia_ObjSimPi(
p, 0 );
169 for ( i = 0; i < Gia_ManPiNum(
p); i++, pSimPi +=
nWords )
170 {
171 pSimPi[0] = vPivot ? Ssc_Random1(Vec_IntEntry(vPivot, i)) : Ssc_Random2();
172 for ( w = 1; w <
nWords; w++ )
173 pSimPi[w] = Ssc_Random();
174
175
176 }
177}
void Ssc_GiaResetPiPattern(Gia_Man_t *p, int nWords)
◆ Ssc_GiaResetPiPattern()
| void Ssc_GiaResetPiPattern |
( |
Gia_Man_t * | p, |
|
|
int | nWords ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 141 of file sscSim.c.
142{
144 if (
p->vSimsPi == NULL )
145 p->vSimsPi = Vec_WrdStart(0);
146 Vec_WrdFill(
p->vSimsPi,
nWords * Gia_ManCiNum(
p), 0 );
148}
◆ Ssc_GiaResetSimInfo()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 240 of file sscSim.c.
241{
242 assert( Vec_WrdSize(
p->vSimsPi) % Gia_ManCiNum(
p) == 0 );
243 if (
p->vSims == NULL )
244 p->vSims = Vec_WrdAlloc(0);
245 Vec_WrdFill(
p->vSims, Gia_ObjSimWords(
p) * Gia_ManObjNum(
p), 0 );
246}
◆ Ssc_GiaSavePiPattern()
Definition at line 149 of file sscSim.c.
150{
152 int i;
153 assert( Vec_IntSize(vPat) == Gia_ManCiNum(
p) );
154 if (
p->iPatsPi == 64 * Gia_ObjSimWords(
p) )
156 assert(
p->iPatsPi < 64 * Gia_ObjSimWords(
p) );
157 pSimPi = Gia_ObjSimPi(
p, 0 );
158 for ( i = 0; i < Gia_ManCiNum(
p); i++, pSimPi += Gia_ObjSimWords(
p) )
159 if ( Vec_IntEntry(vPat, i) )
160 Abc_InfoSetBit( (
unsigned *)pSimPi,
p->iPatsPi );
162}
void Vec_WrdDoubleSimInfo(Vec_Wrd_t *p, int nObjs)
FUNCTION DEFINITIONS ///.
◆ Ssc_GiaSimRound()
Definition at line 247 of file sscSim.c.
248{
250 word * pSim, * pSim0, * pSim1;
251 int i,
nWords = Gia_ObjSimWords(
p);
254
255 Ssc_SimConst( Gia_ObjSim(
p, 0),
nWords, 0 );
256
257 pSim = Gia_ObjSim(
p, 1 );
258 pSim0 = Gia_ObjSimPi(
p, 0 );
260 {
261 assert( pSim == Gia_ObjSimObj(
p, pObj ) );
262 Ssc_SimDup( pSim, pSim0,
nWords, 0 );
265 }
266
267 pSim = Gia_ObjSim(
p, 1+Gia_ManCiNum(
p) );
269 {
270 assert( pSim == Gia_ObjSim(
p, i ) );
273 Ssc_SimAnd( pSim, pSim0, pSim1,
nWords, Gia_ObjFaninC0(pObj), Gia_ObjFaninC1(pObj) );
275 }
276
277 pSim = Gia_ObjSim(
p, Gia_ManObjNum(
p) - Gia_ManPoNum(
p) );
279 {
280 assert( pSim == Gia_ObjSimObj(
p, pObj ) );
282 Ssc_SimDup( pSim, pSim0,
nWords, Gia_ObjFaninC0(pObj) );
283
285 }
286}
#define Gia_ManForEachAnd(p, pObj, i)
void Ssc_GiaResetSimInfo(Gia_Man_t *p)
◆ Ssc_GiaTransferPiPattern()
Function*************************************************************
Synopsis [Transfer the simulation pattern from pCare to pAig.]
Description []
SideEffects []
SeeAlso []
Definition at line 201 of file sscSim.c.
202{
205 int i, w,
nWords = Gia_ObjSimWords( pCare );
207 int Count = Ssc_SimCountBits( pCareMask,
nWords );
208 word * pSimPiCare, * pSimPiAig;
209 if ( Count == 0 )
210 {
212 return 0;
213 }
216 {
217 pSimPiAig = Gia_ObjSimPi( pAig, i );
218 pSimPiCare = Gia_ObjSimObj( pCare, pObj );
219 for ( w = 0; w <
nWords; w++ )
220 if ( Vec_IntEntry(vPivot, i) )
221 pSimPiAig[w] = pSimPiCare[w] | ~pCareMask[w];
222 else
223 pSimPiAig[w] = pSimPiCare[w] & pCareMask[w];
224 }
226 return Count;
227}
struct Gia_Man_t_ Gia_Man_t
◆ Vec_WrdDoubleSimInfo()
| void Vec_WrdDoubleSimInfo |
( |
Vec_Wrd_t * | p, |
|
|
int | nObjs ) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 119 of file sscSim.c.
120{
122 int i,
nWords = Vec_WrdSize(
p) / nObjs;
123 assert( Vec_WrdSize(
p) % nObjs == 0 );
124 for ( i = 0; i < nObjs; i++ )
127 p->nSize =
p->nCap = 2*
nWords*nObjs;
128}
#define ABC_CALLOC(type, num)