21 #ifndef ABC__map__mio__exp_h
22 #define ABC__map__mio__exp_h
81 if ( Lit < 2 * nVars )
83 return Lit + 2 * Shift;
104 else if ( Lit < 2 * nVars )
105 Abc_Print( 1,
"%s%c", (Lit&1) ?
"!" :
" ",
'a' + Lit/2 );
107 Abc_Print( 1,
"%s%d", (Lit&1) ?
"!" :
" ", Lit/2 );
139 assert( (Len0 & 1) && (Len1 & 1) );
143 for ( i = 1; i < Len0; i++ )
145 for ( i = 1; i < Len1; i++ )
158 assert( (Len0 & 1) && (Len1 & 1) );
159 Vec_IntPush( r, 2 * (nVars + Len0/2 + Len1/2 + 2) );
160 Vec_IntPush( r, 2 * (nVars + Len0/2 + Len1/2 + 1) + 1 );
161 Vec_IntPush( r, 2 * (nVars + Len0/2 + Len1/2 + 0) + 1 );
166 for ( i = 1; i < Len0; i++ )
168 for ( i = 1; i < Len1; i++ )
179 if ( Lit < 2 * nVars )
180 return (Lit&1) ? ~puFanins[Lit/2] : puFanins[Lit/2];
181 return (Lit&1) ? ~puNodes[Lit/2-nVars] : puNodes[Lit/2-nVars];
195 if ( puFanins == NULL )
196 puFanins = (
word *)Truth6;
209 for ( w = 0; w <
nWords; w++ )
212 for ( w = 0; w <
nWords; w++ )
214 else if ( Lit < 2 * nVars )
215 for ( w = 0; w <
nWords; w++ )
216 pRes[w] = (Lit&1) ? ~puFanins[Lit/2][w] : puFanins[Lit/2][w];
218 for ( w = 0; w <
nWords; w++ )
219 pRes[w] = (Lit&1) ? ~puNodes[Lit/2-nVars][w] : puNodes[Lit/2-nVars][w];
231 word ** puFanins, ** puNodes, * pTemp0, * pTemp1;
232 int i, w,
nWords = (nVars <= 6 ? 1 : 1 << (nVars-6));
235 for ( i = 0; i < nVars; i++ )
238 for ( i = 0; i < nVars; i++ )
240 for ( w = 0; w <
nWords; w++ )
241 puFanins[i][w] = Truth6[i];
243 for ( w = 0; w <
nWords; w++ )
244 puFanins[i][w] = (w & (1 << (i-6))) ? ~(
word)0 : 0;
256 for ( w = 0; w <
nWords; w++ )
257 puNodes[i][w] = pTemp0[w] & pTemp1[w];
264 for ( i = 0; i < nVars; i++ )
static int Exp_IsConst0(Vec_Int_t *p)
static void Exp_Print(int nVars, Vec_Int_t *p)
static Vec_Int_t * Exp_Var(int iVar)
static void Exp_PrintReverse(int nVars, Vec_Int_t *p)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static void Exp_PrintLit(int nVars, int Lit)
static int Exp_LitShift(int nVars, int Lit, int Shift)
#define EXP_CONST0
INCLUDES ///.
#define ABC_ALLOC(type, num)
static void Exp_TruthLit(int nVars, int Lit, word **puFanins, word **puNodes, word *pRes, int nWords)
static void Vec_IntReverseOrder(Vec_Int_t *p)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static Vec_Int_t * Exp_Or(int *pMan, int nVars, Vec_Int_t *p0, Vec_Int_t *p1)
static word Exp_Truth6(int nVars, Vec_Int_t *p, word *puFanins)
static Vec_Int_t * Exp_And(int *pMan, int nVars, Vec_Int_t *p0, Vec_Int_t *p1, int fCompl0, int fCompl1)
static Vec_Int_t * Exp_Const0()
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static Vec_Int_t * Exp_Xor(int *pMan, int nVars, Vec_Int_t *p0, Vec_Int_t *p1)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned __int64 word
DECLARATIONS ///.
static word Exp_Truth6Lit(int nVars, int Lit, word *puFanins, word *puNodes)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
static void Abc_Print(int level, const char *format,...)
#define ABC_NAMESPACE_HEADER_END
static int Exp_NodeNum(Vec_Int_t *p)
static void Exp_Truth(int nVars, Vec_Int_t *p, word *pRes)
static Vec_Int_t * Exp_Reverse(Vec_Int_t *p)
static int Vec_IntEntryLast(Vec_Int_t *p)
static int Vec_IntSize(Vec_Int_t *p)
static int Exp_IsLit(Vec_Int_t *p)
#define ABC_CONST(number)
PARAMETERS ///.
#define ABC_CALLOC(type, num)
static int Exp_IsConst1(Vec_Int_t *p)
static int Exp_IsConst(Vec_Int_t *p)
static Vec_Int_t * Exp_Not(Vec_Int_t *p)
static Vec_Int_t * Exp_Const1()