Go to the documentation of this file.
41 #include "debug/RubyNetwork.hh"
42 #include "params/GarnetIntLink.hh"
56 if (
mType == Enums::LINK_OBJECT) {
59 }
else if (
mType == Enums::OBJECT_LINK) {
64 panic(
"CDC type must be set");
71 DPRINTF(RubyNetwork,
"VcsPerVnet VC: %d\n", consumerVcs);
96 Cycles totLatency = latency;
105 sendTime = std::max(nextAvailTick, sendTime);
126 if (
mType == Enums::OBJECT_LINK) {
131 DPRINTF(RubyNetwork,
"Target width: %d Current: %d\n",
132 target_width, cur_width);
133 assert(target_width != cur_width);
135 int vc = t_flit->
get_vc();
137 if (target_width > cur_width) {
142 int flitPossible = 0;
156 flitPossible = ceil((
float)sizeAvail/(
float)target_width);
157 assert (flitPossible < 2);
167 flitPossible = floor((
float)sizeAvail/(
float)target_width);
168 assert (flitPossible < 2);
176 DPRINTF(RubyNetwork,
"Deserialize :%dB -----> %dB "
177 " vc:%d\n", cur_width, target_width, vc);
193 DPRINTF(RubyNetwork,
"Scheduling a flit\n");
201 DPRINTF(RubyNetwork,
"Serializing flit :%d -----> %d "
202 "(vc:%d, Original Message Size: %d)\n",
203 cur_width, target_width, vc, t_flit->
msgSize);
205 int flitPossible = 0;
217 flitPossible = floor((
float)sizeAvail/(
float)target_width);
219 sizeSent[vc] += flitPossible*target_width;
224 flitPossible = ceil((
float)sizeAvail/(
float)target_width);
228 assert(flitPossible > 0);
232 for (
int i = 0;
i < flitPossible;
i++) {
236 DPRINTF(RubyNetwork,
"Serialized to flit[%d of %d parts]:"
237 " %s\n",
i+1, flitPossible, *fl);
259 DPRINTF(RubyNetwork,
"Recieved flit %s\n", *t_flit);
267 NetworkBridgeParams::create()
std::vector< int > sizeSent
std::vector< int > lenBuffer
void flitisizeAndSend(flit *t_flit)
virtual void setVcsPerVnet(uint32_t consumerVcs)
uint64_t Tick
Tick count type.
void setVcsPerVnet(uint32_t consumerVcs)
std::vector< int > flitsSent
NetworkBridge(const Params *p)
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...
std::vector< std::queue< int > > extraCredit
flitBuffer * link_srcQueue
void neutralize(int vc, int eCredit)
void setLinkConsumer(Consumer *consumer)
void initBridge(NetworkBridge *coBrid, bool cdc_en, bool serdes_en)
void scheduleEventAbsolute(Tick timeAbs)
void setSourceQueue(flitBuffer *src_queue, ClockedObject *srcClockObject)
bool isReady(Tick curTime)
virtual flit * deserialize(int des_id, int num_flits, uint32_t bWidth)
Cycles is a wrapper class for representing cycle counts, i.e.
ClockedObject * getObject()
virtual flit * serialize(int ser_id, int parts, uint32_t bWidth)
#define panic(...)
This implements a cprintf based panic() function.
Tick curTick()
The current simulated tick.
void scheduleFlit(flit *t_flit, Cycles latency)
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17