gem5 v24.0.0.0
Loading...
Searching...
No Matches
plic.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Huawei International
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 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions are
16 * met: redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer;
18 * redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution;
21 * neither the name of the copyright holders nor the names of its
22 * contributors may be used to endorse or promote products derived from
23 * this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
38
39#include "dev/riscv/plic.hh"
40
41#include <algorithm>
42
43#include "cpu/base.hh"
44#include "debug/Plic.hh"
45#include "mem/packet.hh"
46#include "mem/packet_access.hh"
47#include "params/Plic.hh"
48#include "params/PlicBase.hh"
49#include "sim/system.hh"
50
51namespace gem5
52{
53
54using namespace RiscvISA;
55
56Plic::Plic(const Params &params) :
57 PlicBase(params),
58 system(params.system),
59 nSrc(params.n_src),
60 registers(params.name, pioAddr, this),
61 update([this]{updateOutput();}, name() + ".update")
62{
63 fatal_if(params.hart_config != "" && params.n_contexts != 0,
64 "the hart_config and n_contexts can't be set simultaneously");
65
66 if (params.n_contexts != 0) {
67 initContextFromNContexts(params.n_contexts);
68 }
69 if (params.hart_config != "") {
70 initContextFromHartConfig(params.hart_config);
71 }
72}
73
74void
75Plic::post(int src_id)
76{
77 // Sanity check
78 assert(src_id < nSrc && src_id >= 0);
79
80 // Update pending bit
81 int src_index = src_id >> 5;
82 int src_offset = src_id & 0x1F;
83
84 uint32_t& pending = registers.pending[src_index].get();
85 std::bitset<32> pending_bits(pending);
86 pending_bits[src_offset] = 1;
87 pending = (uint32_t) pending_bits.to_ulong();
88
89 // Update states
90 pendingPriority[src_id] = registers.priority[src_id].get();
91 for (int i = 0; i < contextConfigs.size(); i++) {
92 bool enabled = bits(registers.enable[i][src_index].get(), src_offset);
93 effPriority[i][src_id] = enabled ? pendingPriority[src_id] : 0;
94 }
96 "Int post request - source: %#x, current priority: %#x\n",
97 src_id, pendingPriority[src_id]);
98
99 // Propagate output changes
101}
102
103void
104Plic::clear(int src_id)
105{
106 // Sanity check
107 assert(src_id < nSrc);
108 assert(src_id >= 0);
109
110 // Update pending bit
111 int src_index = src_id >> 5;
112 int src_offset = src_id & 0x1F;
113 uint32_t& pending = registers.pending[src_index].get();
114 std::bitset<32> pending_bits(pending);
115 pending_bits[src_offset] = 0;
116 pending = (uint32_t) pending_bits.to_ulong();
117
118 // Update states
119 pendingPriority[src_id] = 0;
120 for (int i = 0; i < contextConfigs.size(); i++) {
121 effPriority[i][src_id] = 0;
122 }
124 "Int clear request - source: %#x, current priority: %#x\n",
125 src_id, pendingPriority[src_id]);
126
127 // Propagate output changes
129}
130
131Tick
133{
134 // Check for atomic operation
135 bool is_atomic = pkt->isAtomicOp() && pkt->cmd == MemCmd::SwapReq;
137 "Read request - addr: %#x, size: %#x, atomic:%d\n",
138 pkt->getAddr(), pkt->getSize(), is_atomic);
139
140 // Perform register read
141 registers.read(pkt->getAddr(), pkt->getPtr<void>(), pkt->getSize());
142
143 if (is_atomic) {
144 // Perform atomic operation
145 (*(pkt->getAtomicOp()))(pkt->getPtr<uint8_t>());
146 return write(pkt);
147 } else {
148 pkt->makeResponse();
149 return pioDelay;
150 }
151}
152
153Tick
155{
157 "Write request - addr: %#x, size: %#x\n",
158 pkt->getAddr(), pkt->getSize());
159
160 // Perform register write
161 registers.write(pkt->getAddr(), pkt->getPtr<void>(), pkt->getSize());
162
163 // Propagate output changes
165
166 // Apply threshold changes
167 updateInt();
168
169 pkt->makeResponse();
170 return pioDelay;
171}
172
173void
175{
176 // Number of 32-bit pending registesrs where
177 // each bit correspondings to one interrupt source
178 nSrc32 = divCeil(nSrc, 32);
179
180 // Setup register bank
181 registers.init();
182
183 // Setup internal states
184 pendingPriority.resize(nSrc, 0x0);
185 for (int i = 0; i < contextConfigs.size(); i++) {
186 std::vector<uint32_t> context_priority(nSrc, 0x0);
187 effPriority.push_back(context_priority);
188 }
189 lastID.resize(contextConfigs.size(), 0x0);
190
191 // Setup outputs
195
197 "Device init - %d contexts, %d sources, %d pending registers\n",
198 contextConfigs.size(), nSrc, nSrc32);
199
201}
202
203void
205{
206 using namespace std::placeholders;
207
208 // Calculate reserved space size
209 const size_t reserve0_size = pendingStart - plic->nSrc * 4;
210 reserved.emplace_back("reserved0", reserve0_size);
211 const size_t reserve1_size = enableStart - pendingStart
212 - plic->nSrc32 * 4;
213 reserved.emplace_back("reserved1", reserve1_size);
214 const size_t reserve2_size = thresholdStart - enableStart
216 reserved.emplace_back("reserved2", reserve2_size);
217 const size_t reserve3_size = plic->pioSize - thresholdStart
219 reserved.emplace_back("reserved3", reserve3_size);
220
221 // Sanity check
222 assert(plic->pioSize >= thresholdStart
224 assert((int) plic->pioSize <= maxBankSize);
225
226 // Calculate hole sizes
227 const size_t enable_hole_size = enablePadding - plic->nSrc32 * 4;
228 const size_t claim_hole_size = thresholdPadding - 0x8;
229
230 // Initialize registers
231 for (int i = 0; i < plic->nSrc; i++) {
232 priority.emplace_back(
233 std::string("priority") + std::to_string(i), 0);
234 }
235 for (int i = 0; i < plic->nSrc32; i++) {
236 pending.emplace_back(
237 std::string("pending") + std::to_string(i), 0);
238 }
239 for (int i = 0; i < plic->contextConfigs.size(); i++) {
240
241 enable.push_back(std::vector<Register32>());
242 for (int j = 0; j < plic->nSrc32; j++) {
243 enable[i].emplace_back(
244 std::string("enable") + std::to_string(i)
245 + "_" + std::to_string(j), 0);
246 }
247 enable_holes.emplace_back(
248 std::string("enable_hole") + std::to_string(i), enable_hole_size);
249
250 threshold.emplace_back(
251 std::string("threshold") + std::to_string(i), 0);
252 claim.emplace_back(
253 std::string("claim") + std::to_string(i), 0);
254 claim_holes.emplace_back(
255 std::string("claim_hole") + std::to_string(i), claim_hole_size);
256 }
257
258 // Add registers to bank
259 // Priority
260 for (int i = 0; i < plic->nSrc; i++) {
261 auto write_cb = std::bind(&Plic::writePriority, plic, _1, _2, i);
262 priority[i].writer(write_cb);
264 }
266
267 // Pending
268 for (int i = 0; i < plic->nSrc32; i++) {
269 pending[i].readonly();
271 }
273
274 // Enable
275 for (int i = 0; i < plic->contextConfigs.size(); i++) {
276 for (int j = 0; j < plic->nSrc32; j++) {
277 auto write_cb = std::bind(&Plic::writeEnable, plic, _1, _2, j, i);
278 enable[i][j].writer(write_cb);
279 addRegister(enable[i][j]);
280 }
282 }
284
285 // Threshold and claim
286 for (int i = 0; i < plic->contextConfigs.size(); i++) {
287 auto threshold_cb = std::bind(&Plic::writeThreshold, plic, _1, _2, i);
288 threshold[i].writer(threshold_cb);
289 auto read_cb = std::bind(&Plic::readClaim, plic, _1, i);
290 auto write_cb = std::bind(&Plic::writeClaim, plic, _1, _2, i);
291 claim[i].reader(read_cb)
292 .writer(write_cb);
296 }
298}
299
300void
301Plic::writePriority(Register32& reg, const uint32_t& data, const int src_id)
302{
303 reg.update(data);
304
305 // Calculate indices
306 int src_index = src_id >> 5;
307 int src_offset = src_id & 0x1F;
308
309 // Update states
310 bool pending = bits(registers.pending[src_index].get(), src_offset);
311 pendingPriority[src_id] = pending ? reg.get() : 0;
312 for (int i = 0; i < contextConfigs.size(); i++) {
313 bool enabled = bits(
314 registers.enable[i][src_index].get(), src_offset);
315 effPriority[i][src_id] = enabled ? pendingPriority[src_id] : 0;
316 }
317
319 "Priority updated - src: %d, val: %d\n",
320 src_id, reg.get());
321}
322
323void
325 const int src32_id, const int context_id)
326{
327 reg.update(data);
328
329 for (int i = 0; i < 32; i ++) {
330 int src_id = (src32_id << 5) + i;
331 if (src_id < nSrc) {
332 effPriority[context_id][src_id] =
333 bits(reg.get(), i) ? pendingPriority[src_id] : 0;
334 }
335 }
337 "Enable updated - context: %d, src32: %d, val: %#x\n",
338 context_id, src32_id, reg.get());
339}
340
341void
343 const int context_id)
344{
345 reg.update(data);
346
348 "Threshold updated - context: %d, val: %d\n",
349 context_id, reg.get());
350}
351
352uint32_t
353Plic::readClaim(Register32& reg, const int context_id)
354{
355 if (lastID[context_id] == 0) {
356 // Calculate indices
357 uint32_t max_int_id = output.maxID[context_id];
358 int src_index = max_int_id >> 5;
359 int src_offset = max_int_id & 0x1F;
360
361 // Check pending bits
362 if (bits(registers.pending[src_index].get(), src_offset)) {
363 lastID[context_id] = max_int_id;
365 "Claim success - context: %d, interrupt ID: %d\n",
366 context_id, max_int_id);
367 clear(max_int_id);
368 reg.update(max_int_id);
369 return reg.get();
370 } else {
372 "Claim already cleared - context: %d, interrupt ID: %d\n",
373 context_id, max_int_id);
374 return 0;
375 }
376 } else {
377 warn("PLIC claim repeated (not completed) - context: %d, last: %d",
378 context_id, lastID[context_id]);
379 return lastID[context_id];
380 }
381}
382
383void
384Plic::writeClaim(Register32& reg, const uint32_t& data, const int context_id)
385{
386 reg.update(data);
387
392 assert(lastID[context_id] == reg.get());
393 lastID[context_id] = 0;
395 "Complete - context: %d, interrupt ID: %d\n",
396 context_id, reg.get());
397 updateInt();
398}
399
400void
402{
403 // Calculate new output
404 PlicOutput new_output{
407 uint32_t max_id;
408 uint32_t max_priority;
409 for (int i = 0; i < contextConfigs.size(); i++) {
410 max_id = max_element(effPriority[i].begin(),
411 effPriority[i].end()) - effPriority[i].begin();
412 max_priority = effPriority[i][max_id];
413 new_output.maxID[i] = max_id;
414 new_output.maxPriority[i] = max_priority;
415 }
416
417 // Add new output to outputQueue
418 Tick next_update = curTick() + cyclesToTicks(Cycles(3));
419 if (outputQueue.find(next_update) != outputQueue.end()) {
420 outputQueue[next_update] = new_output;
421 } else {
422 outputQueue.insert({next_update, new_output});
423 }
424
425 // Schedule next update event
426 if (!update.scheduled()) {
427 DPRINTF(Plic, "Update scheduled - tick: %d\n", next_update);
428 schedule(update, next_update);
429 }
430}
431
432void
434{
435 contextConfigs.reserve(n_contexts);
436 for (uint32_t i = 0; i < (uint32_t)n_contexts; i += 2) {
437 contextConfigs.emplace_back((i >> 1), ExceptionCode::INT_EXT_MACHINE);
438 contextConfigs.emplace_back((i >> 1), ExceptionCode::INT_EXT_SUPER);
439 }
440}
441
442void
443Plic::initContextFromHartConfig(const std::string& hart_config)
444{
445 contextConfigs.reserve(hart_config.size());
446 uint32_t hart_id = 0;
447 for (char c: hart_config) {
448 switch (c) {
449 case ',':
450 hart_id++;
451 break;
452 case 'M':
453 contextConfigs.emplace_back(hart_id, ExceptionCode::INT_EXT_MACHINE);
454 break;
455 case 'S':
456 contextConfigs.emplace_back(hart_id, ExceptionCode::INT_EXT_SUPER);
457 break;
458 default:
459 fatal("hart_config should not contains the value: %c", c);
460 break;
461 }
462 }
463}
464
465void
467{
468 DPRINTF(Plic, "Update triggered\n");
469 // Set current output to new output
470 output = outputQueue.begin()->second;
471 outputQueue.erase(outputQueue.begin()->first);
472
473 // Schedule next update event (if any)
474 if (!outputQueue.empty()) {
475 DPRINTF(Plic, "Update scheduled - tick: %d\n",
476 outputQueue.begin()->first);
477 schedule(update, outputQueue.begin()->first);
478 }
479
480 updateInt();
481}
482
483void
485{
486 // Update xEIP lines
487 for (int i = 0; i < contextConfigs.size(); i++) {
488 auto [thread_id, int_id] = contextConfigs[i];
489
490 auto tc = system->threads[thread_id];
491 uint32_t max_id = output.maxID[i];
492 uint32_t priority = output.maxPriority[i];
493 uint32_t threshold = registers.threshold[i].get();
494 if (priority > threshold && max_id > 0 && lastID[i] == 0) {
495 DPRINTF(Plic, "Int posted - thread: %d, int id: %d, ",
496 thread_id, int_id);
497 DPRINTFR(Plic, "pri: %d, thres: %d\n", priority, threshold);
498 tc->getCpuPtr()->postInterrupt(tc->threadId(), int_id, 0);
499 } else {
500 if (priority > 0) {
501 DPRINTF(Plic, "Int filtered - thread: %d, int id: %d, ",
502 thread_id, int_id);
503 DPRINTFR(Plic, "pri: %d, thres: %d\n", priority, threshold);
504 }
505 tc->getCpuPtr()->clearInterrupt(tc->threadId(), int_id, 0);
506 }
507 }
508}
509
510void
512{
513 int n_outputs = 0;
514
515 for (auto const &reg: registers.pending) {
516 paramOut(cp, reg.name(), reg);
517 }
518 for (auto const &reg: registers.priority) {
519 paramOut(cp, reg.name(), reg);
520 }
521 for (auto const &reg: registers.enable) {
522 for (auto const &reg_inner: reg) {
523 paramOut(cp, reg_inner.name(), reg_inner);
524 }
525 }
526 for (auto const &reg: registers.threshold) {
527 paramOut(cp, reg.name(), reg);
528 }
529 for (auto const &reg: registers.claim) {
530 paramOut(cp, reg.name(), reg);
531 }
532 for (auto const & it : outputQueue) {
533 paramOut(cp, std::string("output_tick") +
534 std::to_string(n_outputs), it.first);
535 arrayParamOut(cp, std::string("output_id") +
536 std::to_string(n_outputs), it.second.maxID);
537 arrayParamOut(cp, std::string("output_pri") +
538 std::to_string(n_outputs), it.second.maxPriority);
539 n_outputs++;
540 }
541 SERIALIZE_SCALAR(n_outputs);
545 for (int i=0; i < effPriority.size(); i++) {
546 arrayParamOut(cp, std::string("effPriority") +
547 std::to_string(i), effPriority[i]);
548 }
550}
551
552void
554{
555 int n_outputs;
556 UNSERIALIZE_SCALAR(n_outputs);
557
558 for (auto &reg: registers.pending) {
559 paramIn(cp, reg.name(), reg);
560 }
561 for (auto &reg: registers.priority) {
562 paramIn(cp, reg.name(), reg);
563 }
564 for (auto &reg: registers.enable) {
565 for (auto &reg_inner: reg) {
566 paramIn(cp, reg_inner.name(), reg_inner);
567 }
568 }
569 for (auto &reg: registers.threshold) {
570 paramIn(cp, reg.name(), reg);
571 }
572 for (auto &reg: registers.claim) {
573 paramIn(cp, reg.name(), reg);
574 }
575 for (int i = 0; i < n_outputs; i++) {
576 Tick output_tick;
577 std::vector<uint32_t> output_id;
578 std::vector<uint32_t> output_pri;
579 paramIn(cp, std::string("output_tick") +
580 std::to_string(i), output_tick);
581 arrayParamIn(cp, std::string("output_id") +
582 std::to_string(i), output_id);
583 arrayParamIn(cp, std::string("output_pri") +
584 std::to_string(i), output_pri);
585 outputQueue[output_tick] = PlicOutput{output_id, output_pri};
586 }
587 if (!outputQueue.empty()) {
588 schedule(update, outputQueue.begin()->first);
589 }
593 for (int i=0; i < effPriority.size(); i++) {
594 arrayParamIn(cp, std::string("effPriority") +
595 std::to_string(i), effPriority[i]);
596 }
598 updateInt();
599}
600
601} // namespace gem5
#define DPRINTFR(x,...)
Definition trace.hh:224
#define DPRINTF(x,...)
Definition trace.hh:210
const char data[]
Tick pioDelay
Delay that the device experinces on an access.
Definition io_device.hh:157
Addr pioSize
Size that the device's address range.
Definition io_device.hh:154
Tick cyclesToTicks(Cycles c) const
Cycles is a wrapper class for representing cycle counts, i.e.
Definition types.hh:79
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
Addr getAddr() const
Definition packet.hh:807
bool isAtomicOp() const
Definition packet.hh:846
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:1062
T * getPtr()
get a pointer to the data ptr.
Definition packet.hh:1225
unsigned getSize() const
Definition packet.hh:817
AtomicOpFunctor * getAtomicOp() const
Accessor function to atomic op.
Definition packet.hh:845
MemCmd cmd
The command field of the packet.
Definition packet.hh:372
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition io_device.cc:59
std::vector< Register32 > priority
Definition plic.hh:208
const Addr thresholdPadding
Definition plic.hh:204
std::vector< Register32 > pending
Definition plic.hh:209
const Addr enablePadding
Definition plic.hh:203
std::vector< RegisterRaz > enable_holes
Definition plic.hh:213
const Addr enableStart
Definition plic.hh:201
const Addr maxBankSize
Definition plic.hh:205
const Addr thresholdStart
Definition plic.hh:202
std::vector< Register32 > threshold
Definition plic.hh:211
std::vector< std::vector< Register32 > > enable
Definition plic.hh:210
const Addr pendingStart
Definition plic.hh:200
std::vector< RegisterRaz > reserved
Definition plic.hh:215
std::vector< RegisterRaz > claim_holes
Definition plic.hh:214
std::vector< Register32 > claim
Definition plic.hh:212
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition plic.cc:154
int nSrc
Definition plic.hh:118
std::vector< uint32_t > lastID
Definition plic.hh:255
std::map< Tick, PlicOutput > outputQueue
Definition plic.hh:276
void updateOutput()
Trigger:
Definition plic.cc:466
gem5::Plic::PlicRegisters registers
Plic(const Params &params)
Definition plic.cc:56
void post(int src_id) override
Interrupt interface.
Definition plic.cc:75
PlicOutput output
Definition plic.hh:256
std::vector< std::pair< uint32_t, ExceptionCode > > contextConfigs
PLIC hart/pmode address configs, stored in the format {hartID, pmode}.
Definition plic.hh:127
EventFunctionWrapper update
Definition plic.hh:277
Tick read(PacketPtr pkt) override
PioDevice funcitons.
Definition plic.cc:132
PlicRegisters::Register32 Register32
Definition plic.hh:227
void writeEnable(Register32 &reg, const uint32_t &data, const int src32_id, const int context_id)
Definition plic.cc:324
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition plic.cc:553
void clear(int src_id) override
Definition plic.cc:104
void writeThreshold(Register32 &reg, const uint32_t &data, const int context_id)
Definition plic.cc:342
void updateInt()
Trigger:
Definition plic.cc:484
uint32_t readClaim(Register32 &reg, const int context_id)
Definition plic.cc:353
System * system
Definition plic.hh:115
void initContextFromHartConfig(const std::string &hart_config)
Definition plic.cc:443
std::vector< std::vector< uint32_t > > effPriority
Definition plic.hh:253
void propagateOutput()
Trigger:
Definition plic.cc:401
int nSrc32
Number of 32-bit pending registers needed = ceil(nSrc / 32)
Definition plic.hh:123
PlicParams Params
Definition plic.hh:130
void init() override
SimObject functions.
Definition plic.cc:174
std::vector< uint32_t > pendingPriority
Definition plic.hh:251
void writeClaim(Register32 &reg, const uint32_t &data, const int context_id)
Definition plic.cc:384
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition plic.cc:511
void initContextFromNContexts(int n_contexts)
The function for handling context config from params.
Definition plic.cc:433
void writePriority(Register32 &reg, const uint32_t &data, const int src_id)
Register read / write callbacks.
Definition plic.cc:301
void addRegister(RegisterAdder reg)
Definition reg_bank.hh:1022
virtual void read(Addr addr, void *buf, Addr bytes)
Definition reg_bank.hh:1029
virtual void write(Addr addr, const void *buf, Addr bytes)
Definition reg_bank.hh:1075
Threads threads
Definition system.hh:310
STL vector class.
Definition stl.hh:37
static constexpr T divCeil(const T &a, const U &b)
Definition intmath.hh:110
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition bitfield.hh:79
bool scheduled() const
Determine if the current event is scheduled.
Definition eventq.hh:458
void schedule(Event &event, Tick when)
Definition eventq.hh:1012
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Definition logging.hh:236
#define fatal(...)
This implements a cprintf based fatal() function.
Definition logging.hh:200
#define UNSERIALIZE_CONTAINER(member)
Definition serialize.hh:634
#define SERIALIZE_CONTAINER(member)
Definition serialize.hh:626
#define warn(...)
Definition logging.hh:256
Bitfield< 7 > i
Definition misc_types.hh:67
Bitfield< 29 > c
Definition misc_types.hh:53
Bitfield< 3, 0 > priority
Bitfield< 5, 3 > reg
Definition types.hh:92
Bitfield< 15 > system
Definition misc.hh:1032
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
Tick curTick()
The universal simulation clock.
Definition cur_tick.hh:46
std::ostream CheckpointOut
Definition serialize.hh:66
void paramOut(CheckpointOut &cp, const std::string &name, ExtMachInst const &machInst)
Definition types.cc:40
void paramIn(CheckpointIn &cp, const std::string &name, ExtMachInst &machInst)
Definition types.cc:72
void arrayParamOut(CheckpointOut &cp, const std::string &name, const CircleBuf< T > &param)
Definition circlebuf.hh:247
uint64_t Tick
Tick count type.
Definition types.hh:58
void arrayParamIn(CheckpointIn &cp, const std::string &name, CircleBuf< T > &param)
Definition circlebuf.hh:257
Declaration of the Packet class.
#define UNSERIALIZE_SCALAR(scalar)
Definition serialize.hh:575
#define SERIALIZE_SCALAR(scalar)
Definition serialize.hh:568
NOTE: This implementation of PLIC is based on he riscv-plic-spec repository: https://github....
Definition plic.hh:92
std::vector< uint32_t > maxPriority
Definition plic.hh:94
std::vector< uint32_t > maxID
Definition plic.hh:93
const std::string & name()
Definition trace.cc:48

Generated on Tue Jun 18 2024 16:24:03 for gem5 by doxygen 1.11.0