#include <routerReqReply.h>
Definition at line 45 of file routerReqReply.h.
RouterReqReply::RouterReqReply | ( | ) |
RouterReqReply::~RouterReqReply | ( | ) |
constructor
Definition at line 34 of file routerReqReply.cc.
void RouterReqReply::do_input_buffering | ( | ) | [private] |
Definition at line 417 of file routerReqReply.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 RouterReqReply::do_switch_allocation | ( | ) | [private] |
Definition at line 635 of file routerReqReply.cc.
References _DBG, downstream_credits, in_buffers, 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 RouterReqReply::do_switch_traversal | ( | ) | [private] |
Send a credit back and update buffer state for the downstream router buffer
Definition at line 518 of file routerReqReply.cc.
References _DBG, HeadFlit::addr, NetworkComponent::address, TailFlit::avg_network_latency, HeadFlit::avg_network_latency, VcaMsgAware::clear_winner(), cr_time, data, downstream_credits, HeadFlit::dst_address, 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(), HeadFlit::src_address, 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, vca, VCA_COMPLETE, and Router::vcs.
Referenced by handle_tick_event().
void RouterReqReply::do_virtual_channel_allocation | ( | ) | [private] |
Definition at line 698 of file routerReqReply.cc.
References _DBG, NetworkComponent::address, do_request_reply_network, VcaMsgAware::get_no_requestors(), input_buffer_state, istat, no_msg_classes, NetworkComponent::node_ip, ONE_FLIT_REQ, VcaMsgAware::pick_winners(), Router::ports, VcaMsgAware::request(), REQUEST_PKT, request_switch_allocation(), IrisStats::stat_router, stat_vca_cycles, stat_vca_fail_msg_ratio, stat_vca_load, ticking, vca, VCA_COMPLETE, VCA_REQUESTED, Router::vcs, and VcaMsgAware::winners.
Referenced by handle_tick_event().
void RouterReqReply::dump_buffer_state | ( | ) |
Definition at line 204 of file routerReqReply.cc.
References EMPTY, input_buffer_state, INVALID, NetworkComponent::node_ip, Router::ports, and Router::vcs.
void RouterReqReply::handle_detect_deadlock_event | ( | IrisEvent * | e | ) | [private] |
Definition at line 168 of file routerReqReply.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 RouterReqReply::handle_link_arrival_event | ( | IrisEvent * | e | ) | [private] |
Event handle for the LINK_ARRIVAL_EVENT event. Entry from DES kernel.
Definition at line 311 of file routerReqReply.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 RouterReqReply::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 793 of file routerReqReply.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 39 of file routerReqReply.cc.
References NetworkComponent::address, Router::buffer_size, cr_time, Router::credits, decoders, DETECT_DEADLOCK_EVENT, downstream_credits, EMPTY, in_buffers, VcaMsgAware::init(), input_buffer_state, Component::myId(), no_msg_classes, NetworkComponent::node_ip, Simulator::Now(), Router::ports, NetworkComponent::process_event(), request_op, Simulator::Schedule(), VcaMsgAware::set_no_msg_classes(), 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, vca, and Router::vcs.
string RouterReqReply::print_stats | ( | void | ) | [virtual] |
Implements Router.
Definition at line 217 of file routerReqReply.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 RouterReqReply::process_event | ( | IrisEvent * | e | ) | [virtual] |
Implements NetworkComponent.
Definition at line 147 of file routerReqReply.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 RouterReqReply::request_switch_allocation | ( | ) | [private] |
Definition at line 768 of file routerReqReply.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 RouterReqReply::send_credit_back | ( | uint | i | ) |
Definition at line 877 of file routerReqReply.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 RouterReqReply::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 133 of file routerReqReply.cc.
References decoders.
void RouterReqReply::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 123 of file routerReqReply.cc.
References decoders.
string RouterReqReply::toString | ( | ) | const [virtual] |
Reimplemented from Router.
Definition at line 859 of file routerReqReply.cc.
References NetworkComponent::address, decoders, in_buffers, and NetworkComponent::node_ip.
vector<uint> RouterReqReply::available_ports [private] |
Definition at line 79 of file routerReqReply.h.
vector<uint> RouterReqReply::available_vcs [private] |
Definition at line 80 of file routerReqReply.h.
vector< vector<uint> > RouterReqReply::cr_time [private] |
Definition at line 81 of file routerReqReply.h.
Referenced by do_switch_traversal(), handle_detect_deadlock_event(), handle_link_arrival_event(), and init().
vector<GenericRC> RouterReqReply::decoders [private] |
Definition at line 74 of file routerReqReply.h.
Referenced by do_input_buffering(), init(), set_grid_x_location(), set_grid_y_location(), set_no_nodes(), and toString().
vector< vector<uint> > RouterReqReply::downstream_credits |
Definition at line 66 of file routerReqReply.h.
Referenced by do_switch_allocation(), do_switch_traversal(), handle_link_arrival_event(), and init().
vector<GenericBuffer> RouterReqReply::in_buffers [private] |
Definition at line 73 of file routerReqReply.h.
Referenced by do_input_buffering(), do_switch_allocation(), do_switch_traversal(), handle_link_arrival_event(), handle_tick_event(), init(), request_switch_allocation(), and toString().
vector<InputBufferState> RouterReqReply::input_buffer_state [private] |
Definition at line 75 of file routerReqReply.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 RouterReqReply::is_mc_router [private] |
Definition at line 106 of file routerReqReply.h.
double RouterReqReply::last_flit_out_cycle [private] |
Definition at line 98 of file routerReqReply.h.
Referenced by do_switch_traversal(), and print_stats().
vector< vector <uint> > RouterReqReply::request_op [private] |
double RouterReqReply::stat_buffer_occupancy [private] |
These are the statistics variables
Definition at line 94 of file routerReqReply.h.
Referenced by handle_tick_event(), init(), and print_stats().
vector< vector<uint> > RouterReqReply::stat_flit_out [private] |
Definition at line 105 of file routerReqReply.h.
Referenced by do_switch_traversal(), init(), and print_stats().
uint RouterReqReply::stat_flits [private] |
Definition at line 96 of file routerReqReply.h.
Referenced by do_switch_traversal(), init(), and print_stats().
ullint RouterReqReply::stat_ib_cycles [private] |
Definition at line 107 of file routerReqReply.h.
Referenced by do_input_buffering(), handle_link_arrival_event(), init(), and print_stats().
vector< vector<uint> > RouterReqReply::stat_packet_out [private] |
Definition at line 104 of file routerReqReply.h.
Referenced by do_switch_traversal(), init(), and print_stats().
uint RouterReqReply::stat_packets [private] |
Definition at line 95 of file routerReqReply.h.
Referenced by do_switch_traversal(), init(), and print_stats().
ullint RouterReqReply::stat_rc_cycles [private] |
Definition at line 108 of file routerReqReply.h.
Referenced by do_input_buffering(), init(), and print_stats().
ullint RouterReqReply::stat_sim_total_time [private] |
Definition at line 103 of file routerReqReply.h.
ullint RouterReqReply::stat_st_cycles [private] |
Definition at line 111 of file routerReqReply.h.
Referenced by do_switch_traversal(), init(), and print_stats().
ullint RouterReqReply::stat_swa_cycles [private] |
Definition at line 110 of file routerReqReply.h.
Referenced by do_switch_allocation(), init(), and print_stats().
double RouterReqReply::stat_swa_fail_msg_ratio [private] |
Definition at line 99 of file routerReqReply.h.
Referenced by do_switch_allocation(), init(), and print_stats().
double RouterReqReply::stat_swa_load [private] |
Definition at line 100 of file routerReqReply.h.
Referenced by do_switch_allocation(), init(), and print_stats().
double RouterReqReply::stat_total_packet_latency [private] |
Definition at line 97 of file routerReqReply.h.
Referenced by do_switch_traversal(), init(), and print_stats().
ullint RouterReqReply::stat_vca_cycles [private] |
Definition at line 109 of file routerReqReply.h.
Referenced by do_virtual_channel_allocation(), init(), and print_stats().
double RouterReqReply::stat_vca_fail_msg_ratio [private] |
Definition at line 101 of file routerReqReply.h.
Referenced by do_virtual_channel_allocation(), init(), and print_stats().
double RouterReqReply::stat_vca_load [private] |
Definition at line 102 of file routerReqReply.h.
Referenced by do_virtual_channel_allocation(), init(), and print_stats().
vector< vector< uint> > RouterReqReply::sw_alloc [private] |
Definition at line 77 of file routerReqReply.h.
Referenced by do_switch_allocation(), init(), and request_switch_allocation().
bool RouterReqReply::ticking [private] |
Definition at line 83 of file routerReqReply.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 RouterReqReply().
VcaMsgAware RouterReqReply::vca [private] |
Definition at line 76 of file routerReqReply.h.
Referenced by do_switch_traversal(), do_virtual_channel_allocation(), and init().