From ef8a5521e440baa2f86d468cdc9078f54ec7c0c0 Mon Sep 17 00:00:00 2001 From: Dongdong Li Date: Fri, 22 Nov 2013 15:38:36 -0800 Subject: Delete Intersim Code Review Issue: 113001 [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 17414] --- src/intersim/router.cpp | 113 ------------------------------------------------ 1 file changed, 113 deletions(-) delete mode 100644 src/intersim/router.cpp (limited to 'src/intersim/router.cpp') diff --git a/src/intersim/router.cpp b/src/intersim/router.cpp deleted file mode 100644 index 6a750a6..0000000 --- a/src/intersim/router.cpp +++ /dev/null @@ -1,113 +0,0 @@ -#include "booksim.hpp" - -#include -#include - -#include "router.hpp" -#include "iq_router.hpp" -#include "event_router.hpp" - -Router::Router( const Configuration& config, - Module *parent, string name, int id, - int inputs, int outputs ) : -Module( parent, name ), -_id( id ), -_inputs( inputs ), -_outputs( outputs ) -{ - _routing_delay = config.GetInt( "routing_delay" ); - _vc_alloc_delay = config.GetInt( "vc_alloc_delay" ); - _sw_alloc_delay = config.GetInt( "sw_alloc_delay" ); - _st_prepare_delay = config.GetInt( "st_prepare_delay" ); - _st_final_delay = config.GetInt( "st_final_delay" ); - _credit_delay = config.GetInt( "credit_delay" ); - _input_speedup = config.GetInt( "input_speedup" ); - _output_speedup = config.GetInt( "output_speedup" ); - - _input_channels = new vector; - _input_credits = new vector; - - _output_channels = new vector; - _output_credits = new vector; - - _channel_faults = new vector; -} - -Router::~Router( ) -{ - delete _input_channels; - delete _input_credits; - delete _output_channels; - delete _output_credits; - delete _channel_faults; -} - -Credit *Router::_NewCredit( int vcs ) -{ - Credit *c; - - c = new Credit( vcs ); - return c; -} - -void Router::_RetireCredit( Credit *c ) -{ - delete c; -} - -void Router::AddInputChannel( Flit **channel, Credit **backchannel ) -{ - _input_channels->push_back( channel ); - _input_credits->push_back( backchannel ); -} - -void Router::AddOutputChannel( Flit **channel, Credit **backchannel ) -{ - _output_channels->push_back( channel ); - _output_credits->push_back( backchannel ); - _channel_faults->push_back( false ); -} - -int Router::GetID( ) const -{ - return _id; -} - -void Router::OutChannelFault( int c, bool fault ) -{ - assert( ( c >= 0 ) && ( c < (int)_channel_faults->size( ) ) ); - - (*_channel_faults)[c] = fault; -} - -bool Router::IsFaultyOutput( int c ) const -{ - assert( ( c >= 0 ) && ( c < (int)_channel_faults->size( ) ) ); - - return(*_channel_faults)[c]; -} - -Router *Router::NewRouter( const Configuration& config, - Module *parent, string name, int id, - int inputs, int outputs ) -{ - Router *r; - string type; - - config.GetStr( "router", type ); - - if ( type == "iq" ) { - r = new IQRouter( config, parent, name, id, inputs, outputs ); - } else if ( type == "event" ) { - r = new EventRouter( config, parent, name, id, inputs, outputs ); - } else { - cout << "Unknown router type " << type << endl; - } - - return r; -} - - - - - -- cgit v1.3