gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
301
302template <unsigned int BITWIDTH>
303void
305{
306 if (backdoor == nullptr) return;
307
308 // We only need to register the callback at the first time.
309 if (requestedBackdoors.find(backdoor) == requestedBackdoors.end()) {
310 backdoor->addInvalidationCallback(
311 [this](const MemBackdoor &backdoor)
312 {
313 invalidateDmi(backdoor);
314 }
315 );
316 requestedBackdoors.emplace(backdoor);
317 }
318}
319
320template <unsigned int BITWIDTH>
321void
323{
324 socket->invalidate_direct_mem_ptr(
325 backdoor.range().start(), backdoor.range().end());
326 requestedBackdoors.erase(const_cast<gem5::MemBackdoorPtr>(&backdoor));
327}
328
329template <unsigned int BITWIDTH>
330void
332 const tlm::tlm_phase &phase)
333{
334 switch (phase) {
335 case tlm::BEGIN_REQ:
336 handleBeginReq(trans);
337 break;
338 case tlm::END_RESP:
339 handleEndResp(trans);
340 break;
341 default:
342 panic("unimplemented phase in callback");
343 }
344}
345
346template <unsigned int BITWIDTH>
350 sc_core::sc_time &delay)
351{
352 unsigned len = trans.get_data_length();
353 unsigned char *byteEnable = trans.get_byte_enable_ptr();
354 unsigned width = trans.get_streaming_width();
355
356 // check the transaction attributes for unsupported features ...
357 if (byteEnable != 0) {
359 return tlm::TLM_COMPLETED;
360 }
361 if (width < len) { // is this a burst request?
363 return tlm::TLM_COMPLETED;
364 }
365
366 // ... and queue the valid transaction
367 trans.acquire();
368 peq.notify(trans, phase, delay);
369 return tlm::TLM_ACCEPTED;
370}
371
372template <unsigned int BITWIDTH>
373void
376{
377 auto [pkt, pkt_created] = payload2packet(_id, trans);
378 pkt->pushSenderState(new Gem5SystemC::TlmSenderState(trans));
379
380 MemBackdoorPtr backdoor = nullptr;
381 Tick ticks = 0;
382
383 // Check if we have a backdoor meet the request. If yes, we can just hints
384 // the requestor the DMI is supported.
385 for (auto& b : requestedBackdoors) {
386 if (pkt->getAddrRange().isSubset(b->range()) &&
387 ((!pkt->isWrite() && b->readable()) ||
388 (pkt->isWrite() && b->writeable()))) {
389 backdoor = b;
390 }
391 }
392
393 if (backdoor) {
394 ticks = bmp.sendAtomic(pkt);
395 } else {
396 ticks = bmp.sendAtomicBackdoor(pkt, backdoor);
397 }
398
399 // Hints the requestor the DMI is supported.
400 if (backdoor) {
401 trans.set_dmi_allowed(true);
402 cacheBackdoor(backdoor);
403 }
404
405 // send an atomic request to gem5
406 panic_if(pkt->needsResponse() && !pkt->isResponse(),
407 "Packet sending failed!\n");
408
409 auto delay =
410 sc_core::sc_time((double)(ticks / sim_clock::as_int::ps),
412
413 // update time
414 t += delay;
415
416 gem5::Packet::SenderState *senderState = pkt->popSenderState();
417 sc_assert(
418 nullptr != dynamic_cast<Gem5SystemC::TlmSenderState*>(senderState));
419
420 // clean up
421 delete senderState;
422
423 setPayloadResponse(trans, pkt);
424
425 if (pkt_created)
426 destroyPacket(pkt);
427}
428
429template <unsigned int BITWIDTH>
430unsigned int
432{
433 auto [pkt, pkt_created] = payload2packet(_id, trans);
434 if (pkt != nullptr) {
435 pkt->pushSenderState(new Gem5SystemC::TlmSenderState(trans));
436
437 bmp.sendFunctional(pkt);
438
439 gem5::Packet::SenderState *senderState = pkt->popSenderState();
440 sc_assert(
441 nullptr != dynamic_cast<Gem5SystemC::TlmSenderState*>(senderState));
442
443 // clean up
444 delete senderState;
445
446 if (pkt_created)
447 destroyPacket(pkt);
448 }
449
450 return trans.get_data_length();
451}
452
453template <unsigned int BITWIDTH>
454bool
456 tlm::tlm_dmi &dmi_data)
457{
459 switch (trans.get_command()) {
462 break;
465 break;
466 default:
467 panic("TlmToGem5Bridge: "
468 "received transaction with unsupported command");
469 }
470 Addr start_addr = trans.get_address();
471 Addr length = trans.get_data_length();
472
473 MemBackdoorReq req({start_addr, start_addr + length}, flags);
474 MemBackdoorPtr backdoor = nullptr;
475
476 bmp.sendMemBackdoorReq(req, backdoor);
477
478 if (backdoor) {
479 trans.set_dmi_allowed(true);
480 dmi_data.set_dmi_ptr(backdoor->ptr());
481 dmi_data.set_start_address(backdoor->range().start());
482 dmi_data.set_end_address(backdoor->range().end());
483
484 typedef tlm::tlm_dmi::dmi_access_e access_t;
485 access_t access = tlm::tlm_dmi::DMI_ACCESS_NONE;
486 if (backdoor->readable())
487 access = (access_t)(access | tlm::tlm_dmi::DMI_ACCESS_READ);
488 if (backdoor->writeable())
489 access = (access_t)(access | tlm::tlm_dmi::DMI_ACCESS_WRITE);
490 dmi_data.set_granted_access(access);
491 cacheBackdoor(backdoor);
492 }
493
495
496 return backdoor != nullptr;
497}
498
499template <unsigned int BITWIDTH>
500bool
502{
503 // exclusion rule
504 // We need to Wait for END_RESP before sending next BEGIN_RESP
505 if (responseInProgress) {
506 sc_assert(!needToSendRetry);
507 needToSendRetry = true;
508 return false;
509 }
510
511 sc_assert(pkt->isResponse());
512
513 /*
514 * Pay for annotated transport delays.
515 *
516 * See recvTimingReq in sc_slave_port.cc for a detailed description.
517 */
519 // reset the delays
520 pkt->payloadDelay = 0;
521 pkt->headerDelay = 0;
522
523 auto *tlmSenderState =
524 dynamic_cast<Gem5SystemC::TlmSenderState*>(pkt->popSenderState());
525 sc_assert(tlmSenderState != nullptr);
526
527 auto &trans = tlmSenderState->trans;
528 setPayloadResponse(trans, pkt);
529 sendBeginResp(trans, delay);
530
531 Gem5SystemC::Gem5Extension *extension = nullptr;
532 trans.get_extension(extension);
533
534 // clean up
535 delete tlmSenderState;
536
537 // If there is an extension the packet was piped through and we must not
538 // delete it. The packet travels back with the transaction.
539 if (extension == nullptr)
540 destroyPacket(pkt);
541
542 trans.release();
543
544 return true;
545}
546
547template <unsigned int BITWIDTH>
548void
550{
551 sc_assert(waitForRetry);
552 sc_assert(pendingRequest != nullptr);
553 sc_assert(pendingPacket != nullptr);
554
555 // If the packet doesn't need a response, we should send BEGIN_RESP by
556 // ourselves.
557 bool needsResponse = pendingPacket->needsResponse();
558 if (bmp.sendTimingReq(pendingPacket)) {
559 waitForRetry = false;
560
561 auto &trans = *pendingRequest;
562 sendEndReq(trans);
563 if (!needsResponse) {
564 auto delay = sc_core::SC_ZERO_TIME;
565 setPayloadResponse(trans, pendingPacket);
566 sendBeginResp(trans, delay);
567 }
568 trans.release();
569
570 pendingRequest = nullptr;
571 pendingPacket = nullptr;
572 }
573}
574
575template <unsigned int BITWIDTH>
576void
578{
579 DPRINTF(TlmBridge,
580 "received address range change but ignored it");
581}
582
583template <unsigned int BITWIDTH>
585TlmToGem5Bridge<BITWIDTH>::gem5_getPort(const std::string &if_name, int idx)
586{
587 if (if_name == "gem5")
588 return bmp;
589 else if (if_name == "tlm")
590 return wrapper;
591
592 return sc_core::sc_module::gem5_getPort(if_name, idx);
593}
594
595template <unsigned int BITWIDTH>
597 const Params &params, const sc_core::sc_module_name &mn) :
598 TlmToGem5BridgeBase(mn), peq(this, &TlmToGem5Bridge<BITWIDTH>::peq_cb),
599 waitForRetry(false), pendingRequest(nullptr), pendingPacket(nullptr),
600 needToSendRetry(false), responseInProgress(false),
601 bmp(std::string(name()) + "master", *this), socket("tlm_socket"),
602 wrapper(socket, std::string(name()) + ".tlm", InvalidPortID),
603 system(params.system),
604 _id(params.system->getGlobalRequestorId(
605 std::string("[systemc].") + name()))
606{
607}
608
609template <unsigned int BITWIDTH>
610void
612{
613 /*
614 * Register the TLM non-blocking interface when using gem5 Timing mode and
615 * the TLM blocking interface when using the gem5 Atomic mode.
616 * Then the magic (TM) in simple_target_socket automatically transforms
617 * non-blocking in blocking transactions and vice versa.
618 *
619 * NOTE: The mode may change during execution.
620 */
621 if (system->isTimingMode()) {
622 DPRINTF(TlmBridge, "register non-blocking interface");
623 socket.register_nb_transport_fw(
625 } else if (system->isAtomicMode()) {
626 DPRINTF(TlmBridge, "register blocking interface");
627 socket.register_b_transport(
629 } else {
630 panic("gem5 operates neither in Timing nor in Atomic mode");
631 }
632
633 socket.register_get_direct_mem_ptr(
635 socket.register_transport_dbg(
637
639}
640
641} // namespace sc_gem5
642
644gem5::TlmToGem5Bridge32Params::create() const
645{
647 *this, sc_core::sc_module_name(name.c_str()));
648}
649
651gem5::TlmToGem5Bridge64Params::create() const
652{
654 *this, sc_core::sc_module_name(name.c_str()));
655}
656
658gem5::TlmToGem5Bridge128Params::create() const
659{
661 *this, sc_core::sc_module_name(name.c_str()));
662}
663
665gem5::TlmToGem5Bridge256Params::create() const
666{
668 *this, sc_core::sc_module_name(name.c_str()));
669}
670
672gem5::TlmToGem5Bridge512Params::create() const
673{
675 *this, sc_core::sc_module_name(name.c_str()));
676}
#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
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: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)
void cacheBackdoor(gem5::MemBackdoorPtr backdoor)
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:87
Bitfield< 18, 16 > len
Bitfield< 4 > width
Definition misc_types.hh:72
Bitfield< 5 > t
Definition misc_types.hh:71
Bitfield< 7 > b
Bitfield< 5, 0 > status
Bitfield< 15 > system
Definition misc.hh:1032
Tick ps
picosecond
Definition core.cc:69
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
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 binary32.hh:81
@ 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 Tue Jun 18 2024 16:24:07 for gem5 by doxygen 1.11.0