abc-master
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "misc/vec/vec.h"
#include "misc/extra/extraBdd.h"
#include "cloud.h"
Go to the source code of this file.
Data Structures | |
struct | Kit_Sop_t_ |
struct | Kit_Edge_t_ |
struct | Kit_Node_t_ |
struct | Kit_Graph_t_ |
struct | Kit_DsdObj_t_ |
struct | Kit_DsdNtk_t_ |
struct | Kit_DsdMan_t_ |
Macros | |
#define | Kit_DsdNtkForEachObj(pNtk, pObj, i) for ( i = 0; (i < (pNtk)->nNodes) && ((pObj) = (pNtk)->pNodes[i]); i++ ) |
#define | Kit_DsdObjForEachFanin(pNtk, pObj, iLit, i) for ( i = 0; (i < (int)(pObj)->nFans) && ((iLit) = (pObj)->pFans[i], 1); i++ ) |
#define | Kit_DsdObjForEachFaninReverse(pNtk, pObj, iLit, i) for ( i = (int)(pObj)->nFans - 1; (i >= 0) && ((iLit) = (pObj)->pFans[i], 1); i-- ) |
#define | Kit_PlaForEachCube(pSop, nFanins, pCube) for ( pCube = (pSop); *pCube; pCube += (nFanins) + 3 ) |
#define | Kit_PlaCubeForEachVar(pCube, Value, i) for ( i = 0; (pCube[i] != ' ') && (Value = pCube[i]); i++ ) |
#define | KIT_MIN(a, b) (((a) < (b))? (a) : (b)) |
MACRO DEFINITIONS ///. More... | |
#define | KIT_MAX(a, b) (((a) > (b))? (a) : (b)) |
#define | KIT_INFINITY (100000000) |
#define | Kit_SopForEachCube(cSop, uCube, i) for ( i = 0; (i < Kit_SopCubeNum(cSop)) && ((uCube) = Kit_SopCube(cSop, i)); i++ ) |
ITERATORS ///. More... | |
#define | Kit_CubeForEachLiteral(uCube, Lit, nLits, i) for ( i = 0; (i < (nLits)) && ((Lit) = Kit_CubeHasLit(uCube, i)); i++ ) |
#define | Kit_GraphForEachLeaf(pGraph, pLeaf, i) for ( i = 0; (i < (pGraph)->nLeaves) && (((pLeaf) = Kit_GraphNode(pGraph, i)), 1); i++ ) |
#define | Kit_GraphForEachNode(pGraph, pAnd, i) for ( i = (pGraph)->nLeaves; (i < (pGraph)->nSize) && (((pAnd) = Kit_GraphNode(pGraph, i)), 1); i++ ) |
Typedefs | |
typedef typedefABC_NAMESPACE_HEADER_START struct Kit_Sop_t_ | Kit_Sop_t |
INCLUDES ///. More... | |
typedef struct Kit_Edge_t_ | Kit_Edge_t |
typedef struct Kit_Node_t_ | Kit_Node_t |
typedef struct Kit_Graph_t_ | Kit_Graph_t |
typedef struct Kit_DsdObj_t_ | Kit_DsdObj_t |
typedef struct Kit_DsdNtk_t_ | Kit_DsdNtk_t |
typedef struct Kit_DsdMan_t_ | Kit_DsdMan_t |
Enumerations | |
enum | Kit_Dsd_t { KIT_DSD_NONE = 0, KIT_DSD_CONST1, KIT_DSD_VAR, KIT_DSD_AND, KIT_DSD_XOR, KIT_DSD_PRIME } |
Functions | |
static unsigned | Kit_DsdObjOffset (int nFans) |
static unsigned * | Kit_DsdObjTruth (Kit_DsdObj_t *pObj) |
static int | Kit_DsdNtkObjNum (Kit_DsdNtk_t *pNtk) |
static Kit_DsdObj_t * | Kit_DsdNtkObj (Kit_DsdNtk_t *pNtk, int Id) |
static Kit_DsdObj_t * | Kit_DsdNtkRoot (Kit_DsdNtk_t *pNtk) |
static int | Kit_DsdLitIsLeaf (Kit_DsdNtk_t *pNtk, int Lit) |
static unsigned | Kit_DsdLitSupport (Kit_DsdNtk_t *pNtk, int Lit) |
static int | Kit_CubeHasLit (unsigned uCube, int i) |
static unsigned | Kit_CubeSetLit (unsigned uCube, int i) |
static unsigned | Kit_CubeXorLit (unsigned uCube, int i) |
static unsigned | Kit_CubeRemLit (unsigned uCube, int i) |
static int | Kit_CubeContains (unsigned uLarge, unsigned uSmall) |
static unsigned | Kit_CubeSharp (unsigned uCube, unsigned uMask) |
static unsigned | Kit_CubeMask (int nVar) |
static int | Kit_CubeIsMarked (unsigned uCube) |
static unsigned | Kit_CubeMark (unsigned uCube) |
static unsigned | Kit_CubeUnmark (unsigned uCube) |
static int | Kit_SopCubeNum (Kit_Sop_t *cSop) |
static unsigned | Kit_SopCube (Kit_Sop_t *cSop, int i) |
static void | Kit_SopShrink (Kit_Sop_t *cSop, int nCubesNew) |
static void | Kit_SopPushCube (Kit_Sop_t *cSop, unsigned uCube) |
static void | Kit_SopWriteCube (Kit_Sop_t *cSop, unsigned uCube, int i) |
static Kit_Edge_t | Kit_EdgeCreate (int Node, int fCompl) |
static unsigned | Kit_EdgeToInt (Kit_Edge_t eEdge) |
static Kit_Edge_t | Kit_IntToEdge (unsigned Edge) |
static unsigned | Kit_EdgeToInt_ (Kit_Edge_t m) |
static Kit_Edge_t | Kit_IntToEdge_ (unsigned m) |
static int | Kit_GraphIsConst (Kit_Graph_t *pGraph) |
static int | Kit_GraphIsConst0 (Kit_Graph_t *pGraph) |
static int | Kit_GraphIsConst1 (Kit_Graph_t *pGraph) |
static int | Kit_GraphIsComplement (Kit_Graph_t *pGraph) |
static int | Kit_GraphIsVar (Kit_Graph_t *pGraph) |
static void | Kit_GraphComplement (Kit_Graph_t *pGraph) |
static void | Kit_GraphSetRoot (Kit_Graph_t *pGraph, Kit_Edge_t eRoot) |
static int | Kit_GraphLeaveNum (Kit_Graph_t *pGraph) |
static int | Kit_GraphNodeNum (Kit_Graph_t *pGraph) |
static Kit_Node_t * | Kit_GraphNode (Kit_Graph_t *pGraph, int i) |
static Kit_Node_t * | Kit_GraphNodeLast (Kit_Graph_t *pGraph) |
static int | Kit_GraphNodeInt (Kit_Graph_t *pGraph, Kit_Node_t *pNode) |
static int | Kit_GraphNodeIsVar (Kit_Graph_t *pGraph, Kit_Node_t *pNode) |
static Kit_Node_t * | Kit_GraphVar (Kit_Graph_t *pGraph) |
static int | Kit_GraphVarInt (Kit_Graph_t *pGraph) |
static Kit_Node_t * | Kit_GraphNodeFanin0 (Kit_Graph_t *pGraph, Kit_Node_t *pNode) |
static Kit_Node_t * | Kit_GraphNodeFanin1 (Kit_Graph_t *pGraph, Kit_Node_t *pNode) |
static int | Kit_GraphRootLevel (Kit_Graph_t *pGraph) |
static int | Kit_SuppIsMinBase (int Supp) |
static int | Kit_BitWordNum (int nBits) |
static int | Kit_TruthWordNum (int nVars) |
static unsigned | Kit_BitMask (int nBits) |
static void | Kit_TruthSetBit (unsigned *p, int Bit) |
static void | Kit_TruthXorBit (unsigned *p, int Bit) |
static int | Kit_TruthHasBit (unsigned *p, int Bit) |
static int | Kit_WordFindFirstBit (unsigned uWord) |
static int | Kit_WordHasOneBit (unsigned uWord) |
static int | Kit_WordCountOnes (unsigned uWord) |
static int | Kit_TruthCountOnes (unsigned *pIn, int nVars) |
static int | Kit_TruthFindFirstBit (unsigned *pIn, int nVars) |
static int | Kit_TruthFindFirstZero (unsigned *pIn, int nVars) |
static int | Kit_TruthIsEqual (unsigned *pIn0, unsigned *pIn1, int nVars) |
static int | Kit_TruthIsEqualWithCare (unsigned *pIn0, unsigned *pIn1, unsigned *pCare, int nVars) |
static int | Kit_TruthIsOpposite (unsigned *pIn0, unsigned *pIn1, int nVars) |
static int | Kit_TruthIsEqualWithPhase (unsigned *pIn0, unsigned *pIn1, int nVars) |
static int | Kit_TruthIsConst0 (unsigned *pIn, int nVars) |
static int | Kit_TruthIsConst1 (unsigned *pIn, int nVars) |
static int | Kit_TruthIsImply (unsigned *pIn1, unsigned *pIn2, int nVars) |
static int | Kit_TruthIsDisjoint (unsigned *pIn1, unsigned *pIn2, int nVars) |
static int | Kit_TruthIsDisjoint3 (unsigned *pIn1, unsigned *pIn2, unsigned *pIn3, int nVars) |
static void | Kit_TruthCopy (unsigned *pOut, unsigned *pIn, int nVars) |
static void | Kit_TruthClear (unsigned *pOut, int nVars) |
static void | Kit_TruthFill (unsigned *pOut, int nVars) |
static void | Kit_TruthNot (unsigned *pOut, unsigned *pIn, int nVars) |
static void | Kit_TruthAnd (unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars) |
static void | Kit_TruthOr (unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars) |
static void | Kit_TruthXor (unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars) |
static void | Kit_TruthSharp (unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars) |
static void | Kit_TruthNand (unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars) |
static void | Kit_TruthAndPhase (unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars, int fCompl0, int fCompl1) |
static void | Kit_TruthOrPhase (unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars, int fCompl0, int fCompl1) |
static void | Kit_TruthMux (unsigned *pOut, unsigned *pIn0, unsigned *pIn1, unsigned *pCtrl, int nVars) |
static void | Kit_TruthMuxPhase (unsigned *pOut, unsigned *pIn0, unsigned *pIn1, unsigned *pCtrl, int nVars, int fComp0) |
static void | Kit_TruthIthVar (unsigned *pTruth, int nVars, int iVar) |
DdNode * | Kit_SopToBdd (DdManager *dd, Kit_Sop_t *cSop, int nVars) |
FUNCTION DECLARATIONS ///. More... | |
DdNode * | Kit_GraphToBdd (DdManager *dd, Kit_Graph_t *pGraph) |
DdNode * | Kit_TruthToBdd (DdManager *dd, unsigned *pTruth, int nVars, int fMSBonTop) |
CloudNode * | Kit_TruthToCloud (CloudManager *dd, unsigned *pTruth, int nVars) |
unsigned * | Kit_CloudToTruth (Vec_Int_t *vNodes, int nVars, Vec_Ptr_t *vStore, int fInv) |
int | Kit_CreateCloud (CloudManager *dd, CloudNode *pFunc, Vec_Int_t *vNodes) |
int | Kit_CreateCloudFromTruth (CloudManager *dd, unsigned *pTruth, int nVars, Vec_Int_t *vNodes) |
unsigned * | Kit_TruthCompose (CloudManager *dd, unsigned *pTruth, int nVars, unsigned **pInputs, int nVarsAll, Vec_Ptr_t *vStore, Vec_Int_t *vNodes) |
void | Kit_TruthCofSupports (Vec_Int_t *vBddDir, Vec_Int_t *vBddInv, int nVars, Vec_Int_t *vMemory, unsigned *puSupps) |
Kit_DsdMan_t * | Kit_DsdManAlloc (int nVars, int nNodes) |
DECLARATIONS ///. More... | |
void | Kit_DsdManFree (Kit_DsdMan_t *p) |
Kit_DsdNtk_t * | Kit_DsdDeriveNtk (unsigned *pTruth, int nVars, int nLutSize) |
unsigned * | Kit_DsdTruthCompute (Kit_DsdMan_t *p, Kit_DsdNtk_t *pNtk) |
void | Kit_DsdTruth (Kit_DsdNtk_t *pNtk, unsigned *pTruthRes) |
void | Kit_DsdTruthPartial (Kit_DsdMan_t *p, Kit_DsdNtk_t *pNtk, unsigned *pTruthRes, unsigned uSupp) |
void | Kit_DsdTruthPartialTwo (Kit_DsdMan_t *p, Kit_DsdNtk_t *pNtk, unsigned uSupp, int iVar, unsigned *pTruthCo, unsigned *pTruthDec) |
void | Kit_DsdPrint (FILE *pFile, Kit_DsdNtk_t *pNtk) |
void | Kit_DsdPrintExpanded (Kit_DsdNtk_t *pNtk) |
void | Kit_DsdPrintFromTruth (unsigned *pTruth, int nVars) |
void | Kit_DsdPrintFromTruth2 (FILE *pFile, unsigned *pTruth, int nVars) |
void | Kit_DsdWriteFromTruth (char *pBuffer, unsigned *pTruth, int nVars) |
Kit_DsdNtk_t * | Kit_DsdDecompose (unsigned *pTruth, int nVars) |
Kit_DsdNtk_t * | Kit_DsdDecomposeExpand (unsigned *pTruth, int nVars) |
Kit_DsdNtk_t * | Kit_DsdDecomposeMux (unsigned *pTruth, int nVars, int nDecMux) |
void | Kit_DsdVerify (Kit_DsdNtk_t *pNtk, unsigned *pTruth, int nVars) |
void | Kit_DsdNtkFree (Kit_DsdNtk_t *pNtk) |
int | Kit_DsdNonDsdSizeMax (Kit_DsdNtk_t *pNtk) |
Kit_DsdObj_t * | Kit_DsdNonDsdPrimeMax (Kit_DsdNtk_t *pNtk) |
unsigned | Kit_DsdNonDsdSupports (Kit_DsdNtk_t *pNtk) |
int | Kit_DsdCountAigNodes (Kit_DsdNtk_t *pNtk) |
unsigned | Kit_DsdGetSupports (Kit_DsdNtk_t *p) |
Kit_DsdNtk_t * | Kit_DsdExpand (Kit_DsdNtk_t *p) |
Kit_DsdNtk_t * | Kit_DsdShrink (Kit_DsdNtk_t *p, int pPrios[]) |
void | Kit_DsdRotate (Kit_DsdNtk_t *p, int pFreqs[]) |
int | Kit_DsdCofactoring (unsigned *pTruth, int nVars, int *pCofVars, int nLimit, int fVerbose) |
Kit_Graph_t * | Kit_SopFactor (Vec_Int_t *vCover, int fCompl, int nVars, Vec_Int_t *vMemory) |
FUNCTION DEFINITIONS ///. More... | |
Kit_Graph_t * | Kit_GraphCreate (int nLeaves) |
DECLARATIONS ///. More... | |
Kit_Graph_t * | Kit_GraphCreateConst0 () |
Kit_Graph_t * | Kit_GraphCreateConst1 () |
Kit_Graph_t * | Kit_GraphCreateLeaf (int iLeaf, int nLeaves, int fCompl) |
void | Kit_GraphFree (Kit_Graph_t *pGraph) |
Kit_Node_t * | Kit_GraphAppendNode (Kit_Graph_t *pGraph) |
Kit_Edge_t | Kit_GraphAddNodeAnd (Kit_Graph_t *pGraph, Kit_Edge_t eEdge0, Kit_Edge_t eEdge1) |
Kit_Edge_t | Kit_GraphAddNodeOr (Kit_Graph_t *pGraph, Kit_Edge_t eEdge0, Kit_Edge_t eEdge1) |
Kit_Edge_t | Kit_GraphAddNodeXor (Kit_Graph_t *pGraph, Kit_Edge_t eEdge0, Kit_Edge_t eEdge1, int Type) |
Kit_Edge_t | Kit_GraphAddNodeMux (Kit_Graph_t *pGraph, Kit_Edge_t eEdgeC, Kit_Edge_t eEdgeT, Kit_Edge_t eEdgeE, int Type) |
unsigned | Kit_GraphToTruth (Kit_Graph_t *pGraph) |
Kit_Graph_t * | Kit_TruthToGraph (unsigned *pTruth, int nVars, Vec_Int_t *vMemory) |
int | Kit_GraphLeafDepth_rec (Kit_Graph_t *pGraph, Kit_Node_t *pNode, Kit_Node_t *pLeaf) |
int | Kit_TruthIsop (unsigned *puTruth, int nVars, Vec_Int_t *vMemory, int fTryBoth) |
FUNCTION DEFINITIONS ///. More... | |
void | Kit_TruthIsopPrint (unsigned *puTruth, int nVars, Vec_Int_t *vMemory, int fTryBoth) |
void | Kit_TruthIsopPrintCover (Vec_Int_t *vCover, int nVars, int fCompl) |
int | Kit_PlaIsConst0 (char *pSop) |
DECLARATIONS ///. More... | |
int | Kit_PlaIsConst1 (char *pSop) |
int | Kit_PlaIsBuf (char *pSop) |
int | Kit_PlaIsInv (char *pSop) |
int | Kit_PlaGetVarNum (char *pSop) |
int | Kit_PlaGetCubeNum (char *pSop) |
int | Kit_PlaIsComplement (char *pSop) |
void | Kit_PlaComplement (char *pSop) |
char * | Kit_PlaStart (void *p, int nCubes, int nVars) |
char * | Kit_PlaCreateFromIsop (void *p, int nVars, Vec_Int_t *vCover) |
void | Kit_PlaToIsop (char *pSop, Vec_Int_t *vCover) |
char * | Kit_PlaStoreSop (void *p, char *pSop) |
char * | Kit_PlaFromTruth (void *p, unsigned *pTruth, int nVars, Vec_Int_t *vCover) |
char * | Kit_PlaFromTruthNew (unsigned *pTruth, int nVars, Vec_Int_t *vCover, Vec_Str_t *vStr) |
ABC_UINT64_T | Kit_PlaToTruth6 (char *pSop, int nVars) |
void | Kit_PlaToTruth (char *pSop, int nVars, Vec_Ptr_t *vVars, unsigned *pTemp, unsigned *pTruth) |
void | Kit_SopCreate (Kit_Sop_t *cResult, Vec_Int_t *vInput, int nVars, Vec_Int_t *vMemory) |
DECLARATIONS ///. More... | |
void | Kit_SopCreateInverse (Kit_Sop_t *cResult, Vec_Int_t *vInput, int nVars, Vec_Int_t *vMemory) |
void | Kit_SopDup (Kit_Sop_t *cResult, Kit_Sop_t *cSop, Vec_Int_t *vMemory) |
void | Kit_SopDivideByLiteralQuo (Kit_Sop_t *cSop, int iLit) |
void | Kit_SopDivideByCube (Kit_Sop_t *cSop, Kit_Sop_t *cDiv, Kit_Sop_t *vQuo, Kit_Sop_t *vRem, Vec_Int_t *vMemory) |
void | Kit_SopDivideInternal (Kit_Sop_t *cSop, Kit_Sop_t *cDiv, Kit_Sop_t *vQuo, Kit_Sop_t *vRem, Vec_Int_t *vMemory) |
void | Kit_SopMakeCubeFree (Kit_Sop_t *cSop) |
int | Kit_SopIsCubeFree (Kit_Sop_t *cSop) |
void | Kit_SopCommonCubeCover (Kit_Sop_t *cResult, Kit_Sop_t *cSop, Vec_Int_t *vMemory) |
int | Kit_SopAnyLiteral (Kit_Sop_t *cSop, int nLits) |
int | Kit_SopDivisor (Kit_Sop_t *cResult, Kit_Sop_t *cSop, int nLits, Vec_Int_t *vMemory) |
void | Kit_SopBestLiteralCover (Kit_Sop_t *cResult, Kit_Sop_t *cSop, unsigned uCube, int nLits, Vec_Int_t *vMemory) |
void | Kit_TruthSwapAdjacentVars (unsigned *pOut, unsigned *pIn, int nVars, int Start) |
DECLARATIONS ///. More... | |
void | Kit_TruthStretch (unsigned *pOut, unsigned *pIn, int nVars, int nVarsAll, unsigned Phase, int fReturnIn) |
void | Kit_TruthPermute (unsigned *pOut, unsigned *pIn, int nVars, char *pPerm, int fReturnIn) |
void | Kit_TruthShrink (unsigned *pOut, unsigned *pIn, int nVars, int nVarsAll, unsigned Phase, int fReturnIn) |
int | Kit_TruthVarInSupport (unsigned *pTruth, int nVars, int iVar) |
int | Kit_TruthSupportSize (unsigned *pTruth, int nVars) |
unsigned | Kit_TruthSupport (unsigned *pTruth, int nVars) |
void | Kit_TruthCofactor0 (unsigned *pTruth, int nVars, int iVar) |
void | Kit_TruthCofactor1 (unsigned *pTruth, int nVars, int iVar) |
void | Kit_TruthCofactor0New (unsigned *pOut, unsigned *pIn, int nVars, int iVar) |
void | Kit_TruthCofactor1New (unsigned *pOut, unsigned *pIn, int nVars, int iVar) |
int | Kit_TruthVarIsVacuous (unsigned *pOnset, unsigned *pOffset, int nVars, int iVar) |
void | Kit_TruthExist (unsigned *pTruth, int nVars, int iVar) |
void | Kit_TruthExistNew (unsigned *pRes, unsigned *pTruth, int nVars, int iVar) |
void | Kit_TruthExistSet (unsigned *pRes, unsigned *pTruth, int nVars, unsigned uMask) |
void | Kit_TruthForall (unsigned *pTruth, int nVars, int iVar) |
void | Kit_TruthForallNew (unsigned *pRes, unsigned *pTruth, int nVars, int iVar) |
void | Kit_TruthForallSet (unsigned *pRes, unsigned *pTruth, int nVars, unsigned uMask) |
void | Kit_TruthUniqueNew (unsigned *pRes, unsigned *pTruth, int nVars, int iVar) |
void | Kit_TruthMuxVar (unsigned *pOut, unsigned *pCof0, unsigned *pCof1, int nVars, int iVar) |
void | Kit_TruthMuxVarPhase (unsigned *pOut, unsigned *pCof0, unsigned *pCof1, int nVars, int iVar, int fCompl0) |
void | Kit_TruthChangePhase (unsigned *pTruth, int nVars, int iVar) |
int | Kit_TruthVarsSymm (unsigned *pTruth, int nVars, int iVar0, int iVar1, unsigned *pCof0, unsigned *pCof1) |
int | Kit_TruthVarsAntiSymm (unsigned *pTruth, int nVars, int iVar0, int iVar1, unsigned *pCof0, unsigned *pCof1) |
int | Kit_TruthMinCofSuppOverlap (unsigned *pTruth, int nVars, int *pVarMin) |
int | Kit_TruthBestCofVar (unsigned *pTruth, int nVars, unsigned *pCof0, unsigned *pCof1) |
void | Kit_TruthCountOnesInCofs (unsigned *pTruth, int nVars, int *pStore) |
void | Kit_TruthCountOnesInCofs0 (unsigned *pTruth, int nVars, int *pStore) |
void | Kit_TruthCountOnesInCofsSlow (unsigned *pTruth, int nVars, int *pStore, unsigned *pAux) |
unsigned | Kit_TruthHash (unsigned *pIn, int nWords) |
unsigned | Kit_TruthSemiCanonicize (unsigned *pInOut, unsigned *pAux, int nVars, char *pCanonPerm) |
char * | Kit_TruthDumpToFile (unsigned *pTruth, int nVars, int nFile) |
void | Kit_TruthPrintProfile (unsigned *pTruth, int nVars) |
#define Kit_CubeForEachLiteral | ( | uCube, | |
Lit, | |||
nLits, | |||
i | |||
) | for ( i = 0; (i < (nLits)) && ((Lit) = Kit_CubeHasLit(uCube, i)); i++ ) |
#define Kit_DsdNtkForEachObj | ( | pNtk, | |
pObj, | |||
i | |||
) | for ( i = 0; (i < (pNtk)->nNodes) && ((pObj) = (pNtk)->pNodes[i]); i++ ) |
#define Kit_DsdObjForEachFanin | ( | pNtk, | |
pObj, | |||
iLit, | |||
i | |||
) | for ( i = 0; (i < (int)(pObj)->nFans) && ((iLit) = (pObj)->pFans[i], 1); i++ ) |
#define Kit_DsdObjForEachFaninReverse | ( | pNtk, | |
pObj, | |||
iLit, | |||
i | |||
) | for ( i = (int)(pObj)->nFans - 1; (i >= 0) && ((iLit) = (pObj)->pFans[i], 1); i-- ) |
#define Kit_GraphForEachLeaf | ( | pGraph, | |
pLeaf, | |||
i | |||
) | for ( i = 0; (i < (pGraph)->nLeaves) && (((pLeaf) = Kit_GraphNode(pGraph, i)), 1); i++ ) |
#define Kit_GraphForEachNode | ( | pGraph, | |
pAnd, | |||
i | |||
) | for ( i = (pGraph)->nLeaves; (i < (pGraph)->nSize) && (((pAnd) = Kit_GraphNode(pGraph, i)), 1); i++ ) |
#define KIT_MIN | ( | a, | |
b | |||
) | (((a) < (b))? (a) : (b)) |
#define Kit_PlaCubeForEachVar | ( | pCube, | |
Value, | |||
i | |||
) | for ( i = 0; (pCube[i] != ' ') && (Value = pCube[i]); i++ ) |
#define Kit_PlaForEachCube | ( | pSop, | |
nFanins, | |||
pCube | |||
) | for ( pCube = (pSop); *pCube; pCube += (nFanins) + 3 ) |
#define Kit_SopForEachCube | ( | cSop, | |
uCube, | |||
i | |||
) | for ( i = 0; (i < Kit_SopCubeNum(cSop)) && ((uCube) = Kit_SopCube(cSop, i)); i++ ) |
typedef struct Kit_DsdMan_t_ Kit_DsdMan_t |
typedef struct Kit_DsdNtk_t_ Kit_DsdNtk_t |
typedef struct Kit_DsdObj_t_ Kit_DsdObj_t |
typedef struct Kit_Edge_t_ Kit_Edge_t |
typedef struct Kit_Graph_t_ Kit_Graph_t |
typedef struct Kit_Node_t_ Kit_Node_t |
typedef typedefABC_NAMESPACE_HEADER_START struct Kit_Sop_t_ Kit_Sop_t |
INCLUDES ///.
CFile****************************************************************
FileName [kit.h]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Computation kit.]
Synopsis [External declarations.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Dec 6, 2006.]
Revision [
]PARAMETERS ///BASIC TYPES ///
enum Kit_Dsd_t |
|
inlinestatic |
Function*************************************************************
Synopsis [Computes composition of truth tables.]
Description []
SideEffects []
SeeAlso []
Definition at line 229 of file kitCloud.c.
int Kit_CreateCloud | ( | CloudManager * | dd, |
CloudNode * | pFunc, | ||
Vec_Int_t * | vNodes | ||
) |
Function********************************************************************
Synopsis [Transforms the array of BDDs into the integer array.]
Description []
SideEffects []
SeeAlso []
Definition at line 167 of file kitCloud.c.
int Kit_CreateCloudFromTruth | ( | CloudManager * | dd, |
unsigned * | pTruth, | ||
int | nVars, | ||
Vec_Int_t * | vNodes | ||
) |
Function********************************************************************
Synopsis [Transforms the array of BDDs into the integer array.]
Description []
SideEffects []
SeeAlso []
Definition at line 209 of file kitCloud.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
int Kit_DsdCofactoring | ( | unsigned * | pTruth, |
int | nVars, | ||
int * | pCofVars, | ||
int | nLimit, | ||
int | fVerbose | ||
) |
Function*************************************************************
Synopsis [Canonical decomposition into completely DSD-structure.]
Description [Returns the number of cofactoring steps. Also returns the cofactoring variables in pVars.]
SideEffects []
SeeAlso []
Definition at line 2678 of file kitDsd.c.
int Kit_DsdCountAigNodes | ( | Kit_DsdNtk_t * | pNtk | ) |
Function*************************************************************
Synopsis [Returns 1 if there is a component with more than 3 inputs.]
Description []
SideEffects []
SeeAlso []
Kit_DsdNtk_t* Kit_DsdDecompose | ( | unsigned * | pTruth, |
int | nVars | ||
) |
Function*************************************************************
Synopsis [Performs decomposition of the truth table.]
Description []
SideEffects []
SeeAlso []
Definition at line 2314 of file kitDsd.c.
Kit_DsdNtk_t* Kit_DsdDecomposeExpand | ( | unsigned * | pTruth, |
int | nVars | ||
) |
Function*************************************************************
Synopsis [Performs decomposition of the truth table.]
Description []
SideEffects []
SeeAlso []
Definition at line 2330 of file kitDsd.c.
Kit_DsdNtk_t* Kit_DsdDecomposeMux | ( | unsigned * | pTruth, |
int | nVars, | ||
int | nDecMux | ||
) |
Function*************************************************************
Synopsis [Performs decomposition of the truth table.]
Description [Uses MUXes to break-down large prime nodes.]
SideEffects []
SeeAlso []
Definition at line 2350 of file kitDsd.c.
Kit_DsdNtk_t* Kit_DsdDeriveNtk | ( | unsigned * | pTruth, |
int | nVars, | ||
int | nLutSize | ||
) |
Kit_DsdNtk_t* Kit_DsdExpand | ( | Kit_DsdNtk_t * | p | ) |
Function*************************************************************
Synopsis [Expands the network.]
Description []
SideEffects []
SeeAlso []
Definition at line 1451 of file kitDsd.c.
unsigned Kit_DsdGetSupports | ( | Kit_DsdNtk_t * | p | ) |
Function*************************************************************
Synopsis [Compute the support.]
Description []
SideEffects []
SeeAlso []
Definition at line 1762 of file kitDsd.c.
|
inlinestatic |
|
inlinestatic |
Kit_DsdMan_t* Kit_DsdManAlloc | ( | int | nVars, |
int | nNodes | ||
) |
DECLARATIONS ///.
CFile****************************************************************
FileName [kitDsd.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Computation kit.]
Synopsis [Performs disjoint-support decomposition based on truth tables.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Dec 6, 2006.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Allocates the DSD manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 45 of file kitDsd.c.
void Kit_DsdManFree | ( | Kit_DsdMan_t * | p | ) |
Kit_DsdObj_t* Kit_DsdNonDsdPrimeMax | ( | Kit_DsdNtk_t * | pNtk | ) |
int Kit_DsdNonDsdSizeMax | ( | Kit_DsdNtk_t * | pNtk | ) |
unsigned Kit_DsdNonDsdSupports | ( | Kit_DsdNtk_t * | pNtk | ) |
Function*************************************************************
Synopsis [Finds the union of supports of the non-DSD blocks.]
Description []
SideEffects []
SeeAlso []
void Kit_DsdNtkFree | ( | Kit_DsdNtk_t * | pNtk | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
void Kit_DsdPrint | ( | FILE * | pFile, |
Kit_DsdNtk_t * | pNtk | ||
) |
Function*************************************************************
Synopsis [Print the DSD formula.]
Description []
SideEffects []
SeeAlso []
Definition at line 374 of file kitDsd.c.
void Kit_DsdPrintExpanded | ( | Kit_DsdNtk_t * | pNtk | ) |
void Kit_DsdPrintFromTruth | ( | unsigned * | pTruth, |
int | nVars | ||
) |
Function*************************************************************
Synopsis [Print the DSD formula.]
Description []
SideEffects []
SeeAlso []
Definition at line 490 of file kitDsd.c.
void Kit_DsdPrintFromTruth2 | ( | FILE * | pFile, |
unsigned * | pTruth, | ||
int | nVars | ||
) |
Function*************************************************************
Synopsis [Print the DSD formula.]
Description []
SideEffects []
SeeAlso []
Definition at line 514 of file kitDsd.c.
void Kit_DsdRotate | ( | Kit_DsdNtk_t * | p, |
int | pFreqs[] | ||
) |
Function*************************************************************
Synopsis [Rotates the network.]
Description [Transforms prime nodes to have the fanin with the highest frequency of supports go first.]
SideEffects []
SeeAlso []
Definition at line 1671 of file kitDsd.c.
Kit_DsdNtk_t* Kit_DsdShrink | ( | Kit_DsdNtk_t * | p, |
int | pPrios[] | ||
) |
Function*************************************************************
Synopsis [Shrinks the network.]
Description [Transforms the network to have two-input nodes so that the higher-ordered nodes were decomposed out first.]
SideEffects []
SeeAlso []
Definition at line 1633 of file kitDsd.c.
void Kit_DsdTruth | ( | Kit_DsdNtk_t * | pNtk, |
unsigned * | pTruthRes | ||
) |
Function*************************************************************
Synopsis [Derives the truth table of the DSD network.]
Description []
SideEffects []
SeeAlso []
Definition at line 1068 of file kitDsd.c.
unsigned* Kit_DsdTruthCompute | ( | Kit_DsdMan_t * | p, |
Kit_DsdNtk_t * | pNtk | ||
) |
Function*************************************************************
Synopsis [Derives the truth table of the DSD network.]
Description []
SideEffects []
SeeAlso []
Definition at line 663 of file kitDsd.c.
void Kit_DsdTruthPartial | ( | Kit_DsdMan_t * | p, |
Kit_DsdNtk_t * | pNtk, | ||
unsigned * | pTruthRes, | ||
unsigned | uSupp | ||
) |
Function*************************************************************
Synopsis [Derives the truth table of the DSD network.]
Description []
SideEffects []
SeeAlso []
Definition at line 1107 of file kitDsd.c.
void Kit_DsdTruthPartialTwo | ( | Kit_DsdMan_t * | p, |
Kit_DsdNtk_t * | pNtk, | ||
unsigned | uSupp, | ||
int | iVar, | ||
unsigned * | pTruthCo, | ||
unsigned * | pTruthDec | ||
) |
Function*************************************************************
Synopsis [Derives the truth table of the DSD network.]
Description []
SideEffects []
SeeAlso []
Definition at line 1089 of file kitDsd.c.
void Kit_DsdVerify | ( | Kit_DsdNtk_t * | pNtk, |
unsigned * | pTruth, | ||
int | nVars | ||
) |
Function*************************************************************
Synopsis [Performs decomposition of the truth table.]
Description []
SideEffects []
SeeAlso []
Definition at line 2492 of file kitDsd.c.
void Kit_DsdWriteFromTruth | ( | char * | pBuffer, |
unsigned * | pTruth, | ||
int | nVars | ||
) |
Function*************************************************************
Synopsis [Print the DSD formula.]
Description []
SideEffects []
SeeAlso []
Definition at line 536 of file kitDsd.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Kit_Edge_t Kit_GraphAddNodeAnd | ( | Kit_Graph_t * | pGraph, |
Kit_Edge_t | eEdge0, | ||
Kit_Edge_t | eEdge1 | ||
) |
Function*************************************************************
Synopsis [Creates an AND node.]
Description []
SideEffects []
SeeAlso []
Definition at line 172 of file kitGraph.c.
Kit_Edge_t Kit_GraphAddNodeMux | ( | Kit_Graph_t * | pGraph, |
Kit_Edge_t | eEdgeC, | ||
Kit_Edge_t | eEdgeT, | ||
Kit_Edge_t | eEdgeE, | ||
int | Type | ||
) |
Function*************************************************************
Synopsis [Creates an XOR node.]
Description []
SideEffects []
SeeAlso []
Definition at line 265 of file kitGraph.c.
Kit_Edge_t Kit_GraphAddNodeOr | ( | Kit_Graph_t * | pGraph, |
Kit_Edge_t | eEdge0, | ||
Kit_Edge_t | eEdge1 | ||
) |
Function*************************************************************
Synopsis [Creates an OR node.]
Description []
SideEffects []
SeeAlso []
Definition at line 196 of file kitGraph.c.
Kit_Edge_t Kit_GraphAddNodeXor | ( | Kit_Graph_t * | pGraph, |
Kit_Edge_t | eEdge0, | ||
Kit_Edge_t | eEdge1, | ||
int | Type | ||
) |
Function*************************************************************
Synopsis [Creates an XOR node.]
Description []
SideEffects []
SeeAlso []
Definition at line 224 of file kitGraph.c.
Kit_Node_t* Kit_GraphAppendNode | ( | Kit_Graph_t * | pGraph | ) |
Function*************************************************************
Synopsis [Appends a new node to the graph.]
Description [This procedure is meant for internal use.]
SideEffects []
SeeAlso []
Definition at line 148 of file kitGraph.c.
|
inlinestatic |
Kit_Graph_t* Kit_GraphCreate | ( | int | nLeaves | ) |
DECLARATIONS ///.
CFile****************************************************************
FileName [kitGraph.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Computation kit.]
Synopsis [Decomposition graph representation.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Dec 6, 2006.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Creates a graph with the given number of leaves.]
Description []
SideEffects []
SeeAlso []
Definition at line 45 of file kitGraph.c.
Kit_Graph_t* Kit_GraphCreateConst0 | ( | ) |
Function*************************************************************
Synopsis [Creates constant 0 graph.]
Description []
SideEffects []
SeeAlso []
Definition at line 69 of file kitGraph.c.
Kit_Graph_t* Kit_GraphCreateConst1 | ( | ) |
Function*************************************************************
Synopsis [Creates constant 1 graph.]
Description []
SideEffects []
SeeAlso []
Definition at line 90 of file kitGraph.c.
Kit_Graph_t* Kit_GraphCreateLeaf | ( | int | iLeaf, |
int | nLeaves, | ||
int | fCompl | ||
) |
Function*************************************************************
Synopsis [Creates the literal graph.]
Description []
SideEffects []
SeeAlso []
Definition at line 110 of file kitGraph.c.
void Kit_GraphFree | ( | Kit_Graph_t * | pGraph | ) |
Function*************************************************************
Synopsis [Creates a graph with the given number of leaves.]
Description []
SideEffects []
SeeAlso []
Definition at line 131 of file kitGraph.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
int Kit_GraphLeafDepth_rec | ( | Kit_Graph_t * | pGraph, |
Kit_Node_t * | pNode, | ||
Kit_Node_t * | pLeaf | ||
) |
Function*************************************************************
Synopsis [Derives the maximum depth from the leaf to the root.]
Description []
SideEffects []
SeeAlso []
Definition at line 383 of file kitGraph.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
DdNode* Kit_GraphToBdd | ( | DdManager * | dd, |
Kit_Graph_t * | pGraph | ||
) |
Function*************************************************************
Synopsis [Converts graph to BDD.]
Description []
SideEffects []
SeeAlso []
Definition at line 91 of file kitBdd.c.
unsigned Kit_GraphToTruth | ( | Kit_Graph_t * | pGraph | ) |
Function*************************************************************
Synopsis [Derives the truth table.]
Description []
SideEffects []
SeeAlso []
Definition at line 306 of file kitGraph.c.
|
inlinestatic |
|
inlinestatic |
Definition at line 216 of file kit.h.
|
inlinestatic |
|
inlinestatic |
void Kit_PlaComplement | ( | char * | pSop | ) |
char* Kit_PlaCreateFromIsop | ( | void * | p, |
int | nVars, | ||
Vec_Int_t * | vCover | ||
) |
Function*************************************************************
Synopsis [Creates the cover from the ISOP computed from TT.]
Description []
SideEffects []
SeeAlso []
Definition at line 243 of file kitPla.c.
char* Kit_PlaFromTruth | ( | void * | p, |
unsigned * | pTruth, | ||
int | nVars, | ||
Vec_Int_t * | vCover | ||
) |
Function*************************************************************
Synopsis [Transforms truth table into the SOP.]
Description []
SideEffects []
SeeAlso []
Definition at line 337 of file kitPla.c.
Function*************************************************************
Synopsis [Creates the SOP from TT.]
Description []
SideEffects []
SeeAlso []
Definition at line 406 of file kitPla.c.
int Kit_PlaGetCubeNum | ( | char * | pSop | ) |
Function*************************************************************
Synopsis [Reads the number of cubes in the cover.]
Description []
SideEffects []
SeeAlso []
int Kit_PlaGetVarNum | ( | char * | pSop | ) |
Function*************************************************************
Synopsis [Reads the number of variables in the cover.]
Description []
SideEffects []
SeeAlso []
int Kit_PlaIsBuf | ( | char * | pSop | ) |
Function*************************************************************
Synopsis [Checks if the cover is a buffer.]
Description []
SideEffects []
SeeAlso []
int Kit_PlaIsComplement | ( | char * | pSop | ) |
int Kit_PlaIsConst0 | ( | char * | pSop | ) |
DECLARATIONS ///.
CFile****************************************************************
FileName [kitPla.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Computation kit.]
Synopsis [Manipulating SOP in the form of a C-string.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Dec 6, 2006.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Checks if the cover is constant 0.]
Description []
SideEffects []
SeeAlso []
int Kit_PlaIsConst1 | ( | char * | pSop | ) |
int Kit_PlaIsInv | ( | char * | pSop | ) |
Function*************************************************************
Synopsis [Checks if the cover is an inverter.]
Description []
SideEffects []
SeeAlso []
char* Kit_PlaStart | ( | void * | p, |
int | nCubes, | ||
int | nVars | ||
) |
Function*************************************************************
Synopsis [Creates the constant 1 cover with the given number of variables and cubes.]
Description []
SideEffects []
SeeAlso []
Definition at line 211 of file kitPla.c.
char* Kit_PlaStoreSop | ( | void * | p, |
char * | pSop | ||
) |
Function*************************************************************
Synopsis [Allocates memory and copies the SOP into it.]
Description []
SideEffects []
SeeAlso []
Definition at line 317 of file kitPla.c.
void Kit_PlaToIsop | ( | char * | pSop, |
Vec_Int_t * | vCover | ||
) |
void Kit_PlaToTruth | ( | char * | pSop, |
int | nVars, | ||
Vec_Ptr_t * | vVars, | ||
unsigned * | pTemp, | ||
unsigned * | pTruth | ||
) |
Fnction*************************************************************
Synopsis [Converting SOP into a truth table.]
Description [The SOP is represented as a C-string, as documented in file "bblif.h". The truth table is returned as a bit-string composed of 2^nVars bits. For functions of less than 6 variables, the full machine word is returned. (The truth table looks as if the function had 5 variables.) The use of this procedure should be limited to Boolean functions with no more than 16 inputs.]
SideEffects []
SeeAlso []
Definition at line 496 of file kitPla.c.
ABC_UINT64_T Kit_PlaToTruth6 | ( | char * | pSop, |
int | nVars | ||
) |
int Kit_SopAnyLiteral | ( | Kit_Sop_t * | cSop, |
int | nLits | ||
) |
void Kit_SopBestLiteralCover | ( | Kit_Sop_t * | cResult, |
Kit_Sop_t * | cSop, | ||
unsigned | uCube, | ||
int | nLits, | ||
Vec_Int_t * | vMemory | ||
) |
Function*************************************************************
Synopsis [Create the one-literal cover with the best literal from cSop.]
Description []
SideEffects []
SeeAlso []
Definition at line 560 of file kitSop.c.
DECLARATIONS ///.
CFile****************************************************************
FileName [kitSop.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Computation kit.]
Synopsis [Procedures involving SOPs.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Dec 6, 2006.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Creates SOP from the cube array.]
Description []
SideEffects []
SeeAlso []
Definition at line 45 of file kitSop.c.
void Kit_SopCreateInverse | ( | Kit_Sop_t * | cResult, |
Vec_Int_t * | vInput, | ||
int | nLits, | ||
Vec_Int_t * | vMemory | ||
) |
|
inlinestatic |
|
inlinestatic |
void Kit_SopDivideByCube | ( | Kit_Sop_t * | cSop, |
Kit_Sop_t * | cDiv, | ||
Kit_Sop_t * | vQuo, | ||
Kit_Sop_t * | vRem, | ||
Vec_Int_t * | vMemory | ||
) |
void Kit_SopDivideByLiteralQuo | ( | Kit_Sop_t * | cSop, |
int | iLit | ||
) |
Function*************************************************************
Synopsis [Derives the quotient of division by literal.]
Description [Reduces the cover to be equal to the result of division of the given cover by the literal.]
SideEffects []
SeeAlso []
Definition at line 121 of file kitSop.c.
void Kit_SopDivideInternal | ( | Kit_Sop_t * | cSop, |
Kit_Sop_t * | cDiv, | ||
Kit_Sop_t * | vQuo, | ||
Kit_Sop_t * | vRem, | ||
Vec_Int_t * | vMemory | ||
) |
Function*************************************************************
Synopsis [Divides cover by one cube.]
Description []
SideEffects []
SeeAlso []
Definition at line 178 of file kitSop.c.
Function*************************************************************
Synopsis [Computes the quick divisor of the cover.]
Description [Returns 0, if there is no divisor other than trivial.]
SideEffects []
SeeAlso []
Definition at line 534 of file kitSop.c.
Kit_Graph_t* Kit_SopFactor | ( | Vec_Int_t * | vCover, |
int | fCompl, | ||
int | nVars, | ||
Vec_Int_t * | vMemory | ||
) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Factors the cover.]
Description []
SideEffects []
SeeAlso []
Definition at line 55 of file kitFactor.c.
int Kit_SopIsCubeFree | ( | Kit_Sop_t * | cSop | ) |
void Kit_SopMakeCubeFree | ( | Kit_Sop_t * | cSop | ) |
|
inlinestatic |
|
inlinestatic |
FUNCTION DECLARATIONS ///.
FUNCTION DECLARATIONS ///.
CFile****************************************************************
FileName [kitBdd.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Computation kit.]
Synopsis [Procedures involving BDDs.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Dec 6, 2006.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Derives the BDD for the given SOP.]
Description []
SideEffects []
SeeAlso []
Definition at line 46 of file kitBdd.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
int Kit_TruthBestCofVar | ( | unsigned * | pTruth, |
int | nVars, | ||
unsigned * | pCof0, | ||
unsigned * | pCof1 | ||
) |
Function*************************************************************
Synopsis [Find the best cofactoring variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 1365 of file kitTruth.c.
void Kit_TruthChangePhase | ( | unsigned * | pTruth, |
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Changes phase of the function w.r.t. one variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 1259 of file kitTruth.c.
|
inlinestatic |
void Kit_TruthCofactor0 | ( | unsigned * | pTruth, |
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Computes negative cofactor of the function.]
Description []
SideEffects []
SeeAlso []
Definition at line 368 of file kitTruth.c.
void Kit_TruthCofactor0New | ( | unsigned * | pOut, |
unsigned * | pIn, | ||
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Computes positive cofactor of the function.]
Description []
SideEffects []
SeeAlso []
Definition at line 521 of file kitTruth.c.
void Kit_TruthCofactor1 | ( | unsigned * | pTruth, |
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Computes positive cofactor of the function.]
Description []
SideEffects []
SeeAlso []
Definition at line 470 of file kitTruth.c.
void Kit_TruthCofactor1New | ( | unsigned * | pOut, |
unsigned * | pIn, | ||
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Computes positive cofactor of the function.]
Description []
SideEffects []
SeeAlso []
Definition at line 573 of file kitTruth.c.
void Kit_TruthCofSupports | ( | Vec_Int_t * | vBddDir, |
Vec_Int_t * | vBddInv, | ||
int | nVars, | ||
Vec_Int_t * | vMemory, | ||
unsigned * | puSupps | ||
) |
Function********************************************************************
Synopsis [Compute BDD for the truth table.]
Description []
SideEffects []
SeeAlso []
Definition at line 310 of file kitCloud.c.
unsigned* Kit_TruthCompose | ( | CloudManager * | dd, |
unsigned * | pTruth, | ||
int | nVars, | ||
unsigned ** | pInputs, | ||
int | nVarsAll, | ||
Vec_Ptr_t * | vStore, | ||
Vec_Int_t * | vNodes | ||
) |
Function*************************************************************
Synopsis [Computes composition of truth tables.]
Description []
SideEffects []
SeeAlso []
Definition at line 263 of file kitCloud.c.
|
inlinestatic |
|
inlinestatic |
void Kit_TruthCountOnesInCofs | ( | unsigned * | pTruth, |
int | nVars, | ||
int * | pStore | ||
) |
Function*************************************************************
Synopsis [Counts the number of 1's in each cofactor.]
Description [The resulting numbers are stored in the array of ints, whose length is 2*nVars. The number of 1's is counted in a different space than the original function. For example, if the function depends on k variables, the cofactors are assumed to depend on k-1 variables.]
SideEffects []
SeeAlso []
Definition at line 1410 of file kitTruth.c.
void Kit_TruthCountOnesInCofs0 | ( | unsigned * | pTruth, |
int | nVars, | ||
int * | pStore | ||
) |
Function*************************************************************
Synopsis [Counts the number of 1's in each negative cofactor.]
Description [The resulting numbers are stored in the array of ints, whose length is nVars. The number of 1's is counted in a different space than the original function. For example, if the function depends on k variables, the cofactors are assumed to depend on k-1 variables.]
SideEffects []
SeeAlso []
Definition at line 1486 of file kitTruth.c.
void Kit_TruthCountOnesInCofsSlow | ( | unsigned * | pTruth, |
int | nVars, | ||
int * | pStore, | ||
unsigned * | pAux | ||
) |
Function*************************************************************
Synopsis [Counts the number of 1's in each cofactor.]
Description [Verifies the above procedure.]
SideEffects []
SeeAlso []
Definition at line 1537 of file kitTruth.c.
char* Kit_TruthDumpToFile | ( | unsigned * | pTruth, |
int | nVars, | ||
int | nFile | ||
) |
Function*************************************************************
Synopsis [Dumps truth table into a file.]
Description [Generates script file for reading into ABC.]
SideEffects []
SeeAlso []
Definition at line 2004 of file kitTruth.c.
void Kit_TruthExist | ( | unsigned * | pTruth, |
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Existentially quantifies the variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 684 of file kitTruth.c.
void Kit_TruthExistNew | ( | unsigned * | pRes, |
unsigned * | pTruth, | ||
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Existentially quantifies the variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 738 of file kitTruth.c.
void Kit_TruthExistSet | ( | unsigned * | pRes, |
unsigned * | pTruth, | ||
int | nVars, | ||
unsigned | uMask | ||
) |
Function*************************************************************
Synopsis [Existantially quantifies the set of variables.]
Description []
SideEffects []
SeeAlso []
Definition at line 793 of file kitTruth.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
void Kit_TruthForall | ( | unsigned * | pTruth, |
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Unversally quantifies the variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 813 of file kitTruth.c.
void Kit_TruthForallNew | ( | unsigned * | pRes, |
unsigned * | pTruth, | ||
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Universally quantifies the variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 867 of file kitTruth.c.
void Kit_TruthForallSet | ( | unsigned * | pRes, |
unsigned * | pTruth, | ||
int | nVars, | ||
unsigned | uMask | ||
) |
Function*************************************************************
Synopsis [Universally quantifies the set of variables.]
Description []
SideEffects []
SeeAlso []
Definition at line 1048 of file kitTruth.c.
|
inlinestatic |
unsigned Kit_TruthHash | ( | unsigned * | pIn, |
int | nWords | ||
) |
Function*************************************************************
Synopsis [Canonicize the truth table.]
Description []
SideEffects []
SeeAlso []
Definition at line 1560 of file kitTruth.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
int Kit_TruthIsop | ( | unsigned * | puTruth, |
int | nVars, | ||
Vec_Int_t * | vMemory, | ||
int | fTryBoth | ||
) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Computes ISOP from TT.]
Description [Returns the cover in vMemory. Uses the rest of array in vMemory as an intermediate memory storage. Returns the cover with -1 cubes, if the the computation exceeded the memory limit (KIT_ISOP_MEM_LIMIT words of intermediate data).]
SideEffects []
SeeAlso []
Definition at line 55 of file kitIsop.c.
|
inlinestatic |
void Kit_TruthIsopPrint | ( | unsigned * | puTruth, |
int | nVars, | ||
Vec_Int_t * | vMemory, | ||
int | fTryBoth | ||
) |
Definition at line 128 of file kitIsop.c.
void Kit_TruthIsopPrintCover | ( | Vec_Int_t * | vCover, |
int | nVars, | ||
int | fCompl | ||
) |
Definition at line 104 of file kitIsop.c.
|
inlinestatic |
int Kit_TruthMinCofSuppOverlap | ( | unsigned * | pTruth, |
int | nVars, | ||
int * | pVarMin | ||
) |
Function*************************************************************
Synopsis [Computes minimum overlap in supports of cofactors.]
Description []
SideEffects []
SeeAlso []
Definition at line 1315 of file kitTruth.c.
|
inlinestatic |
|
inlinestatic |
void Kit_TruthMuxVar | ( | unsigned * | pOut, |
unsigned * | pCof0, | ||
unsigned * | pCof1, | ||
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Multiplexes two functions with the given variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 1069 of file kitTruth.c.
void Kit_TruthMuxVarPhase | ( | unsigned * | pOut, |
unsigned * | pCof0, | ||
unsigned * | pCof1, | ||
int | nVars, | ||
int | iVar, | ||
int | fCompl0 | ||
) |
Function*************************************************************
Synopsis [Multiplexes two functions with the given variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 1125 of file kitTruth.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
void Kit_TruthPermute | ( | unsigned * | pOut, |
unsigned * | pIn, | ||
int | nVars, | ||
char * | pPerm, | ||
int | fReturnIn | ||
) |
Function*************************************************************
Synopsis [Implement give permutation.]
Description [The input and output truth tables are in pIn/pOut. The number of variables is nVars. Permutation is in pPerm.]
SideEffects [The input truth table is modified.]
SeeAlso []
Definition at line 233 of file kitTruth.c.
void Kit_TruthPrintProfile | ( | unsigned * | pTruth, |
int | nVars | ||
) |
Function*************************************************************
Synopsis [Dumps truth table into a file.]
Description [Generates script file for reading into ABC.]
SideEffects []
SeeAlso []
Definition at line 2203 of file kitTruth.c.
unsigned Kit_TruthSemiCanonicize | ( | unsigned * | pInOut, |
unsigned * | pAux, | ||
int | nVars, | ||
char * | pCanonPerm | ||
) |
Function*************************************************************
Synopsis [Canonicize the truth table.]
Description [Returns the phase. ]
SideEffects []
SeeAlso []
Definition at line 1657 of file kitTruth.c.
|
inlinestatic |
|
inlinestatic |
void Kit_TruthShrink | ( | unsigned * | pOut, |
unsigned * | pIn, | ||
int | nVars, | ||
int | nVarsAll, | ||
unsigned | Phase, | ||
int | fReturnIn | ||
) |
Function*************************************************************
Synopsis [Shrinks the truth table according to the phase.]
Description [The input and output truth tables are in pIn/pOut. The current number of variables is nVars. The total number of variables in nVarsAll. The last argument (Phase) shows what variables should remain.]
SideEffects [The input truth table is modified.]
SeeAlso []
Definition at line 200 of file kitTruth.c.
void Kit_TruthStretch | ( | unsigned * | pOut, |
unsigned * | pIn, | ||
int | nVars, | ||
int | nVarsAll, | ||
unsigned | Phase, | ||
int | fReturnIn | ||
) |
Function*************************************************************
Synopsis [Expands the truth table according to the phase.]
Description [The input and output truth tables are in pIn/pOut. The current number of variables is nVars. The total number of variables in nVarsAll. The last argument (Phase) contains shows where the variables should go.]
SideEffects [The input truth table is modified.]
SeeAlso []
Definition at line 166 of file kitTruth.c.
unsigned Kit_TruthSupport | ( | unsigned * | pTruth, |
int | nVars | ||
) |
Function*************************************************************
Synopsis [Returns support of the function.]
Description []
SideEffects []
SeeAlso []
Definition at line 346 of file kitTruth.c.
int Kit_TruthSupportSize | ( | unsigned * | pTruth, |
int | nVars | ||
) |
Function*************************************************************
Synopsis [Returns the number of support vars.]
Description []
SideEffects []
SeeAlso []
Definition at line 327 of file kitTruth.c.
void Kit_TruthSwapAdjacentVars | ( | unsigned * | pOut, |
unsigned * | pIn, | ||
int | nVars, | ||
int | iVar | ||
) |
DECLARATIONS ///.
CFile****************************************************************
FileName [kitTruth.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Computation kit.]
Synopsis [Procedures involving truth tables.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Dec 6, 2006.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Swaps two adjacent variables in the truth table.]
Description [Swaps var number Start and var number Start+1 (0-based numbers). The input truth table is pIn. The output truth table is pOut.]
SideEffects []
SeeAlso []
Definition at line 46 of file kitTruth.c.
Function*************************************************************
Synopsis [Compute BDD corresponding to the truth table.]
Description [If truth table has N vars, the BDD depends on N topmost variables of the BDD manager. The most significant variable of the table is encoded by the topmost variable of the manager. BDD construction is efficient in this case because BDD is constructed one node at a time, by simply adding BDD nodes on top of existent BDD nodes.]
SideEffects []
SeeAlso []
Definition at line 182 of file kitBdd.c.
CloudNode* Kit_TruthToCloud | ( | CloudManager * | dd, |
unsigned * | pTruth, | ||
int | nVars | ||
) |
Function********************************************************************
Synopsis [Compute BDD for the truth table.]
Description []
SideEffects []
SeeAlso []
Definition at line 148 of file kitCloud.c.
Kit_Graph_t* Kit_TruthToGraph | ( | unsigned * | pTruth, |
int | nVars, | ||
Vec_Int_t * | vMemory | ||
) |
Function*************************************************************
Synopsis [Derives the factored form from the truth table.]
Description []
SideEffects []
SeeAlso []
Definition at line 355 of file kitGraph.c.
void Kit_TruthUniqueNew | ( | unsigned * | pRes, |
unsigned * | pTruth, | ||
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Universally quantifies the variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 922 of file kitTruth.c.
int Kit_TruthVarInSupport | ( | unsigned * | pTruth, |
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Returns 1 if TT depends on the given variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 270 of file kitTruth.c.
int Kit_TruthVarIsVacuous | ( | unsigned * | pOnset, |
unsigned * | pOffset, | ||
int | nVars, | ||
int | iVar | ||
) |
Function*************************************************************
Synopsis [Computes negative cofactor of the function.]
Description []
SideEffects []
SeeAlso []
Definition at line 625 of file kitTruth.c.
int Kit_TruthVarsAntiSymm | ( | unsigned * | pTruth, |
int | nVars, | ||
int | iVar0, | ||
int | iVar1, | ||
unsigned * | pCof0, | ||
unsigned * | pCof1 | ||
) |
Function*************************************************************
Synopsis [Checks antisymmetry of two variables.]
Description []
SideEffects []
SeeAlso []
Definition at line 1223 of file kitTruth.c.
int Kit_TruthVarsSymm | ( | unsigned * | pTruth, |
int | nVars, | ||
int | iVar0, | ||
int | iVar1, | ||
unsigned * | pCof0, | ||
unsigned * | pCof1 | ||
) |
Function*************************************************************
Synopsis [Checks symmetry of two variables.]
Description []
SideEffects []
SeeAlso []
Definition at line 1187 of file kitTruth.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |