ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
mapper.h
Go to the documentation of this file.
1
18
19#ifndef ABC__map__mapper__mapper_h
20#define ABC__map__mapper__mapper_h
21
22
26
30
31
32
34
35
39
50
51// the pair of rise/fall time parameters
53{
54 float Rise;
55 float Fall;
56 float Worst;
57};
58
62
66
67#define Map_IsComplement(p) (((int)((ABC_PTRUINT_T) (p) & 01)))
68#define Map_Regular(p) ((Map_Node_t *)((ABC_PTRUINT_T)(p) & ~01))
69#define Map_Not(p) ((Map_Node_t *)((ABC_PTRUINT_T)(p) ^ 01))
70#define Map_NotCond(p,c) ((Map_Node_t *)((ABC_PTRUINT_T)(p) ^ (c)))
71
75
76/*=== mapperCreate.c =============================================================*/
77extern Map_Man_t * Map_ManCreate( int nInputs, int nOutputs, int fVerbose );
79extern void Map_ManCreateNodeDelays( Map_Man_t * p, int LogFan );
80extern void Map_ManFree( Map_Man_t * pMan );
81extern void Map_ManPrintTimeStats( Map_Man_t * p );
82extern void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, abctime Time );
83extern int Map_ManReadInputNum( Map_Man_t * p );
84extern int Map_ManReadOutputNum( Map_Man_t * p );
85extern int Map_ManReadBufNum( Map_Man_t * p );
89extern Map_Node_t * Map_ManReadBufDriver( Map_Man_t * p, int i );
93extern int Map_ManReadVerbose( Map_Man_t * p );
94extern float Map_ManReadAreaFinal( Map_Man_t * p );
95extern float Map_ManReadRequiredGlo( Map_Man_t * p );
96extern void Map_ManSetOutputNames( Map_Man_t * p, char ** ppNames );
97extern void Map_ManSetAreaRecovery( Map_Man_t * p, int fAreaRecovery );
98extern void Map_ManSetDelayTarget( Map_Man_t * p, float DelayTarget );
99extern void Map_ManSetInputArrivals( Map_Man_t * p, Map_Time_t * pArrivals );
100extern void Map_ManSetOutputRequireds( Map_Man_t * p, Map_Time_t * pArrivals );
101extern void Map_ManSetObeyFanoutLimits( Map_Man_t * p, int fObeyFanoutLimits );
102extern void Map_ManSetNumIterations( Map_Man_t * p, int nNumIterations );
104extern void Map_ManSetPass( Map_Man_t * p, int nPass );
106extern void Map_ManSetFanoutViolations( Map_Man_t * p, int nVio );
107extern void Map_ManSetChoiceNodeNum( Map_Man_t * p, int nChoiceNodes );
108extern void Map_ManSetChoiceNum( Map_Man_t * p, int nChoices );
109extern void Map_ManSetVerbose( Map_Man_t * p, int fVerbose );
110extern void Map_ManSetSwitching( Map_Man_t * p, int fSwitching );
111extern void Map_ManSetSkipFanout( Map_Man_t * p, int fSkipFanout );
112extern void Map_ManSetUseProfile( Map_Man_t * p );
113extern void Map_ManCreateAigIds( Map_Man_t * p, int nObjs );
114
116extern char * Map_NodeReadData( Map_Node_t * p, int fPhase );
117extern int Map_NodeReadNum( Map_Node_t * p );
118extern int Map_NodeReadLevel( Map_Node_t * p );
119extern int Map_NodeReadAigId( Map_Node_t * p );
121extern Map_Cut_t * Map_NodeReadCutBest( Map_Node_t * p, int fPhase );
124extern void Map_NodeSetData( Map_Node_t * p, int fPhase, char * pData );
125extern void Map_NodeSetNextE( Map_Node_t * p, Map_Node_t * pNextE );
126extern void Map_NodeSetRepr( Map_Node_t * p, Map_Node_t * pRepr );
127extern void Map_NodeSetSwitching( Map_Node_t * p, float Switching );
128extern void Map_NodeSetAigId( Map_Node_t * p, int Id );
129
130extern int Map_NodeIsConst( Map_Node_t * p );
131extern int Map_NodeIsVar( Map_Node_t * p );
132extern int Map_NodeIsBuf( Map_Node_t * p );
133extern int Map_NodeIsAnd( Map_Node_t * p );
134extern int Map_NodeComparePhase( Map_Node_t * p1, Map_Node_t * p2 );
135
136extern Map_Super_t * Map_CutReadSuperBest( Map_Cut_t * p, int fPhase );
139extern int Map_CutReadLeavesNum( Map_Cut_t * p );
141extern unsigned Map_CutReadPhaseBest( Map_Cut_t * p, int fPhase );
142extern unsigned Map_CutReadPhase0( Map_Cut_t * p );
143extern unsigned Map_CutReadPhase1( Map_Cut_t * p );
145
146extern char * Map_SuperReadFormula( Map_Super_t * p );
148extern int Map_SuperReadNum( Map_Super_t * p );
150extern int Map_SuperReadFaninNum( Map_Super_t * p );
152extern int Map_SuperReadNumPhases( Map_Super_t * p );
153extern unsigned char * Map_SuperReadPhases( Map_Super_t * p );
155
160
161extern Map_Node_t * Map_NodeAnd( Map_Man_t * p, Map_Node_t * p1, Map_Node_t * p2 );
162extern Map_Node_t * Map_NodeBuf( Map_Man_t * p, Map_Node_t * p1 );
163extern void Map_NodeSetChoice( Map_Man_t * pMan, Map_Node_t * pNodeOld, Map_Node_t * pNodeNew );
164
165/*=== resmCanon.c =============================================================*/
166extern int Map_CanonComputeSlow( unsigned uTruths[][2], int nVarsMax, int nVarsReal, unsigned uTruth[], unsigned char * puPhases, unsigned uTruthRes[] );
167extern int Map_CanonComputeFast( Map_Man_t * p, int nVarsMax, int nVarsReal, unsigned uTruth[], unsigned char * puPhases, unsigned uTruthRes[] );
168/*=== mapperCut.c =============================================================*/
169extern Map_Cut_t * Map_CutAlloc( Map_Man_t * p );
170/*=== mapperCutUtils.c =============================================================*/
171extern void Map_CutCreateFromNode( Map_Man_t * p, Map_Super_t * pSuper, int iRoot, unsigned uPhaseRoot,
172 int * pLeaves, int nLeaves, unsigned uPhaseLeaves );
173extern Vec_Ptr_t * Map_CutInternalNodes( Map_Node_t * pObj, Map_Cut_t * pCut );
174/*=== mapperCore.c =============================================================*/
175extern int Map_Mapping( Map_Man_t * p );
176/*=== mapperLib.c =============================================================*/
177extern int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib, int fVerbose );
178extern void Map_SuperLibFree( Map_SuperLib_t * p );
179/*=== mapperMntk.c =============================================================*/
180//extern Mntk_Man_t * Map_ConvertMappingToMntk( Map_Man_t * pMan );
181/*=== mapperSuper.c =============================================================*/
182extern char * Map_LibraryReadFormulaStep( char * pFormula, char * pStrings[], int * pnStrings );
183/*=== mapperSweep.c =============================================================*/
184extern void Map_NetworkSweep( Abc_Ntk_t * pNet );
185/*=== mapperTable.c =============================================================*/
186extern Map_Super_t * Map_SuperTableLookupC( Map_SuperLib_t * pLib, unsigned uTruth[] );
187/*=== mapperTime.c =============================================================*/
188/*=== mapperUtil.c =============================================================*/
189extern int Map_ManCheckConsistency( Map_Man_t * p );
191extern void Map_ManCleanData( Map_Man_t * p );
192extern void Map_MappingSetupTruthTables( unsigned uTruths[][2] );
193extern void Map_MappingSetupTruthTablesLarge( unsigned uTruths[][32] );
194
195
196
198
199
200
201#endif
202
struct Abc_Ntk_t_ Abc_Ntk_t
Definition abc.h:115
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Cube * p
Definition exorList.c:222
void Map_ManSetOutputNames(Map_Man_t *p, char **ppNames)
Mio_Library_t * Map_ManReadGenLib(Map_Man_t *p)
unsigned char * Map_SuperReadPhases(Map_Super_t *p)
void Map_CutCreateFromNode(Map_Man_t *p, Map_Super_t *pSuper, int iRoot, unsigned uPhaseRoot, int *pLeaves, int nLeaves, unsigned uPhaseLeaves)
int Map_ManReadPass(Map_Man_t *p)
int Map_NodeReadNum(Map_Node_t *p)
void Map_MappingSetupTruthTablesLarge(unsigned uTruths[][32])
unsigned Map_CutReadPhaseBest(Map_Cut_t *p, int fPhase)
void Map_NetworkSweep(Abc_Ntk_t *pNet)
void Map_NodeSetData(Map_Node_t *p, int fPhase, char *pData)
int Map_ManReadVerbose(Map_Man_t *p)
Map_Super_t * Map_CutReadSuper1(Map_Cut_t *p)
Map_Cut_t * Map_CutAlloc(Map_Man_t *p)
DECLARATIONS ///.
Map_Super_t * Map_SuperReadNext(Map_Super_t *p)
void Map_ManSetOutputRequireds(Map_Man_t *p, Map_Time_t *pArrivals)
unsigned Map_CutReadPhase0(Map_Cut_t *p)
float Map_ManReadAreaFinal(Map_Man_t *p)
void Map_NodeSetChoice(Map_Man_t *pMan, Map_Node_t *pNodeOld, Map_Node_t *pNodeNew)
int Map_NodeComparePhase(Map_Node_t *p1, Map_Node_t *p2)
Map_Cut_t * Map_NodeReadCutBest(Map_Node_t *p, int fPhase)
int Map_ManReadFanoutViolations(Map_Man_t *p)
void Map_ManPrintTimeStats(Map_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Map_ManStruct_t_ Map_Man_t
INCLUDES ///.
Definition mapper.h:40
Map_Node_t * Map_NodeReadTwo(Map_Node_t *p)
int Map_ManReadInputNum(Map_Man_t *p)
FUNCTION DEFINITIONS ///.
void Map_ManSetVerbose(Map_Man_t *p, int fVerbose)
int Map_NodeIsBuf(Map_Node_t *p)
void Map_NodeSetRepr(Map_Node_t *p, Map_Node_t *pRepr)
int Map_NodeReadAigId(Map_Node_t *p)
int Map_SuperLibDeriveFromGenlib(Mio_Library_t *pLib, int fVerbose)
Definition mapperLib.c:202
void Map_ManSetUseProfile(Map_Man_t *p)
int Map_NodeReadLevel(Map_Node_t *p)
void Map_ManSetNumIterations(Map_Man_t *p, int nNumIterations)
int Map_CutReadLeavesNum(Map_Cut_t *p)
int Map_SuperReadFaninNum(Map_Super_t *p)
struct Map_HashTableStruct_t_ Map_HashTable_t
Definition mapper.h:47
int Map_NodeIsConst(Map_Node_t *p)
Map_Cut_t * Map_NodeReadCuts(Map_Node_t *p)
struct Map_MatchStruct_t_ Map_Match_t
Definition mapper.h:44
void Map_ManSetSwitching(Map_Man_t *p, int fSwitching)
Mio_Gate_t * Map_SuperReadRoot(Map_Super_t *p)
struct Map_CutStruct_t_ Map_Cut_t
Definition mapper.h:43
Mio_Library_t * Map_SuperLibReadGenLib(Map_SuperLib_t *p)
int Map_CanonComputeSlow(unsigned uTruths[][2], int nVarsMax, int nVarsReal, unsigned uTruth[], unsigned char *puPhases, unsigned uTruthRes[])
FUNCTION DEFINITIONS ///.
Definition mapperCanon.c:48
Map_Node_t ** Map_ManReadOutputs(Map_Man_t *p)
char * Map_LibraryReadFormulaStep(char *pFormula, char *pStrings[], int *pnStrings)
void Map_ManSetObeyFanoutLimits(Map_Man_t *p, int fObeyFanoutLimits)
int Map_ManReadBufNum(Map_Man_t *p)
Map_Node_t * Map_ManReadConst1(Map_Man_t *p)
Map_Node_t ** Map_ManReadInputs(Map_Man_t *p)
struct Map_SuperStruct_t_ Map_Super_t
Definition mapper.h:45
Map_Super_t * Map_CutReadSuper0(Map_Cut_t *p)
unsigned Map_CutReadPhase1(Map_Cut_t *p)
Map_Node_t * Map_NodeCreate(Map_Man_t *p, Map_Node_t *p1, Map_Node_t *p2)
struct Map_SuperLibStruct_t_ Map_SuperLib_t
Definition mapper.h:46
struct Map_TimeStruct_t_ Map_Time_t
Definition mapper.h:49
Map_Node_t ** Map_ManReadBufs(Map_Man_t *p)
Map_Super_t * Map_SuperTableLookupC(Map_SuperLib_t *pLib, unsigned uTruth[])
struct Map_HashEntryStruct_t_ Map_HashEntry_t
Definition mapper.h:48
Map_Node_t * Map_ManReadBufDriver(Map_Man_t *p, int i)
void Map_ManSetChoiceNodeNum(Map_Man_t *p, int nChoiceNodes)
int Map_NodeIsVar(Map_Node_t *p)
int Map_SuperReadNumPhases(Map_Super_t *p)
void Map_ManCreateNodeDelays(Map_Man_t *p, int LogFan)
int Map_Mapping(Map_Man_t *p)
DECLARATIONS ///.
Definition mapperCore.c:50
void Map_NodeSetSwitching(Map_Node_t *p, float Switching)
Map_Super_t * Map_CutReadSuperBest(Map_Cut_t *p, int fPhase)
int Map_SuperReadNum(Map_Super_t *p)
Map_Node_t * Map_NodeBuf(Map_Man_t *p, Map_Node_t *p1)
void Map_ManSetAreaRecovery(Map_Man_t *p, int fAreaRecovery)
char * Map_SuperReadFormula(Map_Super_t *p)
void Map_ManCleanData(Map_Man_t *p)
Map_Man_t * Map_NodeReadMan(Map_Node_t *p)
void Map_ManSetSkipFanout(Map_Man_t *p, int fSkipFanout)
char * Map_NodeReadData(Map_Node_t *p, int fPhase)
Map_Man_t * Map_ManCreate(int nInputs, int nOutputs, int fVerbose)
FUNCTION DEFINITIONS ///.
Map_Node_t * Map_NodeReadOne(Map_Node_t *p)
int Map_CanonComputeFast(Map_Man_t *p, int nVarsMax, int nVarsReal, unsigned uTruth[], unsigned char *puPhases, unsigned uTruthRes[])
void Map_ManSetPass(Map_Man_t *p, int nPass)
void Map_ManSetChoiceNum(Map_Man_t *p, int nChoices)
void Map_ManSetFanoutViolations(Map_Man_t *p, int nVio)
void Map_MappingSetupTruthTables(unsigned uTruths[][2])
float Map_SuperLibReadAreaInv(Map_SuperLib_t *p)
void Map_NodeSetAigId(Map_Node_t *p, int Id)
void Map_ManFree(Map_Man_t *pMan)
void Map_ManSetInputArrivals(Map_Man_t *p, Map_Time_t *pArrivals)
void Map_ManPrintStatsToFile(char *pName, float Area, float Delay, abctime Time)
st__table * Map_CreateTableGate2Super(Map_Man_t *p)
void Map_NodeSetNextE(Map_Node_t *p, Map_Node_t *pNextE)
void Map_SuperLibFree(Map_SuperLib_t *p)
Definition mapperLib.c:170
Map_Cut_t * Map_CutReadNext(Map_Cut_t *p)
Map_Node_t * Map_NodeAnd(Map_Man_t *p, Map_Node_t *p1, Map_Node_t *p2)
int Map_SuperLibReadVarsMax(Map_SuperLib_t *p)
Map_Super_t ** Map_SuperReadFanins(Map_Super_t *p)
int Map_SuperReadFanoutLimit(Map_Super_t *p)
Vec_Ptr_t * Map_CutInternalNodes(Map_Node_t *pObj, Map_Cut_t *pCut)
Map_Node_t ** Map_CutReadLeaves(Map_Cut_t *p)
int Map_NodeIsAnd(Map_Node_t *p)
Map_Time_t Map_SuperLibReadDelayInv(Map_SuperLib_t *p)
void Map_ManSetDelayTarget(Map_Man_t *p, float DelayTarget)
int Map_ManCheckConsistency(Map_Man_t *p)
int Map_ManReadOutputNum(Map_Man_t *p)
void Map_ManCreateAigIds(Map_Man_t *p, int nObjs)
Map_Time_t * Map_ManReadInputArrivals(Map_Man_t *p)
struct Map_NodeVecStruct_t_ Map_NodeVec_t
Definition mapper.h:42
struct Map_NodeStruct_t_ Map_Node_t
Definition mapper.h:41
float Map_ManReadRequiredGlo(Map_Man_t *p)
struct Mio_LibraryStruct_t_ Mio_Library_t
Definition mio.h:42
struct Mio_GateStruct_t_ Mio_Gate_t
Definition mio.h:43
STRUCTURE DEFINITIONS ///.
Definition mapperInt.h:92
Definition st.h:52
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42