61 Abc_Print( 1,
"Something did not work out with the command \"%s\".\n", pScript );
70 Abc_Print( 1,
"Something did not work out with the command \"%s\".\n", pScript );
76 return Abc_NtkNodeNum(pTemp);
78void Acb_NtkRunGen(
int nInputs,
int nMints,
int nFuncs,
int Seed,
int fVerbose,
char * pScript )
81 Vec_Int_t * vNodes = Vec_IntAlloc( 1000 );
82 int i, k, nNodes,
nWords = Abc_TtWordNum(nInputs);
84 Abc_Ntk_t * pNtkNew;
char * pTtStr, * pSop;
86 for ( i = 0; i < 10+Seed; i++ )
88 printf(
"Synthesizing %d random %d-variable functions with %d positive minterms using script \"%s\".\n", nFuncs, nInputs, nMints, pScript );
89 for ( i = 0; i < nFuncs; i++ )
92 for ( k = 0; k <
nWords; k++ )
95 Abc_TtClear( pFun,
nWords );
96 for ( k = 0; k < nMints; k++ ) {
99 while ( Abc_TtGetBit(pFun, iMint) );
100 Abc_TtSetBit( pFun, iMint );
103 pTtStr =
ABC_CALLOC(
char, nInputs > 2 ? (1 << (nInputs-2)) + 1 : 2 );
108 if ( nNodes >= Vec_IntSize(vNodes) )
109 Vec_IntSetEntry( vNodes, nNodes, 0 );
110 Vec_IntAddToEntry( vNodes, nNodes, 1 );
113 printf(
"Function %4d : ", i );
114 printf(
"Random function has %d positive minterms ", nMints );
115 printf(
"and maps into %d nodes.\n", nNodes );
117 printf(
"Truth table : %s\n", pTtStr );
124 printf(
"Nodes %3d : Functions %3d Ratio %5.2f %%\n", k, i, 100.0*i/nFuncs );
126 Abc_PrintTime( 0,
"Total time", Abc_Clock() - clkStart );
void Acb_NtkRunGen(int nInputs, int nMints, int nFuncs, int Seed, int fVerbose, char *pScript)
ABC_NAMESPACE_IMPL_START int Abc_NtkRunGenOne(Abc_Ntk_t *p, char *pScript)
DECLARATIONS ///.
ABC_DLL char * Abc_SopFromTruthHex(char *pTruth)
struct Abc_Ntk_t_ Abc_Ntk_t
ABC_DLL Abc_Ntk_t * Abc_NtkCreateWithNode(char *pSop)
word Abc_RandomW(int fReset)
#define ABC_ALLOC(type, num)
unsigned Abc_Random(int fReset)
#define ABC_CALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Abc_Frame_t * Abc_FrameGetGlobalFrame()
ABC_DLL void Abc_FrameSetBatchMode(int Mode)
ABC_DLL Abc_Ntk_t * Abc_FrameReadNtk(Abc_Frame_t *p)
ABC_DLL void Abc_FrameReplaceCurrentNetwork(Abc_Frame_t *p, Abc_Ntk_t *pNet)
ABC_DLL int Abc_FrameIsBatchMode()
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
ABC_DLL int Cmd_CommandExecute(Abc_Frame_t *pAbc, const char *sCommand)
unsigned __int64 word
DECLARATIONS ///.
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.