#include <routerVcMP.h>
Definition at line 47 of file routerVcMP.h.
RouterVcMP::RouterVcMP | ( | ) |
RouterVcMP::~RouterVcMP | ( | ) |
constructor
Definition at line 30 of file routerVcMP.cc.
void RouterVcMP::do_input_buffering | ( | ) | [private] |
Definition at line 411 of file routerVcMP.cc.
References HeadFlit::addr, decoders, HeadFlit::dst_address, EMPTY, FULL, HEAD, IB, in_buffers, HeadFlit::inport, input_buffer_state, istat, HeadFlit::length, HeadFlit::msg_class, NetworkComponent::node_ip, Simulator::Now(), Router::output_connections, Router::ports, stat_ib_cycles, stat_rc_cycles, IrisStats::stat_router, ticking, Flit::type, Flit::vc, and Router::vcs.
Referenced by handle_tick_event().
void RouterVcMP::do_switch_allocation | ( | ) | [private] |
Definition at line 628 of file routerVcMP.cc.
References downstream_credits, input_buffer_state, istat, NetworkComponent::node_ip, Router::ports, IrisStats::stat_router, stat_swa_cycles, stat_swa_fail_msg_ratio, stat_swa_load, sw_alloc, SW_TRAVERSAL, SWA_REQUESTED, ticking, and Router::vcs.
Referenced by handle_tick_event().
void RouterVcMP::do_switch_traversal | ( | ) | [private] |
Send a credit back and update buffer state for the downstream router buffer
Definition at line 512 of file routerVcMP.cc.
References NetworkComponent::address, TailFlit::avg_network_latency, HeadFlit::avg_network_latency, cr_time, data, downstream_credits, EMPTY, FLIT_ID, FULL, HEAD, HeadFlit::hop_count, in_buffers, input_buffer_state, Flit::is_single_flit_pkt, istat, last_flit_out_cycle, LINK_ARRIVAL_EVENT, NetworkComponent::node_ip, Simulator::Now(), Router::output_connections, Router::ports, NetworkComponent::process_event(), LinkArrivalData::ptr, request_switch_allocation(), Simulator::Schedule(), send_credit_back(), stat_flit_out, stat_flits, IrisStats::stat_link, stat_packet_out, stat_packets, IrisStats::stat_router, stat_st_cycles, stat_total_packet_latency, SW_TRAVERSAL, TAIL, ticking, LinkArrivalData::type, Flit::type, LinkArrivalData::vc, Flit::vc, vc_alloc, VCA_COMPLETE, and Router::vcs.
Referenced by handle_tick_event().
void RouterVcMP::do_virtual_channel_allocation | ( | ) | [private] |
Definition at line 679 of file routerVcMP.cc.
References input_buffer_state, istat, NetworkComponent::node_ip, Router::ports, request_op, request_switch_allocation(), IrisStats::stat_router, stat_vca_cycles, stat_vca_fail_msg_ratio, stat_vca_load, ticking, vc_alloc, VCA_COMPLETE, VCA_REQUESTED, and Router::vcs.
Referenced by handle_tick_event().
void RouterVcMP::dump_buffer_state | ( | ) |
Definition at line 202 of file routerVcMP.cc.
References EMPTY, input_buffer_state, INVALID, NetworkComponent::node_ip, Router::ports, and Router::vcs.
void RouterVcMP::handle_detect_deadlock_event | ( | IrisEvent * | e | ) | [private] |
Definition at line 166 of file routerVcMP.cc.
References _DBG_NOARG, cr_time, DETECT_DEADLOCK_EVENT, input_buffer_state, Simulator::Now(), Router::ports, NetworkComponent::process_event(), Simulator::Schedule(), IrisEvent::type, and Router::vcs.
Referenced by process_event().
void RouterVcMP::handle_link_arrival_event | ( | IrisEvent * | e | ) | [private] |
Event handle for the LINK_ARRIVAL_EVENT event. Entry from DES kernel.
Definition at line 309 of file routerVcMP.cc.
References _DBG, cr_time, CREDIT_ID, data, downstream_credits, IrisEvent::event_data, FLIT_ID, HEAD, in_buffers, input_buffer_state, Router::input_connections, istat, NetworkComponent::node_ip, Simulator::Now(), Router::output_connections, Router::ports, NetworkComponent::process_event(), LinkArrivalData::ptr, Simulator::Schedule(), IrisEvent::src_id, stat_ib_cycles, IrisStats::stat_router, TICK_EVENT, ticking, Flit::type, LinkArrivalData::type, IrisEvent::vc, LinkArrivalData::vc, and Router::vcs.
Referenced by process_event().
void RouterVcMP::handle_tick_event | ( | IrisEvent * | e | ) | [private] |
Event handle for the TICK_EVENT. Entry from DES kernel.
Input buffering Flits are pushed into the input buffer in the link arrival handler itself. To ensure the pipeline stages are executed in reverse pipe order IB is done here and all link_traversals have higher priority and get done before tick. Head/Body and Tail flits go thru the IB stage.
Request VCA at the end of IB
The router can be set to not tick and therefore speed up simulation if there are no messages to route. To be replaced by the start and stop clock functionality in the next release of the kernel. Under high load you also register the component to a clock so that it will be called every cycle and hence an event need not be explicitly generated.
Definition at line 785 of file routerVcMP.cc.
References Router::credits, do_input_buffering(), do_switch_allocation(), do_switch_traversal(), do_virtual_channel_allocation(), IB, in_buffers, input_buffer_state, Simulator::Now(), Router::ports, NetworkComponent::process_event(), Simulator::Schedule(), stat_buffer_occupancy, TICK_EVENT, ticking, IrisEvent::vc, VCA_REQUESTED, and Router::vcs.
Referenced by process_event().
destructor
Implements Router.
Definition at line 35 of file routerVcMP.cc.
References NetworkComponent::address, Router::buffer_size, cr_time, Router::credits, decoders, downstream_credits, EMPTY, in_buffers, input_buffer_state, Component::myId(), NetworkComponent::node_ip, Router::ports, request_op, stat_buffer_occupancy, stat_flit_out, stat_flits, stat_ib_cycles, stat_packet_out, stat_packets, stat_rc_cycles, stat_st_cycles, stat_swa_cycles, stat_swa_fail_msg_ratio, stat_swa_load, stat_total_packet_latency, stat_vca_cycles, stat_vca_fail_msg_ratio, stat_vca_load, sw_alloc, vc_alloc, and Router::vcs.
string RouterVcMP::print_stats | ( | void | ) | [virtual] |
Implements Router.
Definition at line 215 of file routerVcMP.cc.
References last_flit_out_cycle, max_sim_time, NetworkComponent::name, NetworkComponent::node_ip, Router::output_connections, Router::ports, stat_buffer_occupancy, stat_flit_out, stat_flits, stat_ib_cycles, stat_packet_out, stat_packets, stat_print_level, stat_rc_cycles, stat_st_cycles, stat_swa_cycles, stat_swa_fail_msg_ratio, stat_swa_load, stat_total_packet_latency, stat_vca_cycles, stat_vca_fail_msg_ratio, and stat_vca_load.
void RouterVcMP::process_event | ( | IrisEvent * | e | ) | [virtual] |
Implements NetworkComponent.
Definition at line 145 of file routerVcMP.cc.
References _DBG, DETECT_DEADLOCK_EVENT, handle_detect_deadlock_event(), handle_link_arrival_event(), handle_tick_event(), LINK_ARRIVAL_EVENT, TICK_EVENT, and IrisEvent::type.
void RouterVcMP::request_switch_allocation | ( | ) | [private] |
Definition at line 760 of file routerVcMP.cc.
References in_buffers, input_buffer_state, Router::ports, sw_alloc, SWA_REQUESTED, ticking, VCA_COMPLETE, and Router::vcs.
Referenced by do_switch_traversal(), and do_virtual_channel_allocation().
void RouterVcMP::send_credit_back | ( | uint | i | ) |
Definition at line 868 of file routerVcMP.cc.
References NetworkComponent::address, CREDIT_ID, data, input_buffer_state, Router::input_connections, istat, LINK_ARRIVAL_EVENT, Simulator::Now(), NetworkComponent::process_event(), Simulator::Schedule(), IrisStats::stat_link, LinkArrivalData::type, and LinkArrivalData::vc.
Referenced by do_switch_traversal().
void RouterVcMP::set_edge_links | ( | ) |
For DOR the no of nodes in the network and the grid sizes are to be set and passed to RC.
Implements Router.
Definition at line 131 of file routerVcMP.cc.
References decoders.
void RouterVcMP::set_no_nodes | ( | uint | nodes | ) | [virtual] |
These functions are mainly for DOR routing and are seperated so as to not force DOR modelling in all designs.
Initialise the router for ports, vcs and credits. TODO buffer size not used right now. Just make sure its larger than credits.
Implements Router.
Definition at line 121 of file routerVcMP.cc.
References decoders.
string RouterVcMP::toString | ( | ) | const [virtual] |
Reimplemented from Router.
Definition at line 850 of file routerVcMP.cc.
References NetworkComponent::address, decoders, in_buffers, and NetworkComponent::node_ip.
vector<uint> RouterVcMP::available_ports [private] |
Definition at line 81 of file routerVcMP.h.
vector<uint> RouterVcMP::available_vcs [private] |
Definition at line 82 of file routerVcMP.h.
vector< vector<uint> > RouterVcMP::cr_time [private] |
Definition at line 83 of file routerVcMP.h.
Referenced by do_switch_traversal(), handle_detect_deadlock_event(), handle_link_arrival_event(), and init().
vector<GenericRC> RouterVcMP::decoders [private] |
Definition at line 76 of file routerVcMP.h.
Referenced by do_input_buffering(), init(), set_grid_x_location(), set_grid_y_location(), set_no_nodes(), and toString().
vector< vector<uint> > RouterVcMP::downstream_credits |
Definition at line 68 of file routerVcMP.h.
Referenced by do_switch_allocation(), do_switch_traversal(), handle_link_arrival_event(), and init().
vector<GenericBuffer> RouterVcMP::in_buffers [private] |
Definition at line 75 of file routerVcMP.h.
Referenced by do_input_buffering(), do_switch_traversal(), handle_link_arrival_event(), handle_tick_event(), init(), request_switch_allocation(), and toString().
vector<InputBufferState> RouterVcMP::input_buffer_state [private] |
Definition at line 77 of file routerVcMP.h.
Referenced by do_input_buffering(), do_switch_allocation(), do_switch_traversal(), do_virtual_channel_allocation(), dump_buffer_state(), handle_detect_deadlock_event(), handle_link_arrival_event(), handle_tick_event(), init(), request_switch_allocation(), and send_credit_back().
bool RouterVcMP::is_mc_router [private] |
Definition at line 108 of file routerVcMP.h.
double RouterVcMP::last_flit_out_cycle [private] |
Definition at line 100 of file routerVcMP.h.
Referenced by do_switch_traversal(), and print_stats().
vector< vector <uint> > RouterVcMP::request_op [private] |
Definition at line 80 of file routerVcMP.h.
Referenced by do_virtual_channel_allocation(), and init().
double RouterVcMP::stat_buffer_occupancy [private] |
These are the statistics variables
Definition at line 96 of file routerVcMP.h.
Referenced by handle_tick_event(), init(), and print_stats().
vector< vector<uint> > RouterVcMP::stat_flit_out [private] |
Definition at line 107 of file routerVcMP.h.
Referenced by do_switch_traversal(), init(), and print_stats().
uint RouterVcMP::stat_flits [private] |
Definition at line 98 of file routerVcMP.h.
Referenced by do_switch_traversal(), init(), and print_stats().
ullint RouterVcMP::stat_ib_cycles [private] |
Definition at line 109 of file routerVcMP.h.
Referenced by do_input_buffering(), handle_link_arrival_event(), init(), and print_stats().
vector< vector<uint> > RouterVcMP::stat_packet_out [private] |
Definition at line 106 of file routerVcMP.h.
Referenced by do_switch_traversal(), init(), and print_stats().
uint RouterVcMP::stat_packets [private] |
Definition at line 97 of file routerVcMP.h.
Referenced by do_switch_traversal(), init(), and print_stats().
ullint RouterVcMP::stat_rc_cycles [private] |
Definition at line 110 of file routerVcMP.h.
Referenced by do_input_buffering(), init(), and print_stats().
ullint RouterVcMP::stat_sim_total_time [private] |
Definition at line 105 of file routerVcMP.h.
ullint RouterVcMP::stat_st_cycles [private] |
Definition at line 113 of file routerVcMP.h.
Referenced by do_switch_traversal(), init(), and print_stats().
ullint RouterVcMP::stat_swa_cycles [private] |
Definition at line 112 of file routerVcMP.h.
Referenced by do_switch_allocation(), init(), and print_stats().
double RouterVcMP::stat_swa_fail_msg_ratio [private] |
Definition at line 101 of file routerVcMP.h.
Referenced by do_switch_allocation(), init(), and print_stats().
double RouterVcMP::stat_swa_load [private] |
Definition at line 102 of file routerVcMP.h.
Referenced by do_switch_allocation(), init(), and print_stats().
double RouterVcMP::stat_total_packet_latency [private] |
Definition at line 99 of file routerVcMP.h.
Referenced by do_switch_traversal(), init(), and print_stats().
ullint RouterVcMP::stat_vca_cycles [private] |
Definition at line 111 of file routerVcMP.h.
Referenced by do_virtual_channel_allocation(), init(), and print_stats().
double RouterVcMP::stat_vca_fail_msg_ratio [private] |
Definition at line 103 of file routerVcMP.h.
Referenced by do_virtual_channel_allocation(), init(), and print_stats().
double RouterVcMP::stat_vca_load [private] |
Definition at line 104 of file routerVcMP.h.
Referenced by do_virtual_channel_allocation(), init(), and print_stats().
vector< vector< uint> > RouterVcMP::sw_alloc [private] |
Definition at line 79 of file routerVcMP.h.
Referenced by do_switch_allocation(), init(), and request_switch_allocation().
bool RouterVcMP::ticking [private] |
Definition at line 85 of file routerVcMP.h.
Referenced by do_input_buffering(), do_switch_allocation(), do_switch_traversal(), do_virtual_channel_allocation(), handle_link_arrival_event(), handle_tick_event(), request_switch_allocation(), and RouterVcMP().
vector< list< uint> > RouterVcMP::vc_alloc [private] |
Definition at line 78 of file routerVcMP.h.
Referenced by do_switch_traversal(), do_virtual_channel_allocation(), and init().