gem5  v22.1.0.0
tlm_to_gem5.cc
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Google, Inc.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met: redistributions of source code must retain the above copyright
7  * notice, this list of conditions and the following disclaimer;
8  * redistributions in binary form must reproduce the above copyright
9  * notice, this list of conditions and the following disclaimer in the
10  * documentation and/or other materials provided with the distribution;
11  * neither the name of the copyright holders nor the names of its
12  * contributors may be used to endorse or promote products derived from
13  * this software without specific prior written permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  * Copyright (c) 2016, Dresden University of Technology (TU Dresden)
28  * All rights reserved.
29  *
30  * Redistribution and use in source and binary forms, with or without
31  * modification, are permitted provided that the following conditions are
32  * met:
33  *
34  * 1. Redistributions of source code must retain the above copyright notice,
35  * this list of conditions and the following disclaimer.
36  *
37  * 2. Redistributions in binary form must reproduce the above copyright
38  * notice, this list of conditions and the following disclaimer in the
39  * documentation and/or other materials provided with the distribution.
40  *
41  * 3. Neither the name of the copyright holder nor the names of its
42  * contributors may be used to endorse or promote products derived from
43  * this software without specific prior written permission.
44  *
45  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
46  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
47  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
48  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
49  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
50  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
51  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
52  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
53  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
54  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
55  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56  */
57 
59 
60 #include <utility>
61 
62 #include "base/trace.hh"
63 #include "debug/TlmBridge.hh"
64 #include "params/TlmToGem5Bridge128.hh"
65 #include "params/TlmToGem5Bridge256.hh"
66 #include "params/TlmToGem5Bridge32.hh"
67 #include "params/TlmToGem5Bridge512.hh"
68 #include "params/TlmToGem5Bridge64.hh"
69 #include "sim/core.hh"
70 #include "sim/system.hh"
73 
74 using namespace gem5;
75 
76 namespace sc_gem5
77 {
78 
79 namespace
80 {
84 std::vector<PayloadToPacketConversionStep> extraPayloadToPacketSteps;
85 } // namespace
86 
95 void
97 {
98  extraPayloadToPacketSteps.push_back(std::move(step));
99 }
100 
110 {
111  Gem5SystemC::Gem5Extension *extension = nullptr;
112  trans.get_extension(extension);
113 
114  // If there is an extension, this transaction was initiated by the gem5
115  // world and we can pipe through the original packet. Otherwise, we
116  // generate a new packet based on the transaction.
117  if (extension != nullptr) {
118  auto pkt = extension->getPacket();
119  // Sync the address which could have changed.
120  pkt->setAddr(trans.get_address());
121  // Apply all conversion steps necessary in this specific setup.
122  for (auto &step : extraPayloadToPacketSteps) {
123  step(pkt, trans);
124  }
125  return std::make_pair(pkt, false);
126  }
127 
128  MemCmd cmd;
129  RequestPtr req;
130 
131  Gem5SystemC::AtomicExtension *atomic_ex = nullptr;
132  trans.get_extension(atomic_ex);
133  if (atomic_ex) {
134  cmd = MemCmd::SwapReq;
135  Request::Flags flags = (atomic_ex->isReturnRequired() ?
139  atomic_ex->getAtomicOpFunctor()->clone());
140  // FIXME: correct the context_id and pc state.
141  req = std::make_shared<Request>(
142  trans.get_address(), trans.get_data_length(), flags, _id,
143  0, 0, std::move(amo_op));
144  req->setPaddr(trans.get_address());
145  } else {
146  switch (trans.get_command()) {
148  cmd = MemCmd::ReadReq;
149  break;
151  cmd = MemCmd::WriteReq;
152  break;
154  return std::make_pair(nullptr, false);
155  default:
156  SC_REPORT_FATAL("TlmToGem5Bridge",
157  "received transaction with unsupported "
158  "command");
159  }
161  req = std::make_shared<Request>(
162  trans.get_address(), trans.get_data_length(), flags, _id);
163  }
164 
165 
166  /*
167  * Allocate a new Packet. The packet will be deleted when it returns from
168  * the gem5 world as a response.
169  */
170  auto pkt = new Packet(req, cmd);
171  pkt->dataStatic(trans.get_data_ptr());
172 
173  // Apply all conversion steps necessary in this specific setup.
174  for (auto &step : extraPayloadToPacketSteps) {
175  step(pkt, trans);
176  }
177 
178  return std::make_pair(pkt, true);
179 }
180 
181 void
183 {
184  if (!pkt->isError()) {
186  } else if (pkt->isRead() || pkt->isWrite()) {
188  } else {
190  }
191 }
192 
193 template <unsigned int BITWIDTH>
194 void
196 {
198  auto delay = sc_core::SC_ZERO_TIME;
199 
200  auto status = socket->nb_transport_bw(trans, phase, delay);
202  "Unexpected status after sending END_REQ");
203 }
204 
205 template <unsigned int BITWIDTH>
206 void
208  sc_core::sc_time &delay)
209 {
210  Gem5SystemC::Gem5Extension *extension = nullptr;
211  trans.get_extension(extension);
212  panic_if(extension == nullptr,
213  "Missing gem5 extension when sending BEGIN_RESP");
214  auto pkt = extension->getPacket();
215 
216  setPayloadResponse(trans, pkt);
217 
219 
220  auto status = socket->nb_transport_bw(trans, phase, delay);
221 
222  if (status == tlm::TLM_COMPLETED ||
223  (status == tlm::TLM_UPDATED && phase == tlm::END_RESP)) {
224  // transaction completed -> no need to wait for tlm::END_RESP
225  responseInProgress = false;
226  } else if (status == tlm::TLM_ACCEPTED) {
227  // we need to wait for tlm::END_RESP
228  responseInProgress = true;
229  } else {
230  panic("Unexpected status after sending BEGIN_RESP");
231  }
232 }
233 
234 template <unsigned int BITWIDTH>
235 void
237 {
238  sc_assert(!waitForRetry);
239  sc_assert(pendingRequest == nullptr);
240  sc_assert(pendingPacket == nullptr);
241 
242  trans.acquire();
243 
244  auto res = payload2packet(_id, trans);
245  auto pkt = res.first;
246  pkt->pushSenderState(new Gem5SystemC::TlmSenderState(trans));
247 
248  // If the packet doesn't need a response, we should send BEGIN_RESP by
249  // ourselves.
250  bool needsResponse = pkt->needsResponse();
251  if (bmp.sendTimingReq(pkt)) { // port is free -> send END_REQ immediately
252  sendEndReq(trans);
253  if (!needsResponse) {
254  auto delay = sc_core::SC_ZERO_TIME;
255  sendBeginResp(trans, delay);
256  }
257  trans.release();
258  } else { // port is blocked -> wait for retry before sending END_REQ
259  waitForRetry = true;
260  pendingRequest = &trans;
261  pendingPacket = pkt;
262  }
263 }
264 
265 template <unsigned int BITWIDTH>
266 void
268 {
269  sc_assert(responseInProgress);
270 
271  responseInProgress = false;
272 
273  if (needToSendRetry) {
274  bmp.sendRetryResp();
275  needToSendRetry = false;
276  }
277 }
278 
279 template <unsigned int BITWIDTH>
280 void
282 {
283  delete pkt;
284 }
285 
286 template <unsigned int BITWIDTH>
287 void
289 {
290  socket->invalidate_direct_mem_ptr(
291  backdoor.range().start(), backdoor.range().end());
292  requestedBackdoors.erase(const_cast<gem5::MemBackdoorPtr>(&backdoor));
293 }
294 
295 template <unsigned int BITWIDTH>
296 void
298  const tlm::tlm_phase &phase)
299 {
300  switch (phase) {
301  case tlm::BEGIN_REQ:
302  handleBeginReq(trans);
303  break;
304  case tlm::END_RESP:
305  handleEndResp(trans);
306  break;
307  default:
308  panic("unimplemented phase in callback");
309  }
310 }
311 
312 template <unsigned int BITWIDTH>
316  sc_core::sc_time &delay)
317 {
318  unsigned len = trans.get_data_length();
319  unsigned char *byteEnable = trans.get_byte_enable_ptr();
320  unsigned width = trans.get_streaming_width();
321 
322  // check the transaction attributes for unsupported features ...
323  if (byteEnable != 0) {
325  return tlm::TLM_COMPLETED;
326  }
327  if (width < len) { // is this a burst request?
329  return tlm::TLM_COMPLETED;
330  }
331 
332  // ... and queue the valid transaction
333  trans.acquire();
334  peq.notify(trans, phase, delay);
335  return tlm::TLM_ACCEPTED;
336 }
337 
338 template <unsigned int BITWIDTH>
339 void
342 {
343  auto [pkt, pkt_created] = payload2packet(_id, trans);
344  pkt->pushSenderState(new Gem5SystemC::TlmSenderState(trans));
345 
346  MemBackdoorPtr backdoor = nullptr;
347  Tick ticks = bmp.sendAtomicBackdoor(pkt, backdoor);
348  if (backdoor)
349  trans.set_dmi_allowed(true);
350 
351  // send an atomic request to gem5
352  panic_if(pkt->needsResponse() && !pkt->isResponse(),
353  "Packet sending failed!\n");
354 
355  auto delay =
356  sc_core::sc_time((double)(ticks / sim_clock::as_int::ps),
358 
359  // update time
360  t += delay;
361 
362  gem5::Packet::SenderState *senderState = pkt->popSenderState();
363  sc_assert(
364  nullptr != dynamic_cast<Gem5SystemC::TlmSenderState*>(senderState));
365 
366  // clean up
367  delete senderState;
368 
369  setPayloadResponse(trans, pkt);
370 
371  if (pkt_created)
372  destroyPacket(pkt);
373 }
374 
375 template <unsigned int BITWIDTH>
376 unsigned int
378 {
379  auto [pkt, pkt_created] = payload2packet(_id, trans);
380  if (pkt != nullptr) {
381  pkt->pushSenderState(new Gem5SystemC::TlmSenderState(trans));
382 
383  bmp.sendFunctional(pkt);
384 
385  gem5::Packet::SenderState *senderState = pkt->popSenderState();
386  sc_assert(
387  nullptr != dynamic_cast<Gem5SystemC::TlmSenderState*>(senderState));
388 
389  // clean up
390  delete senderState;
391 
392  if (pkt_created)
393  destroyPacket(pkt);
394  }
395 
396  return trans.get_data_length();
397 }
398 
399 template <unsigned int BITWIDTH>
400 bool
402  tlm::tlm_dmi &dmi_data)
403 {
404  auto [pkt, pkt_created] = payload2packet(_id, trans);
405  pkt->pushSenderState(new Gem5SystemC::TlmSenderState(trans));
406  if (pkt_created)
407  pkt->req->setFlags(Request::NO_ACCESS);
408 
409  MemBackdoorPtr backdoor = nullptr;
410  bmp.sendAtomicBackdoor(pkt, backdoor);
411  if (backdoor) {
412  trans.set_dmi_allowed(true);
413  dmi_data.set_dmi_ptr(backdoor->ptr());
414  dmi_data.set_start_address(backdoor->range().start());
415  dmi_data.set_end_address(backdoor->range().end());
416 
417  typedef tlm::tlm_dmi::dmi_access_e access_t;
418  access_t access = tlm::tlm_dmi::DMI_ACCESS_NONE;
419  if (backdoor->readable())
420  access = (access_t)(access | tlm::tlm_dmi::DMI_ACCESS_READ);
421  if (backdoor->writeable())
422  access = (access_t)(access | tlm::tlm_dmi::DMI_ACCESS_WRITE);
423  dmi_data.set_granted_access(access);
424 
425  // We only need to register the callback at the first time.
426  if (requestedBackdoors.find(backdoor) == requestedBackdoors.end()) {
427  backdoor->addInvalidationCallback(
428  [this](const MemBackdoor &backdoor)
429  {
430  invalidateDmi(backdoor);
431  }
432  );
433  requestedBackdoors.emplace(backdoor);
434  }
435  }
436 
437  gem5::Packet::SenderState *senderState = pkt->popSenderState();
438  sc_assert(
439  nullptr != dynamic_cast<Gem5SystemC::TlmSenderState*>(senderState));
440 
441  // clean up
442  delete senderState;
443 
444  setPayloadResponse(trans, pkt);
445 
446  if (pkt_created)
447  destroyPacket(pkt);
448 
449  return backdoor != nullptr;
450 }
451 
452 template <unsigned int BITWIDTH>
453 bool
455 {
456  // exclusion rule
457  // We need to Wait for END_RESP before sending next BEGIN_RESP
458  if (responseInProgress) {
459  sc_assert(!needToSendRetry);
460  needToSendRetry = true;
461  return false;
462  }
463 
464  sc_assert(pkt->isResponse());
465 
466  /*
467  * Pay for annotated transport delays.
468  *
469  * See recvTimingReq in sc_slave_port.cc for a detailed description.
470  */
471  auto delay = sc_core::sc_time::from_value(pkt->payloadDelay);
472  // reset the delays
473  pkt->payloadDelay = 0;
474  pkt->headerDelay = 0;
475 
476  auto *tlmSenderState =
477  dynamic_cast<Gem5SystemC::TlmSenderState*>(pkt->popSenderState());
478  sc_assert(tlmSenderState != nullptr);
479 
480  auto &trans = tlmSenderState->trans;
481 
482  Gem5SystemC::Gem5Extension *extension = nullptr;
483  trans.get_extension(extension);
484 
485  // clean up
486  delete tlmSenderState;
487 
488  // If there is an extension the packet was piped through and we must not
489  // delete it. The packet travels back with the transaction.
490  if (extension == nullptr)
491  destroyPacket(pkt);
492 
493  sendBeginResp(trans, delay);
494  trans.release();
495 
496  return true;
497 }
498 
499 template <unsigned int BITWIDTH>
500 void
502 {
503  sc_assert(waitForRetry);
504  sc_assert(pendingRequest != nullptr);
505  sc_assert(pendingPacket != nullptr);
506 
507  // If the packet doesn't need a response, we should send BEGIN_RESP by
508  // ourselves.
509  bool needsResponse = pendingPacket->needsResponse();
510  if (bmp.sendTimingReq(pendingPacket)) {
511  waitForRetry = false;
512  pendingPacket = nullptr;
513 
514  auto &trans = *pendingRequest;
515  sendEndReq(trans);
516  if (!needsResponse) {
517  auto delay = sc_core::SC_ZERO_TIME;
518  sendBeginResp(trans, delay);
519  }
520  trans.release();
521 
522  pendingRequest = nullptr;
523  }
524 }
525 
526 template <unsigned int BITWIDTH>
527 void
529 {
530  DPRINTF(TlmBridge,
531  "received address range change but ignored it");
532 }
533 
534 template <unsigned int BITWIDTH>
535 gem5::Port &
536 TlmToGem5Bridge<BITWIDTH>::gem5_getPort(const std::string &if_name, int idx)
537 {
538  if (if_name == "gem5")
539  return bmp;
540  else if (if_name == "tlm")
541  return wrapper;
542 
543  return sc_core::sc_module::gem5_getPort(if_name, idx);
544 }
545 
546 template <unsigned int BITWIDTH>
548  const Params &params, const sc_core::sc_module_name &mn) :
549  TlmToGem5BridgeBase(mn), peq(this, &TlmToGem5Bridge<BITWIDTH>::peq_cb),
550  waitForRetry(false), pendingRequest(nullptr), pendingPacket(nullptr),
551  needToSendRetry(false), responseInProgress(false),
552  bmp(std::string(name()) + "master", *this), socket("tlm_socket"),
553  wrapper(socket, std::string(name()) + ".tlm", InvalidPortID),
554  system(params.system),
555  _id(params.system->getGlobalRequestorId(
556  std::string("[systemc].") + name()))
557 {
558 }
559 
560 template <unsigned int BITWIDTH>
561 void
563 {
564  /*
565  * Register the TLM non-blocking interface when using gem5 Timing mode and
566  * the TLM blocking interface when using the gem5 Atomic mode.
567  * Then the magic (TM) in simple_target_socket automatically transforms
568  * non-blocking in blocking transactions and vice versa.
569  *
570  * NOTE: The mode may change during execution.
571  */
572  if (system->isTimingMode()) {
573  DPRINTF(TlmBridge, "register non-blocking interface");
574  socket.register_nb_transport_fw(
576  } else if (system->isAtomicMode()) {
577  DPRINTF(TlmBridge, "register blocking interface");
578  socket.register_b_transport(
580  socket.register_get_direct_mem_ptr(
582  } else {
583  panic("gem5 operates neither in Timing nor in Atomic mode");
584  }
585 
586  socket.register_transport_dbg(
588 
590 }
591 
592 } // namespace sc_gem5
593 
595 gem5::TlmToGem5Bridge32Params::create() const
596 {
597  return new sc_gem5::TlmToGem5Bridge<32>(
598  *this, sc_core::sc_module_name(name.c_str()));
599 }
600 
602 gem5::TlmToGem5Bridge64Params::create() const
603 {
604  return new sc_gem5::TlmToGem5Bridge<64>(
605  *this, sc_core::sc_module_name(name.c_str()));
606 }
607 
609 gem5::TlmToGem5Bridge128Params::create() const
610 {
612  *this, sc_core::sc_module_name(name.c_str()));
613 }
614 
616 gem5::TlmToGem5Bridge256Params::create() const
617 {
619  *this, sc_core::sc_module_name(name.c_str()));
620 }
621 
623 gem5::TlmToGem5Bridge512Params::create() const
624 {
626  *this, sc_core::sc_module_name(name.c_str()));
627 }
#define DPRINTF(x,...)
Definition: trace.hh:186
bool isReturnRequired() const
Definition: sc_ext.cc:172
gem5::AtomicOpFunctor * getAtomicOpFunctor() const
Definition: sc_ext.cc:178
gem5::PacketPtr getPacket()
Definition: sc_ext.cc:119
uint8_t * ptr() const
Definition: backdoor.hh:62
bool readable() const
Definition: backdoor.hh:69
const AddrRange & range() const
Definition: backdoor.hh:58
bool writeable() const
Definition: backdoor.hh:79
void addInvalidationCallback(CbFunction func)
Definition: backdoor.hh:103
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
bool isRead() const
Definition: packet.hh:592
bool isError() const
Definition: packet.hh:621
bool isResponse() const
Definition: packet.hh:597
void setAddr(Addr _addr)
Update the address of this packet mid-transaction.
Definition: packet.hh:813
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
Definition: packet.hh:448
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
Definition: packet.hh:430
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
Definition: packet.cc:342
bool isWrite() const
Definition: packet.hh:593
Ports are used to interface objects to each other.
Definition: port.hh:62
@ ATOMIC_RETURN_OP
The request is an atomic that returns data.
Definition: request.hh:175
@ ATOMIC_NO_RETURN_OP
The request is an atomic that does not return data.
Definition: request.hh:177
@ NO_ACCESS
The request should not cause a memory access.
Definition: request.hh:146
virtual void before_end_of_elaboration()
Definition: sc_module.hh:252
virtual gem5::Port & gem5_getPort(const std::string &if_name, int idx=-1)
Definition: sc_module.cc:117
static sc_time from_value(sc_dt::uint64)
Definition: sc_time.cc:210
void before_end_of_elaboration() override
Definition: tlm_to_gem5.cc:562
gem5::TlmToGem5BridgeBaseParams Params
Definition: tlm_to_gem5.hh:167
STL pair class.
Definition: stl.hh:58
STL vector class.
Definition: stl.hh:37
void set_granted_access(dmi_access_e a)
Definition: dmi.hh:86
dmi_access_e
Definition: dmi.hh:37
@ DMI_ACCESS_WRITE
Definition: dmi.hh:40
@ DMI_ACCESS_NONE
Definition: dmi.hh:38
@ DMI_ACCESS_READ
Definition: dmi.hh:39
void set_dmi_ptr(unsigned char *p)
Definition: dmi.hh:81
void set_start_address(sc_dt::uint64 addr)
Definition: dmi.hh:82
void set_end_address(sc_dt::uint64 addr)
Definition: dmi.hh:83
unsigned char * get_data_ptr() const
Definition: gp.hh:188
void set_dmi_allowed(bool dmi_allowed)
Definition: gp.hh:239
void set_response_status(const tlm_response_status response_status)
Definition: gp.hh:204
unsigned char * get_byte_enable_ptr() const
Definition: gp.hh:219
sc_dt::uint64 get_address() const
Definition: gp.hh:184
void get_extension(T *&ext) const
Definition: gp.hh:364
unsigned int get_streaming_width() const
Definition: gp.hh:211
unsigned int get_data_length() const
Definition: gp.hh:192
tlm_command get_command() const
Definition: gp.hh:180
Addr end() const
Get the end address of the range.
Definition: addr_range.hh:350
Addr start() const
Get the start address of the range.
Definition: addr_range.hh:343
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:242
virtual AtomicOpFunctor * clone()=0
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:178
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition: logging.hh:204
uint16_t len
Definition: helpers.cc:62
uint8_t flags
Definition: helpers.cc:66
Bitfield< 4 > width
Definition: misc_types.hh:72
Bitfield< 5, 0 > status
Definition: misc_types.hh:429
Bitfield< 51 > t
Definition: pagetable.hh:56
Bitfield< 15 > system
Definition: misc.hh:1004
ProbePointArg< PacketInfo > Packet
Packet probe point.
Definition: mem.hh:109
Tick ps
picosecond
Definition: core.cc:72
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::shared_ptr< Request > RequestPtr
Definition: request.hh:92
const PortID InvalidPortID
Definition: types.hh:246
uint64_t Tick
Tick count type.
Definition: types.hh:58
uint16_t RequestorID
Definition: request.hh:95
const sc_time SC_ZERO_TIME
Definition: sc_time.cc:290
@ SC_PS
Definition: sc_time.hh:42
void addPayloadToPacketConversionStep(PayloadToPacketConversionStep step)
Notify the Tlm2Gem5 bridge that we need an extra step to properly convert a tlm payload to gem5 packe...
Definition: tlm_to_gem5.cc:96
void setPayloadResponse(tlm::tlm_generic_payload &trans, PacketPtr pkt)
Definition: tlm_to_gem5.cc:182
std::function< void(gem5::PacketPtr pkt, tlm::tlm_generic_payload &trans)> PayloadToPacketConversionStep
Definition: tlm_to_gem5.hh:79
std::pair< PacketPtr, bool > payload2packet(RequestorID _id, tlm::tlm_generic_payload &trans)
Convert a TLM payload to gem5 packet by copying all the relevant information to new packet.
Definition: tlm_to_gem5.cc:109
Overload hash function for BasicBlockRange type.
Definition: misc.hh:2826
@ BEGIN_RESP
Definition: phase.hh:43
@ END_RESP
Definition: phase.hh:44
@ BEGIN_REQ
Definition: phase.hh:41
@ END_REQ
Definition: phase.hh:42
@ TLM_READ_COMMAND
Definition: gp.hh:84
@ TLM_IGNORE_COMMAND
Definition: gp.hh:86
@ TLM_WRITE_COMMAND
Definition: gp.hh:85
@ TLM_ADDRESS_ERROR_RESPONSE
Definition: gp.hh:94
@ TLM_OK_RESPONSE
Definition: gp.hh:91
@ TLM_BURST_ERROR_RESPONSE
Definition: gp.hh:96
@ TLM_BYTE_ENABLE_ERROR_RESPONSE
Definition: gp.hh:97
@ TLM_COMMAND_ERROR_RESPONSE
Definition: gp.hh:95
tlm_sync_enum
Definition: fw_bw_ifs.hh:31
@ TLM_COMPLETED
Definition: fw_bw_ifs.hh:31
@ TLM_ACCEPTED
Definition: fw_bw_ifs.hh:31
@ TLM_UPDATED
Definition: fw_bw_ifs.hh:31
#define SC_REPORT_FATAL(msg_type, msg)
#define sc_assert(expr)
A virtual base opaque structure used to hold state associated with the packet (e.g....
Definition: packet.hh:468
const std::string & name()
Definition: trace.cc:49

Generated on Wed Dec 21 2022 10:22:50 for gem5 by doxygen 1.9.1