#include <genericRouterPhy.h>
Public Member Functions | |
GenericRouterPhy () | |
~GenericRouterPhy () | |
void | init (uint ports, uint vcs, uint credits, uint buffer_size) |
void | set_no_nodes (uint nodes) |
These functions are mainly for DOR routing and are seperated so as to not force DOR modelling in all designs. | |
void | set_grid_x_location (uint a, uint b, uint c) |
void | set_grid_y_location (uint a, uint b, uint c) |
void | send_credit_back (uint i) |
void | process_event (IrisEvent *e) |
string | toString () const |
string | print_stats () |
Prints out all the accumulated stats at the end of the simulation. Routers have a print_stats component that gets called on all routers at the end of the simulation. For information on where this is called look at either the main front end file at manifold_simiris.cc or the corresponding topology file that you are running. | |
Public Attributes | |
vector< vector< uint > > | downstream_credits |
uint | packets |
uint | flits |
double | total_packet_latency |
double | last_flit_out_cycle |
unsigned long long int | stat_sim_total_time |
vector< vector< uint > > | stat_packet_out |
vector< vector< uint > > | stat_flit_out |
Private Member Functions | |
void | handle_link_arrival_event (IrisEvent *e) |
Event handle for the LINK_ARRIVAL_EVENT event. Entry from DES kernel. | |
void | handle_tick_event (IrisEvent *e) |
Event handle for the TICK_EVENT. Entry from DES kernel This implements the pipe stages for the router. Easy way to follow it. There are as many messages in the system as ports*vcs. Loop over the input_buffer_state ( ports*vcs ) times. Check for a message in a certain pipe stage and do that pipe stage. | |
void | do_switch_traversal () |
void | do_switch_allocation () |
void | do_input_buffering () |
Private Attributes | |
vector< GenericBuffer > | in_buffers |
vector< GenericRC > | decoders |
vector< InputBufferState > | input_buffer_state |
PToPSwitchArbiter | swa |
GenericCrossbar | xbar |
bool | ticking |
Definition at line 71 of file genericRouterPhy.h.
GenericRouterPhy::GenericRouterPhy | ( | ) |
GenericRouterPhy::~GenericRouterPhy | ( | ) |
Definition at line 31 of file genericRouterPhy.cc.
void GenericRouterPhy::do_input_buffering | ( | ) | [private] |
Body and tail flits get written in link arrival and since the message state may already been pushed to ST because of the header we want to ensure that all flits go thru an IB and ST stage. Hence ST is done on the flits_in_ib information and not buffer occupancy.
Definition at line 563 of file genericRouterPhy.cc.
References _DBG, FULL, IB, in_buffers, input_buffer_state, istat, NetworkComponent::node_ip, Simulator::Now(), Router::ports, IrisStats::stat_router, SW_TRAVERSAL, SWA_REQUESTED, ticking, and Router::vcs.
Referenced by handle_tick_event().
void GenericRouterPhy::do_switch_allocation | ( | ) | [private] |
Definition at line 503 of file genericRouterPhy.cc.
References _DBG, PToPSwitchArbiter::clear_requested(), GenericCrossbar::configure_crossbar(), FULL, input_buffer_state, PToPSwitchArbiter::is_empty(), istat, NetworkComponent::node_ip, PToPSwitchArbiter::pick_winner(), SA_unit::port, Router::ports, GenericCrossbar::push(), IrisStats::stat_router, SW_TRAVERSAL, swa, SWA_REQUESTED, ticking, Router::vcs, and xbar.
Referenced by handle_tick_event().
void GenericRouterPhy::do_switch_traversal | ( | ) | [private] |
Definition at line 394 of file genericRouterPhy.cc.
References _DBG, NetworkComponent::address, TailFlit::avg_network_latency, HeadFlit::avg_network_latency, BODY, PToPSwitchArbiter::clear_winner(), data, do_two_stage_router, downstream_credits, EMPTY, FLIT_ID, HEAD, TailFlit::hop_count, HeadFlit::hop_count, in_buffers, input_buffer_state, GenericCrossbar::is_empty(), 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, GenericCrossbar::pull(), Simulator::Schedule(), send_credit_back(), stat_flit_out, stat_packet_out, IrisStats::stat_router, SW_TRAVERSAL, swa, TAIL, ticking, toString(), total_packet_latency, Flit::type, LinkArrivalData::type, LinkArrivalData::vc, Router::vcs, and xbar.
Referenced by handle_tick_event().
void GenericRouterPhy::handle_link_arrival_event | ( | IrisEvent * | e | ) | [private] |
Event handle for the LINK_ARRIVAL_EVENT event. Entry from DES kernel.
Definition at line 235 of file genericRouterPhy.cc.
References _DBG, CREDIT_ID, data, decoders, downstream_credits, IrisEvent::event_data, FLIT_ID, flits, FULL, HEAD, in_buffers, input_buffer_state, Router::input_connections, Flit::is_single_flit_pkt, istat, HeadFlit::length, NetworkComponent::node_ip, Simulator::Now(), Router::output_connections, packets, Router::ports, NetworkComponent::process_event(), LinkArrivalData::ptr, Simulator::Schedule(), IrisEvent::src_id, IrisStats::stat_router, TAIL, TICK_EVENT, ticking, Flit::type, LinkArrivalData::type, IrisEvent::vc, LinkArrivalData::vc, and Router::vcs.
Referenced by process_event().
void GenericRouterPhy::handle_tick_event | ( | IrisEvent * | e | ) | [private] |
Event handle for the TICK_EVENT. Entry from DES kernel This implements the pipe stages for the router. Easy way to follow it. There are as many messages in the system as ports*vcs. Loop over the input_buffer_state ( ports*vcs ) times. Check for a message in a certain pipe stage and do that pipe stage.
Definition at line 619 of file genericRouterPhy.cc.
References _DBG_NOARG, Router::credits, do_input_buffering(), do_switch_allocation(), do_switch_traversal(), downstream_credits, IB, in_buffers, input_buffer_state, PToPSwitchArbiter::is_requested(), Simulator::Now(), Router::ports, NetworkComponent::process_event(), PToPSwitchArbiter::request(), Simulator::Schedule(), swa, SWA_REQUESTED, TICK_EVENT, ticking, toString(), IrisEvent::vc, and Router::vcs.
Referenced by process_event().
Implements Router.
Definition at line 36 of file genericRouterPhy.cc.
References PToPSwitchArbiter::address, NetworkComponent::address, Router::buffer_size, Router::credits, decoders, downstream_credits, EMPTY, flits, in_buffers, input_buffer_state, Component::myId(), PToPSwitchArbiter::node_ip, NetworkComponent::node_ip, packets, Router::ports, PToPSwitchArbiter::resize(), GenericCrossbar::setup(), stat_flit_out, stat_packet_out, swa, total_packet_latency, Router::vcs, and xbar.
string GenericRouterPhy::print_stats | ( | void | ) | [virtual] |
Prints out all the accumulated stats at the end of the simulation. Routers have a print_stats component that gets called on all routers at the end of the simulation. For information on where this is called look at either the main front end file at manifold_simiris.cc or the corresponding topology file that you are running.
Implements Router.
Definition at line 158 of file genericRouterPhy.cc.
References flits, last_flit_out_cycle, NetworkComponent::node_ip, packets, Router::ports, stat_flit_out, stat_packet_out, stat_print_level, and total_packet_latency.
void GenericRouterPhy::process_event | ( | IrisEvent * | e | ) | [virtual] |
Implements NetworkComponent.
Definition at line 124 of file genericRouterPhy.cc.
References _DBG, handle_link_arrival_event(), handle_tick_event(), LINK_ARRIVAL_EVENT, TICK_EVENT, and IrisEvent::type.
void GenericRouterPhy::send_credit_back | ( | uint | i | ) |
Definition at line 704 of file genericRouterPhy.cc.
References _DBG, NetworkComponent::address, CREDIT_ID, data, input_buffer_state, Router::input_connections, LINK_ARRIVAL_EVENT, Simulator::Now(), NetworkComponent::process_event(), Simulator::Schedule(), LinkArrivalData::type, and LinkArrivalData::vc.
Referenced by do_switch_traversal().
void GenericRouterPhy::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.
Implements Router.
Definition at line 100 of file genericRouterPhy.cc.
References decoders.
string GenericRouterPhy::toString | ( | ) | const [virtual] |
Reimplemented from Router.
Definition at line 678 of file genericRouterPhy.cc.
References NetworkComponent::address, decoders, in_buffers, NetworkComponent::node_ip, swa, GenericCrossbar::toString(), PToPSwitchArbiter::toString(), and xbar.
Referenced by do_switch_traversal(), and handle_tick_event().
vector<GenericRC> GenericRouterPhy::decoders [private] |
Definition at line 102 of file genericRouterPhy.h.
Referenced by handle_link_arrival_event(), init(), set_grid_x_location(), set_grid_y_location(), set_no_nodes(), and toString().
vector< vector<uint> > GenericRouterPhy::downstream_credits |
Definition at line 87 of file genericRouterPhy.h.
Referenced by do_switch_traversal(), handle_link_arrival_event(), handle_tick_event(), and init().
Definition at line 91 of file genericRouterPhy.h.
Referenced by handle_link_arrival_event(), init(), and print_stats().
vector<GenericBuffer> GenericRouterPhy::in_buffers [private] |
Definition at line 101 of file genericRouterPhy.h.
Referenced by do_input_buffering(), do_switch_traversal(), handle_link_arrival_event(), handle_tick_event(), init(), and toString().
vector<InputBufferState> GenericRouterPhy::input_buffer_state [private] |
Definition at line 103 of file genericRouterPhy.h.
Referenced by do_input_buffering(), do_switch_allocation(), do_switch_traversal(), handle_link_arrival_event(), handle_tick_event(), init(), and send_credit_back().
Definition at line 93 of file genericRouterPhy.h.
Referenced by do_switch_traversal(), and print_stats().
Definition at line 90 of file genericRouterPhy.h.
Referenced by handle_link_arrival_event(), init(), and print_stats().
vector< vector<uint> > GenericRouterPhy::stat_flit_out |
Definition at line 96 of file genericRouterPhy.h.
Referenced by do_switch_traversal(), init(), and print_stats().
vector< vector<uint> > GenericRouterPhy::stat_packet_out |
Definition at line 95 of file genericRouterPhy.h.
Referenced by do_switch_traversal(), init(), and print_stats().
unsigned long long int GenericRouterPhy::stat_sim_total_time |
Definition at line 94 of file genericRouterPhy.h.
PToPSwitchArbiter GenericRouterPhy::swa [private] |
Definition at line 104 of file genericRouterPhy.h.
Referenced by do_switch_allocation(), do_switch_traversal(), handle_tick_event(), init(), and toString().
bool GenericRouterPhy::ticking [private] |
Definition at line 107 of file genericRouterPhy.h.
Referenced by do_input_buffering(), do_switch_allocation(), do_switch_traversal(), GenericRouterPhy(), handle_link_arrival_event(), and handle_tick_event().
Definition at line 92 of file genericRouterPhy.h.
Referenced by do_switch_traversal(), init(), and print_stats().
GenericCrossbar GenericRouterPhy::xbar [private] |
Definition at line 105 of file genericRouterPhy.h.
Referenced by do_switch_allocation(), do_switch_traversal(), init(), and toString().