diff options
Diffstat (limited to 'src/opt/sim/simSwitch.c')
-rw-r--r-- | src/opt/sim/simSwitch.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/opt/sim/simSwitch.c b/src/opt/sim/simSwitch.c index baabc320..4f675082 100644 --- a/src/opt/sim/simSwitch.c +++ b/src/opt/sim/simSwitch.c @@ -21,6 +21,9 @@ #include "abc.h" #include "sim.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -64,15 +67,15 @@ Vec_Int_t * Sim_NtkComputeSwitching( Abc_Ntk_t * pNtk, int nPatterns ) pSwitching = (float *)vSwitching->pArray; Abc_NtkForEachCi( pNtk, pNode, i ) { - pSimInfo = Vec_PtrEntry(vSimInfo, pNode->Id); + pSimInfo = (unsigned *)Vec_PtrEntry(vSimInfo, pNode->Id); Sim_UtilSetRandom( pSimInfo, nSimWords ); pSwitching[pNode->Id] = Sim_ComputeSwitching( pSimInfo, nSimWords ); } // simulate the internal nodes vNodes = Abc_AigDfs( pNtk, 1, 0 ); - Vec_PtrForEachEntry( vNodes, pNode, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i ) { - pSimInfo = Vec_PtrEntry(vSimInfo, pNode->Id); + pSimInfo = (unsigned *)Vec_PtrEntry(vSimInfo, pNode->Id); Sim_UtilSimulateNodeOne( pNode, vSimInfo, nSimWords, 0 ); pSwitching[pNode->Id] = Sim_ComputeSwitching( pSimInfo, nSimWords ); } @@ -105,3 +108,5 @@ float Sim_ComputeSwitching( unsigned * pSimInfo, int nSimWords ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + |