abc-master
|
Go to the source code of this file.
Data Structures | |
struct | Map_TimeStruct_t_ |
Macros | |
#define | Map_IsComplement(p) (((int)((ABC_PTRUINT_T) (p) & 01))) |
GLOBAL VARIABLES ///. More... | |
#define | Map_Regular(p) ((Map_Node_t *)((ABC_PTRUINT_T)(p) & ~01)) |
#define | Map_Not(p) ((Map_Node_t *)((ABC_PTRUINT_T)(p) ^ 01)) |
#define | Map_NotCond(p, c) ((Map_Node_t *)((ABC_PTRUINT_T)(p) ^ (c))) |
Typedefs | |
typedef typedefABC_NAMESPACE_HEADER_START struct Map_ManStruct_t_ | Map_Man_t |
INCLUDES ///. More... | |
typedef struct Map_NodeStruct_t_ | Map_Node_t |
typedef struct Map_NodeVecStruct_t_ | Map_NodeVec_t |
typedef struct Map_CutStruct_t_ | Map_Cut_t |
typedef struct Map_MatchStruct_t_ | Map_Match_t |
typedef struct Map_SuperStruct_t_ | Map_Super_t |
typedef struct Map_SuperLibStruct_t_ | Map_SuperLib_t |
typedef struct Map_HashTableStruct_t_ | Map_HashTable_t |
typedef struct Map_HashEntryStruct_t_ | Map_HashEntry_t |
typedef struct Map_TimeStruct_t_ | Map_Time_t |
#define Map_Not | ( | p | ) | ((Map_Node_t *)((ABC_PTRUINT_T)(p) ^ 01)) |
#define Map_NotCond | ( | p, | |
c | |||
) | ((Map_Node_t *)((ABC_PTRUINT_T)(p) ^ (c))) |
#define Map_Regular | ( | p | ) | ((Map_Node_t *)((ABC_PTRUINT_T)(p) & ~01)) |
typedef struct Map_CutStruct_t_ Map_Cut_t |
typedef struct Map_HashEntryStruct_t_ Map_HashEntry_t |
typedef struct Map_HashTableStruct_t_ Map_HashTable_t |
typedef typedefABC_NAMESPACE_HEADER_START struct Map_ManStruct_t_ Map_Man_t |
INCLUDES ///.
CFile****************************************************************
FileName [mapper.h]
PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]
Synopsis [Generic technology mapping engine.]
Author [MVSIS Group]
Affiliation [UC Berkeley]
Date [Ver. 2.0. Started - June 1, 2004.]
Revision [
]PARAMETERS ///STRUCTURE DEFINITIONS ///
typedef struct Map_MatchStruct_t_ Map_Match_t |
typedef struct Map_NodeStruct_t_ Map_Node_t |
typedef struct Map_NodeVecStruct_t_ Map_NodeVec_t |
typedef struct Map_SuperStruct_t_ Map_Super_t |
typedef struct Map_SuperLibStruct_t_ Map_SuperLib_t |
typedef struct Map_TimeStruct_t_ Map_Time_t |
int Map_CanonComputeFast | ( | Map_Man_t * | p, |
int | nVarsMax, | ||
int | nVarsReal, | ||
unsigned | uTruth[], | ||
unsigned char * | puPhases, | ||
unsigned | uTruthRes[] | ||
) |
Function*************************************************************
Synopsis [Computes the N-canonical form of the Boolean function.]
Description [The N-canonical form is defined as the truth table with the minimum integer value. This function exhaustively enumerates through the complete set of 2^N phase assignments.]
SideEffects []
SeeAlso []
Definition at line 173 of file mapperCanon.c.
int Map_CanonComputeSlow | ( | unsigned | uTruths[][2], |
int | nVarsMax, | ||
int | nVarsReal, | ||
unsigned | uTruth[], | ||
unsigned char * | puPhases, | ||
unsigned | uTruthRes[] | ||
) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Computes the N-canonical form of the Boolean function.]
Description [The N-canonical form is defined as the truth table with the minimum integer value. This function exhaustively enumerates through the complete set of 2^N phase assignments.]
SideEffects []
SeeAlso []
Definition at line 48 of file mapperCanon.c.
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 613 of file mapperUtils.c.
DECLARATIONS ///.
CFile****************************************************************
FileName [mapperCutUtils.c]
PackageName [MVSIS 1.3: Multi-valued logic synthesis system.]
Synopsis [Generic technology mapping engine.]
Author [MVSIS Group]
Affiliation [UC Berkeley]
Date [Ver. 2.0. Started - June 1, 2004.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Allocates the cut.]
Description []
SideEffects []
SeeAlso []
Definition at line 43 of file mapperCutUtils.c.
void Map_CutCreateFromNode | ( | Map_Man_t * | p, |
Map_Super_t * | pSuper, | ||
int | iRoot, | ||
unsigned | uPhaseRoot, | ||
int * | pLeaves, | ||
int | nLeaves, | ||
unsigned | uPhaseLeaves | ||
) |
Map_Node_t** Map_CutReadLeaves | ( | Map_Cut_t * | p | ) |
Definition at line 133 of file mapperCreate.c.
int Map_CutReadLeavesNum | ( | Map_Cut_t * | p | ) |
Definition at line 132 of file mapperCreate.c.
Definition at line 137 of file mapperCreate.c.
unsigned Map_CutReadPhase0 | ( | Map_Cut_t * | p | ) |
Definition at line 135 of file mapperCreate.c.
unsigned Map_CutReadPhase1 | ( | Map_Cut_t * | p | ) |
Definition at line 136 of file mapperCreate.c.
unsigned Map_CutReadPhaseBest | ( | Map_Cut_t * | p, |
int | fPhase | ||
) |
Definition at line 134 of file mapperCreate.c.
Map_Super_t* Map_CutReadSuper0 | ( | Map_Cut_t * | p | ) |
Definition at line 130 of file mapperCreate.c.
Map_Super_t* Map_CutReadSuper1 | ( | Map_Cut_t * | p | ) |
Definition at line 131 of file mapperCreate.c.
Map_Super_t* Map_CutReadSuperBest | ( | Map_Cut_t * | p, |
int | fPhase | ||
) |
Function*************************************************************
Synopsis [Reads parameters from the cut.]
Description []
SideEffects []
SeeAlso []
Definition at line 129 of file mapperCreate.c.
char* Map_LibraryReadFormulaStep | ( | char * | pFormula, |
char * | pStrings[], | ||
int * | pnStrings | ||
) |
Function*************************************************************
Synopsis [Performs one step of parsing the formula into parts.]
Description [This function will eventually be replaced when the tree-supergate library representation will become standard.]
SideEffects []
SeeAlso []
Definition at line 256 of file mapperSuper.c.
int Map_ManCheckConsistency | ( | Map_Man_t * | p | ) |
Function*************************************************************
Synopsis [Verify one useful property.]
Description [This procedure verifies one useful property. After the FRAIG construction with choice nodes is over, each primary node should have fanins that are primary nodes. The primary nodes is the one that does not have pNode->pRepr set to point to another node.]
SideEffects []
SeeAlso []
Definition at line 427 of file mapperUtils.c.
void Map_ManCleanData | ( | Map_Man_t * | p | ) |
Function*************************************************************
Synopsis [Get the FRAIG node with phase.]
Description []
SideEffects []
SeeAlso []
Definition at line 652 of file mapperUtils.c.
Map_Man_t* Map_ManCreate | ( | int | nInputs, |
int | nOutputs, | ||
int | fVerbose | ||
) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Create the mapping manager.]
Description [The number of inputs and outputs is assumed to be known is advance. It is much simpler to have them fixed upfront. When it comes to representing the object graph in the form of AIG, the resulting manager is similar to the regular AIG manager, except that it does not use reference counting (and therefore does not have garbage collections). It does have table resizing. The data structure is more flexible to represent additional information needed for mapping.]
SideEffects []
SeeAlso []
Definition at line 184 of file mapperCreate.c.
void Map_ManCreateNodeDelays | ( | Map_Man_t * | p, |
int | LogFan | ||
) |
Function*************************************************************
Synopsis [Creates node delays.]
Description []
SideEffects []
SeeAlso []
Definition at line 284 of file mapperCreate.c.
void Map_ManFree | ( | Map_Man_t * | p | ) |
Function*************************************************************
Synopsis [Deallocates the mapping manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 248 of file mapperCreate.c.
void Map_ManPrintStatsToFile | ( | char * | pName, |
float | Area, | ||
float | Delay, | ||
abctime | Time | ||
) |
Function*************************************************************
Synopsis [Prints the mapping stats.]
Description []
SideEffects []
SeeAlso []
Definition at line 341 of file mapperCreate.c.
void Map_ManPrintTimeStats | ( | Map_Man_t * | p | ) |
Function*************************************************************
Synopsis [Deallocates the mapping manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 313 of file mapperCreate.c.
float Map_ManReadAreaFinal | ( | Map_Man_t * | p | ) |
Definition at line 61 of file mapperCreate.c.
Map_Node_t* Map_ManReadBufDriver | ( | Map_Man_t * | p, |
int | i | ||
) |
Definition at line 55 of file mapperCreate.c.
int Map_ManReadBufNum | ( | Map_Man_t * | p | ) |
Definition at line 51 of file mapperCreate.c.
Map_Node_t** Map_ManReadBufs | ( | Map_Man_t * | p | ) |
Definition at line 54 of file mapperCreate.c.
Map_Node_t* Map_ManReadConst1 | ( | Map_Man_t * | p | ) |
Definition at line 56 of file mapperCreate.c.
int Map_ManReadFanoutViolations | ( | Map_Man_t * | p | ) |
Definition at line 70 of file mapperCreate.c.
Mio_Library_t* Map_ManReadGenLib | ( | Map_Man_t * | p | ) |
Definition at line 59 of file mapperCreate.c.
Map_Time_t* Map_ManReadInputArrivals | ( | Map_Man_t * | p | ) |
Definition at line 57 of file mapperCreate.c.
int Map_ManReadInputNum | ( | Map_Man_t * | p | ) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Reads parameters from the mapping manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 49 of file mapperCreate.c.
Map_Node_t** Map_ManReadInputs | ( | Map_Man_t * | p | ) |
Definition at line 52 of file mapperCreate.c.
int Map_ManReadOutputNum | ( | Map_Man_t * | p | ) |
Definition at line 50 of file mapperCreate.c.
Map_Node_t** Map_ManReadOutputs | ( | Map_Man_t * | p | ) |
Definition at line 53 of file mapperCreate.c.
int Map_ManReadPass | ( | Map_Man_t * | p | ) |
float Map_ManReadRequiredGlo | ( | Map_Man_t * | p | ) |
Definition at line 62 of file mapperCreate.c.
int Map_ManReadVerbose | ( | Map_Man_t * | p | ) |
Definition at line 60 of file mapperCreate.c.
void Map_ManSetAreaRecovery | ( | Map_Man_t * | p, |
int | fAreaRecovery | ||
) |
Definition at line 64 of file mapperCreate.c.
void Map_ManSetChoiceNodeNum | ( | Map_Man_t * | p, |
int | nChoiceNodes | ||
) |
Definition at line 72 of file mapperCreate.c.
void Map_ManSetChoiceNum | ( | Map_Man_t * | p, |
int | nChoices | ||
) |
Definition at line 73 of file mapperCreate.c.
void Map_ManSetDelayTarget | ( | Map_Man_t * | p, |
float | DelayTarget | ||
) |
Definition at line 65 of file mapperCreate.c.
void Map_ManSetFanoutViolations | ( | Map_Man_t * | p, |
int | nVio | ||
) |
Definition at line 71 of file mapperCreate.c.
void Map_ManSetInputArrivals | ( | Map_Man_t * | p, |
Map_Time_t * | pArrivals | ||
) |
Definition at line 66 of file mapperCreate.c.
void Map_ManSetNumIterations | ( | Map_Man_t * | p, |
int | nNumIterations | ||
) |
Definition at line 69 of file mapperCreate.c.
void Map_ManSetObeyFanoutLimits | ( | Map_Man_t * | p, |
int | fObeyFanoutLimits | ||
) |
Definition at line 68 of file mapperCreate.c.
void Map_ManSetOutputNames | ( | Map_Man_t * | p, |
char ** | ppNames | ||
) |
Definition at line 63 of file mapperCreate.c.
void Map_ManSetOutputRequireds | ( | Map_Man_t * | p, |
Map_Time_t * | pArrivals | ||
) |
Definition at line 67 of file mapperCreate.c.
void Map_ManSetPass | ( | Map_Man_t * | p, |
int | nPass | ||
) |
void Map_ManSetSwitching | ( | Map_Man_t * | p, |
int | fSwitching | ||
) |
Definition at line 75 of file mapperCreate.c.
void Map_ManSetVerbose | ( | Map_Man_t * | p, |
int | fVerbose | ||
) |
Definition at line 74 of file mapperCreate.c.
int Map_Mapping | ( | Map_Man_t * | p | ) |
DECLARATIONS ///.
CFile****************************************************************
FileName [mapperCore.c]
PackageName [MVSIS 1.3: Multi-valued logic synthesis system.]
Synopsis [Generic technology mapping engine.]
Author [MVSIS Group]
Affiliation [UC Berkeley]
Date [Ver. 2.0. Started - June 1, 2004.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Performs technology mapping for the given object graph.]
Description [The object graph is stored in the mapping manager. First, the AND nodes that fanout into POs are collected in the DFS order. Two preprocessing steps are performed: the k-feasible cuts are computed for each node and the truth tables are computed for each cut. Next, the delay-optimal matches are assigned for each node, followed by several iterations of area recoveryd: using area flow (global optimization) and using exact area at a node (local optimization).]
SideEffects []
SeeAlso []
Definition at line 50 of file mapperCore.c.
void Map_MappingSetupTruthTables | ( | unsigned | uTruths[][2] | ) |
Function*************************************************************
Synopsis [Sets up the truth tables.]
Description []
SideEffects []
SeeAlso []
Definition at line 335 of file mapperUtils.c.
void Map_MappingSetupTruthTablesLarge | ( | unsigned | uTruths[][32] | ) |
Function*************************************************************
Synopsis [Sets up the truth tables.]
Description []
SideEffects []
SeeAlso []
Definition at line 361 of file mapperUtils.c.
void Map_NetworkSweep | ( | Abc_Ntk_t * | pNet | ) |
Map_Node_t* Map_NodeAnd | ( | Map_Man_t * | pMan, |
Map_Node_t * | p1, | ||
Map_Node_t * | p2 | ||
) |
Function*************************************************************
Synopsis [Looks up the AND2 node in the unique table.]
Description [This procedure implements one-level hashing. All the nodes are hashed by their children. If the node with the same children was already created, it is returned by the call to this procedure. If it does not exist, this procedure creates a new node with these children. ]
SideEffects []
SeeAlso []
Definition at line 447 of file mapperCreate.c.
Map_Node_t* Map_NodeBuf | ( | Map_Man_t * | p, |
Map_Node_t * | p1 | ||
) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 552 of file mapperCreate.c.
int Map_NodeComparePhase | ( | Map_Node_t * | p1, |
Map_Node_t * | p2 | ||
) |
Definition at line 116 of file mapperCreate.c.
Map_Node_t* Map_NodeCreate | ( | Map_Man_t * | p, |
Map_Node_t * | p1, | ||
Map_Node_t * | p2 | ||
) |
Function*************************************************************
Synopsis [Creates a new node.]
Description [This procedure should be called to create the constant node and the PI nodes first.]
SideEffects []
SeeAlso []
Definition at line 364 of file mapperCreate.c.
int Map_NodeIsAnd | ( | Map_Node_t * | p | ) |
Definition at line 115 of file mapperCreate.c.
int Map_NodeIsBuf | ( | Map_Node_t * | p | ) |
Definition at line 114 of file mapperCreate.c.
int Map_NodeIsConst | ( | Map_Node_t * | p | ) |
Function*************************************************************
Synopsis [Checks the type of the node.]
Description []
SideEffects []
SeeAlso []
Definition at line 112 of file mapperCreate.c.
int Map_NodeIsVar | ( | Map_Node_t * | p | ) |
Definition at line 113 of file mapperCreate.c.
Map_Cut_t* Map_NodeReadCutBest | ( | Map_Node_t * | p, |
int | fPhase | ||
) |
Definition at line 93 of file mapperCreate.c.
Map_Cut_t* Map_NodeReadCuts | ( | Map_Node_t * | p | ) |
Definition at line 92 of file mapperCreate.c.
char* Map_NodeReadData | ( | Map_Node_t * | p, |
int | fPhase | ||
) |
Definition at line 89 of file mapperCreate.c.
int Map_NodeReadLevel | ( | Map_Node_t * | p | ) |
Definition at line 91 of file mapperCreate.c.
Map_Man_t* Map_NodeReadMan | ( | Map_Node_t * | p | ) |
Function*************************************************************
Synopsis [Reads parameters from the mapping node.]
Description []
SideEffects []
SeeAlso []
Definition at line 88 of file mapperCreate.c.
int Map_NodeReadNum | ( | Map_Node_t * | p | ) |
Definition at line 90 of file mapperCreate.c.
Map_Node_t* Map_NodeReadOne | ( | Map_Node_t * | p | ) |
Definition at line 94 of file mapperCreate.c.
Map_Node_t* Map_NodeReadTwo | ( | Map_Node_t * | p | ) |
Definition at line 95 of file mapperCreate.c.
void Map_NodeSetChoice | ( | Map_Man_t * | pMan, |
Map_Node_t * | pNodeOld, | ||
Map_Node_t * | pNodeNew | ||
) |
Function*************************************************************
Synopsis [Sets the node to be equivalent to the given one.]
Description [This procedure is a work-around for the equivalence check. Does not verify the equivalence. Use at the user's risk.]
SideEffects []
SeeAlso []
Definition at line 571 of file mapperCreate.c.
void Map_NodeSetData | ( | Map_Node_t * | p, |
int | fPhase, | ||
char * | pData | ||
) |
Definition at line 96 of file mapperCreate.c.
void Map_NodeSetNextE | ( | Map_Node_t * | p, |
Map_Node_t * | pNextE | ||
) |
Definition at line 97 of file mapperCreate.c.
void Map_NodeSetRepr | ( | Map_Node_t * | p, |
Map_Node_t * | pRepr | ||
) |
Definition at line 98 of file mapperCreate.c.
void Map_NodeSetSwitching | ( | Map_Node_t * | p, |
float | Switching | ||
) |
Definition at line 99 of file mapperCreate.c.
int Map_SuperLibDeriveFromGenlib | ( | Mio_Library_t * | pLib, |
int | fVerbose | ||
) |
Function*************************************************************
Synopsis [Derives the library from the genlib library.]
Description []
SideEffects []
SeeAlso []
Definition at line 199 of file mapperLib.c.
void Map_SuperLibFree | ( | Map_SuperLib_t * | p | ) |
Function*************************************************************
Synopsis [Deallocates the supergate library.]
Description []
SideEffects []
SeeAlso []
Definition at line 167 of file mapperLib.c.
float Map_SuperLibReadAreaInv | ( | Map_SuperLib_t * | p | ) |
Definition at line 161 of file mapperCreate.c.
Map_Time_t Map_SuperLibReadDelayInv | ( | Map_SuperLib_t * | p | ) |
Definition at line 162 of file mapperCreate.c.
Mio_Library_t* Map_SuperLibReadGenLib | ( | Map_SuperLib_t * | p | ) |
Definition at line 160 of file mapperCreate.c.
int Map_SuperLibReadVarsMax | ( | Map_SuperLib_t * | p | ) |
Definition at line 163 of file mapperCreate.c.
int Map_SuperReadFaninNum | ( | Map_Super_t * | p | ) |
Definition at line 154 of file mapperCreate.c.
Map_Super_t** Map_SuperReadFanins | ( | Map_Super_t * | p | ) |
Definition at line 153 of file mapperCreate.c.
int Map_SuperReadFanoutLimit | ( | Map_Super_t * | p | ) |
Definition at line 158 of file mapperCreate.c.
char* Map_SuperReadFormula | ( | Map_Super_t * | p | ) |
Function*************************************************************
Synopsis [Reads parameters from the supergate.]
Description []
SideEffects []
SeeAlso []
Definition at line 150 of file mapperCreate.c.
Map_Super_t* Map_SuperReadNext | ( | Map_Super_t * | p | ) |
Definition at line 155 of file mapperCreate.c.
int Map_SuperReadNum | ( | Map_Super_t * | p | ) |
Definition at line 152 of file mapperCreate.c.
int Map_SuperReadNumPhases | ( | Map_Super_t * | p | ) |
Definition at line 156 of file mapperCreate.c.
unsigned char* Map_SuperReadPhases | ( | Map_Super_t * | p | ) |
Definition at line 157 of file mapperCreate.c.
Mio_Gate_t* Map_SuperReadRoot | ( | Map_Super_t * | p | ) |
Definition at line 151 of file mapperCreate.c.
Map_Super_t* Map_SuperTableLookupC | ( | Map_SuperLib_t * | p, |
unsigned | uTruth[] | ||
) |
Function*************************************************************
Synopsis [Looks up an entry in the library.]
Description [This function looks up the function, given by its truth table, and return two things: (1) the linked list of supergates, which can implement the functions of this N-class; (2) the phase, which should be applied to the given function, in order to derive the canonical form of this N-class.]
SideEffects []
SeeAlso []
Definition at line 183 of file mapperTable.c.