abc-master
|
#include "gia.h"
#include "misc/util/utilNam.h"
#include "misc/vec/vecWec.h"
#include "misc/tim/tim.h"
Go to the source code of this file.
Data Structures | |
struct | Str_Obj_t_ |
struct | Str_Ntk_t_ |
struct | Str_Man_t_ |
struct | Str_Edg_t_ |
struct | Str_Mux_t_ |
Macros | |
#define | STR_SUPER 100 |
DECLARATIONS ///. More... | |
#define | Str_NtkManForEachObj(p, pObj) for ( pObj = p->pObjs; Str_ObjId(p, pObj) < p->nObjs; pObj++ ) |
#define | Str_NtkManForEachObjVec(vVec, p, pObj, i) for ( i = 0; (i < Vec_IntSize(vVec)) && ((pObj) = Str_NtkObj(p, Vec_IntEntry(vVec,i))); i++ ) |
Typedefs | |
typedef struct Str_Obj_t_ | Str_Obj_t |
typedef struct Str_Ntk_t_ | Str_Ntk_t |
typedef struct Str_Man_t_ | Str_Man_t |
typedef struct Str_Edg_t_ | Str_Edg_t |
typedef struct Str_Mux_t_ | Str_Mux_t |
Enumerations | |
enum | { STR_NONE = 0, STR_CONST0 = 1, STR_PI = 2, STR_AND = 3, STR_XOR = 4, STR_MUX = 5, STR_BUF = 6, STR_PO = 7, STR_UNUSED = 8 } |
Functions | |
static Str_Obj_t * | Str_NtkObj (Str_Ntk_t *p, int i) |
static int | Str_ObjFaninId (Str_Ntk_t *p, Str_Obj_t *pObj, int i) |
static Str_Obj_t * | Str_ObjFanin (Str_Ntk_t *p, Str_Obj_t *pObj, int i) |
static int | Str_ObjFaninC (Str_Ntk_t *p, Str_Obj_t *pObj, int i) |
static int | Str_ObjFaninCopy (Str_Ntk_t *p, Str_Obj_t *pObj, int i) |
static int | Str_ObjId (Str_Ntk_t *p, Str_Obj_t *pObj) |
static int | Str_ObjCreate (Str_Ntk_t *p, int Type, int nFanins, int *pFanins) |
FUNCTION DEFINITIONS ///. More... | |
static Str_Ntk_t * | Str_NtkCreate (int nObjsAlloc, int nFaninsAlloc) |
static void | Str_NtkDelete (Str_Ntk_t *p) |
static void | Str_NtkPs (Str_Ntk_t *p, abctime clk) |
static void | Str_ObjReadGroup (Str_Ntk_t *p, Str_Obj_t *pObj, int *pnGroups, int *pnMuxes) |
static void | Str_NtkPrintGroups (Str_Ntk_t *p) |
Gia_Man_t * | Str_NtkToGia (Gia_Man_t *pGia, Str_Ntk_t *p) |
Gia_Man_t * | Gia_ManDupMuxesNoHash (Gia_Man_t *p) |
void | Str_MuxInputsCollect_rec (Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vNodes) |
void | Str_MuxInputsCollect (Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vNodes) |
void | Str_MuxStructCollect_rec (Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vNodes) |
void | Str_MuxStructCollect (Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vNodes) |
void | Str_MuxStructDump_rec (Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Str_t *vStr) |
void | Str_MuxStructDump (Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Str_t *vStr) |
int | Str_ManMuxCountOne (char *p) |
Vec_Wec_t * | Str_ManDeriveTrees (Gia_Man_t *p) |
Vec_Int_t * | Str_ManCreateRoots (Vec_Wec_t *vGroups, int nObjs) |
void | Str_MuxTraverse_rec (Gia_Man_t *p, int i) |
void | Str_ManCheckOverlap (Gia_Man_t *p, Vec_Wec_t *vGroups) |
static void | Gia_ManSimplifyXor (Vec_Int_t *vSuper) |
static void | Gia_ManSimplifyAnd (Vec_Int_t *vSuper) |
static void | Gia_ManSuperCollectXor_rec (Gia_Man_t *p, Gia_Obj_t *pObj) |
static void | Gia_ManSuperCollectAnd_rec (Gia_Man_t *p, Gia_Obj_t *pObj) |
static void | Gia_ManSuperCollect (Gia_Man_t *p, Gia_Obj_t *pObj) |
void | Str_ManNormalize_rec (Str_Ntk_t *pNtk, Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Wec_t *vGroups, Vec_Int_t *vRoots) |
Str_Ntk_t * | Str_ManNormalizeInt (Gia_Man_t *p, Vec_Wec_t *vGroups, Vec_Int_t *vRoots) |
Str_Ntk_t * | Str_ManNormalize (Gia_Man_t *p) |
static int | Str_Delay2 (int d0, int d1, int nLutSize) |
static int | Str_Delay3 (int d0, int d1, int d2, int nLutSize) |
static int | Str_ObjDelay (Gia_Man_t *pNew, int iObj, int nLutSize, Vec_Int_t *vDelay) |
static void | transpose64 (word A[64]) |
static int | Str_ManNum (Gia_Man_t *p, int iObj) |
static void | Str_ManSetNum (Gia_Man_t *p, int iObj, int Num) |
int | Str_ManVectorAffinity (Gia_Man_t *p, Vec_Int_t *vSuper, Vec_Int_t *vDelay, word Matrix[256], int nLimit) |
static int | Str_CountBits (word i) |
static void | Str_PrintState (int *pCost, int *pSuper, word *pMatrix, int nSize) |
void | Str_NtkBalanceMulti2 (Gia_Man_t *pNew, Str_Ntk_t *p, Str_Obj_t *pObj, Vec_Int_t *vDelay, int nLutSize) |
int | Str_NtkBalanceTwo (Gia_Man_t *pNew, Str_Ntk_t *p, Str_Obj_t *pObj, int i, int j, Vec_Int_t *vDelay, int *pCost, int *pSuper, word *pMatrix, int nSize, int nLutSize, int CostBest) |
void | Str_NtkBalanceMulti (Gia_Man_t *pNew, Str_Ntk_t *p, Str_Obj_t *pObj, Vec_Int_t *vDelay, int nLutSize) |
void | Str_NtkBalanceMux (Gia_Man_t *pNew, Str_Ntk_t *p, Str_Obj_t *pObj, Vec_Int_t *vDelay, int nLutSize, int nGroups, int nMuxes, int fRecursive, int fOptArea, int fVerbose) |
Gia_Man_t * | Str_NtkBalance (Gia_Man_t *pGia, Str_Ntk_t *p, int nLutSize, int fUseMuxes, int fRecursive, int fOptArea, int fVerbose) |
Gia_Man_t * | Gia_ManLutBalance (Gia_Man_t *p, int nLutSize, int fUseMuxes, int fRecursive, int fOptArea, int fVerbose) |
static Str_Mux_t * | Str_MuxFanin (Str_Mux_t *pMux, int i) |
static int | Str_MuxHasFanin (Str_Mux_t *pMux, int i) |
void | Str_MuxDelayPrint_rec (Str_Mux_t *pMux, int i) |
int | Str_MuxDelayEdge_rec (Str_Mux_t *pMux, int i) |
void | Str_MuxCreate (Str_Mux_t *pTree, Str_Ntk_t *pNtk, int iMux, int nMuxes, Vec_Int_t *vDelay, int nLutSize) |
int | Str_MuxToGia_rec (Gia_Man_t *pNew, Str_Mux_t *pMux, int i, Vec_Int_t *vDelay) |
void | Str_MuxChangeOnce (Str_Mux_t *pTree, int *pPath, int i, int k, Str_Mux_t *pBackup, Gia_Man_t *pNew, Vec_Int_t *vDelay) |
void | Str_MuxChangeUndo (Str_Mux_t *pTree, int *pPath, int i, int k, Str_Mux_t *pBackup) |
int | Str_MuxFindPathEdge_rec (Str_Mux_t *pMux, int i, int *pPath, int *pnLength) |
int | Str_MuxFindPath_rec (Str_Mux_t *pMux, int *pPath, int *pnLength) |
Str_Mux_t * | Str_MuxFindBranching (Str_Mux_t *pRoot, int i) |
int | Str_MuxTryOnce (Gia_Man_t *pNew, Str_Ntk_t *pNtk, Str_Mux_t *pTree, Str_Mux_t *pRoot, int Edge, Vec_Int_t *vDelay, int fVerbose) |
int | Str_MuxRestruct_rec (Gia_Man_t *pNew, Str_Ntk_t *pNtk, Str_Mux_t *pTree, Str_Mux_t *pRoot, int Edge, Vec_Int_t *vDelay, int fVerbose) |
int | Str_MuxRestructure2 (Gia_Man_t *pNew, Str_Ntk_t *pNtk, int iMux, int nMuxes, Vec_Int_t *vDelay, int nLutSize, int fVerbose) |
int | Str_MuxRestructure1 (Gia_Man_t *pNew, Str_Ntk_t *pNtk, int iMux, int nMuxes, Vec_Int_t *vDelay, int nLutSize, int fVerbose) |
int | Str_MuxRestructure (Gia_Man_t *pNew, Str_Ntk_t *pNtk, int iMux, int nMuxes, Vec_Int_t *vDelay, int nLutSize, int fRecursive, int fOptArea, int fVerbose) |
int | Str_MuxRestructAreaThree (Gia_Man_t *pNew, Str_Mux_t *pMux, Vec_Int_t *vDelay, int fVerbose) |
int | Str_MuxRestructArea_rec (Gia_Man_t *pNew, Str_Mux_t *pTree, Str_Mux_t *pRoot, int i, Vec_Int_t *vDelay, int fVerbose) |
int | Str_MuxRestructureArea (Gia_Man_t *pNew, Str_Ntk_t *pNtk, int iMux, int nMuxes, Vec_Int_t *vDelay, int nLutSize, int fVerbose) |
#define Str_NtkManForEachObjVec | ( | vVec, | |
p, | |||
pObj, | |||
i | |||
) | for ( i = 0; (i < Vec_IntSize(vVec)) && ((pObj) = Str_NtkObj(p, Vec_IntEntry(vVec,i))); i++ ) |
#define STR_SUPER 100 |
DECLARATIONS ///.
CFile****************************************************************
FileName [giaStr.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Scalable AIG package.]
Synopsis [AIG structuring.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
]
typedef struct Str_Edg_t_ Str_Edg_t |
typedef struct Str_Man_t_ Str_Man_t |
typedef struct Str_Mux_t_ Str_Mux_t |
typedef struct Str_Ntk_t_ Str_Ntk_t |
typedef struct Str_Obj_t_ Str_Obj_t |
anonymous enum |
Enumerator | |
---|---|
STR_NONE | |
STR_CONST0 | |
STR_PI | |
STR_AND | |
STR_XOR | |
STR_MUX | |
STR_BUF | |
STR_PO | |
STR_UNUSED |
Definition at line 34 of file giaStr.c.
Function*************************************************************
Synopsis [Constructs a normalized AIG without structural hashing.]
Description []
SideEffects []
SeeAlso []
Definition at line 224 of file giaStr.c.
Gia_Man_t* Gia_ManLutBalance | ( | Gia_Man_t * | p, |
int | nLutSize, | ||
int | fUseMuxes, | ||
int | fRecursive, | ||
int | fOptArea, | ||
int | fVerbose | ||
) |
Function*************************************************************
Synopsis [Test normalization procedure.]
Description []
SideEffects []
SeeAlso []
Definition at line 1377 of file giaStr.c.
|
inlinestatic |
Definition at line 541 of file giaStr.c.
|
inlinestatic |
Function*************************************************************
Synopsis [Simplify multi-input AND/XOR.]
Description []
SideEffects []
SeeAlso []
Definition at line 521 of file giaStr.c.
Definition at line 602 of file giaStr.c.
Definition at line 587 of file giaStr.c.
Function*************************************************************
Synopsis [Collect multi-input AND/XOR.]
Description []
SideEffects []
SeeAlso []
Definition at line 571 of file giaStr.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 445 of file giaStr.c.
Definition at line 419 of file giaStr.c.
Definition at line 361 of file giaStr.c.
int Str_ManMuxCountOne | ( | char * | p | ) |
Definition at line 754 of file giaStr.c.
void Str_ManNormalize_rec | ( | Str_Ntk_t * | pNtk, |
Gia_Man_t * | p, | ||
Gia_Obj_t * | pObj, | ||
Vec_Wec_t * | vGroups, | ||
Vec_Int_t * | vRoots | ||
) |
Function*************************************************************
Synopsis [Constructs AIG ordered for balancing.]
Description []
SideEffects []
SeeAlso []
Definition at line 638 of file giaStr.c.
Definition at line 727 of file giaStr.c.
|
inlinestatic |
|
inlinestatic |
Definition at line 859 of file giaStr.c.
int Str_ManVectorAffinity | ( | Gia_Man_t * | p, |
Vec_Int_t * | vSuper, | ||
Vec_Int_t * | vDelay, | ||
word | Matrix[256], | ||
int | nLimit | ||
) |
Definition at line 861 of file giaStr.c.
void Str_MuxChangeOnce | ( | Str_Mux_t * | pTree, |
int * | pPath, | ||
int | i, | ||
int | k, | ||
Str_Mux_t * | pBackup, | ||
Gia_Man_t * | pNew, | ||
Vec_Int_t * | vDelay | ||
) |
Definition at line 1539 of file giaStr.c.
void Str_MuxCreate | ( | Str_Mux_t * | pTree, |
Str_Ntk_t * | pNtk, | ||
int | iMux, | ||
int | nMuxes, | ||
Vec_Int_t * | vDelay, | ||
int | nLutSize | ||
) |
Definition at line 1493 of file giaStr.c.
int Str_MuxDelayEdge_rec | ( | Str_Mux_t * | pMux, |
int | i | ||
) |
void Str_MuxDelayPrint_rec | ( | Str_Mux_t * | pMux, |
int | i | ||
) |
Definition at line 1455 of file giaStr.c.
Definition at line 1627 of file giaStr.c.
int Str_MuxFindPath_rec | ( | Str_Mux_t * | pMux, |
int * | pPath, | ||
int * | pnLength | ||
) |
Definition at line 1615 of file giaStr.c.
int Str_MuxFindPathEdge_rec | ( | Str_Mux_t * | pMux, |
int | i, | ||
int * | pPath, | ||
int * | pnLength | ||
) |
Definition at line 1607 of file giaStr.c.
|
inlinestatic |
Definition at line 308 of file giaStr.c.
Function*************************************************************
Synopsis [Constructs AIG ordered for balancing.]
Description []
SideEffects []
SeeAlso []
Definition at line 297 of file giaStr.c.
int Str_MuxRestruct_rec | ( | Gia_Man_t * | pNew, |
Str_Ntk_t * | pNtk, | ||
Str_Mux_t * | pTree, | ||
Str_Mux_t * | pRoot, | ||
int | Edge, | ||
Vec_Int_t * | vDelay, | ||
int | fVerbose | ||
) |
Definition at line 1686 of file giaStr.c.
int Str_MuxRestructArea_rec | ( | Gia_Man_t * | pNew, |
Str_Mux_t * | pTree, | ||
Str_Mux_t * | pRoot, | ||
int | i, | ||
Vec_Int_t * | vDelay, | ||
int | fVerbose | ||
) |
Definition at line 1783 of file giaStr.c.
int Str_MuxRestructAreaThree | ( | Gia_Man_t * | pNew, |
Str_Mux_t * | pMux, | ||
Vec_Int_t * | vDelay, | ||
int | fVerbose | ||
) |
Function*************************************************************
Synopsis [Perform MUX restructuring for area.]
Description []
SideEffects []
SeeAlso []
Definition at line 1768 of file giaStr.c.
int Str_MuxRestructure | ( | Gia_Man_t * | pNew, |
Str_Ntk_t * | pNtk, | ||
int | iMux, | ||
int | nMuxes, | ||
Vec_Int_t * | vDelay, | ||
int | nLutSize, | ||
int | fRecursive, | ||
int | fOptArea, | ||
int | fVerbose | ||
) |
Definition at line 1743 of file giaStr.c.
int Str_MuxRestructure1 | ( | Gia_Man_t * | pNew, |
Str_Ntk_t * | pNtk, | ||
int | iMux, | ||
int | nMuxes, | ||
Vec_Int_t * | vDelay, | ||
int | nLutSize, | ||
int | fVerbose | ||
) |
Definition at line 1720 of file giaStr.c.
int Str_MuxRestructure2 | ( | Gia_Man_t * | pNew, |
Str_Ntk_t * | pNtk, | ||
int | iMux, | ||
int | nMuxes, | ||
Vec_Int_t * | vDelay, | ||
int | nLutSize, | ||
int | fVerbose | ||
) |
Definition at line 1697 of file giaStr.c.
int Str_MuxRestructureArea | ( | Gia_Man_t * | pNew, |
Str_Ntk_t * | pNtk, | ||
int | iMux, | ||
int | nMuxes, | ||
Vec_Int_t * | vDelay, | ||
int | nLutSize, | ||
int | fVerbose | ||
) |
Definition at line 1844 of file giaStr.c.
Definition at line 324 of file giaStr.c.
Definition at line 316 of file giaStr.c.
Definition at line 345 of file giaStr.c.
Definition at line 332 of file giaStr.c.
Definition at line 1525 of file giaStr.c.
void Str_MuxTraverse_rec | ( | Gia_Man_t * | p, |
int | i | ||
) |
int Str_MuxTryOnce | ( | Gia_Man_t * | pNew, |
Str_Ntk_t * | pNtk, | ||
Str_Mux_t * | pTree, | ||
Str_Mux_t * | pRoot, | ||
int | Edge, | ||
Vec_Int_t * | vDelay, | ||
int | fVerbose | ||
) |
Definition at line 1647 of file giaStr.c.
Gia_Man_t* Str_NtkBalance | ( | Gia_Man_t * | pGia, |
Str_Ntk_t * | p, | ||
int | nLutSize, | ||
int | fUseMuxes, | ||
int | fRecursive, | ||
int | fOptArea, | ||
int | fVerbose | ||
) |
Definition at line 1286 of file giaStr.c.
void Str_NtkBalanceMulti | ( | Gia_Man_t * | pNew, |
Str_Ntk_t * | p, | ||
Str_Obj_t * | pObj, | ||
Vec_Int_t * | vDelay, | ||
int | nLutSize | ||
) |
Definition at line 1088 of file giaStr.c.
void Str_NtkBalanceMulti2 | ( | Gia_Man_t * | pNew, |
Str_Ntk_t * | p, | ||
Str_Obj_t * | pObj, | ||
Vec_Int_t * | vDelay, | ||
int | nLutSize | ||
) |
Function*************************************************************
Synopsis [Perform balancing.]
Description []
SideEffects []
SeeAlso []
Definition at line 1038 of file giaStr.c.
void Str_NtkBalanceMux | ( | Gia_Man_t * | pNew, |
Str_Ntk_t * | p, | ||
Str_Obj_t * | pObj, | ||
Vec_Int_t * | vDelay, | ||
int | nLutSize, | ||
int | nGroups, | ||
int | nMuxes, | ||
int | fRecursive, | ||
int | fOptArea, | ||
int | fVerbose | ||
) |
Definition at line 1252 of file giaStr.c.
int Str_NtkBalanceTwo | ( | Gia_Man_t * | pNew, |
Str_Ntk_t * | p, | ||
Str_Obj_t * | pObj, | ||
int | i, | ||
int | j, | ||
Vec_Int_t * | vDelay, | ||
int * | pCost, | ||
int * | pSuper, | ||
word * | pMatrix, | ||
int | nSize, | ||
int | nLutSize, | ||
int | CostBest | ||
) |
Definition at line 1052 of file giaStr.c.
|
inlinestatic |
Definition at line 124 of file giaStr.c.
|
inlinestatic |
Definition at line 158 of file giaStr.c.
Definition at line 141 of file giaStr.c.
Definition at line 171 of file giaStr.c.
|
inlinestatic |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Logic network manipulation.]
Description []
SideEffects []
SeeAlso []
Definition at line 108 of file giaStr.c.
|
inlinestatic |
Definition at line 796 of file giaStr.c.
Definition at line 83 of file giaStr.c.
Definition at line 85 of file giaStr.c.
|
inlinestatic |
Definition at line 147 of file giaStr.c.
|
inlinestatic |