abc-master
|
#include "gia.h"
#include "misc/vec/vecSet.h"
#include "misc/vec/vecMem.h"
#include "misc/extra/extra.h"
#include "bool/kit/kit.h"
#include "misc/util/utilTruth.h"
#include "opt/dau/dau.h"
#include "sat/cnf/cnf.h"
Go to the source code of this file.
Data Structures | |
struct | Jf_Cut_t_ |
struct | Jf_Man_t_ |
Macros | |
#define | JF_LEAF_MAX 8 |
DECLARATIONS ///. More... | |
#define | JF_WORD_MAX ((JF_LEAF_MAX > 6) ? 1 << (JF_LEAF_MAX-6) : 1) |
#define | JF_CUT_MAX 16 |
#define | Jf_ObjForEachCut(pList, pCut, i) for ( i = 0, pCut = pList + 1; i < pList[0]; i++, pCut += Jf_CutSize(pCut) + 1 ) |
#define | Jf_CutForEachLit(pCut, Lit, i) for ( i = 1; i <= Jf_CutSize(pCut) && (Lit = Jf_CutLit(pCut, i)); i++ ) |
#define | Jf_CutForEachVar(pCut, Var, i) for ( i = 1; i <= Jf_CutSize(pCut) && (Var = Jf_CutVar(pCut, i)); i++ ) |
Typedefs | |
typedef struct Jf_Cut_t_ | Jf_Cut_t |
typedef struct Jf_Man_t_ | Jf_Man_t |
Functions | |
static int | Jf_ObjIsUnit (Gia_Obj_t *p) |
static void | Jf_ObjCleanUnit (Gia_Obj_t *p) |
static void | Jf_ObjSetUnit (Gia_Obj_t *p) |
static int | Jf_ObjCutH (Jf_Man_t *p, int i) |
static int * | Jf_ObjCuts (Jf_Man_t *p, int i) |
static int * | Jf_ObjCutBest (Jf_Man_t *p, int i) |
static int | Jf_ObjArr (Jf_Man_t *p, int i) |
static int | Jf_ObjDep (Jf_Man_t *p, int i) |
static float | Jf_ObjFlow (Jf_Man_t *p, int i) |
static float | Jf_ObjRefs (Jf_Man_t *p, int i) |
static int | Jf_ObjLit (int i, int c) |
static int | Jf_CutSize (int *pCut) |
static int | Jf_CutCost (int *pCut) |
static int | Jf_CutFunc (int *pCut) |
static int | Jf_CutSetAll (int f, int c, int s) |
static void | Jf_CutSetSize (int *pCut, int s) |
static void | Jf_CutSetCost (int *pCut, int c) |
static void | Jf_CutSetFunc (int *pCut, int f) |
static int | Jf_CutFuncClass (int *pCut) |
static int | Jf_CutFuncCompl (int *pCut) |
static int * | Jf_CutLits (int *pCut) |
static int | Jf_CutLit (int *pCut, int i) |
static int | Jf_CutVar (int *pCut, int i) |
static int | Jf_CutIsTriv (int *pCut, int i) |
static int | Jf_CutCnfSizeF (Jf_Man_t *p, int f) |
static int | Jf_CutCnfSize (Jf_Man_t *p, int *c) |
static int | Jf_ObjFunc0 (Gia_Obj_t *p, int *c) |
static int | Jf_ObjFunc1 (Gia_Obj_t *p, int *c) |
int | Kit_TruthToGia (Gia_Man_t *pMan, unsigned *pTruth, int nVars, Vec_Int_t *vMemory, Vec_Int_t *vLeaves, int fHash) |
DECLARATIONS ///. More... | |
void | Jf_ManGenCnf (word uTruth, int iLitOut, Vec_Int_t *vLeaves, Vec_Int_t *vLits, Vec_Int_t *vClas, Vec_Int_t *vCover) |
FUNCTION DEFINITIONS ///. More... | |
Cnf_Dat_t * | Jf_ManCreateCnfRemap (Gia_Man_t *p, Vec_Int_t *vLits, Vec_Int_t *vClas, int fAddOrCla) |
Cnf_Dat_t * | Jf_ManCreateCnf (Gia_Man_t *p, Vec_Int_t *vLits, Vec_Int_t *vClas) |
float * | Jf_ManInitRefs (Jf_Man_t *pMan) |
void | Jf_ManProfileClasses (Jf_Man_t *p) |
Jf_Man_t * | Jf_ManAlloc (Gia_Man_t *pGia, Jf_Par_t *pPars) |
void | Jf_ManFree (Jf_Man_t *p) |
static void | Jf_CutPrint (int *pCut) |
static void | Jf_ObjCutPrint (int *pCuts) |
static void | Jf_ObjBestCutConePrint (Jf_Man_t *p, Gia_Obj_t *pObj) |
static void | Jf_CutCheck (int *pCut) |
static int | Jf_CountBitsSimple (unsigned n) |
static int | Jf_CountBits32 (unsigned i) |
static int | Jf_CountBits (word i) |
static unsigned | Jf_CutGetSign32 (int *pCut) |
static word | Jf_CutGetSign (int *pCut) |
static int | Jf_CutArr (Jf_Man_t *p, int *pCut) |
static void | Jf_ObjSetBestCut (int *pCuts, int *pCut, Vec_Int_t *vTemp) |
static void | Jf_CutRef (Jf_Man_t *p, int *pCut) |
static void | Jf_CutDeref (Jf_Man_t *p, int *pCut) |
static float | Jf_CutFlow (Jf_Man_t *p, int *pCut) |
static int | Jf_CutIsContainedOrder (int *pBase, int *pCut) |
static int | Jf_CutMergeOrder (int *pCut0, int *pCut1, int *pCut, int LutSize) |
static int | Jf_CutFindLeaf0 (int *pCut, int iObj) |
static int | Jf_CutIsContained0 (int *pBase, int *pCut) |
static int | Jf_CutMerge0 (int *pCut0, int *pCut1, int *pCut, int LutSize) |
static int | Jf_CutFindLeaf1 (int *pCut, int iLit) |
static int | Jf_CutIsContained1 (int *pBase, int *pCut) |
static int | Jf_CutMerge1 (int *pCut0, int *pCut1, int *pCut, int LutSize) |
static int | Jf_CutMerge2 (int *pCut0, int *pCut1, int *pCut, int LutSize) |
int | Jf_ObjCutFilterBoth (Jf_Man_t *p, Jf_Cut_t **pSto, int c) |
int | Jf_ObjCutFilter (Jf_Man_t *p, Jf_Cut_t **pSto, int c) |
static void | Jf_ObjSortCuts (Jf_Cut_t **pSto, int nSize) |
int | Jf_CutRef_rec (Jf_Man_t *p, int *pCut) |
int | Jf_CutDeref_rec (Jf_Man_t *p, int *pCut) |
static int | Jf_CutAreaOld (Jf_Man_t *p, int *pCut) |
int | Jf_CutAreaRef_rec (Jf_Man_t *p, int *pCut) |
int | Jf_CutAreaRefEdge_rec (Jf_Man_t *p, int *pCut) |
static int | Jf_CutArea (Jf_Man_t *p, int *pCut, int fEdge) |
int | Jf_CutCheckMffc_rec (Jf_Man_t *p, int *pCut, int Limit) |
static int | Jf_CutCheckMffc (Jf_Man_t *p, int *pCut, int Limit) |
float | Jf_CutCompareDelay (Jf_Cut_t *pOld, Jf_Cut_t *pNew) |
float | Jf_CutCompareArea (Jf_Cut_t *pOld, Jf_Cut_t *pNew) |
static int | Jf_ObjAddCutToStore (Jf_Man_t *p, Jf_Cut_t **pSto, int c, int cMax) |
static void | Jf_ObjPrintStore (Jf_Man_t *p, Jf_Cut_t **pSto, int c) |
static void | Jf_ObjCheckPtrs (Jf_Cut_t **pSto, int c) |
static void | Jf_ObjCheckStore (Jf_Man_t *p, Jf_Cut_t **pSto, int c, int iObj) |
int | Jf_TtComputeForCut (Jf_Man_t *p, int iFuncLit0, int iFuncLit1, int *pCut0, int *pCut1, int *pCutOut) |
static void | Jf_ObjAssignCut (Jf_Man_t *p, Gia_Obj_t *pObj) |
static void | Jf_ObjPropagateBuf (Jf_Man_t *p, Gia_Obj_t *pObj, int fReverse) |
static int | Jf_ObjHasCutWithSize (Jf_Cut_t **pSto, int c, int nSize) |
void | Jf_ObjComputeCuts (Jf_Man_t *p, Gia_Obj_t *pObj, int fEdge) |
void | Jf_ManComputeCuts (Jf_Man_t *p, int fEdge) |
int | Jf_ManComputeDelay (Jf_Man_t *p, int fEval) |
int | Jf_ManComputeRefs (Jf_Man_t *p) |
void | Jf_ObjComputeBestCut (Jf_Man_t *p, Gia_Obj_t *pObj, int fEdge, int fEla) |
void | Jf_ManPropagateFlow (Jf_Man_t *p, int fEdge) |
void | Jf_ManPropagateEla (Jf_Man_t *p, int fEdge) |
Gia_Man_t * | Jf_ManDeriveMappingGia (Jf_Man_t *p) |
void | Jf_ManDeriveMapping (Jf_Man_t *p) |
Gia_Man_t * | Jf_ManDeriveGia (Jf_Man_t *p) |
void | Jf_ManSetDefaultPars (Jf_Par_t *pPars) |
void | Jf_ManPrintStats (Jf_Man_t *p, char *pTitle) |
Gia_Man_t * | Jf_ManPerformMapping (Gia_Man_t *pGia, Jf_Par_t *pPars) |
Gia_Man_t * | Jf_ManDeriveCnf (Gia_Man_t *p, int fCnfObjIds) |
Gia_Man_t * | Jf_ManDeriveCnfMiter (Gia_Man_t *p, int fVerbose) |
void | Jf_ManDumpCnf (Gia_Man_t *p, char *pFileName, int fVerbose) |
void | Jf_ManTestCnf (Gia_Man_t *p) |
#define Jf_CutForEachLit | ( | pCut, | |
Lit, | |||
i | |||
) | for ( i = 1; i <= Jf_CutSize(pCut) && (Lit = Jf_CutLit(pCut, i)); i++ ) |
#define Jf_CutForEachVar | ( | pCut, | |
Var, | |||
i | |||
) | for ( i = 1; i <= Jf_CutSize(pCut) && (Var = Jf_CutVar(pCut, i)); i++ ) |
#define JF_LEAF_MAX 8 |
DECLARATIONS ///.
CFile****************************************************************
FileName [giaJf.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Scalable AIG package.]
Synopsis []
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
]
#define Jf_ObjForEachCut | ( | pList, | |
pCut, | |||
i | |||
) | for ( i = 0, pCut = pList + 1; i < pList[0]; i++, pCut += Jf_CutSize(pCut) + 1 ) |
#define JF_WORD_MAX ((JF_LEAF_MAX > 6) ? 1 << (JF_LEAF_MAX-6) : 1) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 891 of file giaJf.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 918 of file giaJf.c.
int Jf_CutCheckMffc_rec | ( | Jf_Man_t * | p, |
int * | pCut, | ||
int | Limit | ||
) |
Definition at line 904 of file giaJf.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
int Jf_CutRef_rec | ( | Jf_Man_t * | p, |
int * | pCut | ||
) |
|
inlinestatic |
|
inlinestatic |
Function*************************************************************
Synopsis [Manager manipulation.]
Description []
SideEffects []
SeeAlso []
Definition at line 364 of file giaJf.c.
void Jf_ManComputeCuts | ( | Jf_Man_t * | p, |
int | fEdge | ||
) |
Definition at line 1238 of file giaJf.c.
int Jf_ManComputeDelay | ( | Jf_Man_t * | p, |
int | fEval | ||
) |
Function*************************************************************
Synopsis [Computing delay/area.]
Description []
SideEffects []
SeeAlso []
Definition at line 1287 of file giaJf.c.
int Jf_ManComputeRefs | ( | Jf_Man_t * | p | ) |
Definition at line 198 of file giaJf.c.
Cnf_Dat_t* Jf_ManCreateCnfRemap | ( | Gia_Man_t * | p, |
Vec_Int_t * | vLits, | ||
Vec_Int_t * | vClas, | ||
int | fAddOrCla | ||
) |
Definition at line 162 of file giaJf.c.
Definition at line 1746 of file giaJf.c.
Definition at line 1754 of file giaJf.c.
Function*************************************************************
Synopsis [Derive GIA without mapping.]
Description []
SideEffects []
SeeAlso []
Definition at line 1578 of file giaJf.c.
void Jf_ManDeriveMapping | ( | Jf_Man_t * | p | ) |
Definition at line 1542 of file giaJf.c.
Function*************************************************************
Synopsis [Derives the result of mapping.]
Description []
SideEffects []
SeeAlso []
Definition at line 1429 of file giaJf.c.
void Jf_ManDumpCnf | ( | Gia_Man_t * | p, |
char * | pFileName, | ||
int | fVerbose | ||
) |
Definition at line 1764 of file giaJf.c.
void Jf_ManFree | ( | Jf_Man_t * | p | ) |
Definition at line 395 of file giaJf.c.
void Jf_ManGenCnf | ( | word | uTruth, |
int | iLitOut, | ||
Vec_Int_t * | vLeaves, | ||
Vec_Int_t * | vLits, | ||
Vec_Int_t * | vClas, | ||
Vec_Int_t * | vCover | ||
) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Derives CNF for the mapped GIA.]
Description []
SideEffects []
SeeAlso []
Definition at line 128 of file giaJf.c.
float* Jf_ManInitRefs | ( | Jf_Man_t * | pMan | ) |
Function*************************************************************
Synopsis [Computing references while discounting XOR/MUX.]
Description []
SideEffects []
SeeAlso []
Definition at line 244 of file giaJf.c.
Definition at line 1712 of file giaJf.c.
void Jf_ManPrintStats | ( | Jf_Man_t * | p, |
char * | pTitle | ||
) |
Definition at line 1699 of file giaJf.c.
void Jf_ManProfileClasses | ( | Jf_Man_t * | p | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 307 of file giaJf.c.
void Jf_ManPropagateEla | ( | Jf_Man_t * | p, |
int | fEdge | ||
) |
Definition at line 1390 of file giaJf.c.
void Jf_ManPropagateFlow | ( | Jf_Man_t * | p, |
int | fEdge | ||
) |
Definition at line 1379 of file giaJf.c.
void Jf_ManSetDefaultPars | ( | Jf_Par_t * | pPars | ) |
void Jf_ManTestCnf | ( | Gia_Man_t * | p | ) |
Definition at line 1781 of file giaJf.c.
Definition at line 956 of file giaJf.c.
Function*************************************************************
Synopsis [Cut enumeration.]
Description []
SideEffects []
SeeAlso []
Definition at line 1099 of file giaJf.c.
Definition at line 451 of file giaJf.c.
|
inlinestatic |
Function*************************************************************
Synopsis [Mapping rounds.]
Description []
SideEffects []
SeeAlso []
Definition at line 1357 of file giaJf.c.
Definition at line 1125 of file giaJf.c.
|
inlinestatic |
Definition at line 787 of file giaJf.c.
Function*************************************************************
Synopsis [Cut filtering.]
Description [Returns the number of cuts after filtering and the last cut in the last entry. If the cut is filtered, its size is set to -1.]
SideEffects [This was found to be 15% slower.]
SeeAlso []
Definition at line 760 of file giaJf.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 1106 of file giaJf.c.
|
inlinestatic |
|
inlinestatic |
Function*************************************************************
Synopsis [Sorting cuts by size.]
Description []
SideEffects [Did not really help.]
SeeAlso []
Definition at line 820 of file giaJf.c.
int Jf_TtComputeForCut | ( | Jf_Man_t * | p, |
int | iFuncLit0, | ||
int | iFuncLit1, | ||
int * | pCut0, | ||
int * | pCut1, | ||
int * | pCutOut | ||
) |
Function*************************************************************
Synopsis [Cut minimization.]
Description []
SideEffects []
SeeAlso []
Definition at line 1068 of file giaJf.c.
int Kit_TruthToGia | ( | Gia_Man_t * | pMan, |
unsigned * | pTruth, | ||
int | nVars, | ||
Vec_Int_t * | vMemory, | ||
Vec_Int_t * | vLeaves, | ||
int | fHash | ||
) |
DECLARATIONS ///.
CFile****************************************************************
FileName [giaMap.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Scalable AIG package.]
Synopsis [Manipulation of mapping associated with the AIG.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
]
Definition at line 80 of file kitHop.c.