gem5  v20.1.0.0
NetworkInterface.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Advanced Micro Devices, Inc.
3  * Copyright (c) 2020 Inria
4  * Copyright (c) 2016 Georgia Institute of Technology
5  * Copyright (c) 2008 Princeton University
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are
10  * met: redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer;
12  * redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution;
15  * neither the name of the copyright holders nor the names of its
16  * contributors may be used to endorse or promote products derived from
17  * this software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 
34 
35 #include <cassert>
36 #include <cmath>
37 
38 #include "base/cast.hh"
39 #include "debug/RubyNetwork.hh"
44 
45 using namespace std;
46 
48  : ClockedObject(p), Consumer(this), m_id(p->id),
49  m_virtual_networks(p->virt_nets), m_vc_per_vnet(0),
50  m_vc_allocator(m_virtual_networks, 0),
51  m_deadlock_threshold(p->garnet_deadlock_threshold),
52  vc_busy_counter(m_virtual_networks, 0)
53 {
55  niOutVcs.resize(0);
56 }
57 
58 void
60  CreditLink *credit_link)
61 {
62  InputPort *newInPort = new InputPort(in_link, credit_link);
63  inPorts.push_back(newInPort);
64  DPRINTF(RubyNetwork, "Adding input port:%s with vnets %s\n",
65  in_link->name(), newInPort->printVnets());
66 
67  in_link->setLinkConsumer(this);
68  credit_link->setSourceQueue(newInPort->outCreditQueue(), this);
69  if (m_vc_per_vnet != 0) {
70  in_link->setVcsPerVnet(m_vc_per_vnet);
71  credit_link->setVcsPerVnet(m_vc_per_vnet);
72  }
73 
74 }
75 
76 void
78  CreditLink *credit_link,
79  SwitchID router_id, uint32_t consumerVcs)
80 {
81  OutputPort *newOutPort = new OutputPort(out_link, credit_link, router_id);
82  outPorts.push_back(newOutPort);
83 
84  assert(consumerVcs > 0);
85  // We are not allowing different physical links to have different vcs
86  // If it is required that the Network Interface support different VCs
87  // for every physical link connected to it. Then they need to change
88  // the logic within outport and inport.
89  if (niOutVcs.size() == 0) {
90  m_vc_per_vnet = consumerVcs;
91  int m_num_vcs = consumerVcs * m_virtual_networks;
92  niOutVcs.resize(m_num_vcs);
93  outVcState.reserve(m_num_vcs);
94  m_ni_out_vcs_enqueue_time.resize(m_num_vcs);
95  // instantiating the NI flit buffers
96  for (int i = 0; i < m_num_vcs; i++) {
98  outVcState.emplace_back(i, m_net_ptr, consumerVcs);
99  }
100 
101  // Reset VC Per VNET for input links already instantiated
102  for (auto &iPort: inPorts) {
103  NetworkLink *inNetLink = iPort->inNetLink();
104  inNetLink->setVcsPerVnet(m_vc_per_vnet);
105  credit_link->setVcsPerVnet(m_vc_per_vnet);
106  }
107  } else {
108  fatal_if(consumerVcs != m_vc_per_vnet,
109  "%s: Connected Physical links have different vc requests: %d and %d\n",
110  name(), consumerVcs, m_vc_per_vnet);
111  }
112 
113  DPRINTF(RubyNetwork, "OutputPort:%s Vnet: %s\n",
114  out_link->name(), newOutPort->printVnets());
115 
116  out_link->setSourceQueue(newOutPort->outFlitQueue(), this);
117  out_link->setVcsPerVnet(m_vc_per_vnet);
118  credit_link->setLinkConsumer(this);
119  credit_link->setVcsPerVnet(m_vc_per_vnet);
120 }
121 
122 void
125 {
126  inNode_ptr = in;
127  outNode_ptr = out;
128 
129  for (auto& it : in) {
130  if (it != nullptr) {
131  it->setConsumer(this);
132  }
133  }
134 }
135 
136 void
138 {
139  // An output MessageBuffer has dequeued something this cycle and there
140  // is now space to enqueue a stalled message. However, we cannot wake
141  // on the same cycle as the dequeue. Schedule a wake at the soonest
142  // possible time (next cycle).
144 }
145 
146 void
148 {
149  int vnet = t_flit->get_vnet();
150 
151  // Latency
153  Tick network_delay =
154  t_flit->get_dequeue_time() -
155  t_flit->get_enqueue_time() - cyclesToTicks(Cycles(1));
156  Tick src_queueing_delay = t_flit->get_src_delay();
157  Tick dest_queueing_delay = (curTick() - t_flit->get_dequeue_time());
158  Tick queueing_delay = src_queueing_delay + dest_queueing_delay;
159 
160  m_net_ptr->increment_flit_network_latency(network_delay, vnet);
161  m_net_ptr->increment_flit_queueing_latency(queueing_delay, vnet);
162 
163  if (t_flit->get_type() == TAIL_ || t_flit->get_type() == HEAD_TAIL_) {
165  m_net_ptr->increment_packet_network_latency(network_delay, vnet);
166  m_net_ptr->increment_packet_queueing_latency(queueing_delay, vnet);
167  }
168 
169  // Hops
171 }
172 
173 /*
174  * The NI wakeup checks whether there are any ready messages in the protocol
175  * buffer. If yes, it picks that up, flitisizes it into a number of flits and
176  * puts it into an output buffer and schedules the output link. On a wakeup
177  * it also checks whether there are flits in the input link. If yes, it picks
178  * them up and if the flit is a tail, the NI inserts the corresponding message
179  * into the protocol buffer. It also checks for credits being sent by the
180  * downstream router.
181  */
182 
183 void
185 {
186  std::ostringstream oss;
187  for (auto &oPort: outPorts) {
188  oss << oPort->routerID() << "[" << oPort->printVnets() << "] ";
189  }
190  DPRINTF(RubyNetwork, "Network Interface %d connected to router:%s "
191  "woke up. Period: %ld\n", m_id, oss.str(), clockPeriod());
192 
193  assert(curTick() == clockEdge());
194  MsgPtr msg_ptr;
195  Tick curTime = clockEdge();
196 
197  // Checking for messages coming from the protocol
198  // can pick up a message/cycle for each virtual net
199  for (int vnet = 0; vnet < inNode_ptr.size(); ++vnet) {
200  MessageBuffer *b = inNode_ptr[vnet];
201  if (b == nullptr) {
202  continue;
203  }
204 
205  if (b->isReady(curTime)) { // Is there a message waiting
206  msg_ptr = b->peekMsgPtr();
207  if (flitisizeMessage(msg_ptr, vnet)) {
208  b->dequeue(curTime);
209  }
210  }
211  }
212 
214 
215  // Check if there are flits stalling a virtual channel. Track if a
216  // message is enqueued to restrict ejection to one message per cycle.
217  checkStallQueue();
218 
219  /*********** Check the incoming flit link **********/
220  DPRINTF(RubyNetwork, "Number of input ports: %d\n", inPorts.size());
221  for (auto &iPort: inPorts) {
222  NetworkLink *inNetLink = iPort->inNetLink();
223  if (inNetLink->isReady(curTick())) {
224  flit *t_flit = inNetLink->consumeLink();
225  DPRINTF(RubyNetwork, "Recieved flit:%s\n", *t_flit);
226  assert(t_flit->m_width == iPort->bitWidth());
227 
228  int vnet = t_flit->get_vnet();
229  t_flit->set_dequeue_time(curTick());
230 
231  // If a tail flit is received, enqueue into the protocol buffers
232  // if space is available. Otherwise, exchange non-tail flits for
233  // credits.
234  if (t_flit->get_type() == TAIL_ ||
235  t_flit->get_type() == HEAD_TAIL_) {
236  if (!iPort->messageEnqueuedThisCycle &&
237  outNode_ptr[vnet]->areNSlotsAvailable(1, curTime)) {
238  // Space is available. Enqueue to protocol buffer.
239  outNode_ptr[vnet]->enqueue(t_flit->get_msg_ptr(), curTime,
240  cyclesToTicks(Cycles(1)));
241 
242  // Simply send a credit back since we are not buffering
243  // this flit in the NI
244  Credit *cFlit = new Credit(t_flit->get_vc(),
245  true, curTick());
246  iPort->sendCredit(cFlit);
247  // Update stats and delete flit pointer
248  incrementStats(t_flit);
249  delete t_flit;
250  } else {
251  // No space available- Place tail flit in stall queue and
252  // set up a callback for when protocol buffer is dequeued.
253  // Stat update and flit pointer deletion will occur upon
254  // unstall.
255  iPort->m_stall_queue.push_back(t_flit);
256  m_stall_count[vnet]++;
257 
258  outNode_ptr[vnet]->registerDequeueCallback([this]() {
259  dequeueCallback(); });
260  }
261  } else {
262  // Non-tail flit. Send back a credit but not VC free signal.
263  Credit *cFlit = new Credit(t_flit->get_vc(), false,
264  curTick());
265  // Simply send a credit back since we are not buffering
266  // this flit in the NI
267  iPort->sendCredit(cFlit);
268 
269  // Update stats and delete flit pointer.
270  incrementStats(t_flit);
271  delete t_flit;
272  }
273  }
274  }
275 
276  /****************** Check the incoming credit link *******/
277 
278  for (auto &oPort: outPorts) {
279  CreditLink *inCreditLink = oPort->inCreditLink();
280  if (inCreditLink->isReady(curTick())) {
281  Credit *t_credit = (Credit*) inCreditLink->consumeLink();
282  outVcState[t_credit->get_vc()].increment_credit();
283  if (t_credit->is_free_signal()) {
284  outVcState[t_credit->get_vc()].setState(IDLE_,
285  curTick());
286  }
287  delete t_credit;
288  }
289  }
290 
291 
292  // It is possible to enqueue multiple outgoing credit flits if a message
293  // was unstalled in the same cycle as a new message arrives. In this
294  // case, we should schedule another wakeup to ensure the credit is sent
295  // back.
296  for (auto &iPort: inPorts) {
297  if (iPort->outCreditQueue()->getSize() > 0) {
298  DPRINTF(RubyNetwork, "Sending a credit %s via %s at %ld\n",
299  *(iPort->outCreditQueue()->peekTopFlit()),
300  iPort->outCreditLink()->name(), clockEdge(Cycles(1)));
301  iPort->outCreditLink()->
303  }
304  }
305  checkReschedule();
306 }
307 
308 void
310 {
311  // Check all stall queues.
312  // There is one stall queue for each input link
313  for (auto &iPort: inPorts) {
314  iPort->messageEnqueuedThisCycle = false;
315  Tick curTime = clockEdge();
316 
317  if (!iPort->m_stall_queue.empty()) {
318  for (auto stallIter = iPort->m_stall_queue.begin();
319  stallIter != iPort->m_stall_queue.end(); ) {
320  flit *stallFlit = *stallIter;
321  int vnet = stallFlit->get_vnet();
322 
323  // If we can now eject to the protocol buffer,
324  // send back credits
325  if (outNode_ptr[vnet]->areNSlotsAvailable(1,
326  curTime)) {
327  outNode_ptr[vnet]->enqueue(stallFlit->get_msg_ptr(),
328  curTime, cyclesToTicks(Cycles(1)));
329 
330  // Send back a credit with free signal now that the
331  // VC is no longer stalled.
332  Credit *cFlit = new Credit(stallFlit->get_vc(), true,
333  curTick());
334  iPort->sendCredit(cFlit);
335 
336  // Update Stats
337  incrementStats(stallFlit);
338 
339  // Flit can now safely be deleted and removed from stall
340  // queue
341  delete stallFlit;
342  iPort->m_stall_queue.erase(stallIter);
343  m_stall_count[vnet]--;
344 
345  // If there are no more stalled messages for this vnet, the
346  // callback on it's MessageBuffer is not needed.
347  if (m_stall_count[vnet] == 0)
348  outNode_ptr[vnet]->unregisterDequeueCallback();
349 
350  iPort->messageEnqueuedThisCycle = true;
351  break;
352  } else {
353  ++stallIter;
354  }
355  }
356  }
357  }
358 }
359 
360 // Embed the protocol message into flits
361 bool
363 {
364  Message *net_msg_ptr = msg_ptr.get();
365  NetDest net_msg_dest = net_msg_ptr->getDestination();
366 
367  // gets all the destinations associated with this message.
368  vector<NodeID> dest_nodes = net_msg_dest.getAllDest();
369 
370  // Number of flits is dependent on the link bandwidth available.
371  // This is expressed in terms of bytes/cycle or the flit size
372  OutputPort *oPort = getOutportForVnet(vnet);
373  assert(oPort);
374  int num_flits = (int)divCeil((float) m_net_ptr->MessageSizeType_to_int(
375  net_msg_ptr->getMessageSize()), (float)oPort->bitWidth());
376 
377  DPRINTF(RubyNetwork, "Message Size:%d vnet:%d bitWidth:%d\n",
379  vnet, oPort->bitWidth());
380 
381  // loop to convert all multicast messages into unicast messages
382  for (int ctr = 0; ctr < dest_nodes.size(); ctr++) {
383 
384  // this will return a free output virtual channel
385  int vc = calculateVC(vnet);
386 
387  if (vc == -1) {
388  return false ;
389  }
390  MsgPtr new_msg_ptr = msg_ptr->clone();
391  NodeID destID = dest_nodes[ctr];
392 
393  Message *new_net_msg_ptr = new_msg_ptr.get();
394  if (dest_nodes.size() > 1) {
395  NetDest personal_dest;
396  for (int m = 0; m < (int) MachineType_NUM; m++) {
397  if ((destID >= MachineType_base_number((MachineType) m)) &&
398  destID < MachineType_base_number((MachineType) (m+1))) {
399  // calculating the NetDest associated with this destID
400  personal_dest.clear();
401  personal_dest.add((MachineID) {(MachineType) m, (destID -
402  MachineType_base_number((MachineType) m))});
403  new_net_msg_ptr->getDestination() = personal_dest;
404  break;
405  }
406  }
407  net_msg_dest.removeNetDest(personal_dest);
408  // removing the destination from the original message to reflect
409  // that a message with this particular destination has been
410  // flitisized and an output vc is acquired
411  net_msg_ptr->getDestination().removeNetDest(personal_dest);
412  }
413 
414  // Embed Route into the flits
415  // NetDest format is used by the routing table
416  // Custom routing algorithms just need destID
417 
418  RouteInfo route;
419  route.vnet = vnet;
420  route.net_dest = new_net_msg_ptr->getDestination();
421  route.src_ni = m_id;
422  route.src_router = oPort->routerID();
423  route.dest_ni = destID;
424  route.dest_router = m_net_ptr->get_router_id(destID, vnet);
425 
426  // initialize hops_traversed to -1
427  // so that the first router increments it to 0
428  route.hops_traversed = -1;
429 
431  for (int i = 0; i < num_flits; i++) {
433  flit *fl = new flit(i, vc, vnet, route, num_flits, new_msg_ptr,
435  net_msg_ptr->getMessageSize()),
436  oPort->bitWidth(), curTick());
437 
438  fl->set_src_delay(curTick() - ticksToCycles(msg_ptr->getTime()));
439  niOutVcs[vc].insert(fl);
440  }
441 
443  outVcState[vc].setState(ACTIVE_, curTick());
444  }
445  return true ;
446 }
447 
448 // Looking for a free output vc
449 int
451 {
452  for (int i = 0; i < m_vc_per_vnet; i++) {
453  int delta = m_vc_allocator[vnet];
454  m_vc_allocator[vnet]++;
455  if (m_vc_allocator[vnet] == m_vc_per_vnet)
456  m_vc_allocator[vnet] = 0;
457 
458  if (outVcState[(vnet*m_vc_per_vnet) + delta].isInState(
459  IDLE_, curTick())) {
460  vc_busy_counter[vnet] = 0;
461  return ((vnet*m_vc_per_vnet) + delta);
462  }
463  }
464 
465  vc_busy_counter[vnet] += 1;
467  "%s: Possible network deadlock in vnet: %d at time: %llu \n",
468  name(), vnet, curTick());
469 
470  return -1;
471 }
472 
473 void
475 {
476  int vc = oPort->vcRoundRobin();
477 
478  for (int i = 0; i < niOutVcs.size(); i++) {
479  vc++;
480  if (vc == niOutVcs.size())
481  vc = 0;
482 
483  int t_vnet = get_vnet(vc);
484  if (oPort->isVnetSupported(t_vnet)) {
485  // model buffer backpressure
486  if (niOutVcs[vc].isReady(curTick()) &&
487  outVcState[vc].has_credit()) {
488 
489  bool is_candidate_vc = true;
490  int vc_base = t_vnet * m_vc_per_vnet;
491 
492  if (m_net_ptr->isVNetOrdered(t_vnet)) {
493  for (int vc_offset = 0; vc_offset < m_vc_per_vnet;
494  vc_offset++) {
495  int t_vc = vc_base + vc_offset;
496  if (niOutVcs[t_vc].isReady(curTick())) {
497  if (m_ni_out_vcs_enqueue_time[t_vc] <
499  is_candidate_vc = false;
500  break;
501  }
502  }
503  }
504  }
505  if (!is_candidate_vc)
506  continue;
507 
508  // Update the round robin arbiter
509  oPort->vcRoundRobin(vc);
510 
511  outVcState[vc].decrement_credit();
512 
513  // Just removing the top flit
514  flit *t_flit = niOutVcs[vc].getTopFlit();
515  t_flit->set_time(clockEdge(Cycles(1)));
516 
517  // Scheduling the flit
518  scheduleFlit(t_flit);
519 
520  if (t_flit->get_type() == TAIL_ ||
521  t_flit->get_type() == HEAD_TAIL_) {
523  }
524 
525  // Done with this port, continue to schedule
526  // other ports
527  return;
528  }
529  }
530  }
531 }
532 
533 
534 
541 void
543 {
544  // Schedule each output link
545  for (auto &oPort: outPorts) {
546  scheduleOutputPort(oPort);
547  }
548 }
549 
552 {
553  for (auto &iPort : inPorts) {
554  if (iPort->isVnetSupported(vnet)) {
555  return iPort;
556  }
557  }
558 
559  return nullptr;
560 }
561 
562 /*
563  * This function returns the outport which supports the given vnet.
564  * Currently, HeteroGarnet does not support multiple outports to
565  * support same vnet. Thus, this function returns the first-and
566  * only outport which supports the vnet.
567  */
570 {
571  for (auto &oPort : outPorts) {
572  if (oPort->isVnetSupported(vnet)) {
573  return oPort;
574  }
575  }
576 
577  return nullptr;
578 }
579 void
581 {
582  OutputPort *oPort = getOutportForVnet(t_flit->get_vnet());
583 
584  if (oPort) {
585  DPRINTF(RubyNetwork, "Scheduling at %s time:%ld flit:%s Message:%s\n",
586  oPort->outNetLink()->name(), clockEdge(Cycles(1)),
587  *t_flit, *(t_flit->get_msg_ptr()));
588  oPort->outFlitQueue()->insert(t_flit);
590  return;
591  }
592 
593  panic("No output port found for vnet:%d\n", t_flit->get_vnet());
594  return;
595 }
596 
597 int
599 {
600  for (int i = 0; i < m_virtual_networks; i++) {
601  if (vc >= (i*m_vc_per_vnet) && vc < ((i+1)*m_vc_per_vnet)) {
602  return i;
603  }
604  }
605  fatal("Could not determine vc");
606 }
607 
608 
609 // Wakeup the NI in the next cycle if there are waiting
610 // messages in the protocol buffer, or waiting flits in the
611 // output VC buffer.
612 // Also check if we have to reschedule because of a clock period
613 // difference.
614 void
616 {
617  for (const auto& it : inNode_ptr) {
618  if (it == nullptr) {
619  continue;
620  }
621 
622  while (it->isReady(clockEdge())) { // Is there a message waiting
623  scheduleEvent(Cycles(1));
624  return;
625  }
626  }
627 
628  for (auto& ni_out_vc : niOutVcs) {
629  if (ni_out_vc.isReady(clockEdge(Cycles(1)))) {
630  scheduleEvent(Cycles(1));
631  return;
632  }
633  }
634 
635  // Check if any input links have flits to be popped.
636  // This can happen if the links are operating at
637  // a higher frequency.
638  for (auto &iPort : inPorts) {
639  NetworkLink *inNetLink = iPort->inNetLink();
640  if (inNetLink->isReady(curTick())) {
641  scheduleEvent(Cycles(1));
642  return;
643  }
644  }
645 
646  for (auto &oPort : outPorts) {
647  CreditLink *inCreditLink = oPort->inCreditLink();
648  if (inCreditLink->isReady(curTick())) {
649  scheduleEvent(Cycles(1));
650  return;
651  }
652  }
653 }
654 
655 void
656 NetworkInterface::print(std::ostream& out) const
657 {
658  out << "[Network Interface]";
659 }
660 
661 uint32_t
663 {
664  uint32_t num_functional_writes = 0;
665  for (auto& ni_out_vc : niOutVcs) {
666  num_functional_writes += ni_out_vc.functionalWrite(pkt);
667  }
668 
669  for (auto &oPort: outPorts) {
670  num_functional_writes += oPort->outFlitQueue()->functionalWrite(pkt);
671  }
672  return num_functional_writes;
673 }
674 
676 GarnetNetworkInterfaceParams::create()
677 {
678  return new NetworkInterface(this);
679 }
NetworkInterface::addInPort
void addInPort(NetworkLink *in_link, CreditLink *credit_link)
Definition: NetworkInterface.cc:59
GarnetNetwork::increment_received_flits
void increment_received_flits(int vnet)
Definition: GarnetNetwork.hh:125
flit::get_vnet
int get_vnet()
Definition: flit.hh:56
fatal
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:183
GarnetNetwork::increment_total_hops
void increment_total_hops(int hops)
Definition: GarnetNetwork.hh:140
NetDest::add
void add(MachineID newElement)
Definition: NetDest.cc:39
flit::get_msg_ptr
MsgPtr & get_msg_ptr()
Definition: flit.hh:59
NetworkInterface::OutputPort::vcRoundRobin
int vcRoundRobin()
Definition: NetworkInterface.hh:156
GarnetNetwork::increment_flit_network_latency
void increment_flit_network_latency(Tick latency, int vnet)
Definition: GarnetNetwork.hh:128
RouteInfo::dest_ni
int dest_ni
Definition: CommonTypes.hh:61
NetworkInterface::print
void print(std::ostream &out) const
Definition: NetworkInterface.cc:656
Message::getDestination
virtual const NetDest & getDestination() const
Definition: Message.hh:96
flit
Definition: flit.hh:41
GarnetNetwork::get_router_id
int get_router_id(int ni, int vnet)
Definition: GarnetNetwork.cc:357
RouteInfo
Definition: CommonTypes.hh:47
NetworkInterface::OutputPort::printVnets
std::string printVnets()
Definition: NetworkInterface.hh:146
ArmISA::i
Bitfield< 7 > i
Definition: miscregs_types.hh:63
flit::get_enqueue_time
Tick get_enqueue_time()
Definition: flit.hh:52
NetworkInterface::get_vnet
int get_vnet(int vc)
Definition: NetworkInterface.cc:598
NetworkInterface::m_net_ptr
GarnetNetwork * m_net_ptr
Definition: NetworkInterface.hh:261
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
Credit::is_free_signal
bool is_free_signal()
Definition: Credit.hh:58
NetworkInterface::OutputPort::outFlitQueue
flitBuffer * outFlitQueue()
Definition: NetworkInterface.hh:102
cast.hh
GarnetNetwork::increment_packet_queueing_latency
void increment_packet_queueing_latency(Tick latency, int vnet)
Definition: GarnetNetwork.hh:119
std::vector< MessageBuffer * >
Message::getMessageSize
virtual const MessageSizeType & getMessageSize() const
Definition: Message.hh:64
NetworkInterface::outVcState
std::vector< OutVcState > outVcState
Definition: NetworkInterface.hh:269
MachineID
Definition: MachineID.hh:38
flitBuffer.hh
NetworkInterface::m_id
const NodeID m_id
Definition: NetworkInterface.hh:262
flit::get_route
RouteInfo get_route()
Definition: flit.hh:58
NetworkInterface::OutputPort::bitWidth
uint32_t bitWidth()
Definition: NetworkInterface.hh:125
NetworkInterface::m_vc_allocator
std::vector< int > m_vc_allocator
Definition: NetworkInterface.hh:265
ClockedObject
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Definition: clocked_object.hh:231
GarnetNetwork::increment_injected_flits
void increment_injected_flits(int vnet)
Definition: GarnetNetwork.hh:124
IDLE_
@ IDLE_
Definition: CommonTypes.hh:40
Credit
Definition: Credit.hh:45
GarnetNetwork::increment_injected_packets
void increment_injected_packets(int vnet)
Definition: GarnetNetwork.hh:109
GarnetNetwork::increment_received_packets
void increment_received_packets(int vnet)
Definition: GarnetNetwork.hh:110
GarnetNetwork::increment_packet_network_latency
void increment_packet_network_latency(Tick latency, int vnet)
Definition: GarnetNetwork.hh:113
NetworkInterface::m_deadlock_threshold
int m_deadlock_threshold
Definition: NetworkInterface.hh:268
divCeil
T divCeil(const T &a, const U &b)
Definition: intmath.hh:114
flit::set_dequeue_time
void set_dequeue_time(Tick time)
Definition: flit.hh:69
NetworkInterface::wakeup
void wakeup()
Definition: NetworkInterface.cc:184
NetworkInterface::addOutPort
void addOutPort(NetworkLink *out_link, CreditLink *credit_link, SwitchID router_id, uint32_t consumerVcs)
Definition: NetworkInterface.cc:77
Clocked::cyclesToTicks
Tick cyclesToTicks(Cycles c) const
Definition: clocked_object.hh:224
flit::set_src_delay
void set_src_delay(Tick delay)
Definition: flit.hh:68
NetworkInterface::vc_busy_counter
std::vector< int > vc_busy_counter
Definition: NetworkInterface.hh:283
NetworkInterface::inPorts
std::vector< InputPort * > inPorts
Definition: NetworkInterface.hh:267
RouteInfo::src_router
int src_router
Definition: CommonTypes.hh:60
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:234
NetworkInterface::m_virtual_networks
const int m_virtual_networks
Definition: NetworkInterface.hh:263
NetworkInterface::outNode_ptr
std::vector< MessageBuffer * > outNode_ptr
Definition: NetworkInterface.hh:281
NetworkInterface::Params
GarnetNetworkInterfaceParams Params
Definition: NetworkInterface.hh:55
NetworkInterface::addNode
void addNode(std::vector< MessageBuffer * > &inNode, std::vector< MessageBuffer * > &outNode)
Definition: NetworkInterface.cc:123
NetworkInterface::scheduleOutputLink
void scheduleOutputLink()
This function looks at the NI buffers if some buffer has flits which are ready to traverse the link i...
Definition: NetworkInterface.cc:542
RouteInfo::src_ni
int src_ni
Definition: CommonTypes.hh:59
Consumer
Definition: Consumer.hh:43
Clocked::clockEdge
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...
Definition: clocked_object.hh:174
GarnetNetwork::increment_flit_queueing_latency
void increment_flit_queueing_latency(Tick latency, int vnet)
Definition: GarnetNetwork.hh:134
flit::get_type
flit_type get_type()
Definition: flit.hh:60
ACTIVE_
@ ACTIVE_
Definition: CommonTypes.hh:40
Network::MessageSizeType_to_int
static uint32_t MessageSizeType_to_int(MessageSizeType size_type)
Definition: Network.cc:160
NetworkInterface
Definition: NetworkInterface.hh:52
flit::get_dequeue_time
Tick get_dequeue_time()
Definition: flit.hh:53
NetworkInterface::checkReschedule
void checkReschedule()
Definition: NetworkInterface.cc:615
NetDest::clear
void clear()
Definition: NetDest.cc:79
NetworkInterface::InputPort
Definition: NetworkInterface.hh:180
NetworkInterface::scheduleFlit
void scheduleFlit(flit *t_flit)
Definition: NetworkInterface.cc:580
NetworkInterface::getInportForVnet
InputPort * getInportForVnet(int vnet)
Definition: NetworkInterface.cc:551
NetworkInterface::incrementStats
void incrementStats(flit *t_flit)
Definition: NetworkInterface.cc:147
Clocked::clockPeriod
Tick clockPeriod() const
Definition: clocked_object.hh:214
MsgPtr
std::shared_ptr< Message > MsgPtr
Definition: Message.hh:40
flit::set_time
void set_time(Tick time)
Definition: flit.hh:65
RouteInfo::net_dest
NetDest net_dest
Definition: CommonTypes.hh:56
NetworkInterface::OutputPort::isVnetSupported
bool isVnetSupported(int pVnet)
Definition: NetworkInterface.hh:130
NetworkInterface::calculateVC
int calculateVC(int vnet)
Definition: NetworkInterface.cc:450
SimObject::name
virtual const std::string name() const
Definition: sim_object.hh:133
NetworkInterface::InputPort::outCreditQueue
flitBuffer * outCreditQueue()
Definition: NetworkInterface.hh:194
TAIL_
@ TAIL_
Definition: CommonTypes.hh:38
GarnetNetwork::isVNetOrdered
bool isVNetOrdered(int vnet) const
Definition: GarnetNetwork.hh:78
MessageBuffer.hh
flitBuffer::insert
void insert(flit *flt)
Definition: flitBuffer.hh:70
NetworkInterface::NetworkInterface
NetworkInterface(const Params *p)
Definition: NetworkInterface.cc:47
panic_if
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition: logging.hh:197
flit::get_vc
int get_vc()
Definition: flit.hh:57
NetworkInterface::OutputPort::routerID
int routerID()
Definition: NetworkInterface.hh:120
ArmISA::b
Bitfield< 7 > b
Definition: miscregs_types.hh:376
Consumer::scheduleEventAbsolute
void scheduleEventAbsolute(Tick timeAbs)
Definition: Consumer.cc:40
NetworkInterface::m_vc_per_vnet
int m_vc_per_vnet
Definition: NetworkInterface.hh:264
std
Overload hash function for BasicBlockRange type.
Definition: vec_reg.hh:587
NetworkInterface::flitisizeMessage
bool flitisizeMessage(MsgPtr msg_ptr, int vnet)
Definition: NetworkInterface.cc:362
Clocked::ticksToCycles
Cycles ticksToCycles(Tick t) const
Definition: clocked_object.hh:219
NetworkInterface::m_stall_count
std::vector< int > m_stall_count
Definition: NetworkInterface.hh:271
flit::get_src_delay
Tick get_src_delay()
Definition: flit.hh:62
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
Credit.hh
NetworkInterface::OutputPort::outNetLink
NetworkLink * outNetLink()
Definition: NetworkInterface.hh:108
RouteInfo::dest_router
int dest_router
Definition: CommonTypes.hh:62
Cycles
Cycles is a wrapper class for representing cycle counts, i.e.
Definition: types.hh:83
NetworkInterface::dequeueCallback
void dequeueCallback()
Definition: NetworkInterface.cc:137
Message
Definition: Message.hh:43
HEAD_TAIL_
@ HEAD_TAIL_
Definition: CommonTypes.hh:38
NodeID
unsigned int NodeID
Definition: TypeDefines.hh:34
NetworkInterface::niOutVcs
std::vector< flitBuffer > niOutVcs
Definition: NetworkInterface.hh:275
RouteInfo::hops_traversed
int hops_traversed
Definition: CommonTypes.hh:63
NetworkInterface::m_ni_out_vcs_enqueue_time
std::vector< Tick > m_ni_out_vcs_enqueue_time
Definition: NetworkInterface.hh:276
NetworkInterface::getOutportForVnet
OutputPort * getOutportForVnet(int vnet)
Definition: NetworkInterface.cc:569
NetworkInterface::outPorts
std::vector< OutputPort * > outPorts
Definition: NetworkInterface.hh:266
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
MessageBuffer
Definition: MessageBuffer.hh:68
NetworkInterface::InputPort::printVnets
std::string printVnets()
Definition: NetworkInterface.hh:237
fatal_if
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Definition: logging.hh:219
RouteInfo::vnet
int vnet
Definition: CommonTypes.hh:55
Message.hh
NetDest::getAllDest
std::vector< NodeID > getAllDest()
Definition: NetDest.cc:106
NetworkInterface.hh
NetDest
Definition: NetDest.hh:39
NetworkInterface::OutputPort
Definition: NetworkInterface.hh:83
NetworkInterface::checkStallQueue
void checkStallQueue()
Definition: NetworkInterface.cc:309
NetworkInterface::functionalWrite
uint32_t functionalWrite(Packet *)
Definition: NetworkInterface.cc:662
SwitchID
unsigned int SwitchID
Definition: TypeDefines.hh:35
INFINITE_
#define INFINITE_
Definition: CommonTypes.hh:66
ArmISA::id
Bitfield< 33 > id
Definition: miscregs_types.hh:247
ArmISA::m
Bitfield< 0 > m
Definition: miscregs_types.hh:389
NetDest::removeNetDest
void removeNetDest(const NetDest &netDest)
Definition: NetDest.cc:70
Consumer::scheduleEvent
void scheduleEvent(Cycles timeDelta)
Definition: Consumer.cc:34
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
NetworkInterface::inNode_ptr
std::vector< MessageBuffer * > inNode_ptr
Definition: NetworkInterface.hh:279
NetworkInterface::scheduleOutputPort
void scheduleOutputPort(OutputPort *oPort)
Definition: NetworkInterface.cc:474
curTick
Tick curTick()
The current simulated tick.
Definition: core.hh:45
flit::m_width
uint32_t m_width
Definition: flit.hh:105

Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17