gem5
|
#include <SwitchAllocator.hh>
Public Member Functions | |
SwitchAllocator (Router *router) | |
void | wakeup () |
void | init () |
void | clear_request_vector () |
void | check_for_wakeup () |
int | get_vnet (int invc) |
void | print (std::ostream &out) const |
void | arbitrate_inports () |
void | arbitrate_outports () |
bool | send_allowed (int inport, int invc, int outport, int outvc) |
int | vc_allocate (int outport, int inport, int invc) |
double | get_input_arbiter_activity () |
double | get_output_arbiter_activity () |
Public Member Functions inherited from Consumer | |
Consumer (ClockedObject *_em) | |
virtual | ~Consumer () |
virtual void | storeEventInfo (int info) |
bool | alreadyScheduled (Tick time) |
void | insertScheduledWakeupTime (Tick time) |
void | scheduleEventAbsolute (Tick timeAbs) |
Private Attributes | |
int | m_num_inports |
int | m_num_outports |
int | m_num_vcs |
int | m_vc_per_vnet |
double | m_input_arbiter_activity |
double | m_output_arbiter_activity |
Router * | m_router |
std::vector< int > | m_round_robin_invc |
std::vector< int > | m_round_robin_inport |
std::vector< std::vector< bool > > | m_port_requests |
std::vector< std::vector< int > > | m_vc_winners |
std::vector< InputUnit * > | m_input_unit |
std::vector< OutputUnit * > | m_output_unit |
Additional Inherited Members | |
Protected Member Functions inherited from Consumer | |
void | scheduleEvent (Cycles timeDelta) |
Definition at line 47 of file SwitchAllocator.hh.
SwitchAllocator::SwitchAllocator | ( | Router * | router | ) |
Definition at line 42 of file SwitchAllocator.cc.
References Router::get_num_vcs(), Router::get_vc_per_vnet(), m_input_arbiter_activity, m_num_vcs, m_output_arbiter_activity, m_router, and m_vc_per_vnet.
void SwitchAllocator::arbitrate_inports | ( | ) |
Definition at line 112 of file SwitchAllocator.cc.
References Clocked::curCycle(), m_input_arbiter_activity, m_input_unit, m_num_inports, m_num_vcs, m_port_requests, m_round_robin_invc, m_router, m_vc_winners, SA_, and send_allowed().
Referenced by wakeup().
void SwitchAllocator::arbitrate_outports | ( | ) |
Definition at line 170 of file SwitchAllocator.cc.
References flit::advance_stage(), Clocked::curCycle(), DPRINTF, Router::get_id(), flit::get_type(), Router::getPortDirectionName(), Router::grant_switch(), HEAD_TAIL_, m_input_unit, m_num_inports, m_num_outports, m_output_arbiter_activity, m_output_unit, m_port_requests, m_round_robin_inport, m_router, m_vc_winners, flit::set_outport(), flit::set_vc(), ST_, TAIL_, and vc_allocate().
Referenced by wakeup().
void SwitchAllocator::check_for_wakeup | ( | ) |
Definition at line 356 of file SwitchAllocator.cc.
References Clocked::curCycle(), ArmISA::i, ArmISA::j, m_input_unit, m_num_inports, m_num_vcs, m_router, SA_, and Router::schedule_wakeup().
Referenced by wakeup().
void SwitchAllocator::clear_request_vector | ( | ) |
Definition at line 382 of file SwitchAllocator.cc.
References ArmISA::i, ArmISA::j, m_num_inports, m_num_outports, and m_port_requests.
Referenced by wakeup().
|
inline |
Definition at line 63 of file SwitchAllocator.hh.
References m_input_arbiter_activity.
Referenced by Router::collateStats().
|
inline |
Definition at line 68 of file SwitchAllocator.hh.
References m_output_arbiter_activity.
Referenced by Router::collateStats().
int SwitchAllocator::get_vnet | ( | int | invc | ) |
Definition at line 371 of file SwitchAllocator.cc.
References m_vc_per_vnet.
Referenced by send_allowed(), and vc_allocate().
void SwitchAllocator::init | ( | ) |
Definition at line 54 of file SwitchAllocator.cc.
References Router::get_inputUnit_ref(), Router::get_num_inports(), Router::get_num_outports(), Router::get_outputUnit_ref(), ArmISA::i, ArmISA::j, m_input_unit, m_num_inports, m_num_outports, m_output_unit, m_port_requests, m_round_robin_inport, m_round_robin_invc, m_router, and m_vc_winners.
Referenced by Router::init().
|
inlinevirtual |
Implements Consumer.
Definition at line 56 of file SwitchAllocator.hh.
bool SwitchAllocator::send_allowed | ( | int | inport, |
int | invc, | ||
int | outport, | ||
int | outvc | ||
) |
Definition at line 284 of file SwitchAllocator.cc.
References Clocked::curCycle(), Router::get_net_ptr(), get_vnet(), m_input_unit, m_output_unit, m_router, m_vc_per_vnet, and SA_.
Referenced by arbitrate_inports().
int SwitchAllocator::vc_allocate | ( | int | outport, |
int | inport, | ||
int | invc | ||
) |
Definition at line 342 of file SwitchAllocator.cc.
References get_vnet(), m_input_unit, and m_output_unit.
Referenced by arbitrate_outports().
|
virtual |
Implements Consumer.
Definition at line 92 of file SwitchAllocator.cc.
References arbitrate_inports(), arbitrate_outports(), check_for_wakeup(), and clear_request_vector().
Referenced by Router::wakeup().
|
private |
Definition at line 77 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), get_input_arbiter_activity(), and SwitchAllocator().
|
private |
Definition at line 84 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), check_for_wakeup(), init(), send_allowed(), and vc_allocate().
|
private |
Definition at line 74 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), check_for_wakeup(), clear_request_vector(), and init().
|
private |
Definition at line 74 of file SwitchAllocator.hh.
Referenced by arbitrate_outports(), clear_request_vector(), and init().
|
private |
Definition at line 75 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), check_for_wakeup(), and SwitchAllocator().
|
private |
Definition at line 77 of file SwitchAllocator.hh.
Referenced by arbitrate_outports(), get_output_arbiter_activity(), and SwitchAllocator().
|
private |
Definition at line 85 of file SwitchAllocator.hh.
Referenced by arbitrate_outports(), init(), send_allowed(), and vc_allocate().
|
private |
Definition at line 82 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), clear_request_vector(), and init().
|
private |
Definition at line 81 of file SwitchAllocator.hh.
Referenced by arbitrate_outports(), and init().
|
private |
Definition at line 80 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), and init().
|
private |
Definition at line 79 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), check_for_wakeup(), init(), send_allowed(), and SwitchAllocator().
|
private |
Definition at line 75 of file SwitchAllocator.hh.
Referenced by get_vnet(), send_allowed(), and SwitchAllocator().
|
private |
Definition at line 83 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), and init().