gem5  v20.1.0.0
RubyPort.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2013,2020 ARM Limited
3  * All rights reserved.
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 2009-2013 Advanced Micro Devices, Inc.
15  * Copyright (c) 2011 Mark D. Hill and David A. Wood
16  * All rights reserved.
17  *
18  * Redistribution and use in source and binary forms, with or without
19  * modification, are permitted provided that the following conditions are
20  * met: redistributions of source code must retain the above copyright
21  * notice, this list of conditions and the following disclaimer;
22  * redistributions in binary form must reproduce the above copyright
23  * notice, this list of conditions and the following disclaimer in the
24  * documentation and/or other materials provided with the distribution;
25  * neither the name of the copyright holders nor the names of its
26  * contributors may be used to endorse or promote products derived from
27  * this software without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  */
41 
43 
45 #include "debug/Config.hh"
46 #include "debug/Drain.hh"
47 #include "debug/Ruby.hh"
48 #include "mem/ruby/protocol/AccessPermission.hh"
50 #include "mem/simple_mem.hh"
51 #include "sim/full_system.hh"
52 #include "sim/system.hh"
53 
55  : ClockedObject(p), m_ruby_system(p->ruby_system), m_version(p->version),
56  m_controller(NULL), m_mandatory_q_ptr(NULL),
57  m_usingRubyTester(p->using_ruby_tester), system(p->system),
58  pioRequestPort(csprintf("%s.pio-request-port", name()), this),
59  pioResponsePort(csprintf("%s.pio-response-port", name()), this),
60  memRequestPort(csprintf("%s.mem-request-port", name()), this),
61  memResponsePort(csprintf("%s-mem-response-port", name()), this,
62  p->ruby_system->getAccessBackingStore(), -1,
63  p->no_retry_on_stall),
64  gotAddrRanges(p->port_interrupt_out_port_connection_count),
65  m_isCPUSequencer(p->is_cpu_sequencer)
66 {
67  assert(m_version != -1);
68 
69  // create the response ports based on the number of connected ports
70  for (size_t i = 0; i < p->port_in_ports_connection_count; ++i) {
72  ("%s.response_ports%d", name(), i), this,
73  p->ruby_system->getAccessBackingStore(),
74  i, p->no_retry_on_stall));
75  }
76 
77  // create the request ports based on the number of connected ports
78  for (size_t i = 0; i < p->port_interrupt_out_port_connection_count; ++i) {
80  "%s.request_ports%d", name(), i), this));
81  }
82 }
83 
84 void
86 {
87  assert(m_controller != NULL);
89 }
90 
91 Port &
92 RubyPort::getPort(const std::string &if_name, PortID idx)
93 {
94  if (if_name == "mem_request_port") {
95  return memRequestPort;
96  } else if (if_name == "pio_request_port") {
97  return pioRequestPort;
98  } else if (if_name == "mem_response_port") {
99  return memResponsePort;
100  } else if (if_name == "pio_response_port") {
101  return pioResponsePort;
102  } else if (if_name == "interrupt_out_port") {
103  // used by the x86 CPUs to connect the interrupt PIO and interrupt
104  // response port
105  if (idx >= static_cast<PortID>(request_ports.size())) {
106  panic("%s: unknown %s index (%d)\n", __func__, if_name, idx);
107  }
108 
109  return *request_ports[idx];
110  } else if (if_name == "in_ports") {
111  // used by the CPUs to connect the caches to the interconnect, and
112  // for the x86 case also the interrupt request port
113  if (idx >= static_cast<PortID>(response_ports.size())) {
114  panic("%s: unknown %s index (%d)\n", __func__, if_name, idx);
115  }
116 
117  return *response_ports[idx];
118  }
119 
120  // pass it along to our super class
121  return ClockedObject::getPort(if_name, idx);
122 }
123 
125  RubyPort *_port)
126  : QueuedRequestPort(_name, _port, reqQueue, snoopRespQueue),
127  reqQueue(*_port, *this), snoopRespQueue(*_port, *this)
128 {
129  DPRINTF(RubyPort, "Created request pioport on sequencer %s\n", _name);
130 }
131 
133  RubyPort *_port)
134  : QueuedResponsePort(_name, _port, queue), queue(*_port, *this)
135 {
136  DPRINTF(RubyPort, "Created response pioport on sequencer %s\n", _name);
137 }
138 
140  RubyPort *_port)
141  : QueuedRequestPort(_name, _port, reqQueue, snoopRespQueue),
142  reqQueue(*_port, *this), snoopRespQueue(*_port, *this)
143 {
144  DPRINTF(RubyPort, "Created request memport on ruby sequencer %s\n", _name);
145 }
146 
148 MemResponsePort::MemResponsePort(const std::string &_name, RubyPort *_port,
149  bool _access_backing_store, PortID id,
150  bool _no_retry_on_stall)
151  : QueuedResponsePort(_name, _port, queue, id), queue(*_port, *this),
152  access_backing_store(_access_backing_store),
153  no_retry_on_stall(_no_retry_on_stall)
154 {
155  DPRINTF(RubyPort, "Created response memport on ruby sequencer %s\n",
156  _name);
157 }
158 
159 bool
161 {
162  RubyPort *rp = static_cast<RubyPort *>(&owner);
163  DPRINTF(RubyPort, "Response for address: 0x%#x\n", pkt->getAddr());
164 
165  // send next cycle
167  pkt, curTick() + rp->m_ruby_system->clockPeriod());
168  return true;
169 }
170 
172 {
173  // got a response from a device
174  assert(pkt->isResponse());
175  assert(!pkt->htmTransactionFailedInCache());
176 
177  // First we must retrieve the request port from the sender State
178  RubyPort::SenderState *senderState =
179  safe_cast<RubyPort::SenderState *>(pkt->popSenderState());
180  MemResponsePort *port = senderState->port;
181  assert(port != NULL);
182  delete senderState;
183 
184  // In FS mode, ruby memory will receive pio responses from devices
185  // and it must forward these responses back to the particular CPU.
186  DPRINTF(RubyPort, "Pio response for address %#x, going to %s\n",
187  pkt->getAddr(), port->name());
188 
189  // attempt to send the response in the next cycle
190  RubyPort *rp = static_cast<RubyPort *>(&owner);
191  port->schedTimingResp(pkt, curTick() + rp->m_ruby_system->clockPeriod());
192 
193  return true;
194 }
195 
196 bool
198 {
199  RubyPort *ruby_port = static_cast<RubyPort *>(&owner);
200 
201  for (size_t i = 0; i < ruby_port->request_ports.size(); ++i) {
202  AddrRangeList l = ruby_port->request_ports[i]->getAddrRanges();
203  for (auto it = l.begin(); it != l.end(); ++it) {
204  if (it->contains(pkt->getAddr())) {
205  // generally it is not safe to assume success here as
206  // the port could be blocked
207  bool M5_VAR_USED success =
208  ruby_port->request_ports[i]->sendTimingReq(pkt);
209  assert(success);
210  return true;
211  }
212  }
213  }
214  panic("Should never reach here!\n");
215 }
216 
217 Tick
219 {
220  RubyPort *ruby_port = static_cast<RubyPort *>(&owner);
221  // Only atomic_noncaching mode supported!
222  if (!ruby_port->system->bypassCaches()) {
223  panic("Ruby supports atomic accesses only in noncaching mode\n");
224  }
225 
226  for (size_t i = 0; i < ruby_port->request_ports.size(); ++i) {
227  AddrRangeList l = ruby_port->request_ports[i]->getAddrRanges();
228  for (auto it = l.begin(); it != l.end(); ++it) {
229  if (it->contains(pkt->getAddr())) {
230  return ruby_port->request_ports[i]->sendAtomic(pkt);
231  }
232  }
233  }
234  panic("Could not find address in Ruby PIO address ranges!\n");
235 }
236 
237 bool
239 {
240  DPRINTF(RubyPort, "Timing request for address %#x on port %d\n",
241  pkt->getAddr(), id);
242  RubyPort *ruby_port = static_cast<RubyPort *>(&owner);
243 
244  if (pkt->cacheResponding())
245  panic("RubyPort should never see request with the "
246  "cacheResponding flag set\n");
247 
248  // ruby doesn't support cache maintenance operations at the
249  // moment, as a workaround, we respond right away
250  if (pkt->req->isCacheMaintenance()) {
251  warn_once("Cache maintenance operations are not supported in Ruby.\n");
252  pkt->makeResponse();
253  schedTimingResp(pkt, curTick());
254  return true;
255  }
256  // Check for pio requests and directly send them to the dedicated
257  // pio port.
258  if (pkt->cmd != MemCmd::MemSyncReq) {
259  if (!isPhysMemAddress(pkt)) {
260  assert(!pkt->req->isHTMCmd());
261  assert(ruby_port->memRequestPort.isConnected());
262  DPRINTF(RubyPort, "Request address %#x assumed to be a "
263  "pio address\n", pkt->getAddr());
264 
265  // Save the port in the sender state object to be used later to
266  // route the response
267  pkt->pushSenderState(new SenderState(this));
268 
269  // send next cycle
270  RubySystem *rs = ruby_port->m_ruby_system;
271  ruby_port->memRequestPort.schedTimingReq(pkt,
272  curTick() + rs->clockPeriod());
273  return true;
274  }
275  }
276 
277  // Save the port in the sender state object to be used later to
278  // route the response
279  pkt->pushSenderState(new SenderState(this));
280 
281  // Submit the ruby request
282  RequestStatus requestStatus = ruby_port->makeRequest(pkt);
283 
284  // If the request successfully issued then we should return true.
285  // Otherwise, we need to tell the port to retry at a later point
286  // and return false.
287  if (requestStatus == RequestStatus_Issued) {
288  DPRINTF(RubyPort, "Request %s 0x%x issued\n", pkt->cmdString(),
289  pkt->getAddr());
290  return true;
291  }
292 
293  // pop off sender state as this request failed to issue
294  SenderState *ss = safe_cast<SenderState *>(pkt->popSenderState());
295  delete ss;
296 
297  if (pkt->cmd != MemCmd::MemSyncReq) {
299  "Request %s for address %#x did not issue because %s\n",
300  pkt->cmdString(), pkt->getAddr(),
301  RequestStatus_to_string(requestStatus));
302  }
303 
304  addToRetryList();
305 
306  return false;
307 }
308 
309 Tick
311 {
312  RubyPort *ruby_port = static_cast<RubyPort *>(&owner);
313  // Only atomic_noncaching mode supported!
314  if (!ruby_port->system->bypassCaches()) {
315  panic("Ruby supports atomic accesses only in noncaching mode\n");
316  }
317 
318  // Check for pio requests and directly send them to the dedicated
319  // pio port.
320  if (pkt->cmd != MemCmd::MemSyncReq) {
321  if (!isPhysMemAddress(pkt)) {
322  assert(ruby_port->memRequestPort.isConnected());
323  DPRINTF(RubyPort, "Request address %#x assumed to be a "
324  "pio address\n", pkt->getAddr());
325 
326  // Save the port in the sender state object to be used later to
327  // route the response
328  pkt->pushSenderState(new SenderState(this));
329 
330  // send next cycle
331  Tick req_ticks = ruby_port->memRequestPort.sendAtomic(pkt);
332  return ruby_port->ticksToCycles(req_ticks);
333  }
334 
335  assert(getOffset(pkt->getAddr()) + pkt->getSize() <=
337  }
338 
339  // Find appropriate directory for address
340  // This assumes that protocols have a Directory machine,
341  // which has its memPort hooked up to memory. This can
342  // fail for some custom protocols.
343  MachineID id = ruby_port->m_controller->mapAddressToMachine(
344  pkt->getAddr(), MachineType_Directory);
345  RubySystem *rs = ruby_port->m_ruby_system;
346  AbstractController *directory =
347  rs->m_abstract_controls[id.getType()][id.getNum()];
348  Tick latency = directory->recvAtomic(pkt);
349  if (access_backing_store)
350  rs->getPhysMem()->access(pkt);
351  return latency;
352 }
353 
354 void
356 {
357  RubyPort *ruby_port = static_cast<RubyPort *>(&owner);
358 
359  //
360  // Unless the request port do not want retries (e.g., the Ruby tester),
361  // record the stalled M5 port for later retry when the sequencer
362  // becomes free.
363  //
364  if (!no_retry_on_stall && !ruby_port->onRetryList(this)) {
365  ruby_port->addToRetryList(this);
366  }
367 }
368 
369 void
371 {
372  DPRINTF(RubyPort, "Functional access for address: %#x\n", pkt->getAddr());
373 
374  RubyPort *rp M5_VAR_USED = static_cast<RubyPort *>(&owner);
375  RubySystem *rs = rp->m_ruby_system;
376 
377  // Check for pio requests and directly send them to the dedicated
378  // pio port.
379  if (!isPhysMemAddress(pkt)) {
380  DPRINTF(RubyPort, "Pio Request for address: 0x%#x\n", pkt->getAddr());
381  assert(rp->pioRequestPort.isConnected());
382  rp->pioRequestPort.sendFunctional(pkt);
383  return;
384  }
385 
386  assert(pkt->getAddr() + pkt->getSize() <=
388 
389  if (access_backing_store) {
390  // The attached physmem contains the official version of data.
391  // The following command performs the real functional access.
392  // This line should be removed once Ruby supplies the official version
393  // of data.
394  rs->getPhysMem()->functionalAccess(pkt);
395  } else {
396  bool accessSucceeded = false;
397  bool needsResponse = pkt->needsResponse();
398 
399  // Do the functional access on ruby memory
400  if (pkt->isRead()) {
401  accessSucceeded = rs->functionalRead(pkt);
402  } else if (pkt->isWrite()) {
403  accessSucceeded = rs->functionalWrite(pkt);
404  } else {
405  panic("Unsupported functional command %s\n", pkt->cmdString());
406  }
407 
408  // Unless the request port explicitly said otherwise, generate an error
409  // if the functional request failed
410  if (!accessSucceeded && !pkt->suppressFuncError()) {
411  fatal("Ruby functional %s failed for address %#x\n",
412  pkt->isWrite() ? "write" : "read", pkt->getAddr());
413  }
414 
415  // turn packet around to go back to request port if response expected
416  if (needsResponse) {
417  // The pkt is already turned into a reponse if the directory
418  // forwarded the request to the memory controller (see
419  // AbstractController::functionalMemoryWrite and
420  // AbstractMemory::functionalAccess)
421  if (!pkt->isResponse())
422  pkt->makeResponse();
423  pkt->setFunctionalResponseStatus(accessSucceeded);
424  }
425 
426  DPRINTF(RubyPort, "Functional access %s!\n",
427  accessSucceeded ? "successful":"failed");
428  }
429 }
430 
431 void
433 {
434  DPRINTF(RubyPort, "Hit callback for %s 0x%x\n", pkt->cmdString(),
435  pkt->getAddr());
436 
437  // The packet was destined for memory and has not yet been turned
438  // into a response
439  assert(system->isMemAddr(pkt->getAddr()) || system->isDeviceMemAddr(pkt));
440  assert(pkt->isRequest());
441 
442  // First we must retrieve the request port from the sender State
443  RubyPort::SenderState *senderState =
444  safe_cast<RubyPort::SenderState *>(pkt->popSenderState());
445  MemResponsePort *port = senderState->port;
446  assert(port != NULL);
447  delete senderState;
448 
449  port->hitCallback(pkt);
450 
451  trySendRetries();
452 }
453 
454 void
456 {
457  //
458  // If we had to stall the MemResponsePorts, wake them up because the
459  // sequencer likely has free resources now.
460  //
461  if (!retryList.empty()) {
462  // Record the current list of ports to retry on a temporary list
463  // before calling sendRetryReq on those ports. sendRetryReq will cause
464  // an immediate retry, which may result in the ports being put back on
465  // the list. Therefore we want to clear the retryList before calling
466  // sendRetryReq.
468 
469  retryList.clear();
470 
471  for (auto i = curRetryList.begin(); i != curRetryList.end(); ++i) {
473  "Sequencer may now be free. SendRetry to port %s\n",
474  (*i)->name());
475  (*i)->sendRetryReq();
476  }
477  }
478 }
479 
480 void
482 {
483  //If we weren't able to drain before, we might be able to now.
484  if (drainState() == DrainState::Draining) {
485  unsigned int drainCount = outstandingCount();
486  DPRINTF(Drain, "Drain count: %u\n", drainCount);
487  if (drainCount == 0) {
488  DPRINTF(Drain, "RubyPort done draining, signaling drain done\n");
489  signalDrainDone();
490  }
491  }
492 }
493 
496 {
497  if (isDeadlockEventScheduled()) {
499  }
500 
501  //
502  // If the RubyPort is not empty, then it needs to clear all outstanding
503  // requests before it should call signalDrainDone()
504  //
505  DPRINTF(Config, "outstanding count %d\n", outstandingCount());
506  if (outstandingCount() > 0) {
507  DPRINTF(Drain, "RubyPort not drained\n");
508  return DrainState::Draining;
509  } else {
510  return DrainState::Drained;
511  }
512 }
513 
514 void
516 {
517  bool needsResponse = pkt->needsResponse();
518 
519  // Unless specified at configuration, all responses except failed SC
520  // and Flush operations access M5 physical memory.
521  bool accessPhysMem = access_backing_store;
522 
523  if (pkt->isLLSC()) {
524  if (pkt->isWrite()) {
525  if (pkt->req->getExtraData() != 0) {
526  //
527  // Successful SC packets convert to normal writes
528  //
529  pkt->convertScToWrite();
530  } else {
531  //
532  // Failed SC packets don't access physical memory and thus
533  // the RubyPort itself must convert it to a response.
534  //
535  accessPhysMem = false;
536  }
537  } else {
538  //
539  // All LL packets convert to normal loads so that M5 PhysMem does
540  // not lock the blocks.
541  //
542  pkt->convertLlToRead();
543  }
544  }
545 
546  // Flush, acquire, release requests don't access physical memory
547  if (pkt->isFlush() || pkt->cmd == MemCmd::MemSyncReq) {
548  accessPhysMem = false;
549  }
550 
551  if (pkt->req->isKernel()) {
552  accessPhysMem = false;
553  needsResponse = true;
554  }
555 
556  DPRINTF(RubyPort, "Hit callback needs response %d\n", needsResponse);
557 
558  RubyPort *ruby_port = static_cast<RubyPort *>(&owner);
559  RubySystem *rs = ruby_port->m_ruby_system;
560  if (accessPhysMem) {
561  // We must check device memory first in case it overlaps with the
562  // system memory range.
563  if (ruby_port->system->isDeviceMemAddr(pkt)) {
564  auto dmem = ruby_port->system->getDeviceMemory(pkt->requestorId());
565  dmem->access(pkt);
566  } else if (ruby_port->system->isMemAddr(pkt->getAddr())) {
567  rs->getPhysMem()->access(pkt);
568  } else {
569  panic("Packet is in neither device nor system memory!");
570  }
571  } else if (needsResponse) {
572  pkt->makeResponse();
573  }
574 
575  // turn packet around to go back to request port if response expected
576  if (needsResponse || pkt->isResponse()) {
577  DPRINTF(RubyPort, "Sending packet back over port\n");
578  // Send a response in the same cycle. There is no need to delay the
579  // response because the response latency is already incurred in the
580  // Ruby protocol.
581  schedTimingResp(pkt, curTick());
582  } else {
583  delete pkt;
584  }
585 
586  DPRINTF(RubyPort, "Hit callback done!\n");
587 }
588 
591 {
592  // at the moment the assumption is that the request port does not care
593  AddrRangeList ranges;
594  RubyPort *ruby_port = static_cast<RubyPort *>(&owner);
595 
596  for (size_t i = 0; i < ruby_port->request_ports.size(); ++i) {
597  ranges.splice(ranges.begin(),
598  ruby_port->request_ports[i]->getAddrRanges());
599  }
600  for (const auto M5_VAR_USED &r : ranges)
601  DPRINTF(RubyPort, "%s\n", r.to_string());
602  return ranges;
603 }
604 
605 bool
607 {
608  RubyPort *ruby_port = static_cast<RubyPort *>(&owner);
609  return ruby_port->system->isMemAddr(pkt->getAddr())
610  || ruby_port->system->isDeviceMemAddr(pkt);
611 }
612 
613 void
615 {
616  DPRINTF(RubyPort, "Sending invalidations.\n");
617  // Allocate the invalidate request and packet on the stack, as it is
618  // assumed they will not be modified or deleted by receivers.
619  // TODO: should this really be using funcRequestorId?
620  auto request = std::make_shared<Request>(
621  address, RubySystem::getBlockSizeBytes(), 0,
623 
624  // Use a single packet to signal all snooping ports of the invalidation.
625  // This assumes that snooping ports do NOT modify the packet/request
626  Packet pkt(request, MemCmd::InvalidateReq);
627  for (CpuPortIter p = response_ports.begin(); p != response_ports.end();
628  ++p) {
629  // check if the connected request port is snooping
630  if ((*p)->isSnooping()) {
631  // send as a snoop request
632  (*p)->sendTimingSnoopReq(&pkt);
633  }
634  }
635 }
636 
637 void
639 {
640  RubyPort &r = static_cast<RubyPort &>(owner);
641  r.gotAddrRanges--;
642  if (r.gotAddrRanges == 0 && FullSystem) {
643  r.pioResponsePort.sendRangeChange();
644  }
645 }
646 
647 int
649 {
650  int num_written = 0;
651  for (auto port : response_ports) {
652  if (port->trySatisfyFunctional(func_pkt)) {
653  num_written += 1;
654  }
655  }
656  return num_written;
657 }
fatal
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:183
RubyPort::MemResponsePort::recvAtomic
Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the peer.
Definition: RubyPort.cc:310
Packet::isResponse
bool isResponse() const
Definition: packet.hh:560
RubyPort::isDeadlockEventScheduled
virtual bool isDeadlockEventScheduled() const =0
RubyPort::ruby_hit_callback
void ruby_hit_callback(PacketPtr pkt)
Definition: RubyPort.cc:432
RubyPort::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: RubyPort.cc:85
system.hh
Packet::cacheResponding
bool cacheResponding() const
Definition: packet.hh:619
RubySystem::getBlockSizeBytes
static uint32_t getBlockSizeBytes()
Definition: RubySystem.hh:62
AbstractController::recvAtomic
Tick recvAtomic(PacketPtr pkt)
Definition: AbstractController.cc:347
Packet::getAddr
Addr getAddr() const
Definition: packet.hh:754
makeLineAddress
Addr makeLineAddress(Addr addr)
Definition: Address.cc:54
Packet::convertLlToRead
void convertLlToRead()
When ruby is in use, Ruby will monitor the cache line and the phys memory should treat LL ops as norm...
Definition: packet.hh:812
RubyPort::Params
RubyPortParams Params
Definition: RubyPort.hh:146
warn_once
#define warn_once(...)
Definition: logging.hh:243
ArmISA::i
Bitfield< 7 > i
Definition: miscregs_types.hh:63
RubyPort::PioRequestPort::recvTimingResp
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
Definition: RubyPort.cc:160
AbstractController::getMandatoryQueue
virtual MessageBuffer * getMandatoryQueue() const =0
RubyPort::MemResponsePort::addToRetryList
void addToRetryList()
Definition: RubyPort.cc:355
RubyPort::PioResponsePort::recvAtomic
Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the peer.
Definition: RubyPort.cc:218
RubyPort::PioResponsePort::recvTimingReq
bool recvTimingReq(PacketPtr pkt)
Receive a timing request from the peer.
Definition: RubyPort.cc:197
RubyPort::testDrainComplete
void testDrainComplete()
Definition: RubyPort.cc:481
Packet::isRead
bool isRead() const
Definition: packet.hh:556
RubyPort::RubyPort
RubyPort(const Params *p)
Definition: RubyPort.cc:54
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
AbstractController::mapAddressToMachine
MachineID mapAddressToMachine(Addr addr, MachineType mtype) const
Map an address to the correct MachineID.
Definition: AbstractController.cc:353
AbstractController.hh
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:237
RubyPort::drain
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: RubyPort.cc:495
Packet::req
RequestPtr req
A pointer to the original request.
Definition: packet.hh:340
Packet::isLLSC
bool isLLSC() const
Definition: packet.hh:582
Packet::requestorId
RequestorID requestorId() const
Definition: packet.hh:740
std::vector
STL vector class.
Definition: stl.hh:37
FullSystem
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
Definition: root.cc:132
Packet::getSize
unsigned getSize() const
Definition: packet.hh:764
AbstractController
Definition: AbstractController.hh:74
RubyPort::MemResponsePort::recvFunctional
void recvFunctional(PacketPtr pkt)
Receive a functional request packet from the peer.
Definition: RubyPort.cc:370
RubyPort::getPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition: RubyPort.cc:92
Packet::isRequest
bool isRequest() const
Definition: packet.hh:559
RubyPort::PioResponsePort::getAddrRanges
AddrRangeList getAddrRanges() const
Get a list of the non-overlapping address ranges the owner is responsible for.
Definition: RubyPort.cc:590
RubyPort::onRetryList
bool onRetryList(MemResponsePort *port)
Definition: RubyPort.hh:198
QueuedResponsePort::schedTimingResp
void schedTimingResp(PacketPtr pkt, Tick when)
Schedule the sending of a timing response.
Definition: qport.hh:90
Packet::convertScToWrite
void convertScToWrite()
It has been determined that the SC packet should successfully update memory.
Definition: packet.hh:800
RubyPort::MemRequestPort::MemRequestPort
MemRequestPort(const std::string &_name, RubyPort *_port)
Definition: RubyPort.cc:139
RubyPort::makeRequest
virtual RequestStatus makeRequest(PacketPtr pkt)=0
MachineID
Definition: MachineID.hh:38
QueuedRequestPort::schedTimingReq
void schedTimingReq(PacketPtr pkt, Tick when)
Schedule the sending of a timing request.
Definition: qport.hh:146
ClockedObject
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Definition: clocked_object.hh:231
RubyPort::m_mandatory_q_ptr
MessageBuffer * m_mandatory_q_ptr
Definition: RubyPort.hh:191
DrainState::Drained
@ Drained
Buffers drained, ready for serialization/handover.
RubyPort::m_controller
AbstractController * m_controller
Definition: RubyPort.hh:190
DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:71
X86ISA::system
Bitfield< 15 > system
Definition: misc.hh:997
RubyPort::response_ports
std::vector< MemResponsePort * > response_ports
Definition: RubyPort.hh:195
RubyPort::MemResponsePort
Definition: RubyPort.hh:75
ArmISA::ss
Bitfield< 21 > ss
Definition: miscregs_types.hh:56
AbstractMemory::access
void access(PacketPtr pkt)
Perform an untimed memory access and update all the state (e.g.
Definition: abstract_mem.cc:373
QueuedRequestPort
The QueuedRequestPort combines two queues, a request queue and a snoop response queue,...
Definition: qport.hh:106
SimObject::getPort
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
Definition: sim_object.cc:123
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:234
SenderState
RubyTester::SenderState SenderState
Definition: Check.cc:37
RubySystem
Definition: RubySystem.hh:52
Packet::cmdString
const std::string & cmdString() const
Return the string name of the cmd field (for debugging and tracing).
Definition: packet.hh:551
RubyPort
Definition: RubyPort.hh:58
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
Packet::needsResponse
bool needsResponse() const
Definition: packet.hh:570
MipsISA::r
r
Definition: pra_constants.hh:95
RubyTester.hh
RubyPort::MemResponsePort::MemResponsePort
MemResponsePort(const std::string &_name, RubyPort *_port, bool _access_backing_store, PortID id, bool _no_retry_on_stall)
Definition: RubyPort.cc:148
Packet::suppressFuncError
bool suppressFuncError() const
Definition: packet.hh:718
System::bypassCaches
bool bypassCaches() const
Should caches be bypassed?
Definition: system.hh:279
Drainable::signalDrainDone
void signalDrainDone() const
Signal that an object is drained.
Definition: drain.hh:301
QueuedResponsePort
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
Definition: qport.hh:58
RubyPort::PioRequestPort
Definition: RubyPort.hh:105
RubyPort::memRequestPort
MemRequestPort memRequestPort
Definition: RubyPort.hh:211
RubyPort::system
System * system
Definition: RubyPort.hh:193
RubyPort::memResponsePort
MemResponsePort memResponsePort
Definition: RubyPort.hh:212
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
Port::name
const std::string name() const
Return port name (for DPRINTF).
Definition: port.hh:106
Packet::makeResponse
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
Definition: packet.hh:1004
name
const std::string & name()
Definition: trace.cc:50
Packet::htmTransactionFailedInCache
bool htmTransactionFailedInCache() const
Returns whether or not this packet/request has returned from the cache hierarchy in a failed transact...
Definition: packet.cc:524
Clocked::clockPeriod
Tick clockPeriod() const
Definition: clocked_object.hh:214
full_system.hh
RubyPort::functionalWrite
virtual int functionalWrite(Packet *func_pkt)
Definition: RubyPort.cc:648
RubyPort::PioResponsePort::PioResponsePort
PioResponsePort(const std::string &_name, RubyPort *_port)
Definition: RubyPort.cc:132
Drainable::drainState
DrainState drainState() const
Return the current drain state of an object.
Definition: drain.hh:320
Request::funcRequestorId
@ funcRequestorId
This requestor id is used for functional requests that don't come from a particular device.
Definition: request.hh:248
RubyPort::pioRequestPort
PioRequestPort pioRequestPort
Definition: RubyPort.hh:209
SimObject::name
virtual const std::string name() const
Definition: sim_object.hh:133
RubyPort::addToRetryList
void addToRetryList(MemResponsePort *port)
Definition: RubyPort.hh:203
RubyPort::MemRequestPort::recvTimingResp
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
Definition: RubyPort.cc:171
Packet::cmd
MemCmd cmd
The command field of the packet.
Definition: packet.hh:335
Packet::pushSenderState
void pushSenderState(SenderState *sender_state)
Push a new sender state to the packet and make the current sender state the predecessor of the new on...
Definition: packet.cc:332
System::isDeviceMemAddr
bool isDeviceMemAddr(PacketPtr pkt) const
Similar to isMemAddr but for devices.
Definition: system.cc:431
RubyPort::PioRequestPort::recvRangeChange
void recvRangeChange()
Called to receive an address range change from the peer response port.
Definition: RubyPort.cc:638
Clocked::ticksToCycles
Cycles ticksToCycles(Tick t) const
Definition: clocked_object.hh:219
MemCmd::MemSyncReq
@ MemSyncReq
Definition: packet.hh:115
RubyPort::retryList
std::vector< MemResponsePort * > retryList
Definition: RubyPort.hh:223
RubyPort::request_ports
std::vector< PioRequestPort * > request_ports
Definition: RubyPort.hh:217
RubyPort::descheduleDeadlockEvent
virtual void descheduleDeadlockEvent()=0
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
Packet::popSenderState
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
Definition: packet.cc:340
RubyPort::SenderState::port
MemResponsePort * port
Definition: RubyPort.hh:141
getOffset
Addr getOffset(Addr addr)
Definition: Address.cc:48
RubyPort::MemResponsePort::hitCallback
void hitCallback(PacketPtr pkt)
Definition: RubyPort.cc:515
Port::isConnected
bool isConnected() const
Is this port currently connected to a peer?
Definition: port.hh:128
MemCmd::InvalidateReq
@ InvalidateReq
Definition: packet.hh:133
ArmISA::rs
Bitfield< 9, 8 > rs
Definition: miscregs_types.hh:372
Packet::isWrite
bool isWrite() const
Definition: packet.hh:557
RubyPort::PioRequestPort::PioRequestPort
PioRequestPort(const std::string &_name, RubyPort *_port)
Definition: RubyPort.cc:124
RubyPort::pioResponsePort
PioResponsePort pioResponsePort
Definition: RubyPort.hh:210
RubyPort::outstandingCount
virtual int outstandingCount() const =0
System::getDeviceMemory
AbstractMemory * getDeviceMemory(RequestorID _id) const
Return a pointer to the device memory.
Definition: system.cc:440
Packet::isFlush
bool isFlush() const
Definition: packet.hh:585
RequestPort::sendAtomic
Tick sendAtomic(PacketPtr pkt)
Send an atomic request packet, where the data is moved and the state is updated in zero time,...
Definition: port.hh:461
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
std::list< AddrRange >
RubyPort::trySendRetries
void trySendRetries()
Definition: RubyPort.cc:455
MipsISA::l
Bitfield< 5 > l
Definition: pra_constants.hh:320
RubyPort::MemResponsePort::isPhysMemAddress
bool isPhysMemAddress(PacketPtr pkt) const
Definition: RubyPort.cc:606
RubyPort.hh
RubyPort::m_ruby_system
RubySystem * m_ruby_system
Definition: RubyPort.hh:188
RubyPort::m_version
uint32_t m_version
Definition: RubyPort.hh:189
System::isMemAddr
bool isMemAddr(Addr addr) const
Check if a physical address is within a range of a memory that is part of the global address map.
Definition: system.cc:417
Packet::setFunctionalResponseStatus
void setFunctionalResponseStatus(bool success)
Definition: packet.hh:1028
RubyPort::SenderState
Definition: RubyPort.hh:139
csprintf
std::string csprintf(const char *format, const Args &...args)
Definition: cprintf.hh:158
RubyPort::CpuPortIter
std::vector< MemResponsePort * >::iterator CpuPortIter
Vector of M5 Ports attached to this Ruby port.
Definition: RubyPort.hh:216
RubyPort::ruby_eviction_callback
void ruby_eviction_callback(Addr address)
Definition: RubyPort.cc:614
DrainState::Draining
@ Draining
Draining buffers pending serialization/handover.
ArmISA::id
Bitfield< 33 > id
Definition: miscregs_types.hh:247
RubyPort::MemResponsePort::recvTimingReq
bool recvTimingReq(PacketPtr pkt)
Receive a timing request from the peer.
Definition: RubyPort.cc:238
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
simple_mem.hh
curTick
Tick curTick()
The current simulated tick.
Definition: core.hh:45

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