gem5 v23.0.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
74using namespace gem5;
75
76namespace sc_gem5
77{
78
79namespace
80{
84std::vector<PayloadToPacketConversionStep> extraPayloadToPacketSteps;
85} // namespace
86
95void
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
181void
183{
184 if (!pkt->isError()) {
186 } else if (pkt->isRead() || pkt->isWrite()) {
188 } else {
190 }
191}
192
193template <unsigned int BITWIDTH>
194void
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
205template <unsigned int BITWIDTH>
206void
208 sc_core::sc_time &delay)
209{
211 switch (trans.get_command()) {
214 break;
217 break;
218 default:
219 panic("TlmToGem5Bridge: "
220 "received transaction with unsupported command");
221 }
222 Addr start_addr = trans.get_address();
223 Addr length = trans.get_data_length();
224
225 MemBackdoorReq req({start_addr, start_addr + length}, flags);
226 MemBackdoorPtr backdoor = nullptr;
227
228 bmp.sendMemBackdoorReq(req, backdoor);
229
230 if (backdoor)
231 trans.set_dmi_allowed(true);
232
234
235 auto status = socket->nb_transport_bw(trans, phase, delay);
236
237 if (status == tlm::TLM_COMPLETED ||
238 (status == tlm::TLM_UPDATED && phase == tlm::END_RESP)) {
239 // transaction completed -> no need to wait for tlm::END_RESP
240 responseInProgress = false;
241 } else if (status == tlm::TLM_ACCEPTED) {
242 // we need to wait for tlm::END_RESP
243 responseInProgress = true;
244 } else {
245 panic("Unexpected status after sending BEGIN_RESP");
246 }
247}
248
249template <unsigned int BITWIDTH>
250void
252{
253 sc_assert(!waitForRetry);
254 sc_assert(pendingRequest == nullptr);
255 sc_assert(pendingPacket == nullptr);
256
257 trans.acquire();
258
259 auto res = payload2packet(_id, trans);
260 auto pkt = res.first;
261 pkt->pushSenderState(new Gem5SystemC::TlmSenderState(trans));
262
263 // If the packet doesn't need a response, we should send BEGIN_RESP by
264 // ourselves.
265 bool needsResponse = pkt->needsResponse();
266 if (bmp.sendTimingReq(pkt)) { // port is free -> send END_REQ immediately
267 sendEndReq(trans);
268 if (!needsResponse) {
269 auto delay = sc_core::SC_ZERO_TIME;
270 setPayloadResponse(trans, pkt);
271 sendBeginResp(trans, delay);
272 }
273 trans.release();
274 } else { // port is blocked -> wait for retry before sending END_REQ
275 waitForRetry = true;
276 pendingRequest = &trans;
277 pendingPacket = pkt;
278 }
279}
280
281template <unsigned int BITWIDTH>
282void
284{
285 sc_assert(responseInProgress);
286
287 responseInProgress = false;
288
289 if (needToSendRetry) {
290 bmp.sendRetryResp();
291 needToSendRetry = false;
292 }
293}
294
295template <unsigned int BITWIDTH>
296void
298{
299 delete pkt;
300}
301
302template <unsigned int BITWIDTH>
303void
305{
306 socket->invalidate_direct_mem_ptr(
307 backdoor.range().start(), backdoor.range().end());
308 requestedBackdoors.erase(const_cast<gem5::MemBackdoorPtr>(&backdoor));
309}
310
311template <unsigned int BITWIDTH>
312void
314 const tlm::tlm_phase &phase)
315{
316 switch (phase) {
317 case tlm::BEGIN_REQ:
318 handleBeginReq(trans);
319 break;
320 case tlm::END_RESP:
321 handleEndResp(trans);
322 break;
323 default:
324 panic("unimplemented phase in callback");
325 }
326}
327
328template <unsigned int BITWIDTH>
332 sc_core::sc_time &delay)
333{
334 unsigned len = trans.get_data_length();
335 unsigned char *byteEnable = trans.get_byte_enable_ptr();
336 unsigned width = trans.get_streaming_width();
337
338 // check the transaction attributes for unsupported features ...
339 if (byteEnable != 0) {
341 return tlm::TLM_COMPLETED;
342 }
343 if (width < len) { // is this a burst request?
345 return tlm::TLM_COMPLETED;
346 }
347
348 // ... and queue the valid transaction
349 trans.acquire();
350 peq.notify(trans, phase, delay);
351 return tlm::TLM_ACCEPTED;
352}
353
354template <unsigned int BITWIDTH>
355void
358{
359 auto [pkt, pkt_created] = payload2packet(_id, trans);
360 pkt->pushSenderState(new Gem5SystemC::TlmSenderState(trans));
361
362 MemBackdoorPtr backdoor = nullptr;
363 Tick ticks = bmp.sendAtomicBackdoor(pkt, backdoor);
364 if (backdoor)
365 trans.set_dmi_allowed(true);
366
367 // send an atomic request to gem5
368 panic_if(pkt->needsResponse() && !pkt->isResponse(),
369 "Packet sending failed!\n");
370
371 auto delay =
372 sc_core::sc_time((double)(ticks / sim_clock::as_int::ps),
374
375 // update time
376 t += delay;
377
378 gem5::Packet::SenderState *senderState = pkt->popSenderState();
379 sc_assert(
380 nullptr != dynamic_cast<Gem5SystemC::TlmSenderState*>(senderState));
381
382 // clean up
383 delete senderState;
384
385 setPayloadResponse(trans, pkt);
386
387 if (pkt_created)
388 destroyPacket(pkt);
389}
390
391template <unsigned int BITWIDTH>
392unsigned int
394{
395 auto [pkt, pkt_created] = payload2packet(_id, trans);
396 if (pkt != nullptr) {
397 pkt->pushSenderState(new Gem5SystemC::TlmSenderState(trans));
398
399 bmp.sendFunctional(pkt);
400
401 gem5::Packet::SenderState *senderState = pkt->popSenderState();
402 sc_assert(
403 nullptr != dynamic_cast<Gem5SystemC::TlmSenderState*>(senderState));
404
405 // clean up
406 delete senderState;
407
408 if (pkt_created)
409 destroyPacket(pkt);
410 }
411
412 return trans.get_data_length();
413}
414
415template <unsigned int BITWIDTH>
416bool
418 tlm::tlm_dmi &dmi_data)
419{
421 switch (trans.get_command()) {
424 break;
427 break;
428 default:
429 panic("TlmToGem5Bridge: "
430 "received transaction with unsupported command");
431 }
432 Addr start_addr = trans.get_address();
433 Addr length = trans.get_data_length();
434
435 MemBackdoorReq req({start_addr, start_addr + length}, flags);
436 MemBackdoorPtr backdoor = nullptr;
437
438 bmp.sendMemBackdoorReq(req, backdoor);
439
440 if (backdoor) {
441 trans.set_dmi_allowed(true);
442 dmi_data.set_dmi_ptr(backdoor->ptr());
443 dmi_data.set_start_address(backdoor->range().start());
444 dmi_data.set_end_address(backdoor->range().end());
445
446 typedef tlm::tlm_dmi::dmi_access_e access_t;
447 access_t access = tlm::tlm_dmi::DMI_ACCESS_NONE;
448 if (backdoor->readable())
449 access = (access_t)(access | tlm::tlm_dmi::DMI_ACCESS_READ);
450 if (backdoor->writeable())
451 access = (access_t)(access | tlm::tlm_dmi::DMI_ACCESS_WRITE);
452 dmi_data.set_granted_access(access);
453
454 // We only need to register the callback at the first time.
455 if (requestedBackdoors.find(backdoor) == requestedBackdoors.end()) {
456 backdoor->addInvalidationCallback(
457 [this](const MemBackdoor &backdoor)
458 {
459 invalidateDmi(backdoor);
460 }
461 );
462 requestedBackdoors.emplace(backdoor);
463 }
464 }
465
467
468 return backdoor != nullptr;
469}
470
471template <unsigned int BITWIDTH>
472bool
474{
475 // exclusion rule
476 // We need to Wait for END_RESP before sending next BEGIN_RESP
477 if (responseInProgress) {
478 sc_assert(!needToSendRetry);
479 needToSendRetry = true;
480 return false;
481 }
482
483 sc_assert(pkt->isResponse());
484
485 /*
486 * Pay for annotated transport delays.
487 *
488 * See recvTimingReq in sc_slave_port.cc for a detailed description.
489 */
491 // reset the delays
492 pkt->payloadDelay = 0;
493 pkt->headerDelay = 0;
494
495 auto *tlmSenderState =
496 dynamic_cast<Gem5SystemC::TlmSenderState*>(pkt->popSenderState());
497 sc_assert(tlmSenderState != nullptr);
498
499 auto &trans = tlmSenderState->trans;
500 setPayloadResponse(trans, pkt);
501 sendBeginResp(trans, delay);
502
503 Gem5SystemC::Gem5Extension *extension = nullptr;
504 trans.get_extension(extension);
505
506 // clean up
507 delete tlmSenderState;
508
509 // If there is an extension the packet was piped through and we must not
510 // delete it. The packet travels back with the transaction.
511 if (extension == nullptr)
512 destroyPacket(pkt);
513
514 trans.release();
515
516 return true;
517}
518
519template <unsigned int BITWIDTH>
520void
522{
523 sc_assert(waitForRetry);
524 sc_assert(pendingRequest != nullptr);
525 sc_assert(pendingPacket != nullptr);
526
527 // If the packet doesn't need a response, we should send BEGIN_RESP by
528 // ourselves.
529 bool needsResponse = pendingPacket->needsResponse();
530 if (bmp.sendTimingReq(pendingPacket)) {
531 waitForRetry = false;
532
533 auto &trans = *pendingRequest;
534 sendEndReq(trans);
535 if (!needsResponse) {
536 auto delay = sc_core::SC_ZERO_TIME;
537 setPayloadResponse(trans, pendingPacket);
538 sendBeginResp(trans, delay);
539 }
540 trans.release();
541
542 pendingRequest = nullptr;
543 }
544}
545
546template <unsigned int BITWIDTH>
547void
549{
550 DPRINTF(TlmBridge,
551 "received address range change but ignored it");
552}
553
554template <unsigned int BITWIDTH>
556TlmToGem5Bridge<BITWIDTH>::gem5_getPort(const std::string &if_name, int idx)
557{
558 if (if_name == "gem5")
559 return bmp;
560 else if (if_name == "tlm")
561 return wrapper;
562
563 return sc_core::sc_module::gem5_getPort(if_name, idx);
564}
565
566template <unsigned int BITWIDTH>
568 const Params &params, const sc_core::sc_module_name &mn) :
569 TlmToGem5BridgeBase(mn), peq(this, &TlmToGem5Bridge<BITWIDTH>::peq_cb),
570 waitForRetry(false), pendingRequest(nullptr), pendingPacket(nullptr),
571 needToSendRetry(false), responseInProgress(false),
572 bmp(std::string(name()) + "master", *this), socket("tlm_socket"),
573 wrapper(socket, std::string(name()) + ".tlm", InvalidPortID),
574 system(params.system),
575 _id(params.system->getGlobalRequestorId(
576 std::string("[systemc].") + name()))
577{
578}
579
580template <unsigned int BITWIDTH>
581void
583{
584 /*
585 * Register the TLM non-blocking interface when using gem5 Timing mode and
586 * the TLM blocking interface when using the gem5 Atomic mode.
587 * Then the magic (TM) in simple_target_socket automatically transforms
588 * non-blocking in blocking transactions and vice versa.
589 *
590 * NOTE: The mode may change during execution.
591 */
592 if (system->isTimingMode()) {
593 DPRINTF(TlmBridge, "register non-blocking interface");
594 socket.register_nb_transport_fw(
596 } else if (system->isAtomicMode()) {
597 DPRINTF(TlmBridge, "register blocking interface");
598 socket.register_b_transport(
600 } else {
601 panic("gem5 operates neither in Timing nor in Atomic mode");
602 }
603
604 socket.register_get_direct_mem_ptr(
606 socket.register_transport_dbg(
608
610}
611
612} // namespace sc_gem5
613
615gem5::TlmToGem5Bridge32Params::create() const
616{
618 *this, sc_core::sc_module_name(name.c_str()));
619}
620
622gem5::TlmToGem5Bridge64Params::create() const
623{
625 *this, sc_core::sc_module_name(name.c_str()));
626}
627
629gem5::TlmToGem5Bridge128Params::create() const
630{
632 *this, sc_core::sc_module_name(name.c_str()));
633}
634
636gem5::TlmToGem5Bridge256Params::create() const
637{
639 *this, sc_core::sc_module_name(name.c_str()));
640}
641
643gem5::TlmToGem5Bridge512Params::create() const
644{
646 *this, sc_core::sc_module_name(name.c_str()));
647}
#define DPRINTF(x,...)
Definition trace.hh:210
bool isReturnRequired() const
Definition sc_ext.cc:188
gem5::AtomicOpFunctor * getAtomicOpFunctor() const
Definition sc_ext.cc:194
gem5::PacketPtr getPacket()
Definition sc_ext.cc:135
const AddrRange & range() const
Definition backdoor.hh:58
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
bool isRead() const
Definition packet.hh:593
bool isError() const
Definition packet.hh:622
bool isResponse() const
Definition packet.hh:598
void setAddr(Addr _addr)
Update the address of this packet mid-transaction.
Definition packet.hh:815
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
Definition packet.hh:449
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
Definition packet.hh:431
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:594
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
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 destroyPacket(gem5::PacketPtr pkt)
void handleEndResp(tlm::tlm_generic_payload &trans)
bool get_direct_mem_ptr(tlm::tlm_generic_payload &trans, tlm::tlm_dmi &dmi_data)
void sendBeginResp(tlm::tlm_generic_payload &trans, sc_core::sc_time &delay)
void invalidateDmi(const gem5::MemBackdoor &backdoor)
void b_transport(tlm::tlm_generic_payload &trans, sc_core::sc_time &t)
tlm::tlm_sync_enum nb_transport_fw(tlm::tlm_generic_payload &trans, tlm::tlm_phase &phase, sc_core::sc_time &t)
unsigned int transport_dbg(tlm::tlm_generic_payload &trans)
void sendEndReq(tlm::tlm_generic_payload &trans)
void handleBeginReq(tlm::tlm_generic_payload &trans)
gem5::Port & gem5_getPort(const std::string &if_name, int idx=-1) override
void peq_cb(tlm::tlm_generic_payload &trans, const tlm::tlm_phase &phase)
TlmToGem5Bridge(const Params &p, const sc_core::sc_module_name &mn)
void before_end_of_elaboration() override
bool recvTimingResp(gem5::PacketPtr pkt)
gem5::TlmToGem5BridgeBaseParams Params
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_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.
Addr start() const
Get the start address of the range.
virtual AtomicOpFunctor * clone()=0
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition amo.hh:269
#define panic(...)
This implements a cprintf based panic() function.
Definition logging.hh:188
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition logging.hh:214
uint8_t flags
Definition helpers.cc:66
Bitfield< 18, 16 > len
Bitfield< 4 > width
Definition misc_types.hh:72
Bitfield< 5 > t
Definition misc_types.hh:71
Bitfield< 5, 0 > status
Bitfield< 15 > system
Definition misc.hh:1004
Tick ps
picosecond
Definition core.cc:69
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::shared_ptr< Request > RequestPtr
Definition request.hh:94
const PortID InvalidPortID
Definition types.hh:246
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
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...
void setPayloadResponse(tlm::tlm_generic_payload &trans, PacketPtr pkt)
std::function< void(gem5::PacketPtr pkt, tlm::tlm_generic_payload &trans)> PayloadToPacketConversionStep
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.
Overload hash function for BasicBlockRange type.
Definition misc.hh:2910
@ 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:469
const std::string & name()
Definition trace.cc:48

Generated on Mon Jul 10 2023 15:32:07 for gem5 by doxygen 1.9.7