diff --git a/src/flitchannel.cpp b/src/flitchannel.cpp index 89c544aa..5ecb0f90 100644 --- a/src/flitchannel.cpp +++ b/src/flitchannel.cpp @@ -47,7 +47,7 @@ // ---------------------------------------------------------------------- FlitChannel::FlitChannel(Module * parent, string const & name, int classes) : Channel(parent, name), _routerSource(NULL), _routerSourcePort(-1), - _routerSink(NULL), _routerSinkPort(-1), _idle(0), _classes(classes) { + _routerSink(NULL), _routerSinkPort(-1), _idle(0) { _active.resize(classes, 0); } diff --git a/src/flitchannel.hpp b/src/flitchannel.hpp index 5f9d9d8e..261c4119 100644 --- a/src/flitchannel.hpp +++ b/src/flitchannel.hpp @@ -94,7 +94,6 @@ class FlitChannel : public Channel { // Statistics for Activity Factors vector _active; int _idle; - int _classes; }; #endif diff --git a/src/networks/kncube.cpp b/src/networks/kncube.cpp index 5f89d612..07259a34 100644 --- a/src/networks/kncube.cpp +++ b/src/networks/kncube.cpp @@ -239,7 +239,7 @@ void KNCube::InsertRandomFaults( const Configuration &config ) num_fails = config.GetInt( "link_failures" ); - if ( num_fails ) { + if ( _size && num_fails ) { prev_seed = RandomIntLong( ); RandomSeed( config.GetInt( "fail_seed" ) ); diff --git a/src/routers/chaos_router.cpp b/src/routers/chaos_router.cpp index 42ab87ea..f7e44a8d 100644 --- a/src/routers/chaos_router.cpp +++ b/src/routers/chaos_router.cpp @@ -589,13 +589,13 @@ void ChaosRouter::_OutputAdvance( ) for ( int m = 0; m < _multi_queue_size; ++m ) { if ( _multi_match[m] != -1 ) { - if ( !_multi_queue[m].empty( ) ) { - f = _multi_queue[m].front( ); - _multi_queue[m].pop( ); - } else { + if ( _multi_queue[m].empty( ) ) { cout << "State = " << _multi_state[m] << endl; Error( "Multi queue empty, but matched!" ); } + assert( !_multi_queue[m].empty( ) ); + f = _multi_queue[m].front( ); + _multi_queue[m].pop( ); _crossbar_pipe->Write( f, _multi_match[m] );