Go to the documentation of this file.
39 #include "debug/RubyNetwork.hh"
40 #include "params/GarnetIntLink.hh"
63 if (
mType == enums::LINK_OBJECT) {
66 }
else if (
mType == enums::OBJECT_LINK) {
71 panic(
"CDC type must be set");
78 DPRINTF(RubyNetwork,
"VcsPerVnet VC: %d\n", consumerVcs);
103 Cycles totLatency = latency;
112 sendTime = std::max(nextAvailTick, sendTime);
133 if (
mType == enums::OBJECT_LINK) {
138 DPRINTF(RubyNetwork,
"Target width: %d Current: %d\n",
139 target_width, cur_width);
140 assert(target_width != cur_width);
142 int vc = t_flit->
get_vc();
144 if (target_width > cur_width) {
149 int flitPossible = 0;
163 flitPossible = ceil((
float)sizeAvail/(
float)target_width);
164 assert (flitPossible < 2);
174 flitPossible = floor((
float)sizeAvail/(
float)target_width);
175 assert (flitPossible < 2);
183 DPRINTF(RubyNetwork,
"Deserialize :%dB -----> %dB "
184 " vc:%d\n", cur_width, target_width, vc);
200 DPRINTF(RubyNetwork,
"Scheduling a flit\n");
208 DPRINTF(RubyNetwork,
"Serializing flit :%d -----> %d "
209 "(vc:%d, Original Message Size: %d)\n",
210 cur_width, target_width, vc, t_flit->
msgSize);
212 int flitPossible = 0;
224 flitPossible = floor((
float)sizeAvail/(
float)target_width);
226 sizeSent[vc] += flitPossible*target_width;
231 flitPossible = ceil((
float)sizeAvail/(
float)target_width);
235 assert(flitPossible > 0);
239 for (
int i = 0;
i < flitPossible;
i++) {
243 DPRINTF(RubyNetwork,
"Serialized to flit[%d of %d parts]:"
244 " %s\n",
i+1, flitPossible, *fl);
266 DPRINTF(RubyNetwork,
"Recieved flit %s\n", *t_flit);
Tick curTick()
The universal simulation clock.
flitBuffer * link_srcQueue
std::vector< int > flitsSent
std::vector< std::queue< int > > extraCredit
std::vector< int > sizeSent
virtual flit * deserialize(int des_id, int num_flits, uint32_t bWidth)
void setLinkConsumer(Consumer *consumer)
void scheduleFlit(flit *t_flit, Cycles latency)
bool isReady(Tick curTime)
Cycles is a wrapper class for representing cycle counts, i.e.
void setVcsPerVnet(uint32_t consumerVcs)
virtual void setVcsPerVnet(uint32_t consumerVcs)
void scheduleEvent(Cycles timeDelta)
void initBridge(NetworkBridge *coBrid, bool cdc_en, bool serdes_en)
uint64_t Tick
Tick count type.
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...
void neutralize(int vc, int eCredit)
void setSourceQueue(flitBuffer *src_queue, ClockedObject *srcClockObject)
void flitisizeAndSend(flit *t_flit)
NetworkBridge(const Params &p)
std::vector< int > lenBuffer
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
virtual flit * serialize(int ser_id, int parts, uint32_t bWidth)
void scheduleEventAbsolute(Tick timeAbs)
ClockedObject * getObject()
#define panic(...)
This implements a cprintf based panic() function.
Generated on Tue Sep 7 2021 14:53:48 for gem5 by doxygen 1.8.17