MatchLib
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
WHVCSourceRouter< NumLPorts, NumRports, NumVchannels, BufferSize, FlitType, MaxHops > Class Template Reference

Wormhole Router with virtual channels. More...

#include <WHVCRouter.h>

Inheritance diagram for WHVCSourceRouter< NumLPorts, NumRports, NumVchannels, BufferSize, FlitType, MaxHops >:
WHVCRouterBase< NumLPorts, NumRports, NumVchannels, BufferSize, FlitType >

Public Types

enum  {
  num_lports = BaseClass::num_lports , num_rports = BaseClass::num_rports , num_ports = BaseClass::num_ports , num_vchannels = BaseClass::num_vchannels ,
  log_num_rports = BaseClass::log_num_rports , log_num_ports = BaseClass::log_num_ports , log_num_vchannels = BaseClass::log_num_vchannels , dest_width_per_hop = log_num_rports + num_lports ,
  dest_width = MaxHops * dest_width_per_hop
}
 
typedef WHVCRouterBase< NumLPorts, NumRports, NumVchannels, BufferSize, FlitType > BaseClass
 
typedef FlitType Flit_t
 
- Public Types inherited from WHVCRouterBase< NumLPorts, NumRports, NumVchannels, BufferSize, FlitType >
enum  
 
typedef FlitType Flit_t
 

Public Member Functions

 WHVCSourceRouter (sc_module_name name_)
 
 NVUINTW (num_ports) out_dest[num_ports][num_vchannels]
 
 NVUINTW (num_ports) out_stall
 
void inputvc_arbiter (NVUINTW(log_num_vchannels) vcin[num_ports], NVUINTW(num_ports) &in_valid)
 
void compute_route (Flit_t flit_in[num_ports], NVUINTW(log_num_vchannels) vcin[num_ports], NVUINTW(num_ports) in_valid)
 
void flit_output (bool is_push[num_ports], NVUINTW(log_num_vchannels) vcout[num_ports])
 
void arbitration (Flit_t flit_in[num_ports], NVUINTW(num_ports) in_valid, NVUINTW(log_num_vchannels) vcin[num_ports], NVUINTW(num_ports) valid[num_ports], NVUINTW(num_ports) select[num_ports], NVUINTW(log_num_ports) select_id[num_ports])
 
void reset ()
 
void run ()
 
- Public Member Functions inherited from WHVCRouterBase< NumLPorts, NumRports, NumVchannels, BufferSize, FlitType >
typedef NVUINTW (log_buffersizeplus1) Credit_t
 
typedef NVUINTW (1) Credit_ret_t
 
 SC_HAS_PROCESS (WHVCRouterBase)
 
 WHVCRouterBase (sc_module_name name_)
 
void receive_credit ()
 
void send_credit ()
 
void fill_ififo ()
 
void peek_ififo (Flit_t flit_in[num_ports], NVUINTW(log_num_vchannels) vcin[num_ports], NVUINTW(num_ports) in_valid)
 
void crossbar_traversal (Flit_t flit_in[num_ports], bool is_push[num_ports], NVUINTW(log_num_ports) select_id[num_ports], NVUINTW(log_num_vchannels) vcin[num_ports], NVUINTW(log_num_vchannels) vcout[num_ports])
 
void process ()
 

Public Attributes

Arbiter< num_ports > arbiter [num_ports]
 
bool is_get_new_packet [num_ports *num_vchannels]
 
- Public Attributes inherited from WHVCRouterBase< NumLPorts, NumRports, NumVchannels, BufferSize, FlitType >
Connections::In< Flit_t > in_port [num_ports]
 
Connections::Out< Flit_t > out_port [num_ports]
 
Connections::In< Credit_ret_t > in_credit [num_ports *num_vchannels]
 
Connections::Out< Credit_ret_t > out_credit [num_ports *num_vchannels]
 
sc_in_clk clk
 
sc_in< bool > rst
 
FIFO< Flit_t, buffersize, num_ports *num_vchannels > ififo
 
Credit_t credit_recv [num_ports *num_vchannels]
 
Credit_t credit_send [num_ports *num_vchannels]
 
Flit_t flit_out [num_ports]
 

Static Public Attributes

static const int kDebugLevel = 2
 
- Static Public Attributes inherited from WHVCRouterBase< NumLPorts, NumRports, NumVchannels, BufferSize, FlitType >
static const int kDebugLevel
 

Detailed Description

template<int NumLPorts, int NumRports, int NumVchannels, int BufferSize, typename FlitType, int MaxHops>
class WHVCSourceRouter< NumLPorts, NumRports, NumVchannels, BufferSize, FlitType, MaxHops >

Wormhole Router with virtual channels.

Template Parameters
NumLPortsNumber of local ingress/egress ports
NumRportsNumber of remote ports
NumVchannelsNumber of virtual channels
BufferSizeBuffersize of input fifo
FlitTypeIndicates the Flit type
MaxHopsIndicates Max. number of hops for SourceRouting
A Simple Example
#include <WHVCRouter.h>
...
WHVCRouter<kNumLPorts, kNumRPorts, kNumVChannels, kBufferSize, Flit_t, kNumMaxHops> router;
Connections::In<Flit_t> in_port[kNumPorts];
Connections::Out<Flit_t> out_port[kNumPorts];
Connections::In<Credit_t> in_credit[kNumCredits];
Connections::Out<Credit_t> out_credit[kNumCredits];
for (int i = 0; i < kNumPorts; i++) {
router.in_port[i](in_port[i]);
router.out_port[i](out_port[i]);
for (int j = 0; j < kNumVChannels; j++) {
router.in_credit[i * kNumVChannels + j](
in_credit[i * kNumVChannels + j]);
router.out_credit[i * kNumVChannels + j](
out_credit[i * kNumVChannels + j]);
}
}
...

Definition at line 257 of file WHVCRouter.h.


The documentation for this class was generated from the following file: