#include <genericRPG.h>
Public Member Functions | |
GenericRPG () | |
~GenericRPG () | |
void | init_generator () |
void | setup (uint no_nodes, uint vcs, uint max_sim_time) |
void | finish () |
void | pre_tick () |
void | post_tick () |
void | idle () |
void | process_event (IrisEvent *e) |
void | set_no_vcs (uint v) |
string | toString () const |
bool | compare () |
set< HighLevelPacket > | get_all_sent () |
set< HighLevelPacket > | get_all_recv () |
void | init () |
Public Attributes | |
unsigned int | packets |
uint | max_sim_time |
double | lamda |
libRandom::randomNumberGenerator::distribution | destination_type |
libRandom::randomNumberGenerator::distribution | length_type |
libRandom::randomNumberGenerator::distribution | delay_type |
unsigned int | address |
unsigned int | max_address |
unsigned int | min_length |
unsigned int | max_length |
unsigned int | min_delay |
unsigned int | max_delay |
unsigned int | hot_spots |
unsigned long long int | max_time |
unsigned int | seed |
Private Member Functions | |
void | handle_new_packet_event (IrisEvent *e) |
void | handle_ready_event (IrisEvent *e) |
void | handle_out_pull_event (IrisEvent *e) |
Private Attributes | |
deque< HighLevelPacket > | out_packets |
deque< HighLevelPacket > | sent_packets |
string | out_filename |
uint | vcs |
ofstream | out_file |
vector< bool > | ready |
unsigned int | last_vc |
bool | only_sink |
bool | sending |
libRandom::randomNumberGenerator | generator |
Definition at line 45 of file genericRPG.h.
GenericRPG::GenericRPG | ( | ) |
Definition at line 7 of file genericRPG.cc.
References Processor::interface_connections, last_vc, NetworkComponent::name, seed, and sending.
GenericRPG::~GenericRPG | ( | ) |
Definition at line 18 of file genericRPG.cc.
bool GenericRPG::compare | ( | ) |
void GenericRPG::finish | ( | ) |
Definition at line 120 of file genericRPG.cc.
set< HighLevelPacket > GenericRPG::get_all_recv | ( | ) |
set< HighLevelPacket > GenericRPG::get_all_sent | ( | ) |
void GenericRPG::handle_new_packet_event | ( | IrisEvent * | e | ) | [private] |
Definition at line 148 of file genericRPG.cc.
References _DBG, IrisEvent::event_data, Processor::interface_connections, Simulator::Now(), NetworkComponent::process_event(), READY_EVENT, Simulator::Schedule(), HighLevelPacket::sent_time, VirtualChannelDescription::vc, and HighLevelPacket::virtual_channel.
Referenced by process_event().
void GenericRPG::handle_out_pull_event | ( | IrisEvent * | e | ) | [private] |
Definition at line 182 of file genericRPG.cc.
References address, HighLevelPacket::data, HighLevelPacket::data_payload_length, HighLevelPacket::destination, generator, Processor::interface_connections, last_vc, max_phy_link_bits, MAX_SIM_TIME, NEW_PACKET_EVENT, NetworkComponent::node_ip, Simulator::Now(), only_sink, OUT_PULL_EVENT, packets, NetworkComponent::process_event(), ready, Simulator::Schedule(), seed, sending, HighLevelPacket::sent_time, HighLevelPacket::source, HighLevelPacket::toString(), HighLevelPacket::transaction_id, IrisEvent::vc, and HighLevelPacket::virtual_channel.
Referenced by process_event().
void GenericRPG::handle_ready_event | ( | IrisEvent * | e | ) | [private] |
Definition at line 274 of file genericRPG.cc.
References _DBG_NOARG, IrisEvent::event_data, MAX_SIM_TIME, Simulator::Now(), OUT_PULL_EVENT, NetworkComponent::process_event(), ready, Simulator::Schedule(), sending, IrisEvent::vc, and VirtualChannelDescription::vc.
Referenced by process_event().
void GenericRPG::idle | ( | ) |
void GenericRPG::init | ( | ) |
void GenericRPG::init_generator | ( | ) |
Definition at line 23 of file genericRPG.cc.
References delay_type, destination_type, generator, HOT_SPOTS, length_type, MAX_ADDRESS, MAX_DELAY, MAX_LENGTH, MIN_DELAY, MIN_LENGTH, and seed.
Referenced by setup().
void GenericRPG::post_tick | ( | ) |
void GenericRPG::pre_tick | ( | ) |
void GenericRPG::process_event | ( | IrisEvent * | e | ) | [virtual] |
Implements Processor.
Definition at line 127 of file genericRPG.cc.
References address, handle_new_packet_event(), handle_out_pull_event(), handle_ready_event(), NEW_PACKET_EVENT, OUT_PULL_EVENT, READY_EVENT, and IrisEvent::type.
void GenericRPG::set_no_vcs | ( | uint | v | ) |
Implements Processor.
Definition at line 48 of file genericRPG.cc.
References address, delay_type, destination_type, init_generator(), length_type, max_sim_time, Component::myId(), Simulator::Now(), only_sink, packets, NetworkComponent::process_event(), ready, READY_EVENT, run_destination_type, Simulator::Schedule(), VirtualChannelDescription::vc, and vcs.
string GenericRPG::toString | ( | ) | const [virtual] |
unsigned int GenericRPG::address |
Reimplemented from NetworkComponent.
Definition at line 74 of file genericRPG.h.
Referenced by handle_out_pull_event(), process_event(), and setup().
libRandom::randomNumberGenerator::distribution GenericRPG::delay_type |
libRandom::randomNumberGenerator::distribution GenericRPG::destination_type |
libRandom::randomNumberGenerator GenericRPG::generator [private] |
Definition at line 61 of file genericRPG.h.
Referenced by handle_out_pull_event(), and init_generator().
unsigned int GenericRPG::hot_spots |
Definition at line 80 of file genericRPG.h.
double GenericRPG::lamda |
Definition at line 70 of file genericRPG.h.
unsigned int GenericRPG::last_vc [private] |
Definition at line 55 of file genericRPG.h.
Referenced by GenericRPG(), and handle_out_pull_event().
libRandom::randomNumberGenerator::distribution GenericRPG::length_type |
unsigned int GenericRPG::max_address |
Definition at line 75 of file genericRPG.h.
unsigned int GenericRPG::max_delay |
Definition at line 79 of file genericRPG.h.
unsigned int GenericRPG::max_length |
Definition at line 77 of file genericRPG.h.
unsigned long long int GenericRPG::max_time |
Definition at line 81 of file genericRPG.h.
unsigned int GenericRPG::min_delay |
Definition at line 78 of file genericRPG.h.
unsigned int GenericRPG::min_length |
Definition at line 76 of file genericRPG.h.
bool GenericRPG::only_sink [private] |
ofstream GenericRPG::out_file [private] |
Definition at line 53 of file genericRPG.h.
string GenericRPG::out_filename [private] |
Definition at line 51 of file genericRPG.h.
deque< HighLevelPacket > GenericRPG::out_packets [private] |
Definition at line 49 of file genericRPG.h.
unsigned int GenericRPG::packets |
vector< bool > GenericRPG::ready [private] |
Definition at line 54 of file genericRPG.h.
Referenced by handle_out_pull_event(), handle_ready_event(), and setup().
unsigned int GenericRPG::seed |
Definition at line 82 of file genericRPG.h.
Referenced by GenericRPG(), handle_out_pull_event(), and init_generator().
bool GenericRPG::sending [private] |
Definition at line 57 of file genericRPG.h.
Referenced by GenericRPG(), handle_out_pull_event(), and handle_ready_event().
deque< HighLevelPacket > GenericRPG::sent_packets [private] |
Definition at line 50 of file genericRPG.h.
uint GenericRPG::vcs [private] |