ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
dchCore.c
Go to the documentation of this file.
1
20
21#include "dchInt.h"
22
24
25
29
33
46{
47 memset( p, 0, sizeof(Dch_Pars_t) );
48 p->nWords = 8; // the number of simulation words
49 p->nBTLimit = 1000; // conflict limit at a node
50 p->nSatVarMax = 5000; // the max number of SAT variables
51 p->fSynthesis = 1; // derives three snapshots
52 p->fPolarFlip = 1; // uses polarity adjustment
53 p->fSimulateTfo = 1; // simulate TFO
54 p->fPower = 0; // power-aware rewriting
55 p->fLightSynth = 0; // uses lighter version of synthesis
56 p->fSkipRedSupp = 0; // skips choices with redundant structural support
57 p->fVerbose = 0; // verbose stats
58 p->nNodesAhead = 1000; // the lookahead in terms of nodes
59 p->nCallsRecycle = 100; // calls to perform before recycling SAT solver
60}
61
74{
75 return p->fVerbose;
76}
77
90{
91 Dch_Man_t * p;
92 Aig_Man_t * pResult;
93 abctime clk, clk2 = Abc_Clock(), clkTotal = Abc_Clock();
94 // reset random numbers
96 // start the choicing manager
97 p = Dch_ManCreate( pAig, pPars );
98 // compute candidate equivalence classes
99clk = Abc_Clock();
100 p->ppClasses = Dch_CreateCandEquivClasses( pAig, pPars->nWords, pPars->fVerbose );
101p->timeSimInit = Abc_Clock() - clk;
102// Dch_ClassesPrint( p->ppClasses, 0 );
103 p->nLits = Dch_ClassesLitNum( p->ppClasses );
104 // perform SAT sweeping
105 Dch_ManSweep( p );
106 // free memory ahead of time
107p->timeTotal = Abc_Clock() - clkTotal;
108 Dch_ManStop( p );
109 if ( pPars->fVerbose )
110 Abc_PrintTime( 1, "Old choice computation time", Abc_Clock() - clk2 );
111 // create choices
112 ABC_FREE( pAig->pTable );
113 pResult = Dch_DeriveChoiceAig( pAig, pPars->fSkipRedSupp );
114 // count the number of representatives
115 if ( pPars->fVerbose )
116 Abc_Print( 1, "STATS: Ands:%8d ->%8d. Reprs:%7d ->%7d. Choices =%7d.\n",
117 Aig_ManNodeNum(pAig),
118 Aig_ManNodeNum(pResult),
121 Aig_ManChoiceNum( pResult ) );
122 return pResult;
123}
124
137{
138 Dch_Man_t * p;
139 abctime clk, clkTotal = Abc_Clock();
140 // reset random numbers
141 Aig_ManRandom(1);
142 // start the choicing manager
143 p = Dch_ManCreate( pAig, pPars );
144 // compute candidate equivalence classes
145clk = Abc_Clock();
146 p->ppClasses = Dch_CreateCandEquivClasses( pAig, pPars->nWords, pPars->fVerbose );
147p->timeSimInit = Abc_Clock() - clk;
148// Dch_ClassesPrint( p->ppClasses, 0 );
149 p->nLits = Dch_ClassesLitNum( p->ppClasses );
150 // perform SAT sweeping
151 Dch_ManSweep( p );
152 // free memory ahead of time
153p->timeTotal = Abc_Clock() - clkTotal;
154 Dch_ManStop( p );
155}
156
160
161
163
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_FREE(obj)
Definition abc_global.h:267
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
int Aig_ManChoiceNum(Aig_Man_t *p)
Definition aigUtil.c:1020
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
unsigned Aig_ManRandom(int fReset)
Definition aigUtil.c:1170
Aig_Man_t * Dch_DeriveChoiceAig(Aig_Man_t *pAig, int fSkipRedSupps)
Definition dchChoice.c:524
int Dch_DeriveChoiceCountEquivs(Aig_Man_t *pAig)
Definition dchChoice.c:89
int Dch_DeriveChoiceCountReprs(Aig_Man_t *pAig)
FUNCTION DECLARATIONS ///.
Definition dchChoice.c:75
int Dch_ClassesLitNum(Dch_Cla_t *p)
Definition dchClass.c:206
Aig_Man_t * Dch_ComputeChoices(Aig_Man_t *pAig, Dch_Pars_t *pPars)
Definition dchCore.c:89
void Dch_ComputeEquivalences(Aig_Man_t *pAig, Dch_Pars_t *pPars)
Definition dchCore.c:136
ABC_NAMESPACE_IMPL_START void Dch_ManSetDefaultParams(Dch_Pars_t *p)
DECLARATIONS ///.
Definition dchCore.c:45
int Dch_ManReadVerbose(Dch_Pars_t *p)
Definition dchCore.c:73
Dch_Man_t * Dch_ManCreate(Aig_Man_t *pAig, Dch_Pars_t *pPars)
DECLARATIONS ///.
Definition dchMan.c:45
struct Dch_Man_t_ Dch_Man_t
Definition dchInt.h:50
void Dch_ManStop(Dch_Man_t *p)
Definition dchMan.c:122
void Dch_ManSweep(Dch_Man_t *p)
Definition dchSweep.c:106
Dch_Cla_t * Dch_CreateCandEquivClasses(Aig_Man_t *pAig, int nWords, int fVerbose)
Definition dchSim.c:264
typedefABC_NAMESPACE_HEADER_START struct Dch_Pars_t_ Dch_Pars_t
INCLUDES ///.
Definition dch.h:43
Cube * p
Definition exorList.c:222
char * memset()