diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2006-09-16 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2006-09-16 08:01:00 -0700 |
commit | 370578bf1c4504b65f49ab63fcf7ed9c88a15d69 (patch) | |
tree | d8297df3e080f52c6526fd7ccded9dd4cc601f2d /src/base/abci/abcFpga.c | |
parent | aab0c478e4c78c6856919fcd1027583ca148f3eb (diff) | |
download | abc-370578bf1c4504b65f49ab63fcf7ed9c88a15d69.tar.gz abc-370578bf1c4504b65f49ab63fcf7ed9c88a15d69.tar.bz2 abc-370578bf1c4504b65f49ab63fcf7ed9c88a15d69.zip |
Version abc60916
Diffstat (limited to 'src/base/abci/abcFpga.c')
-rw-r--r-- | src/base/abci/abcFpga.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/base/abci/abcFpga.c b/src/base/abci/abcFpga.c index e5286487..80238b48 100644 --- a/src/base/abci/abcFpga.c +++ b/src/base/abci/abcFpga.c @@ -209,7 +209,8 @@ Abc_Ntk_t * Abc_NtkFromFpga( Fpga_Man_t * pMan, Abc_Ntk_t * pNtk ) Abc_NtkForEachCi( pNtk, pNode, i ) Fpga_NodeSetData0( Fpga_ManReadInputs(pMan)[i], (char *)pNode->pCopy ); // set the constant node - Fpga_NodeSetData0( Fpga_ManReadConst1(pMan), (char *)Abc_NodeCreateConst1(pNtkNew) ); +// if ( Fpga_NodeReadRefs(Fpga_ManReadConst1(pMan)) > 0 ) + Fpga_NodeSetData0( Fpga_ManReadConst1(pMan), (char *)Abc_NodeCreateConst1(pNtkNew) ); // process the nodes in topological order pProgress = Extra_ProgressBarStart( stdout, Abc_NtkCoNum(pNtk) ); Abc_NtkForEachCo( pNtk, pNode, i ) @@ -222,6 +223,10 @@ Abc_Ntk_t * Abc_NtkFromFpga( Fpga_Man_t * pMan, Abc_Ntk_t * pNtk ) Extra_ProgressBarStop( pProgress ); // finalize the new network Abc_NtkFinalize( pNtk, pNtkNew ); + // remove the constant node if not used + pNodeNew = (Abc_Obj_t *)Fpga_NodeReadData0(Fpga_ManReadConst1(pMan)); + if ( Abc_ObjFanoutNum(pNodeNew) == 0 ) + Abc_NtkDeleteObj( pNodeNew ); // decouple the PO driver nodes to reduce the number of levels nDupGates = Abc_NtkLogicMakeSimpleCos( pNtkNew, 1 ); // if ( nDupGates && Fpga_ManReadVerbose(pMan) ) |