abc-master
|
#include <float.h>
#include "gia.h"
#include "misc/st/st.h"
#include "map/mio/mio.h"
#include "misc/util/utilTruth.h"
#include "misc/extra/extra.h"
#include "base/main/main.h"
#include "misc/vec/vecMem.h"
#include "misc/vec/vecWec.h"
#include "opt/dau/dau.h"
Go to the source code of this file.
Data Structures | |
struct | Nf_Cut_t_ |
struct | Nf_Mat_t_ |
struct | Nf_Obj_t_ |
struct | Nf_Man_t_ |
Macros | |
#define | NF_LEAF_MAX 6 |
DECLARATIONS ///. More... | |
#define | NF_CUT_MAX 32 |
#define | NF_NO_LEAF 31 |
#define | NF_INFINITY FLT_MAX |
#define | Nf_SetForEachCut(pList, pCut, i) for ( i = 0, pCut = pList + 1; i < pList[0]; i++, pCut += Nf_CutSize(pCut) + 1 ) |
#define | Nf_ObjForEachCut(pCuts, i, nCuts) for ( i = 0, i < nCuts; i++ ) |
#define | Nf_CutForEachLit(pCut, Conf, iLit, i) for ( i = 0; i < Nf_CutSize(pCut) && (iLit = Abc_Lit2LitV(Nf_CutLeaves(pCut), Nf_CutConfLit(Conf, i))); i++ ) |
#define | Nf_CutForEachVar(pCut, Conf, iVar, c, i) for ( i = 0; i < Nf_CutSize(pCut) && (iVar = Nf_CutLeaves(pCut)[Nf_CutConfVar(Conf, i)]) && ((c = Nf_CutConfC(Conf, i)), 1); i++ ) |
Typedefs | |
typedef struct Nf_Cut_t_ | Nf_Cut_t |
typedef struct Nf_Mat_t_ | Nf_Mat_t |
typedef struct Nf_Obj_t_ | Nf_Obj_t |
typedef struct Nf_Man_t_ | Nf_Man_t |
Enumerations | |
enum | { NF_ANDOR = 1, NF_XOR = 2, NF_PRIME = 3 } |
Functions | |
static Nf_Obj_t * | Nf_ManObj (Nf_Man_t *p, int i) |
static Mio_Cell_t * | Nf_ManCell (Nf_Man_t *p, int i) |
static int * | Nf_ManCutSet (Nf_Man_t *p, int i) |
static int | Nf_ObjCutSetId (Nf_Man_t *p, int i) |
static int * | Nf_ObjCutSet (Nf_Man_t *p, int i) |
static int | Nf_ObjHasCuts (Nf_Man_t *p, int i) |
static int * | Nf_ObjCutBest (Nf_Man_t *p, int i) |
static int | Nf_ObjCutUseless (Nf_Man_t *p, int TruthId) |
static float | Nf_ObjCutFlow (Nf_Man_t *p, int i) |
static int | Nf_ObjCutDelay (Nf_Man_t *p, int i) |
static void | Nf_ObjSetCutFlow (Nf_Man_t *p, int i, float a) |
static void | Nf_ObjSetCutDelay (Nf_Man_t *p, int i, int d) |
static int | Nf_ObjMapRefNum (Nf_Man_t *p, int i, int c) |
static int | Nf_ObjMapRefInc (Nf_Man_t *p, int i, int c) |
static int | Nf_ObjMapRefDec (Nf_Man_t *p, int i, int c) |
static float | Nf_ObjFlowRefs (Nf_Man_t *p, int i, int c) |
static float | Nf_ObjRequired (Nf_Man_t *p, int i, int c) |
static void | Nf_ObjSetRequired (Nf_Man_t *p, int i, int c, float f) |
static void | Nf_ObjUpdateRequired (Nf_Man_t *p, int i, int c, float f) |
static Nf_Mat_t * | Nf_ObjMatchD (Nf_Man_t *p, int i, int c) |
static Nf_Mat_t * | Nf_ObjMatchA (Nf_Man_t *p, int i, int c) |
static Nf_Mat_t * | Nf_ObjMatchBest (Nf_Man_t *p, int i, int c) |
static int | Nf_CutSize (int *pCut) |
static int | Nf_CutFunc (int *pCut) |
static int * | Nf_CutLeaves (int *pCut) |
static int | Nf_CutSetBoth (int n, int f) |
static int | Nf_CutIsTriv (int *pCut, int i) |
static int | Nf_CutHandle (int *pCutSet, int *pCut) |
static int * | Nf_CutFromHandle (int *pCutSet, int h) |
static int | Nf_CutConfLit (int Conf, int i) |
static int | Nf_CutConfVar (int Conf, int i) |
static int | Nf_CutConfC (int Conf, int i) |
static void | Nf_StoSelectSort (int *pArray, int nSize, Mio_Cell_t *pCell) |
FUNCTION DEFINITIONS ///. More... | |
static void | Nf_StoSelectSortLit (int *pArray, int nSize, Mio_Cell_t *pCell) |
void | Nf_StoCreateGateAdd (Nf_Man_t *pMan, word uTruth, int *pFans, int nFans, int CellId, int Type) |
int | Nf_StoBuildDsdAnd_rec (Nf_Man_t *pMan, Mio_Cell_t *pCell, char *pStr, char **p, int *pMatches, int pGroups[NF_LEAF_MAX][NF_LEAF_MAX], int *nGroupSizes, int *pnGroups) |
int | Nf_StoBuildDsdAnd (Nf_Man_t *pMan, Mio_Cell_t *pCell, char *p) |
int | Nf_StoCheckDsdAnd_rec (char *pStr, char **p, int *pMatches) |
int | Nf_StoCheckDsdAnd (char *p) |
int | Nf_StoCheckDsdXor_rec (char *pStr, char **p, int *pMatches) |
int | Nf_StoCheckDsdXor (char *p) |
void | Nf_StoCreateGateNonDsd (Nf_Man_t *pMan, Mio_Cell_t *pCell, int **pComp, int **pPerm, int *pnPerms) |
void | Nf_StoCreateGateDsd (Nf_Man_t *pMan, Mio_Cell_t *pCell, int **pComp, int **pPerm, int *pnPerms) |
void | Nf_StoDeriveMatches (Nf_Man_t *p, int fVerbose) |
void | Nf_StoPrintOne (Nf_Man_t *p, int Count, int t, int i, Mio_Cell_t *pC, int Type, int fCompl, char *pInfo) |
void | Nf_StoPrint (Nf_Man_t *p, int fVerbose) |
Nf_Man_t * | Nf_StoCreate (Gia_Man_t *pGia, Jf_Par_t *pPars) |
void | Nf_StoDelete (Nf_Man_t *p) |
static int | Nf_CutComputeTruth6 (Nf_Man_t *p, Nf_Cut_t *pCut0, Nf_Cut_t *pCut1, int fCompl0, int fCompl1, Nf_Cut_t *pCutR, int fIsXor) |
static int | Nf_CutComputeTruthMux6 (Nf_Man_t *p, Nf_Cut_t *pCut0, Nf_Cut_t *pCut1, Nf_Cut_t *pCutC, int fCompl0, int fCompl1, int fComplC, Nf_Cut_t *pCutR) |
static int | Nf_CutCountBits (word i) |
static word | Nf_CutGetSign (int *pLeaves, int nLeaves) |
static int | Nf_CutCreateUnit (Nf_Cut_t *p, int i) |
static void | Nf_Cutprintf (Nf_Man_t *p, Nf_Cut_t *pCut) |
static int | Nf_ManPrepareCuts (Nf_Cut_t *pCuts, Nf_Man_t *p, int iObj, int fAddUnit) |
static int | Nf_ManSaveCuts (Nf_Man_t *p, Nf_Cut_t **pCuts, int nCuts, int fUseful) |
static int | Nf_ManCountUseful (Nf_Cut_t **pCuts, int nCuts) |
static int | Nf_ManCountMatches (Nf_Man_t *p, Nf_Cut_t **pCuts, int nCuts) |
static int | Nf_CutCheck (Nf_Cut_t *pBase, Nf_Cut_t *pCut) |
static int | Nf_SetCheckArray (Nf_Cut_t **ppCuts, int nCuts) |
static int | Nf_CutMergeOrder (Nf_Cut_t *pCut0, Nf_Cut_t *pCut1, Nf_Cut_t *pCut, int nLutSize) |
static int | Nf_CutMergeOrderMux (Nf_Cut_t *pCut0, Nf_Cut_t *pCut1, Nf_Cut_t *pCut2, Nf_Cut_t *pCut, int nLutSize) |
static int | Nf_SetCutIsContainedOrder (Nf_Cut_t *pBase, Nf_Cut_t *pCut) |
static int | Nf_SetLastCutIsContained (Nf_Cut_t **pCuts, int nCuts) |
static int | Nf_SetLastCutContainsArea (Nf_Cut_t **pCuts, int nCuts) |
static int | Nf_CutCompareArea (Nf_Cut_t *pCut0, Nf_Cut_t *pCut1) |
static void | Nf_SetSortByArea (Nf_Cut_t **pCuts, int nCuts) |
static int | Nf_SetAddCut (Nf_Cut_t **pCuts, int nCuts, int nCutNum) |
static int | Nf_CutArea (Nf_Man_t *p, int nLeaves) |
static void | Nf_CutParams (Nf_Man_t *p, Nf_Cut_t *pCut, float FlowRefs) |
void | Nf_ObjMergeOrder (Nf_Man_t *p, int iObj) |
void | Nf_ManComputeCuts (Nf_Man_t *p) |
void | Nf_ManPrintStats (Nf_Man_t *p, char *pTitle) |
void | Nf_ManPrintInit (Nf_Man_t *p) |
void | Nf_ManPrintQuit (Nf_Man_t *p) |
float | Nf_MatchDeref2_rec (Nf_Man_t *p, int i, int c, Nf_Mat_t *pM) |
float | Nf_MatchRef2_rec (Nf_Man_t *p, int i, int c, Nf_Mat_t *pM, Vec_Int_t *vBackup) |
float | Nf_MatchRef2Area (Nf_Man_t *p, int i, int c, Nf_Mat_t *pM) |
void | Nf_ManCutMatchprintf (Nf_Man_t *p, int iObj, int fCompl, Nf_Mat_t *pM) |
void | Nf_ManCutMatchOne (Nf_Man_t *p, int iObj, int *pCut, int *pCutSet) |
static void | Nf_ObjPrepareCi (Nf_Man_t *p, int iObj) |
static void | Nf_ObjPrepareBuf (Nf_Man_t *p, Gia_Obj_t *pObj) |
static float | Nf_CutRequired (Nf_Man_t *p, Nf_Mat_t *pM, int *pCutSet) |
static void | Nf_ObjComputeRequired (Nf_Man_t *p, int iObj) |
void | Nf_ManCutMatch (Nf_Man_t *p, int iObj) |
void | Nf_ManComputeMapping (Nf_Man_t *p) |
void | Nf_ManSetMapRefsGate (Nf_Man_t *p, int iObj, float Required, Nf_Mat_t *pM) |
int | Nf_ManSetMapRefs (Nf_Man_t *p) |
Gia_Man_t * | Nf_ManDeriveMapping (Nf_Man_t *p) |
void | Nf_ManUpdateStats (Nf_Man_t *p) |
void | Nf_ManSetDefaultPars (Jf_Par_t *pPars) |
Gia_Man_t * | Nf_ManPerformMapping (Gia_Man_t *pGia, Jf_Par_t *pPars) |
#define Nf_CutForEachLit | ( | pCut, | |
Conf, | |||
iLit, | |||
i | |||
) | for ( i = 0; i < Nf_CutSize(pCut) && (iLit = Abc_Lit2LitV(Nf_CutLeaves(pCut), Nf_CutConfLit(Conf, i))); i++ ) |
#define Nf_CutForEachVar | ( | pCut, | |
Conf, | |||
iVar, | |||
c, | |||
i | |||
) | for ( i = 0; i < Nf_CutSize(pCut) && (iVar = Nf_CutLeaves(pCut)[Nf_CutConfVar(Conf, i)]) && ((c = Nf_CutConfC(Conf, i)), 1); i++ ) |
#define NF_LEAF_MAX 6 |
DECLARATIONS ///.
CFile****************************************************************
FileName [giaNf.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Scalable AIG package.]
Synopsis [Standard-cell mapper.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
]
#define Nf_ObjForEachCut | ( | pCuts, | |
i, | |||
nCuts | |||
) | for ( i = 0, i < nCuts; i++ ) |
#define Nf_SetForEachCut | ( | pList, | |
pCut, | |||
i | |||
) | for ( i = 0, pCut = pList + 1; i < pList[0]; i++, pCut += Nf_CutSize(pCut) + 1 ) |
anonymous enum |
Enumerator | |
---|---|
NF_ANDOR | |
NF_XOR | |
NF_PRIME |
|
inlinestatic |
|
inlinestatic |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 704 of file giaNf.c.
|
inlinestatic |
Definition at line 724 of file giaNf.c.
|
inlinestatic |
|
inlinestatic |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 783 of file giaNf.c.
|
inlinestatic |
|
inlinestatic |
void Nf_ManComputeCuts | ( | Nf_Man_t * | p | ) |
void Nf_ManComputeMapping | ( | Nf_Man_t * | p | ) |
|
inlinestatic |
void Nf_ManCutMatch | ( | Nf_Man_t * | p, |
int | iObj | ||
) |
Definition at line 1726 of file giaNf.c.
void Nf_ManCutMatchOne | ( | Nf_Man_t * | p, |
int | iObj, | ||
int * | pCut, | ||
int * | pCutSet | ||
) |
Definition at line 1425 of file giaNf.c.
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 1388 of file giaNf.c.
|
inlinestatic |
Definition at line 2120 of file giaNf.c.
|
inlinestatic |
Definition at line 798 of file giaNf.c.
void Nf_ManPrintQuit | ( | Nf_Man_t * | p | ) |
Definition at line 1276 of file giaNf.c.
void Nf_ManPrintStats | ( | Nf_Man_t * | p, |
char * | pTitle | ||
) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 1244 of file giaNf.c.
void Nf_ManSetDefaultPars | ( | Jf_Par_t * | pPars | ) |
Function*************************************************************
Synopsis [Technology mappping.]
Description []
SideEffects []
SeeAlso [] Function*************************************************************
Synopsis [Technology mappping.]
Description []
SideEffects []
SeeAlso []
Definition at line 2476 of file giaNf.c.
int Nf_ManSetMapRefs | ( | Nf_Man_t * | p | ) |
Definition at line 1918 of file giaNf.c.
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 1899 of file giaNf.c.
void Nf_ManUpdateStats | ( | Nf_Man_t * | p | ) |
Definition at line 2168 of file giaNf.c.
Function*************************************************************
Synopsis [Technology mappping.]
Description []
SideEffects []
SeeAlso []
Definition at line 1316 of file giaNf.c.
Definition at line 1338 of file giaNf.c.
Definition at line 1364 of file giaNf.c.
|
inlinestatic |
Definition at line 1718 of file giaNf.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 132 of file giaNf.c.
void Nf_ObjMergeOrder | ( | Nf_Man_t * | p, |
int | iObj | ||
) |
Definition at line 1114 of file giaNf.c.
|
inlinestatic |
Definition at line 1661 of file giaNf.c.
|
inlinestatic |
|
inlinestatic |
Definition at line 119 of file giaNf.c.
|
inlinestatic |
Definition at line 118 of file giaNf.c.
|
inlinestatic |
Definition at line 126 of file giaNf.c.
|
inlinestatic |
Definition at line 127 of file giaNf.c.
|
inlinestatic |
Definition at line 1086 of file giaNf.c.
|
inlinestatic |
Definition at line 885 of file giaNf.c.
|
inlinestatic |
Definition at line 1046 of file giaNf.c.
|
inlinestatic |
Definition at line 1038 of file giaNf.c.
|
inlinestatic |
= 1 )
Definition at line 1076 of file giaNf.c.
int Nf_StoBuildDsdAnd | ( | Nf_Man_t * | pMan, |
Mio_Cell_t * | pCell, | ||
char * | p | ||
) |
Definition at line 279 of file giaNf.c.
int Nf_StoBuildDsdAnd_rec | ( | Nf_Man_t * | pMan, |
Mio_Cell_t * | pCell, | ||
char * | pStr, | ||
char ** | p, | ||
int * | pMatches, | ||
int | pGroups[NF_LEAF_MAX][NF_LEAF_MAX], | ||
int * | nGroupSizes, | ||
int * | pnGroups | ||
) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 245 of file giaNf.c.
int Nf_StoCheckDsdAnd | ( | char * | p | ) |
Definition at line 378 of file giaNf.c.
int Nf_StoCheckDsdAnd_rec | ( | char * | pStr, |
char ** | p, | ||
int * | pMatches | ||
) |
Definition at line 360 of file giaNf.c.
int Nf_StoCheckDsdXor | ( | char * | p | ) |
Definition at line 410 of file giaNf.c.
int Nf_StoCheckDsdXor_rec | ( | char * | pStr, |
char ** | p, | ||
int * | pMatches | ||
) |
Definition at line 387 of file giaNf.c.
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 615 of file giaNf.c.
void Nf_StoCreateGateAdd | ( | Nf_Man_t * | pMan, |
word | uTruth, | ||
int * | pFans, | ||
int | nFans, | ||
int | CellId, | ||
int | Type | ||
) |
Definition at line 217 of file giaNf.c.
void Nf_StoCreateGateDsd | ( | Nf_Man_t * | pMan, |
Mio_Cell_t * | pCell, | ||
int ** | pComp, | ||
int ** | pPerm, | ||
int * | pnPerms | ||
) |
Definition at line 460 of file giaNf.c.
void Nf_StoCreateGateNonDsd | ( | Nf_Man_t * | pMan, |
Mio_Cell_t * | pCell, | ||
int ** | pComp, | ||
int ** | pPerm, | ||
int * | pnPerms | ||
) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 430 of file giaNf.c.
void Nf_StoDeriveMatches | ( | Nf_Man_t * | p, |
int | fVerbose | ||
) |
Definition at line 488 of file giaNf.c.
void Nf_StoPrint | ( | Nf_Man_t * | p, |
int | fVerbose | ||
) |
Definition at line 560 of file giaNf.c.
void Nf_StoPrintOne | ( | Nf_Man_t * | p, |
int | Count, | ||
int | t, | ||
int | i, | ||
Mio_Cell_t * | pC, | ||
int | Type, | ||
int | fCompl, | ||
char * | pInfo | ||
) |
Definition at line 509 of file giaNf.c.
|
inlinestatic |
|
inlinestatic |