Go to the documentation of this file.
37 #include "debug/RubyNetwork.hh"
38 #include "params/GarnetIntLink.hh"
61 if (
mType == enums::LINK_OBJECT) {
64 }
else if (
mType == enums::OBJECT_LINK) {
69 panic(
"CDC type must be set");
76 DPRINTF(RubyNetwork,
"VcsPerVnet VC: %d\n", consumerVcs);
101 Cycles totLatency = latency;
110 sendTime = std::max(nextAvailTick, sendTime);
131 if (
mType == enums::OBJECT_LINK) {
136 DPRINTF(RubyNetwork,
"Target width: %d Current: %d\n",
137 target_width, cur_width);
138 assert(target_width != cur_width);
140 int vc = t_flit->
get_vc();
142 if (target_width > cur_width) {
147 int flitPossible = 0;
161 flitPossible = ceil((
float)sizeAvail/(
float)target_width);
162 assert (flitPossible < 2);
172 flitPossible = floor((
float)sizeAvail/(
float)target_width);
173 assert (flitPossible < 2);
181 DPRINTF(RubyNetwork,
"Deserialize :%dB -----> %dB "
182 " vc:%d\n", cur_width, target_width, vc);
198 DPRINTF(RubyNetwork,
"Scheduling a flit\n");
206 DPRINTF(RubyNetwork,
"Serializing flit :%d -----> %d "
207 "(vc:%d, Original Message Size: %d)\n",
208 cur_width, target_width, vc, t_flit->
msgSize);
210 int flitPossible = 0;
222 flitPossible = floor((
float)sizeAvail/(
float)target_width);
224 sizeSent[vc] += flitPossible*target_width;
229 flitPossible = ceil((
float)sizeAvail/(
float)target_width);
233 assert(flitPossible > 0);
237 for (
int i = 0;
i < flitPossible;
i++) {
241 DPRINTF(RubyNetwork,
"Serialized to flit[%d of %d parts]:"
242 " %s\n",
i+1, flitPossible, *fl);
264 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 Sun Jul 30 2023 01:56:58 for gem5 by doxygen 1.8.17