gem5
v20.1.0.0
|
#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 () |
void | resetStats () |
Public Member Functions inherited from Consumer | |
Consumer (ClockedObject *_em) | |
virtual | ~Consumer () |
virtual void | storeEventInfo (int info) |
bool | alreadyScheduled (Tick time) |
void | insertScheduledWakeupTime (Tick time) |
ClockedObject * | getObject () |
void | scheduleEventAbsolute (Tick timeAbs) |
void | scheduleEvent (Cycles timeDelta) |
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 |
Definition at line 45 of file SwitchAllocator.hh.
SwitchAllocator::SwitchAllocator | ( | Router * | router | ) |
Definition at line 40 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 107 of file SwitchAllocator.cc.
References curTick(), InputUnit::get_outport(), Router::getInputUnit(), m_input_arbiter_activity, 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 159 of file SwitchAllocator.cc.
References flit::advance_stage(), Clocked::curCycle(), curTick(), DPRINTF, Router::get_id(), flit::get_type(), Router::getInputUnit(), Router::getOutputUnit(), Router::getPortDirectionName(), Router::grant_switch(), HEAD_TAIL_, m_num_inports, m_num_outports, m_num_vcs, m_output_arbiter_activity, m_port_requests, m_round_robin_inport, m_round_robin_invc, 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 353 of file SwitchAllocator.cc.
References Consumer::alreadyScheduled(), Clocked::clockEdge(), Router::getInputUnit(), ArmISA::i, ArmISA::j, m_num_inports, m_num_vcs, m_router, InputUnit::need_stage(), SA_, and Router::schedule_wakeup().
Referenced by wakeup().
void SwitchAllocator::clear_request_vector | ( | ) |
Definition at line 383 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 61 of file SwitchAllocator.hh.
References m_input_arbiter_activity.
Referenced by Router::collateStats().
|
inline |
Definition at line 66 of file SwitchAllocator.hh.
References m_output_arbiter_activity.
Referenced by Router::collateStats().
int SwitchAllocator::get_vnet | ( | int | invc | ) |
Definition at line 372 of file SwitchAllocator.cc.
References m_vc_per_vnet.
Referenced by send_allowed(), and vc_allocate().
void SwitchAllocator::init | ( | ) |
Definition at line 52 of file SwitchAllocator.cc.
References Router::get_num_inports(), Router::get_num_outports(), ArmISA::i, ArmISA::j, m_num_inports, m_num_outports, 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 54 of file SwitchAllocator.hh.
void SwitchAllocator::resetStats | ( | ) |
Definition at line 393 of file SwitchAllocator.cc.
References m_input_arbiter_activity, and m_output_arbiter_activity.
Referenced by Router::resetStats().
bool SwitchAllocator::send_allowed | ( | int | inport, |
int | invc, | ||
int | outport, | ||
int | outvc | ||
) |
Definition at line 280 of file SwitchAllocator.cc.
References curTick(), InputUnit::get_enqueue_time(), Router::get_net_ptr(), get_vnet(), Router::getInputUnit(), Router::getOutputUnit(), OutputUnit::has_credit(), 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 338 of file SwitchAllocator.cc.
References get_vnet(), Router::getInputUnit(), Router::getOutputUnit(), InputUnit::grant_outvc(), m_router, and OutputUnit::select_free_vc().
Referenced by arbitrate_outports().
|
virtual |
Implements Consumer.
Definition at line 87 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(), resetStats(), and SwitchAllocator().
|
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(), arbitrate_outports(), check_for_wakeup(), and SwitchAllocator().
|
private |
Definition at line 77 of file SwitchAllocator.hh.
Referenced by arbitrate_outports(), get_output_arbiter_activity(), resetStats(), and SwitchAllocator().
|
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(), arbitrate_outports(), and init().
|
private |
Definition at line 79 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), check_for_wakeup(), init(), send_allowed(), SwitchAllocator(), and vc_allocate().
|
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().