#include "rwr.h"
#include "base/main/main.h"
#include "bool/dec/dec.h"
Go to the source code of this file.
◆ Rwr_ManAddTimeCuts()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 261 of file rwrMan.c.
◆ Rwr_ManAddTimeTotal()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 293 of file rwrMan.c.
294{
295 p->timeTotal += Time;
296}
◆ Rwr_ManAddTimeUpdate()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 277 of file rwrMan.c.
278{
279 p->timeUpdate += Time;
280}
◆ Rwr_ManPrintStats()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 143 of file rwrMan.c.
144{
145 int i, Counter = 0;
146 for ( i = 0; i < 222; i++ )
147 Counter += (
p->nScores[i] > 0);
148
149 printf( "Rewriting statistics:\n" );
150 printf(
"Total cuts tries = %8d.\n",
p->nCutsGood );
151 printf(
"Bad cuts found = %8d.\n",
p->nCutsBad );
152 printf(
"Total subgraphs = %8d.\n",
p->nSubgraphs );
153 printf( "Used NPN classes = %8d.\n", Counter );
154 printf(
"Nodes considered = %8d.\n",
p->nNodesConsidered );
155 printf(
"Nodes rewritten = %8d.\n",
p->nNodesRewritten );
156 printf(
"Gain = %8d. (%6.2f %%).\n",
p->nNodesBeg-
p->nNodesEnd, 100.0*(
p->nNodesBeg-
p->nNodesEnd)/
p->nNodesBeg );
159 ABC_PRT(
"Resynthesis ",
p->timeRes );
162 ABC_PRT(
"Update ",
p->timeUpdate );
164
165
166
167
168
169
170
171
172
173
174
175 printf( "\n" );
176
177}
◆ Rwr_ManPrintStatsFile()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 190 of file rwrMan.c.
191{
192 FILE * pTable;
193 pTable = fopen( "stats.txt", "a+" );
194 fprintf( pTable,
"%d ",
p->nCutsGood );
195 fprintf( pTable,
"%d ",
p->nSubgraphs );
196 fprintf( pTable,
"%d ",
p->nNodesRewritten );
197 fprintf( pTable,
"%d",
p->nNodesGained );
198 fprintf( pTable, "\n" );
199 fclose( pTable );
200}
◆ Rwr_ManReadCompl()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 245 of file rwrMan.c.
◆ Rwr_ManReadDecs()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 213 of file rwrMan.c.
◆ Rwr_ManReadLeaves()
Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 229 of file rwrMan.c.
◆ Rwr_ManStart()
DECLARATIONS ///.
CFile****************************************************************
FileName [rwrMan.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [DAG-aware AIG rewriting package.]
Synopsis [Rewriting manager.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
- Id
- rwrMan.c,v 1.00 2005/06/20 00:00:00 alanmi Exp
] FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Starts rewriting manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 47 of file rwrMan.c.
48{
52clk = Abc_Clock();
60 p->pMap = pManDec->
pMap;
61
63
66
68 p->vForest = Vec_PtrAlloc( 100 );
75
78 p->vLevNums = Vec_IntAlloc( 50 );
79 p->vFanins = Vec_PtrAlloc( 50 );
80 p->vFaninsCur = Vec_PtrAlloc( 50 );
81 p->vNodesTemp = Vec_PtrAlloc( 50 );
82 if ( fPrecompute )
83 {
85
87 }
88 else
89 {
91
93 }
94p->timeStart = Abc_Clock() - clk;
96}
#define ABC_ALLOC(type, num)
ABC_DLL void * Abc_FrameReadManDec()
struct Dec_Man_t_ Dec_Man_t
Rwr_Node_t * Rwr_ManAddVar(Rwr_Man_t *p, unsigned uTruth, int fPrecompute)
char * Rwr_ManGetPractical(Rwr_Man_t *p)
void Rwr_ManPreprocess(Rwr_Man_t *p)
MACRO DEFINITIONS ///.
struct Rwr_Man_t_ Rwr_Man_t
void Rwr_ManWriteToArray(Rwr_Man_t *p)
FUNCTION DEFINITIONS ///.
void Rwr_ManPrecompute(Rwr_Man_t *p)
FUNCTION DEFINITIONS ///.
struct Rwr_Node_t_ Rwr_Node_t
void Rwr_ManLoadFromArray(Rwr_Man_t *p, int fVerbose)
unsigned short * puCanons
◆ Rwr_ManStop()
Function*************************************************************
Synopsis [Stops rewriting manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 109 of file rwrMan.c.
110{
112 {
114 int i, k;
117 }
118 if (
p->vClasses ) Vec_VecFree(
p->vClasses );
119 Vec_PtrFree(
p->vNodesTemp );
120 Vec_PtrFree(
p->vForest );
121 Vec_IntFree(
p->vLevNums );
122 Vec_PtrFree(
p->vFanins );
123 Vec_PtrFree(
p->vFaninsCur );
130}
struct Dec_Graph_t_ Dec_Graph_t
#define Vec_VecForEachEntry(Type, vGlob, pEntry, i, k)
◆ Rwr_Precompute()
Function*************************************************************
Synopsis [Precomputes AIG subgraphs.]
Description []
SideEffects []
SeeAlso []
Definition at line 310 of file rwrMan.c.
311{
315}
ABC_NAMESPACE_IMPL_START Rwr_Man_t * Rwr_ManStart(int fPrecompute)
DECLARATIONS ///.
void Rwr_ManStop(Rwr_Man_t *p)