ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
mapperInt.h
Go to the documentation of this file.
1
18
19#ifndef ABC__map__mapper__mapperInt_h
20#define ABC__map__mapper__mapperInt_h
21
22
26
27#include <stdio.h>
28#include <stdlib.h>
29#include <string.h>
30#include <float.h>
31#include <math.h>
32
33#include "base/main/main.h"
34#include "map/mio/mio.h"
35#include "mapper.h"
36
38
39
43
44// uncomment to have fanouts represented in the mapping graph
45//#define MAP_ALLOCATE_FANOUT 1
46
50
51// the bit masks
52#define MAP_MASK(n) ((~((unsigned)0)) >> (32-(n)))
53#define MAP_FULL (~((unsigned)0))
54#define MAP_NO_VAR (-9999.0)
55
56// maximum/minimum operators
57#define MAP_MIN(a,b) (((a) < (b))? (a) : (b))
58#define MAP_MAX(a,b) (((a) > (b))? (a) : (b))
59
60// the small and large numbers (min/max float are 1.17e-38/3.40e+38)
61#define MAP_FLOAT_LARGE ((float)(FLT_MAX/10))
62#define MAP_FLOAT_SMALL ((float)1.0e-03)
63
64// generating random unsigned (#define RAND_MAX 0x7fff)
65#define MAP_RANDOM_UNSIGNED ((((unsigned)rand()) << 24) ^ (((unsigned)rand()) << 12) ^ ((unsigned)rand()))
66
67// internal macros to work with cuts
68#define Map_CutIsComplement(p) (((int)((ABC_PTRUINT_T) (p) & 01)))
69#define Map_CutRegular(p) ((Map_Cut_t *)((ABC_PTRUINT_T)(p) & ~01))
70#define Map_CutNot(p) ((Map_Cut_t *)((ABC_PTRUINT_T)(p) ^ 01))
71#define Map_CutNotCond(p,c) ((Map_Cut_t *)((ABC_PTRUINT_T)(p) ^ (c)))
72
73// internal macros for referencing of nodes
74#define Map_NodeReadRef(p) ((Map_Regular(p))->nRefs)
75#define Map_NodeRef(p) ((Map_Regular(p))->nRefs++)
76
77// macros to get hold of the bits in the support info
78#define Map_InfoSetVar(p,i) (p[(i)>>5] |= (1<<((i) & 31)))
79#define Map_InfoRemVar(p,i) (p[(i)>>5] &= ~(1<<((i) & 31)))
80#define Map_InfoFlipVar(p,i) (p[(i)>>5] ^= (1<<((i) & 31)))
81#define Map_InfoReadVar(p,i) ((p[(i)>>5] & (1<<((i) & 31))) > 0)
82
83// returns the complemented attribute of the node
84#define Map_NodeIsSimComplement(p) (Map_IsComplement(p)? !(Map_Regular(p)->fInv) : (p)->fInv)
85
89
90// the mapping manager
92{
93 // the mapping graph
94 Map_Node_t ** pBins; // the table of nodes hashed by their children
95 int nBins; // the size of the table
96 Map_Node_t ** pInputs; // the array of inputs
97 int nInputs; // the number of inputs
98 Map_Node_t ** pOutputs; // the array of outputs
99 int nOutputs; // the number of outputs
100 int nNodes; // the total number of nodes
101 Map_Node_t * pConst1; // the constant 1 node
102 Map_NodeVec_t * vMapObjs; // the array of all nodes
103 Map_NodeVec_t * vMapBufs; // the array of all nodes
104 float * pNodeDelays; // the array of node delays
105
106 // info about the original circuit
107 char ** ppOutputNames; // the primary output names
108 Map_Time_t * pInputArrivals;// the PI arrival times
109 Map_Time_t * pOutputRequireds;// the PI arrival times
110 int * pAigNodeIDs; // IDs of the original AIG nodes
111
112 // mapping parameters
113 int nVarsMax; // the max number of variables
114 int fAreaRecovery; // the flag to enable area recovery
115 int fVerbose; // the verbosiness flag
116 int fMappingMode; // set to 1 when doing area
117 float fRequiredGlo; // the global required times
118 float fEpsilon; // the epsilon used to compare floats
119 float AreaBase; // the area after delay-oriented mapping
120 float AreaFinal; // the area after delay-oriented mapping
121 int nIterations; // How many matching passes to do
122 int fObeyFanoutLimits;// Should mapper try to obey fanout limits or not
123 float DelayTarget; // the required times set by the user
124 int nTravIds; // the traversal counter
125 int fSwitching; // use switching activity
126 int fSkipFanout; // skip large gates when mapping high-fanout nodes
127 int fUseProfile; // use standard-cell profile
128
129 // the supergate library
130 Map_SuperLib_t * pSuperLib; // the current supergate library
131 unsigned uTruths[6][2]; // the elementary truth tables
132 unsigned uTruthsLarge[10][32]; // the elementary truth tables
133 int nCounts[32]; // the counter of minterms
134 int nCountsBest[32];// the counter of minterms
135 Map_NodeVec_t * vVisited; // the visited cuts during cut computation
136
137 // the memory managers
138 Extra_MmFixed_t * mmNodes; // the memory manager for nodes
139 Extra_MmFixed_t * mmCuts; // the memory manager for cuts
140
141 // precomputed N-canonical forms
142 unsigned short * uCanons; // N-canonical forms
143 char ** uPhases; // N-canonical phases
144 char * pCounters; // counters of phases
145
146 // various statistical variables
147 int nChoiceNodes; // the number of choice nodes
148 int nChoices; // the number of all choices
149 int nCanons; // the number of times N-canonical form was computed
150 int nMatches; // the number of times supergate matching was performed
151 int nPhases; // the number of phases considered during matching
152 int nFanoutViolations; // the number of nodes in mapped circuit violating fanout
153
154 // runtime statistics
155 abctime timeToMap; // time to transfer to the mapping structure
156 abctime timeCuts; // time to compute k-feasible cuts
157 abctime timeTruth; // time to compute the truth table for each cut
158 abctime timeMatch; // time to perform matching for each node
159 abctime timeArea; // time to recover area after delay oriented mapping
160 abctime timeSweep; // time to perform technology dependent sweep
161 abctime timeToNet; // time to transfer back to the network
162 abctime timeTotal; // the total mapping time
163 abctime time1; // time to transfer to the mapping structure
164 abctime time2; // time to transfer to the mapping structure
165 abctime time3; // time to transfer to the mapping structure
166};
167
168// the supergate library
170{
171 // general info
172 char * pName; // the name of the supergate library
173 Mio_Library_t * pGenlib; // the generic library
174
175 // other info
176 int nVarsMax; // the max number of variables
177 int nSupersAll; // the total number of supergates
178 int nSupersReal; // the total number of supergates
179 int nLines; // the total number of lines in the supergate file
180 int fVerbose; // the verbosity flag
181
182 // hash tables
183 Map_Super_t ** ppSupers; // the array of supergates
184 Map_HashTable_t * tTableC; // the table mapping N-canonical forms into supergates
185 Map_HashTable_t * tTable; // the table mapping truth tables into supergates
186
187 // data structures for N-canonical form computation
188 unsigned uTruths[6][2]; // the elementary truth tables
189 unsigned uMask[2]; // the mask for the truth table
190
191 // the invertor
192 Mio_Gate_t * pGateInv; // the pointer to the intertor gate
193 Map_Time_t tDelayInv; // the delay of the inverter
194 float AreaInv; // the area of the inverter
195 float AreaBuf; // the area of the buffer
196 Map_Super_t * pSuperInv; // the supergate representing the inverter
197
198 // the memory manager for the internal table
199 Extra_MmFixed_t * mmSupers; // the mamory manager for supergates
200 Extra_MmFixed_t * mmEntries; // the memory manager for the entries
201 Extra_MmFlex_t * mmForms; // the memory manager for formulas
202};
203
204// the mapping node
206{
207 // general information about the node
208 Map_Man_t * p; // the mapping manager
209 Map_Node_t * pNext; // the next node in the hash table
210 int Num; // the unique number of this node
211 int TravId; // the traversal ID (use to avoid cleaning marks)
212 int nRefs; // the number of references (fanouts) of the given node
213 unsigned fMark0 : 1; // the mark used for traversals
214 unsigned fMark1 : 1; // the mark used for traversals
215 unsigned fUsed : 1; // the mark to mark the node or its fanins
216 unsigned fInv : 1; // the complemented attribute for the equivalent nodes
217 unsigned fInvert: 1; // the flag to denote the use of interter
218 unsigned Level :16; // the level of the given node
219 unsigned NumTemp:10; // the level of the given node
220 int nRefAct[3]; // estimated fanout for current covering phase, neg and pos and sum
221 float nRefEst[3]; // actual fanout for previous covering phase, neg and pos and sum
222 float Switching; // the probability of switching
223
224 // connectivity
225 Map_Node_t * p1; // the first child
226 Map_Node_t * p2; // the second child
227 Map_Node_t * pNextE; // the next functionally equivalent node
228 Map_Node_t * pRepr; // the representative of the functionally equivalent class
229
230#ifdef MAP_ALLOCATE_FANOUT
231 // representation of node's fanouts
232 Map_Node_t * pFanPivot; // the first fanout of this node
233 Map_Node_t * pFanFanin1; // the next fanout of p1
234 Map_Node_t * pFanFanin2; // the next fanout of p2
235// Map_NodeVec_t * vFanouts; // the array of fanouts of the gate
236#endif
237
238 // the delay information
239 Map_Time_t tArrival[2]; // the best arrival time of the neg (0) and pos (1) phases
240 Map_Time_t tRequired[2]; // the required time of the neg (0) and pos (1) phases
241
242 // misc information
243 Map_Cut_t * pCutBest[2]; // the best mapping for neg and pos phase
244 Map_Cut_t * pCuts; // mapping choices for the node (elementary comes first)
245 char * pData0; // temporary storage for the corresponding network node
246 char * pData1; // temporary storage for the corresponding network node
247};
248
249// the match of the cut
251{
252 // information used for matching
254 unsigned uPhase;
255 // information about the best selected match
256 unsigned uPhaseBest; // the best phase (the EXOR of match's phase and gate's phase)
257 Map_Super_t * pSuperBest; // the best supergate matched
258 // the parameters of the match
259 Map_Time_t tArrive; // the arrival time of this match
260 float AreaFlow; // the area flow or area of this match
261};
262
263// the cuts used for matching
265{
266 Map_Cut_t * pNext; // the pointer to the next cut in the list
267 Map_Cut_t * pOne; // the father of this cut
268 Map_Cut_t * pTwo; // the mother of this cut
269 Map_Node_t * ppLeaves[6]; // the leaves of this cut
270 unsigned uTruth; // truth table for five-input cuts
271 char nLeaves; // the number of leaves
272 char nVolume; // the volume of this cut
273 char fMark; // the mark to denote visited cut
274 char Phase; // the mark to denote complemented cut
275 Map_Match_t M[2]; // the matches for positive/negative phase
276};
277
278// the supergate internally represented
280{
281 int Num; // the ID of the supergate
282 unsigned fSuper : 1; // the flag to distinquish a real super from a fake one
283 unsigned fExclude: 1; // the flag if set causes gate to be excluded from being used for mapping
284 unsigned nFanins : 3; // the number of inputs
285 unsigned nGates : 3; // the number of gates inside this supergate
286 unsigned nFanLimit: 4; // the max number of fanout count
287 unsigned nSupers : 16; // the number of supergates in the list
288 unsigned nPhases : 4; // the number of phases for matching with canonical form
289 unsigned char uPhases[4]; // the maximum of 4 phases for matching with canonical form
290 int nUsed; // the number of times the supergate is used
291 Map_Super_t * pFanins[6]; // the fanins of the gate
292 Mio_Gate_t * pRoot; // the root gate
293 unsigned uTruth[2]; // the truth table
294 Map_Time_t tDelaysR[6]; // the pin-to-pin delay constraints for the rise of the output
295 Map_Time_t tDelaysF[6]; // the pin-to-pin delay constraints for the rise of the output
296 Map_Time_t tDelayMax; // the maximum delay
297 float Area; // the area
298 char * pFormula; // the symbolic formula
299 Map_Super_t * pNext; // the pointer to the next super in the list
300};
301
302// the vector of nodes
304{
305 Map_Node_t ** pArray; // the array of nodes
306 int nSize; // the number of entries in the array
307 int nCap; // the number of allocated entries
308};
309
310// the hash table
312{
313 Map_HashEntry_t ** pBins; // the table bins
314 int nBins; // the size of the table
315 int nEntries; // the total number of entries in the table
316 Extra_MmFixed_t * mmMan; // the memory manager for entries
317};
318
319// the entry in the hash table
321{
322 unsigned uTruth[2]; // the truth table for 6-var function
323 unsigned uPhase; // the phase to tranform it into the canonical form
324 Map_Super_t * pGates; // the linked list of matching supergates
325 Map_HashEntry_t * pNext; // the next entry in the hash table
326};
327
328// getting hold of the next fanout of the node
329#define Map_NodeReadNextFanout( pNode, pFanout ) \
330 ( ( pFanout == NULL )? NULL : \
331 ((Map_Regular((pFanout)->p1) == (pNode))? \
332 (pFanout)->pFanFanin1 : (pFanout)->pFanFanin2) )
333
334// getting hold of the place where the next fanout will be attached
335#define Map_NodeReadNextFanoutPlace( pNode, pFanout ) \
336 ( (Map_Regular((pFanout)->p1) == (pNode))? \
337 &(pFanout)->pFanFanin1 : &(pFanout)->pFanFanin2 )
338
339// iterator through the fanouts of the node
340#define Map_NodeForEachFanout( pNode, pFanout ) \
341 for ( pFanout = (pNode)->pFanPivot; pFanout; \
342 pFanout = Map_NodeReadNextFanout(pNode, pFanout) )
343
344// safe iterator through the fanouts of the node
345#define Map_NodeForEachFanoutSafe( pNode, pFanout, pFanout2 ) \
346 for ( pFanout = (pNode)->pFanPivot, \
347 pFanout2 = Map_NodeReadNextFanout(pNode, pFanout); \
348 pFanout; \
349 pFanout = pFanout2, \
350 pFanout2 = Map_NodeReadNextFanout(pNode, pFanout) )
351
355
359
360/*=== mapperCanon.c =============================================================*/
361/*=== mapperCut.c ===============================================================*/
362extern void Map_MappingCuts( Map_Man_t * p );
363/*=== mapperCutUtils.c ===============================================================*/
364extern Map_Cut_t * Map_CutAlloc( Map_Man_t * p );
365extern void Map_CutFree( Map_Man_t * p, Map_Cut_t * pCut );
366extern void Map_CutPrint( Map_Man_t * p, Map_Node_t * pRoot, Map_Cut_t * pCut, int fPhase );
367extern float Map_CutGetRootArea( Map_Cut_t * pCut, int fPhase );
368extern int Map_CutGetLeafPhase( Map_Cut_t * pCut, int fPhase, int iLeaf );
369extern int Map_NodeGetLeafPhase( Map_Node_t * pNode, int fPhase, int iLeaf );
370extern Map_Cut_t * Map_CutListAppend( Map_Cut_t * pSetAll, Map_Cut_t * pSets );
371extern void Map_CutListRecycle( Map_Man_t * p, Map_Cut_t * pSetList, Map_Cut_t * pSave );
372extern int Map_CutListCount( Map_Cut_t * pSets );
373extern void Map_CutRemoveFanouts( Map_Node_t * pNode, Map_Cut_t * pCut, int fPhase );
374extern void Map_CutInsertFanouts( Map_Node_t * pNode, Map_Cut_t * pCut, int fPhase );
375/*=== mapperFanout.c =============================================================*/
376extern void Map_NodeAddFaninFanout( Map_Node_t * pFanin, Map_Node_t * pFanout );
377extern void Map_NodeRemoveFaninFanout( Map_Node_t * pFanin, Map_Node_t * pFanoutToRemove );
378extern int Map_NodeGetFanoutNum( Map_Node_t * pNode );
379/*=== mapperLib.c ============================================================*/
380extern Map_SuperLib_t * Map_SuperLibCreate( Mio_Library_t * pGenlib, Vec_Str_t * vStr, char * pFileName, char * pExcludeFile, int fAlgorithm, int fVerbose );
381extern void Map_SuperLibFree( Map_SuperLib_t * p );
382/*=== mapperMatch.c ===============================================================*/
383extern int Map_MappingMatches( Map_Man_t * p );
384/*=== mapperRefs.c =============================================================*/
386extern void Map_MappingEstimateRefs( Map_Man_t * p );
387extern float Map_CutGetAreaFlow( Map_Cut_t * pCut, int fPhase );
388extern float Map_CutGetAreaRefed( Map_Cut_t * pCut, int fPhase );
389extern float Map_CutGetAreaDerefed( Map_Cut_t * pCut, int fPhase );
390extern float Map_CutRef( Map_Cut_t * pCut, int fPhase, int fProfile );
391extern float Map_CutDeref( Map_Cut_t * pCut, int fPhase, int fProfile );
392extern void Map_MappingSetRefs( Map_Man_t * pMan );
393extern float Map_MappingGetArea( Map_Man_t * pMan );
394/*=== mapperSwitch.c =============================================================*/
395extern float Map_SwitchCutGetDerefed( Map_Node_t * pNode, Map_Cut_t * pCut, int fPhase );
396extern float Map_SwitchCutRef( Map_Node_t * pNode, Map_Cut_t * pCut, int fPhase );
397extern float Map_SwitchCutDeref( Map_Node_t * pNode, Map_Cut_t * pCut, int fPhase );
398extern float Map_MappingGetSwitching( Map_Man_t * pMan );
399/*=== mapperTree.c ===============================================================*/
400extern int Map_LibraryDeriveGateInfo( Map_SuperLib_t * pLib, st__table * tExcludeGate );
401extern int Map_LibraryReadFileTreeStr( Map_SuperLib_t * pLib, Mio_Library_t * pGenlib, Vec_Str_t * vStr, char * pFileName );
402extern int Map_LibraryReadTree( Map_SuperLib_t * pLib, Mio_Library_t * pGenlib, char * pFileName, char * pExcludeFile );
403extern void Map_LibraryPrintTree( Map_SuperLib_t * pLib );
404/*=== mapperSuper.c ===============================================================*/
405extern int Map_LibraryRead( Map_SuperLib_t * p, char * pFileName );
406extern void Map_LibraryPrintSupergate( Map_Super_t * pGate );
407/*=== mapperTable.c ============================================================*/
409extern void Map_SuperTableFree( Map_HashTable_t * p );
410extern int Map_SuperTableInsertC( Map_HashTable_t * pLib, unsigned uTruthC[], Map_Super_t * pGate );
411extern int Map_SuperTableInsert( Map_HashTable_t * pLib, unsigned uTruth[], Map_Super_t * pGate, unsigned uPhase );
412extern Map_Super_t * Map_SuperTableLookup( Map_HashTable_t * p, unsigned uTruth[], unsigned * puPhase );
413extern void Map_SuperTableSortSupergates( Map_HashTable_t * p, int nSupersMax );
414extern void Map_SuperTableSortSupergatesByDelay( Map_HashTable_t * p, int nSupersMax );
415/*=== mapperTime.c =============================================================*/
416extern float Map_TimeCutComputeArrival( Map_Node_t * pNode, Map_Cut_t * pCut, int fPhase, float tWorstCaseLimit );
417extern float Map_TimeComputeArrivalMax( Map_Man_t * p );
419/*=== mapperTruth.c ===============================================================*/
420extern void Map_MappingTruths( Map_Man_t * pMan );
421extern int Map_TruthsCutDontCare( Map_Man_t * pMan, Map_Cut_t * pCut, unsigned * uTruthDc );
422extern int Map_TruthCountOnes( unsigned * uTruth, int nLeaves );
423extern int Map_TruthDetectTwoFirst( unsigned * uTruth, int nLeaves );
424/*=== mapperUtils.c ===============================================================*/
425extern Map_NodeVec_t * Map_MappingDfs( Map_Man_t * pMan, int fCollectEquiv );
426extern int Map_MappingCountLevels( Map_Man_t * pMan );
427extern void Map_MappingUnmark( Map_Man_t * pMan );
428extern void Map_MappingMark_rec( Map_Node_t * pNode );
429extern void Map_MappingUnmark_rec( Map_Node_t * pNode );
431extern void Map_MappingSetupMask( unsigned uMask[], int nVarsMax );
432extern int Map_MappingNodeIsViolator( Map_Node_t * pNode, Map_Cut_t * pCut, int fPosPol );
433extern float Map_MappingGetAreaFlow( Map_Man_t * p );
434extern void Map_MappingSortByLevel( Map_Man_t * pMan, Map_NodeVec_t * vNodes );
435extern int Map_MappingCountDoubles( Map_Man_t * pMan, Map_NodeVec_t * vNodes );
436extern void Map_MappingExpandTruth( unsigned uTruth[2], int nVars );
442extern int Map_MappingGetMaxLevel( Map_Man_t * pMan );
443extern void Map_MappingSetChoiceLevels( Map_Man_t * pMan );
444extern void Map_MappingReportChoices( Map_Man_t * pMan );
445/*=== mapperVec.c =============================================================*/
446extern Map_NodeVec_t * Map_NodeVecAlloc( int nCap );
447extern void Map_NodeVecFree( Map_NodeVec_t * p );
450extern int Map_NodeVecReadSize( Map_NodeVec_t * p );
451extern void Map_NodeVecGrow( Map_NodeVec_t * p, int nCapMin );
452extern void Map_NodeVecShrink( Map_NodeVec_t * p, int nSizeNew );
453extern void Map_NodeVecClear( Map_NodeVec_t * p );
454extern void Map_NodeVecPush( Map_NodeVec_t * p, Map_Node_t * Entry );
455extern int Map_NodeVecPushUnique( Map_NodeVec_t * p, Map_Node_t * Entry );
457extern void Map_NodeVecRemove( Map_NodeVec_t * p, Map_Node_t * Entry );
458extern void Map_NodeVecWriteEntry( Map_NodeVec_t * p, int i, Map_Node_t * Entry );
460extern void Map_NodeVecSortByLevel( Map_NodeVec_t * p );
461
462
463
465
466#endif
467
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
struct Vec_Str_t_ Vec_Str_t
Definition bblif.c:46
Cube * p
Definition exorList.c:222
struct Extra_MmFixed_t_ Extra_MmFixed_t
Definition extra.h:147
struct Extra_MmFlex_t_ Extra_MmFlex_t
Definition extra.h:148
int Map_MappingNodeIsViolator(Map_Node_t *pNode, Map_Cut_t *pCut, int fPosPol)
int Map_TruthCountOnes(unsigned *uTruth, int nLeaves)
float Map_CutGetAreaRefed(Map_Cut_t *pCut, int fPhase)
Definition mapperRefs.c:335
int Map_SuperTableInsert(Map_HashTable_t *pLib, unsigned uTruth[], Map_Super_t *pGate, unsigned uPhase)
Map_Cut_t * Map_CutListAppend(Map_Cut_t *pSetAll, Map_Cut_t *pSets)
int Map_LibraryRead(Map_SuperLib_t *p, char *pFileName)
FUNCTION DEFINITIONS ///.
Definition mapperSuper.c:50
void Map_MappingMark_rec(Map_Node_t *pNode)
void Map_CutPrint(Map_Man_t *p, Map_Node_t *pRoot, Map_Cut_t *pCut, int fPhase)
int Map_MappingGetMaxLevel(Map_Man_t *pMan)
void Map_NodeVecRemove(Map_NodeVec_t *p, Map_Node_t *Entry)
Definition mapperVec.c:250
int Map_NodeGetFanoutNum(Map_Node_t *pNode)
Map_Cut_t * Map_CutAlloc(Map_Man_t *p)
DECLARATIONS ///.
void Map_MappingSetRefs(Map_Man_t *pMan)
Definition mapperRefs.c:450
int Map_NodeVecPushUnique(Map_NodeVec_t *p, Map_Node_t *Entry)
Definition mapperVec.c:213
int Map_MappingMatches(Map_Man_t *p)
Map_NodeVec_t * Map_NodeVecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition mapperVec.c:45
Map_NodeVec_t * Map_NodeVecDup(Map_NodeVec_t *p)
Definition mapperVec.c:87
void Map_NodeVecSortByLevel(Map_NodeVec_t *p)
Definition mapperVec.c:307
float Map_CutGetAreaDerefed(Map_Cut_t *pCut, int fPhase)
Definition mapperRefs.c:355
void Map_MappingSetupMask(unsigned uMask[], int nVarsMax)
int Map_TruthDetectTwoFirst(unsigned *uTruth, int nLeaves)
void Map_MappingExpandTruth(unsigned uTruth[2], int nVars)
int Map_MappingCountLevels(Map_Man_t *pMan)
int Map_CutGetLeafPhase(Map_Cut_t *pCut, int fPhase, int iLeaf)
float Map_SwitchCutRef(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
void Map_SuperTableSortSupergates(Map_HashTable_t *p, int nSupersMax)
void Map_NodeVecFree(Map_NodeVec_t *p)
Definition mapperVec.c:68
int Map_LibraryReadTree(Map_SuperLib_t *pLib, Mio_Library_t *pGenlib, char *pFileName, char *pExcludeFile)
Definition mapperTree.c:525
void Map_NodeVecShrink(Map_NodeVec_t *p, int nSizeNew)
Definition mapperVec.c:157
void Map_CutInsertFanouts(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
void Map_MappingEstimateRefsInit(Map_Man_t *p)
Definition mapperRefs.c:126
int Map_MappingCountDoubles(Map_Man_t *pMan, Map_NodeVec_t *vNodes)
void Map_SuperTableFree(Map_HashTable_t *p)
Definition mapperTable.c:74
void Map_TimeComputeRequiredGlobal(Map_Man_t *p)
Definition mapperTime.c:385
void Map_NodeRemoveFaninFanout(Map_Node_t *pFanin, Map_Node_t *pFanoutToRemove)
int Map_NodeGetLeafPhase(Map_Node_t *pNode, int fPhase, int iLeaf)
void Map_NodeVecGrow(Map_NodeVec_t *p, int nCapMin)
Definition mapperVec.c:138
int Map_TruthsCutDontCare(Map_Man_t *pMan, Map_Cut_t *pCut, unsigned *uTruthDc)
int Map_NodeVecReadSize(Map_NodeVec_t *p)
Definition mapperVec.c:122
void Map_MappingPrintOutputArrivals(Map_Man_t *p)
float Map_MappingGetAreaFlow(Map_Man_t *p)
int Map_LibraryDeriveGateInfo(Map_SuperLib_t *pLib, st__table *tExcludeGate)
Definition mapperTree.c:586
float Map_TimeComputeArrivalMax(Map_Man_t *p)
DECLARATIONS ///.
Definition mapperTime.c:45
float Map_CutDeref(Map_Cut_t *pCut, int fPhase, int fProfile)
Definition mapperRefs.c:391
void Map_CutFree(Map_Man_t *p, Map_Cut_t *pCut)
void Map_CutRemoveFanouts(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
int Map_SuperTableInsertC(Map_HashTable_t *pLib, unsigned uTruthC[], Map_Super_t *pGate)
Definition mapperTable.c:92
void Map_NodeVecPush(Map_NodeVec_t *p, Map_Node_t *Entry)
Definition mapperVec.c:190
Map_SuperLib_t * Map_SuperLibCreate(Mio_Library_t *pGenlib, Vec_Str_t *vStr, char *pFileName, char *pExcludeFile, int fAlgorithm, int fVerbose)
DECLARATIONS ///.
Definition mapperLib.c:61
Map_NodeVec_t * Map_MappingDfs(Map_Man_t *pMan, int fCollectEquiv)
Definition mapperUtils.c:77
void Map_NodeAddFaninFanout(Map_Node_t *pFanin, Map_Node_t *pFanout)
void Map_MappingEstimateRefs(Map_Man_t *p)
Definition mapperRefs.c:151
void Map_MappingWireReport(Map_Man_t *p)
int Map_LibraryReadFileTreeStr(Map_SuperLib_t *pLib, Mio_Library_t *pGenlib, Vec_Str_t *vStr, char *pFileName)
Definition mapperTree.c:391
Map_Node_t ** Map_NodeVecReadArray(Map_NodeVec_t *p)
Definition mapperVec.c:106
void Map_MappingSetChoiceLevels(Map_Man_t *pMan)
void Map_MappingReportChoices(Map_Man_t *pMan)
void Map_MappingTruths(Map_Man_t *pMan)
FUNCTION DEFINITIONS ///.
Definition mapperTruth.c:47
float Map_MappingPrintWirelength(Map_Man_t *p)
void Map_LibraryPrintTree(Map_SuperLib_t *pLib)
Definition mapperTree.c:979
int Map_CutListCount(Map_Cut_t *pSets)
float Map_CutRef(Map_Cut_t *pCut, int fPhase, int fProfile)
Definition mapperRefs.c:375
float Map_CutGetAreaFlow(Map_Cut_t *pCut, int fPhase)
Definition mapperRefs.c:179
Map_Node_t * Map_NodeVecReadEntry(Map_NodeVec_t *p, int i)
Definition mapperVec.c:290
float Map_SwitchCutGetDerefed(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
FUNCTION DEFINITIONS ///.
void Map_SuperTableSortSupergatesByDelay(Map_HashTable_t *p, int nSupersMax)
void Map_MappingUnmark_rec(Map_Node_t *pNode)
float Map_MappingPrintSwitching(Map_Man_t *pMan)
void Map_MappingSortByLevel(Map_Man_t *pMan, Map_NodeVec_t *vNodes)
Map_Node_t * Map_NodeVecPop(Map_NodeVec_t *p)
Definition mapperVec.c:234
void Map_CutListRecycle(Map_Man_t *p, Map_Cut_t *pSetList, Map_Cut_t *pSave)
void Map_SuperLibFree(Map_SuperLib_t *p)
Definition mapperLib.c:170
float Map_SwitchCutDeref(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
float Map_MappingGetSwitching(Map_Man_t *pMan)
void Map_MappingUnmark(Map_Man_t *pMan)
void Map_NodeVecWriteEntry(Map_NodeVec_t *p, int i, Map_Node_t *Entry)
Definition mapperVec.c:273
float Map_TimeCutComputeArrival(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase, float tWorstCaseLimit)
Definition mapperTime.c:75
void Map_LibraryPrintSupergate(Map_Super_t *pGate)
void Map_MappingCuts(Map_Man_t *p)
GLOBAL VARIABLES ///.
Definition mapperCut.c:172
float Map_MappingComputeDelayWithFanouts(Map_Man_t *p)
Map_HashTable_t * Map_SuperTableCreate(Map_SuperLib_t *pLib)
FUNCTION DEFINITIONS ///.
Definition mapperTable.c:48
void Map_NodeVecClear(Map_NodeVec_t *p)
Definition mapperVec.c:174
float Map_MappingGetArea(Map_Man_t *pMan)
Definition mapperRefs.c:485
void Map_MappingSetPlacementInfo(Map_Man_t *p)
Map_Super_t * Map_SuperTableLookup(Map_HashTable_t *p, unsigned uTruth[], unsigned *puPhase)
float Map_CutGetRootArea(Map_Cut_t *pCut, int fPhase)
typedefABC_NAMESPACE_HEADER_START struct Map_ManStruct_t_ Map_Man_t
INCLUDES ///.
Definition mapper.h:40
struct Map_HashTableStruct_t_ Map_HashTable_t
Definition mapper.h:47
struct Map_MatchStruct_t_ Map_Match_t
Definition mapper.h:44
struct Map_CutStruct_t_ Map_Cut_t
Definition mapper.h:43
struct Map_SuperStruct_t_ Map_Super_t
Definition mapper.h:45
struct Map_SuperLibStruct_t_ Map_SuperLib_t
Definition mapper.h:46
struct Map_TimeStruct_t_ Map_Time_t
Definition mapper.h:49
struct Map_HashEntryStruct_t_ Map_HashEntry_t
Definition mapper.h:48
struct Map_NodeVecStruct_t_ Map_NodeVec_t
Definition mapper.h:42
struct Map_NodeStruct_t_ Map_Node_t
Definition mapper.h:41
struct Mio_LibraryStruct_t_ Mio_Library_t
Definition mio.h:42
struct Mio_GateStruct_t_ Mio_Gate_t
Definition mio.h:43
Map_Cut_t * pTwo
Definition mapperInt.h:268
Map_Match_t M[2]
Definition mapperInt.h:275
Map_Node_t * ppLeaves[6]
Definition mapperInt.h:269
Map_Cut_t * pOne
Definition mapperInt.h:267
unsigned uTruth
Definition mapperInt.h:270
Map_Cut_t * pNext
Definition mapperInt.h:266
Map_HashEntry_t * pNext
Definition mapperInt.h:325
Map_Super_t * pGates
Definition mapperInt.h:324
Extra_MmFixed_t * mmMan
Definition mapperInt.h:316
Map_HashEntry_t ** pBins
Definition mapperInt.h:313
STRUCTURE DEFINITIONS ///.
Definition mapperInt.h:92
abctime timeTotal
Definition mapperInt.h:162
unsigned uTruths[6][2]
Definition mapperInt.h:131
abctime timeSweep
Definition mapperInt.h:160
Map_SuperLib_t * pSuperLib
Definition mapperInt.h:130
Extra_MmFixed_t * mmNodes
Definition mapperInt.h:138
Extra_MmFixed_t * mmCuts
Definition mapperInt.h:139
Map_NodeVec_t * vMapObjs
Definition mapperInt.h:102
Map_Node_t ** pOutputs
Definition mapperInt.h:98
float * pNodeDelays
Definition mapperInt.h:104
Map_Node_t ** pInputs
Definition mapperInt.h:96
Map_NodeVec_t * vVisited
Definition mapperInt.h:135
int nCountsBest[32]
Definition mapperInt.h:134
Map_Node_t * pConst1
Definition mapperInt.h:101
abctime timeToMap
Definition mapperInt.h:155
unsigned short * uCanons
Definition mapperInt.h:142
abctime timeToNet
Definition mapperInt.h:161
abctime timeTruth
Definition mapperInt.h:157
Map_Node_t ** pBins
Definition mapperInt.h:94
Map_NodeVec_t * vMapBufs
Definition mapperInt.h:103
char ** ppOutputNames
Definition mapperInt.h:107
unsigned uTruthsLarge[10][32]
Definition mapperInt.h:132
Map_Time_t * pOutputRequireds
Definition mapperInt.h:109
Map_Time_t * pInputArrivals
Definition mapperInt.h:108
abctime timeMatch
Definition mapperInt.h:158
Map_Super_t * pSupers
Definition mapperInt.h:253
Map_Super_t * pSuperBest
Definition mapperInt.h:257
unsigned uPhaseBest
Definition mapperInt.h:256
Map_Time_t tArrive
Definition mapperInt.h:259
Map_Cut_t * pCutBest[2]
Definition mapperInt.h:243
Map_Node_t * pNextE
Definition mapperInt.h:227
Map_Node_t * pRepr
Definition mapperInt.h:228
Map_Time_t tRequired[2]
Definition mapperInt.h:240
Map_Man_t * p
Definition mapperInt.h:208
Map_Time_t tArrival[2]
Definition mapperInt.h:239
Map_Node_t * pNext
Definition mapperInt.h:209
Map_Node_t * p2
Definition mapperInt.h:226
Map_Cut_t * pCuts
Definition mapperInt.h:244
Map_Node_t * p1
Definition mapperInt.h:225
Map_Node_t ** pArray
Definition mapperInt.h:305
unsigned uTruths[6][2]
Definition mapperInt.h:188
Extra_MmFixed_t * mmEntries
Definition mapperInt.h:200
Mio_Library_t * pGenlib
Definition mapperInt.h:173
Map_HashTable_t * tTableC
Definition mapperInt.h:184
Mio_Gate_t * pGateInv
Definition mapperInt.h:192
Map_HashTable_t * tTable
Definition mapperInt.h:185
Extra_MmFixed_t * mmSupers
Definition mapperInt.h:199
Extra_MmFlex_t * mmForms
Definition mapperInt.h:201
Map_Super_t * pSuperInv
Definition mapperInt.h:196
Map_Super_t ** ppSupers
Definition mapperInt.h:183
Mio_Gate_t * pRoot
Definition mapperInt.h:292
unsigned uTruth[2]
Definition mapperInt.h:293
Map_Super_t * pNext
Definition mapperInt.h:299
Map_Time_t tDelayMax
Definition mapperInt.h:296
Map_Time_t tDelaysF[6]
Definition mapperInt.h:295
Map_Time_t tDelaysR[6]
Definition mapperInt.h:294
unsigned char uPhases[4]
Definition mapperInt.h:289
Map_Super_t * pFanins[6]
Definition mapperInt.h:291
Definition st.h:52