#include <genericInterfacePhy.h>
Definition at line 44 of file genericInterfacePhy.h.
GenericInterfacePhy::GenericInterfacePhy | ( | ) |
Definition at line 29 of file genericInterfacePhy.cc.
References NetworkComponent::name, and ticking.
GenericInterfacePhy::~GenericInterfacePhy | ( | ) |
ullint GenericInterfacePhy::get_flits_out | ( | ) | [virtual] |
uint GenericInterfacePhy::get_no_credits | ( | ) | const |
ullint GenericInterfacePhy::get_packets | ( | ) | [virtual] |
Implements Interface.
Definition at line 542 of file genericInterfacePhy.cc.
References packets_in, and packets_out.
ullint GenericInterfacePhy::get_packets_out | ( | ) | [virtual] |
Implements Interface.
Definition at line 536 of file genericInterfacePhy.cc.
References packets_out.
void GenericInterfacePhy::handle_link_arrival | ( | IrisEvent * | e | ) | [private] |
link arrival can be for a flit or credit. FLIT: Add incoming flit to buffer and send a credit back. Credit for the tail flit is not sent here. This is held till we know the ejection port is free. ( This is modelled here for the additional MC backpressure modelling and need not be this way). CREDIT: Update state for downstream credits. Generate a TICK event at the end of it. This will restart the interface if it is blocked on a credit(outgoing path) or initiate a new packet(incoming path).
Definition at line 200 of file genericInterfacePhy.cc.
References _DBG, NetworkComponent::address, GenericBuffer::change_push_channel(), CREDIT_ID, downstream_credits, IrisEvent::event_data, FLIT_ID, flits_in, in_buffer, Interface::input_connection, Flit::is_single_flit_pkt, LINK_ARRIVAL_EVENT, Simulator::Now(), packets_in, process_event(), NetworkComponent::process_event(), LinkArrivalData::ptr, GenericBuffer::push(), Simulator::Schedule(), TAIL, TICK_EVENT, ticking, total_packets_in_time, IrisEvent::type, Flit::type, LinkArrivalData::type, LinkArrivalData::valid, IrisEvent::vc, and LinkArrivalData::vc.
Referenced by process_event().
void GenericInterfacePhy::handle_new_packet_event | ( | IrisEvent * | e | ) | [private] |
Definition at line 279 of file genericInterfacePhy.cc.
References _DBG, IrisEvent::event_data, Simulator::Now(), out_packet_flit_index, out_packets, NetworkComponent::process_event(), Simulator::Schedule(), TICK_EVENT, ticking, HighLevelPacket::to_low_level_packet(), IrisEvent::vc, and HighLevelPacket::virtual_channel.
Referenced by process_event().
void GenericInterfacePhy::handle_ready_event | ( | IrisEvent * | e | ) | [private] |
These are credits from the processor and hence do not update flow control state. Flow control state is updated at the link arrival event for a credit.
Definition at line 175 of file genericInterfacePhy.cc.
References _DBG, in_ready, Simulator::Now(), NetworkComponent::process_event(), Simulator::Schedule(), TICK_EVENT, ticking, and IrisEvent::vc.
Referenced by process_event().
void GenericInterfacePhy::handle_tick_event | ( | IrisEvent * | e | ) | [private] |
Definition at line 311 of file genericInterfacePhy.cc.
References _DBG, NetworkComponent::address, HighLevelPacket::avg_network_latency, GenericBuffer::change_pull_channel(), GenericBuffer::change_push_channel(), CREDIT_ID, credits, do_two_stage_router, downstream_credits, IrisEvent::event_data, FLIT_ID, flits_out, HighLevelPacket::from_low_level_packet(), GenericBuffer::get_occupancy(), HEAD, HighLevelPacket::hop_count, in_buffer, in_packet_complete, in_packets, in_packets_flit_index, in_ready, Interface::input_connection, Flit::is_single_flit_pkt, LINK_ARRIVAL_EVENT, NEW_PACKET_EVENT, NetworkComponent::node_ip, Simulator::Now(), out_buffer, out_packet_flit_index, out_packets, Interface::output_connection, packets_out, GenericBuffer::peek(), process_event(), NetworkComponent::process_event(), Interface::processor_connection, LinkArrivalData::ptr, GenericBuffer::pull(), GenericBuffer::push(), READY_EVENT, HighLevelPacket::recv_time, HighLevelPacket::req_start_time, Simulator::Schedule(), IrisEvent::src_id, TAIL, TICK_EVENT, ticking, HighLevelPacket::toString(), toString(), IrisEvent::type, LinkArrivalData::type, Flit::type, IrisEvent::vc, LinkArrivalData::vc, and HighLevelPacket::waiting_in_ni.
Referenced by process_event().
bool GenericInterfacePhy::is_pkt_in_progress | ( | uint | vc | ) | [private] |
string GenericInterfacePhy::print_stats | ( | void | ) | [virtual] |
Implements Interface.
Definition at line 514 of file genericInterfacePhy.cc.
References flits_in, flits_out, NetworkComponent::node_ip, packets_in, packets_out, and total_packets_in_time.
void GenericInterfacePhy::process_event | ( | IrisEvent * | e | ) | [virtual] |
READY_EVENT: A ready is the credit at a packet level with the injection/ejection point
LINK_ARRIVAL_EVENT: This is a flit/credit arrival from the network. (Incoming path)
NEW_PACKET_EVENT: This is a high level packet from the processor connected to this node
TICK_EVENT: Update internal state of the interface. This involves two distinct paths ( Incoming and Outgoing ). Push flits into the output buffer and send them out after all flits for a packet are moved to the output buffer(Outgoing path). Push flits from the input buffer to a low level packet. Convert the low level packet to a high level packet when complete and then send it to the injection processor connected to this node (Incoming path).
Implements Interface.
Definition at line 135 of file genericInterfacePhy.cc.
References handle_link_arrival(), handle_new_packet_event(), handle_ready_event(), handle_tick_event(), LINK_ARRIVAL_EVENT, NEW_PACKET_EVENT, READY_EVENT, TICK_EVENT, and IrisEvent::type.
Referenced by handle_link_arrival(), and handle_tick_event().
void GenericInterfacePhy::set_buffer_size | ( | uint | b | ) | [virtual] |
Implements Interface.
Definition at line 101 of file genericInterfacePhy.cc.
References buffer_size.
void GenericInterfacePhy::set_no_credits | ( | int | credits | ) | [virtual] |
void GenericInterfacePhy::set_no_vcs | ( | uint | v | ) | [virtual] |
Definition at line 43 of file genericInterfacePhy.cc.
References NetworkComponent::address, buffer_size, credits, downstream_credits, flits_in, flits_out, in_buffer, in_packet_complete, in_packets, in_packets_flit_index, in_packets_valid, in_ready, mc_positions, Component::myId(), NetworkComponent::node_ip, out_buffer, out_packet_flit_index, out_packets, packets_in, packets_out, GenericBuffer::resize(), total_packets_in_time, and vcs.
string GenericInterfacePhy::toString | ( | ) | const [virtual] |
Reimplemented from Interface.
Definition at line 122 of file genericInterfacePhy.cc.
References NetworkComponent::address, in_buffer, NetworkComponent::node_ip, out_buffer, out_packets, and GenericBuffer::toString().
Referenced by handle_tick_event().
uint GenericInterfacePhy::buffer_size [private] |
int GenericInterfacePhy::credits [private] |
Definition at line 68 of file genericInterfacePhy.h.
Referenced by get_no_credits(), handle_tick_event(), set_no_credits(), and setup().
vector< int > GenericInterfacePhy::downstream_credits [private] |
Definition at line 75 of file genericInterfacePhy.h.
Referenced by handle_link_arrival(), handle_tick_event(), and setup().
ullint GenericInterfacePhy::flits_in [private] |
Definition at line 97 of file genericInterfacePhy.h.
Referenced by handle_link_arrival(), print_stats(), and setup().
ullint GenericInterfacePhy::flits_out [private] |
Definition at line 99 of file genericInterfacePhy.h.
Referenced by get_flits_out(), handle_tick_event(), print_stats(), and setup().
GenericBuffer GenericInterfacePhy::in_buffer [private] |
Definition at line 74 of file genericInterfacePhy.h.
Referenced by handle_link_arrival(), handle_tick_event(), setup(), and toString().
bool GenericInterfacePhy::in_packet_cleared [private] |
Definition at line 69 of file genericInterfacePhy.h.
bool GenericInterfacePhy::in_packet_complete [private] |
Definition at line 70 of file genericInterfacePhy.h.
Referenced by handle_tick_event(), and setup().
vector< LowLevelPacket> GenericInterfacePhy::in_packets [private] |
Definition at line 82 of file genericInterfacePhy.h.
Referenced by handle_tick_event(), setup(), and ~GenericInterfacePhy().
vector< uint > GenericInterfacePhy::in_packets_flit_index [private] |
Definition at line 83 of file genericInterfacePhy.h.
Referenced by handle_tick_event(), and setup().
vector< bool> GenericInterfacePhy::in_packets_valid [private] |
vector< bool > GenericInterfacePhy::in_ready [private] |
Definition at line 87 of file genericInterfacePhy.h.
Referenced by handle_ready_event(), handle_tick_event(), and setup().
GenericBuffer GenericInterfacePhy::out_buffer [private] |
Definition at line 73 of file genericInterfacePhy.h.
Referenced by handle_tick_event(), setup(), and toString().
vector< uint > GenericInterfacePhy::out_packet_flit_index [private] |
Definition at line 79 of file genericInterfacePhy.h.
Referenced by handle_new_packet_event(), handle_tick_event(), and setup().
vector< LowLevelPacket> GenericInterfacePhy::out_packets [private] |
Definition at line 78 of file genericInterfacePhy.h.
Referenced by handle_new_packet_event(), handle_tick_event(), setup(), toString(), and ~GenericInterfacePhy().
ullint GenericInterfacePhy::packets_in [private] |
Definition at line 98 of file genericInterfacePhy.h.
Referenced by get_packets(), handle_link_arrival(), print_stats(), and setup().
ullint GenericInterfacePhy::packets_out [private] |
Definition at line 100 of file genericInterfacePhy.h.
Referenced by get_packets(), get_packets_out(), handle_tick_event(), print_stats(), and setup().
vector< bool> GenericInterfacePhy::pkt_in_progress [private] |
bool GenericInterfacePhy::ticking [private] |
Definition at line 72 of file genericInterfacePhy.h.
Referenced by GenericInterfacePhy(), handle_link_arrival(), handle_new_packet_event(), handle_ready_event(), and handle_tick_event().
Definition at line 101 of file genericInterfacePhy.h.
Referenced by handle_link_arrival(), print_stats(), and setup().
uint GenericInterfacePhy::vcs [private] |