|
gem5
v21.1.0.2
|
#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 gem5::ruby::Consumer | |
| Consumer (ClockedObject *_em) | |
| virtual | ~Consumer () |
| virtual void | storeEventInfo (int info) |
| bool | alreadyScheduled (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< int > | m_port_requests |
| std::vector< int > | m_vc_winners |
Definition at line 54 of file SwitchAllocator.hh.
| gem5::ruby::garnet::SwitchAllocator::SwitchAllocator | ( | Router * | router | ) |
Definition at line 49 of file SwitchAllocator.cc.
References gem5::ruby::garnet::Router::get_num_vcs(), gem5::ruby::garnet::Router::get_vc_per_vnet(), m_input_arbiter_activity, m_num_vcs, m_output_arbiter_activity, m_router, and m_vc_per_vnet.
| void gem5::ruby::garnet::SwitchAllocator::arbitrate_inports | ( | ) |
Definition at line 111 of file SwitchAllocator.cc.
References gem5::curTick(), gem5::ruby::garnet::InputUnit::get_outport(), gem5::ruby::garnet::Router::getInputUnit(), m_input_arbiter_activity, m_num_inports, m_num_vcs, m_port_requests, m_round_robin_invc, m_router, m_vc_winners, gem5::ruby::garnet::SA_, and send_allowed().
Referenced by wakeup().
| void gem5::ruby::garnet::SwitchAllocator::arbitrate_outports | ( | ) |
Definition at line 163 of file SwitchAllocator.cc.
References gem5::ruby::garnet::flit::advance_stage(), gem5::Clocked::curCycle(), gem5::curTick(), DPRINTF, gem5::ruby::garnet::Router::get_id(), gem5::ruby::garnet::flit::get_type(), gem5::ruby::garnet::Router::getInputUnit(), gem5::ruby::garnet::Router::getOutputUnit(), gem5::ruby::garnet::Router::getPortDirectionName(), gem5::ruby::garnet::Router::grant_switch(), gem5::ruby::garnet::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, gem5::ruby::garnet::flit::set_outport(), gem5::ruby::garnet::flit::set_vc(), gem5::ruby::garnet::ST_, gem5::ruby::garnet::TAIL_, and vc_allocate().
Referenced by wakeup().
| void gem5::ruby::garnet::SwitchAllocator::check_for_wakeup | ( | ) |
Definition at line 357 of file SwitchAllocator.cc.
References gem5::ruby::Consumer::alreadyScheduled(), gem5::Clocked::clockEdge(), gem5::ruby::garnet::Router::getInputUnit(), gem5::ArmISA::i, gem5::ArmISA::j, m_num_inports, m_num_vcs, m_router, gem5::ruby::garnet::InputUnit::need_stage(), gem5::ruby::garnet::SA_, and gem5::ruby::garnet::Router::schedule_wakeup().
Referenced by wakeup().
| void gem5::ruby::garnet::SwitchAllocator::clear_request_vector | ( | ) |
Definition at line 387 of file SwitchAllocator.cc.
References gem5::MipsISA::fill, and m_port_requests.
Referenced by wakeup().
|
inline |
Definition at line 70 of file SwitchAllocator.hh.
References m_input_arbiter_activity.
Referenced by gem5::ruby::garnet::Router::collateStats().
|
inline |
Definition at line 75 of file SwitchAllocator.hh.
References m_output_arbiter_activity.
Referenced by gem5::ruby::garnet::Router::collateStats().
| int gem5::ruby::garnet::SwitchAllocator::get_vnet | ( | int | invc | ) |
Definition at line 376 of file SwitchAllocator.cc.
References m_vc_per_vnet.
Referenced by send_allowed(), and vc_allocate().
| void gem5::ruby::garnet::SwitchAllocator::init | ( | ) |
Definition at line 61 of file SwitchAllocator.cc.
References gem5::ruby::garnet::Router::get_num_inports(), gem5::ruby::garnet::Router::get_num_outports(), gem5::ArmISA::i, 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 gem5::ruby::garnet::Router::init().
|
inlinevirtual |
Implements gem5::ruby::Consumer.
Definition at line 63 of file SwitchAllocator.hh.
| void gem5::ruby::garnet::SwitchAllocator::resetStats | ( | ) |
Definition at line 393 of file SwitchAllocator.cc.
References m_input_arbiter_activity, and m_output_arbiter_activity.
Referenced by gem5::ruby::garnet::Router::resetStats().
| bool gem5::ruby::garnet::SwitchAllocator::send_allowed | ( | int | inport, |
| int | invc, | ||
| int | outport, | ||
| int | outvc | ||
| ) |
Definition at line 284 of file SwitchAllocator.cc.
References gem5::curTick(), gem5::ruby::garnet::InputUnit::get_enqueue_time(), gem5::ruby::garnet::Router::get_net_ptr(), get_vnet(), gem5::ruby::garnet::Router::getInputUnit(), gem5::ruby::garnet::Router::getOutputUnit(), gem5::ruby::garnet::OutputUnit::has_credit(), m_router, m_vc_per_vnet, and gem5::ruby::garnet::SA_.
Referenced by arbitrate_inports().
| int gem5::ruby::garnet::SwitchAllocator::vc_allocate | ( | int | outport, |
| int | inport, | ||
| int | invc | ||
| ) |
Definition at line 342 of file SwitchAllocator.cc.
References get_vnet(), gem5::ruby::garnet::Router::getInputUnit(), gem5::ruby::garnet::Router::getOutputUnit(), gem5::ruby::garnet::InputUnit::grant_outvc(), m_router, and gem5::ruby::garnet::OutputUnit::select_free_vc().
Referenced by arbitrate_outports().
|
virtual |
Implements gem5::ruby::Consumer.
Definition at line 91 of file SwitchAllocator.cc.
References arbitrate_inports(), arbitrate_outports(), check_for_wakeup(), and clear_request_vector().
Referenced by gem5::ruby::garnet::Router::wakeup().
|
private |
Definition at line 86 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), get_input_arbiter_activity(), resetStats(), and SwitchAllocator().
|
private |
Definition at line 83 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), check_for_wakeup(), and init().
|
private |
Definition at line 83 of file SwitchAllocator.hh.
Referenced by arbitrate_outports(), and init().
|
private |
Definition at line 84 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), check_for_wakeup(), and SwitchAllocator().
|
private |
Definition at line 86 of file SwitchAllocator.hh.
Referenced by arbitrate_outports(), get_output_arbiter_activity(), resetStats(), and SwitchAllocator().
|
private |
Definition at line 91 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), clear_request_vector(), and init().
|
private |
Definition at line 90 of file SwitchAllocator.hh.
Referenced by arbitrate_outports(), and init().
|
private |
Definition at line 89 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), and init().
|
private |
Definition at line 88 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), check_for_wakeup(), init(), send_allowed(), SwitchAllocator(), and vc_allocate().
|
private |
Definition at line 84 of file SwitchAllocator.hh.
Referenced by get_vnet(), send_allowed(), and SwitchAllocator().
|
private |
Definition at line 92 of file SwitchAllocator.hh.
Referenced by arbitrate_inports(), arbitrate_outports(), and init().