#include "rwt.h"
#include "bool/deco/deco.h"
Go to the source code of this file.
◆ Rwt_ManAddTimeCuts()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 301 of file rwtMan.c.
◆ Rwt_ManAddTimeTotal()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 333 of file rwtMan.c.
334{
335 p->timeTotal += Time;
336}
◆ Rwt_ManAddTimeUpdate()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 317 of file rwtMan.c.
318{
319 p->timeUpdate += Time;
320}
◆ Rwt_ManGlobalStart()
| void Rwt_ManGlobalStart |
( |
| ) |
|
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Starts residual rewriting manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 51 of file rwtMan.c.
52{
53 if ( s_puCanons == NULL )
55}
◆ Rwt_ManGlobalStop()
| void Rwt_ManGlobalStop |
( |
| ) |
|
Function*************************************************************
Synopsis [Starts residual rewriting manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 68 of file rwtMan.c.
◆ Rwt_ManPrintStats()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 183 of file rwtMan.c.
184{
185 int i, Counter = 0;
186 for ( i = 0; i < 222; i++ )
187 Counter += (
p->nScores[i] > 0);
188
189 printf( "Rewriting statistics:\n" );
190 printf(
"Total cuts tries = %8d.\n",
p->nCutsGood );
191 printf(
"Bad cuts found = %8d.\n",
p->nCutsBad );
192 printf(
"Total subgraphs = %8d.\n",
p->nSubgraphs );
193 printf( "Used NPN classes = %8d.\n", Counter );
194 printf(
"Nodes considered = %8d.\n",
p->nNodesConsidered );
195 printf(
"Nodes rewritten = %8d.\n",
p->nNodesRewritten );
196 printf(
"Calculated gain = %8d.\n",
p->nNodesGained );
200 ABC_PRT(
"Resynthesis ",
p->timeRes );
203 ABC_PRT(
"Update ",
p->timeUpdate );
205
206
207
208
209
210
211
212
213
214
215
216
217}
◆ Rwt_ManPrintStatsFile()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 230 of file rwtMan.c.
231{
232 FILE * pTable;
233 pTable = fopen( "stats.txt", "a+" );
234 fprintf( pTable,
"%d ",
p->nCutsGood );
235 fprintf( pTable,
"%d ",
p->nSubgraphs );
236 fprintf( pTable,
"%d ",
p->nNodesRewritten );
237 fprintf( pTable,
"%d",
p->nNodesGained );
238 fprintf( pTable, "\n" );
239 fclose( pTable );
240}
◆ Rwt_ManReadCompl()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 285 of file rwtMan.c.
◆ Rwt_ManReadDecs()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 253 of file rwtMan.c.
◆ Rwt_ManReadLeaves()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 269 of file rwtMan.c.
◆ Rwt_ManStart()
Function*************************************************************
Synopsis [Starts rewriting manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 87 of file rwtMan.c.
88{
91clk = Abc_Clock();
95
97 p->puCanons = s_puCanons;
98 p->pPhases = s_pPhases;
101
103
106
108 p->vForest = Vec_PtrAlloc( 100 );
115
118 p->vLevNums = Vec_IntAlloc( 50 );
119 p->vFanins = Vec_PtrAlloc( 50 );
120 p->vFaninsCur = Vec_PtrAlloc( 50 );
121 p->vNodesTemp = Vec_PtrAlloc( 50 );
122 if ( fPrecompute )
123 {
124
125
126
127 }
128 else
129 {
131
133 }
134p->timeStart = Abc_Clock() - clk;
136}
#define ABC_ALLOC(type, num)
Mem_Fixed_t * Mem_FixedStart(int nEntrySize)
FUNCTION DEFINITIONS ///.
void Rwt_ManGlobalStart()
FUNCTION DEFINITIONS ///.
void Rwt_ManLoadFromArray(Rwt_Man_t *p, int fVerbose)
struct Rwt_Man_t_ Rwt_Man_t
Rwt_Node_t * Rwt_ManAddVar(Rwt_Man_t *p, unsigned uTruth, int fPrecompute)
struct Rwt_Node_t_ Rwt_Node_t
char * Rwt_ManGetPractical(Rwt_Man_t *p)
void Rwt_ManPreprocess(Rwt_Man_t *p)
MACRO DEFINITIONS ///.
◆ Rwt_ManStop()
Function*************************************************************
Synopsis [Stops rewriting manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 149 of file rwtMan.c.
150{
152 {
154 int i, k;
157 }
158 if (
p->vClasses ) Vec_VecFree(
p->vClasses );
159 Vec_PtrFree(
p->vNodesTemp );
160 Vec_PtrFree(
p->vForest );
161 Vec_IntFree(
p->vLevNums );
162 Vec_PtrFree(
p->vFanins );
163 Vec_PtrFree(
p->vFaninsCur );
170}
struct Dec_Graph_t_ Dec_Graph_t
void Mem_FixedStop(Mem_Fixed_t *p, int fVerbose)
#define Vec_VecForEachEntry(Type, vGlob, pEntry, i, k)
◆ Rwt_Precompute()
Function*************************************************************
Synopsis [Precomputes AIG subgraphs.]
Description []
SideEffects []
SeeAlso []
Definition at line 350 of file rwtMan.c.
351{
355}
void Rwt_ManStop(Rwt_Man_t *p)
Rwt_Man_t * Rwt_ManStart(int fPrecompute)