34#include "debug/RubyNetwork.hh"
48 :
Consumer(router), m_router(router), m_num_vcs(m_router->get_num_vcs()),
49 m_crossbar_activity(0), switchBuffers(0)
68 DPRINTF(RubyNetwork,
"CrossbarSwitch at Router %d woke up "
73 if (!switch_buffer.isReady(
curTick())) {
77 flit *t_flit = switch_buffer.peekTopFlit();
88 switch_buffer.getTopFlit();
99 if (switch_buffer.functionalRead(pkt,
mask))
108 uint32_t num_functional_writes = 0;
111 num_functional_writes += switch_buffer.functionalWrite(pkt);
114 return num_functional_writes;
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
Cycles is a wrapper class for representing cycle counts, i.e.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
uint32_t functionalWrite(Packet *pkt)
CrossbarSwitch(Router *router)
bool functionalRead(Packet *pkt, WriteMask &mask)
std::vector< flitBuffer > switchBuffers
double m_crossbar_activity
void insert_flit(flit *t_flit)
OutputUnit * getOutputUnit(unsigned port)
bool is_stage(flit_stage stage, Tick time)
void advance_stage(flit_stage t_stage, Tick newTime)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick curTick()
The universal simulation clock.