Go to the source code of this file.
◆ Cut_ManIncrementDagNodes()
| void Cut_ManIncrementDagNodes |
( |
Cut_Man_t * | p | ) |
|
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 309 of file cutMan.c.
◆ Cut_ManPrintStats()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 155 of file cutMan.c.
156{
158 {
161 }
162 printf( "Cut computation statistics:\n" );
163 printf(
"Current cuts = %8d. (Trivial = %d.)\n",
p->nCutsCur-
p->nCutsTriv,
p->nCutsTriv );
164 printf(
"Peak cuts = %8d.\n",
p->nCutsPeak );
165 printf(
"Total allocated = %8d.\n",
p->nCutsAlloc );
166 printf(
"Total deallocated = %8d.\n",
p->nCutsDealloc );
167 printf(
"Cuts filtered = %8d.\n",
p->nCutsFilter );
168 printf(
"Nodes saturated = %8d. (Max cuts = %d.)\n",
p->nCutsLimit,
p->pParams->nKeepMax );
169 printf(
"Cuts per node = %8.1f\n", ((
float)(
p->nCutsCur-
p->nCutsTriv))/
p->nNodes );
170 printf(
"The cut size = %8d bytes.\n",
p->EntrySize );
171 printf(
"Peak memory = %8.2f MB.\n", (
float)
p->nCutsPeak *
p->EntrySize / (1<<20) );
172 printf(
"Total nodes = %8d.\n",
p->nNodes );
173 if (
p->pParams->fDag ||
p->pParams->fTree )
174 {
175 printf(
"DAG nodes = %8d.\n",
p->nNodesDag );
176 printf(
"Tree nodes = %8d.\n",
p->nNodes -
p->nNodesDag );
177 }
178 printf(
"Nodes w/o cuts = %8d.\n",
p->nNodesNoCuts );
179 if (
p->pParams->fMap && !
p->pParams->fSeq )
180 printf(
"Mapping delay = %8d.\n",
p->nDelayMin );
181
187
188
189
190}
void Cut_CutRecycle(Cut_Man_t *p, Cut_Cut_t *pCut)
◆ Cut_ManPrintStatsToFile()
| void Cut_ManPrintStatsToFile |
( |
Cut_Man_t * | p, |
|
|
char * | pFileName, |
|
|
abctime | TimeTotal ) |
Function*************************************************************
Synopsis [Prints some interesting stats.]
Description []
SideEffects []
SeeAlso []
Definition at line 204 of file cutMan.c.
205{
206 FILE * pTable;
207 pTable = fopen( "cut_stats.txt", "a+" );
208 fprintf( pTable, "%-20s ", pFileName );
209 fprintf( pTable,
"%8d ",
p->nNodes );
210 fprintf( pTable,
"%6.1f ", ((
float)(
p->nCutsCur))/
p->nNodes );
211 fprintf( pTable,
"%6.2f ", ((
float)(100.0 *
p->nCutsLimit))/
p->nNodes );
212 fprintf( pTable,
"%6.2f ", (
float)
p->nCutsPeak *
p->EntrySize / (1<<20) );
213 fprintf( pTable, "%6.2f ", (float)(TimeTotal)/(float)(CLOCKS_PER_SEC) );
214 fprintf( pTable, "\n" );
215 fclose( pTable );
216}
◆ Cut_ManReadNodeAttrs()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 293 of file cutMan.c.
294{
295 return p->vNodeAttrs;
296}
◆ Cut_ManReadParams()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 277 of file cutMan.c.
◆ Cut_ManReadVarsMax()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 261 of file cutMan.c.
262{
263 return p->pParams->nVarsMax;
264}
◆ Cut_ManSetFanoutCounts()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 229 of file cutMan.c.
230{
231 p->vFanCounts = vFanCounts;
232}
◆ Cut_ManSetNodeAttrs()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 245 of file cutMan.c.
246{
247 p->vNodeAttrs = vNodeAttrs;
248}
◆ Cut_ManStart()
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Starts the cut manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 47 of file cutMan.c.
48{
50
51
55
57
58 p->vCutsNew = Vec_PtrAlloc( pParams->
nIdsMax );
59 Vec_PtrFill(
p->vCutsNew, pParams->
nIdsMax, NULL );
60
62 {
63 p->pParams->fFilter = 1;
64 p->vCutsOld = Vec_PtrAlloc( pParams->
nIdsMax );
65 Vec_PtrFill(
p->vCutsOld, pParams->
nIdsMax, NULL );
66 p->vCutsTemp = Vec_PtrAlloc( pParams->
nCutSet );
67 Vec_PtrFill(
p->vCutsTemp, pParams->
nCutSet, NULL );
69 {
71 printf( "Skipping computation of truth tables for sequential cuts with more than 5 inputs.\n" );
72 }
73 }
74
77 {
79 {
81 printf( "Skipping computation of truth table for more than %d inputs.\n", 14 );
82 }
83 else
84 {
85 p->nTruthWords = Cut_TruthWords( pParams->
nVarsMax );
86 p->EntrySize +=
p->nTruthWords *
sizeof(unsigned);
87 }
88 p->puTemp[0] =
ABC_ALLOC(
unsigned, 4 *
p->nTruthWords );
89 p->puTemp[1] =
p->puTemp[0] +
p->nTruthWords;
90 p->puTemp[2] =
p->puTemp[1] +
p->nTruthWords;
91 p->puTemp[3] =
p->puTemp[2] +
p->nTruthWords;
92 }
93
95 {
96 p->vNodeCuts = Vec_IntStart( pParams->
nIdsMax );
97 p->vNodeStarts = Vec_IntStart( pParams->
nIdsMax );
98 p->vCutPairs = Vec_IntAlloc( 0 );
99 }
100
101 if ( pParams->
fMap && !
p->pParams->fSeq )
102 {
103 p->vDelays = Vec_IntStart( pParams->
nIdsMax );
104 p->vDelays2 = Vec_IntStart( pParams->
nIdsMax );
105 p->vCutsMax = Vec_PtrStart( pParams->
nIdsMax );
106 }
107
109 p->vTemp = Vec_PtrAlloc( 100 );
111}
#define ABC_ALLOC(type, num)
struct Cut_ManStruct_t_ Cut_Man_t
BASIC TYPES ///.
struct Cut_CutStruct_t_ Cut_Cut_t
◆ Cut_ManStop()
Function*************************************************************
Synopsis [Stops the cut manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 124 of file cutMan.c.
125{
126 if (
p->vCutsNew ) Vec_PtrFree(
p->vCutsNew );
127 if (
p->vCutsOld ) Vec_PtrFree(
p->vCutsOld );
128 if (
p->vCutsTemp ) Vec_PtrFree(
p->vCutsTemp );
129 if (
p->vFanCounts ) Vec_IntFree(
p->vFanCounts );
130 if (
p->vTemp ) Vec_PtrFree(
p->vTemp );
131
132 if (
p->vCutsMax ) Vec_PtrFree(
p->vCutsMax );
133 if (
p->vDelays ) Vec_IntFree(
p->vDelays );
134 if (
p->vDelays2 ) Vec_IntFree(
p->vDelays2 );
135 if (
p->vNodeCuts ) Vec_IntFree(
p->vNodeCuts );
136 if (
p->vNodeStarts ) Vec_IntFree(
p->vNodeStarts );
137 if (
p->vCutPairs ) Vec_IntFree(
p->vCutPairs );
139
142}
◆ Npn_StartTruth8()
DECLARATIONS ///.
CFile****************************************************************
FileName [cutMan.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [K-feasible cut computation package.]
Synopsis [Cut manager.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
- Id
- cutMan.c,v 1.00 2005/06/20 00:00:00 alanmi Exp
]