From 69f2911e04ffb1b19eef1fafb8c040af271f656e Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Thu, 15 Jul 2010 18:09:46 -0800 Subject: creating branch for adding support for CUDA 3.x and Fermi [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6829] --- src/intersim/iq_router.hpp | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 src/intersim/iq_router.hpp (limited to 'src/intersim/iq_router.hpp') diff --git a/src/intersim/iq_router.hpp b/src/intersim/iq_router.hpp new file mode 100644 index 0000000..47db1fa --- /dev/null +++ b/src/intersim/iq_router.hpp @@ -0,0 +1,75 @@ +#ifndef _IQ_ROUTER_HPP_ +#define _IQ_ROUTER_HPP_ + +#include +#include + +#include "module.hpp" +#include "router.hpp" +#include "vc.hpp" +#include "allocator.hpp" +#include "routefunc.hpp" +#include "outputset.hpp" +#include "buffer_state.hpp" +#include "pipefifo.hpp" + +class IQRouter : public Router { + int _vcs; + int _vc_size; + + int _iq_time; + int _output_extra_latency; + + VC **_vc; + BufferState *_next_vcs; + + Allocator *_vc_allocator; + Allocator *_sw_allocator; + + int *_sw_rr_offset; + + tRoutingFunction _rf; + + PipelineFIFO *_crossbar_pipe; + PipelineFIFO *_credit_pipe; + + queue *_input_buffer; + queue > *_output_buffer; + + queue *_in_cred_buffer; + queue *_out_cred_buffer; + + int _hold_switch_for_packet; + int *_switch_hold_in; + int *_switch_hold_out; + int *_switch_hold_vc; + + void _ReceiveFlits( ); + void _ReceiveCredits( ); + + void _InputQueuing( ); + void _Route( ); + void _VCAlloc( ); + void _SWAlloc( ); + void _OutputQueuing( ); + + void _SendFlits( ); + void _SendCredits( ); + + void _AddVCRequests( VC* cur_vc, int input_index, bool watch = false ); + +public: + IQRouter( const Configuration& config, + Module *parent, string name, int id, + int inputs, int outputs ); + + virtual ~IQRouter( ); + + virtual void ReadInputs( ); + virtual void InternalStep( ); + virtual void WriteOutputs( ); + + void Display( ) const; +}; + +#endif -- cgit v1.3