C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
register-templates.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2022 Intel Corporation
5
6 This software and the related documents are Intel copyrighted materials, and
7 your use of them is governed by the express license under which they were
8 provided to you ("License"). Unless the License provides otherwise, you may
9 not use, modify, copy, publish, distribute, disclose or transmit this software
10 or the related documents without Intel's prior written permission.
11
12 This software and the related documents are provided as is, with no express or
13 implied warranties, other than those that are expressly stated in the License.
14*/
15
16#ifndef SIMICS_REGISTER_TEMPLATES_H
17#define SIMICS_REGISTER_TEMPLATES_H
18
19#include <string>
20#include <limits>
21#include <vector>
22
23#include "register.h"
24#include "type/register-type.h" // register_t
26
27namespace simics {
28
29// Templates
30
31/*
32 * Register with map information
33 * This class creates a register object and add it to the <arg>bank_iface</arg>.
34 * Optional <arg>fields</arg> is used to create a field object and add it
35 * to the register.
36 * Customized registers such as ReadConstantRegister takes additional arguments.
37 */
38template <typename TRegister = Register, typename... Args>
39class BankRegister : public TRegister {
40 static_assert(std::is_base_of<Register, TRegister>::value,
41 "TRegister must be derived from Register");
42 public:
44 Name reg_name, Description desc, Offset offset, ByteSize size,
45 InitValue value, std::initializer_list<field_t> fields = {},
46 Args... args)
47 : TRegister(bank_iface, reg_name, args ...) {
48 bank_iface->add_register(reg_name, desc, offset, size, value, fields);
49 }
50};
51
52// Writes are ignored.
54 public:
56
57 void write(uint64_t value, uint64_t enabled_bits) override {}
58};
59
60// Reads return 0. Writes are unaffected by this template.
61class Read0Register : public Register {
62 public:
64
65 uint64_t read(uint64_t enabled_bits) override {
67 fmt::format("Read from read-zero register {} -> 0x0",
68 name()));
69 return 0;
70 }
71};
72
73// The object value is read-only for software, the object value
74// can be modified by hardware.
75class ReadOnlyRegister : public Register {
76 public:
78
79 bool is_read_only() const override {
80 return true;
81 }
82
83 void write(uint64_t value, uint64_t enabled_bits) override {
84 // SIM_LOG_XXX_ONCE does not work within a class
85 // must use a member variable
86 SIM_LOG_SPEC_VIOLATION_STR(logged_once_ ? 2 : 1, bank_obj_ref(), 0,
87 fmt::format("Write to read-only register {}"
88 " (value written = {:#010x},"
89 " contents = {:#010x})", name(),
90 value & enabled_bits, get()));
91 logged_once_ = true;
92 }
93
94 private:
95 bool logged_once_ {false};
96};
97
98// The register value can be modified by software but can't be
99// read back, reads return 0.
101 public:
102 using Register::Register;
103
104 uint64_t read(uint64_t enabled_bits) override {
105 SIM_LOG_SPEC_VIOLATION_STR(logged_once_ ? 2 : 1, bank_obj_ref(), 0,
106 fmt::format("Read from write-only register"
107 " {} (returning 0)", name()));
108 logged_once_ = true;
109 return 0;
110 }
111
112 private:
113 bool logged_once_ {false};
114};
115
116// Software can only clear bits. This feature is often used when
117// hardware sets bits and software clears them to acknowledge.
118// Software write 1's to clear bits. The new object value is a
119// bitwise AND of the old object value and the bitwise complement
120// of the value written by software.
122 public:
123 using Register::Register;
124
125 void write(uint64_t value, uint64_t enabled_bits) override {
126 Register::write(~value, enabled_bits & value);
127 }
128};
129
130// Software reads return the object value. The object value is
131// then reset to 0 as a side-effect of the read.
133 public:
134 using Register::Register;
135
136 uint64_t read(uint64_t enabled_bits) override {
137 uint64_t value = get();
138 set(0);
139 return value & enabled_bits;
140 }
141};
142
143// Software can only set bits to 1. The new object value is
144// the bitwise OR of the old object value and the value written
145// by software.
147 public:
148 using Register::Register;
149
150 void write(uint64_t value, uint64_t enabled_bits) override {
151 Register::write(get() | value, enabled_bits);
152 }
153};
154
155// Software can only set bits to 0. The new object value is
156// the bitwise AND of the old object value and the value
157// written by software.
159 public:
160 using Register::Register;
161
162 void write(uint64_t value, uint64_t enabled_bits) override {
163 Register::write(value & get(), enabled_bits);
164 }
165};
166
167// Reads return a constant value
169 public:
171 const std::string &name,
172 uint64_t read_val = 0) :
174 read_val_(read_val) {}
175
177 std::string_view reg_name,
178 uint64_t read_val = 0) :
179 Register(parent, reg_name),
180 read_val_(read_val) {}
181
182
183 uint64_t read(uint64_t enabled_bits) override {
184 return read_val_ & enabled_bits;
185 }
186
187 protected:
188 uint64_t read_val_;
189};
190
191// Writes are forbidden and have no effect. TODO(xiuliang): no_reset?
193 public:
194 using Register::Register;
195
196 void write(uint64_t value, uint64_t enabled_bits) override {
197 SIM_LOG_SPEC_VIOLATION_STR(logged_once_ ? 2 : 1, bank_obj_ref(), 0,
198 fmt::format("Write to constant register {}"
199 " (value written = {:#010x},"
200 " contents = {:#010x})", name(),
201 value & enabled_bits, get()));
202 logged_once_ = true;
203 }
204
205 private:
206 bool logged_once_ {false};
207};
208
209// The object value will remain constant. Writes are ignored
210// and do not update the object value.
212 public:
213 using Register::Register;
214
215 void write(uint64_t value, uint64_t enabled_bits) override {}
216};
217
218// The object value is constant 0. Software writes are forbidden
219// and do not update the object value.
221 public:
222 using ConstantRegister::ConstantRegister;
223
224 void init(std::string_view desc, unsigned number_of_bytes,
225 uint64_t init_val) override {
226 if (init_val != 0) {
227 SIM_LOG_SPEC_VIOLATION(
228 logged_once_ ? 2 : 1, bank_obj_ref(), 0,
229 "Invalid non-zeros init_val for ZerosRegister");
230 logged_once_ = true;
231 }
232 ConstantRegister::init(desc, number_of_bytes, 0);
233 }
234
235 private:
236 bool logged_once_ {false};
237};
238
239// The object is constant all 1's. Software writes do not update
240// the object value.
242 public:
243 using ConstantRegister::ConstantRegister;
244
245 void init(std::string_view desc, unsigned number_of_bytes,
246 uint64_t init_val) override {
247 uint64_t all_ones = std::numeric_limits<uint64_t>::max();
248 if (number_of_bytes != 8) {
249 all_ones >>= (8 - number_of_bytes) * 8;
250 }
251 if (init_val != all_ones) {
252 SIM_LOG_SPEC_VIOLATION(
253 logged_once_ ? 2 : 1, bank_obj_ref(), 0,
254 "Invalid non-ones init_val for OnesRegister");
255 logged_once_ = true;
256 }
257 ConstantRegister::init(desc, number_of_bytes, all_ones);
258 }
259
260 private:
261 bool logged_once_ {false};
262};
263
264// The object's functionality is unimportant. Reads return 0.
265// Writes are ignored.
267 public:
268 using IgnoreWriteRegister::IgnoreWriteRegister;
269
270 uint64_t read(uint64_t enabled_bits) override {
271 return 0;
272 }
273};
274
275// The object is marked reserved and should not be used by software.
276// Writes update the object value. Reads return the object value.
278 public:
279 using Register::Register;
280
281 void write(uint64_t value, uint64_t enabled_bits) override {
282 if (!has_logged_) {
284 fmt::format("Write to reserved register {} (value written ="
285 " {:#010x}, contents = {:#010x}), will not warn"
286 " again.", name(), value & enabled_bits, get()));
287 has_logged_ = true;
288 }
289 }
290
291 private:
292 bool has_logged_ {false};
293};
294
295// The object functionality associated to a read access is
296// unimplemented. Write access is using default implementation.
298 public:
300 : Register(obj, name) {
301 set_description("Read access not implemented. " + description());
302 }
303
305 std::string_view reg_name) :
306 Register(parent, reg_name) {
307 set_description("Read access not implemented. " + description());
308 }
309
310 uint64_t read(uint64_t enabled_bits) override {
311 SIM_LOG_UNIMPLEMENTED_STR(logged_once_ ? 3 : 1, bank_obj_ref(), 0,
312 fmt::format("Read from unimplemented register {}"
313 " (contents = {:#010x}).", name(),
314 get() & enabled_bits));
315 logged_once_ = true;
316 return get() & enabled_bits;
317 }
318
319 private:
320 bool logged_once_ {false};
321};
322
323// The object functionality is unimplemented. Warn when software
324// is using the object. Writes and reads are implemented as default
325// writes and reads.
326class UnimplRegister : public Register {
327 public:
328 UnimplRegister(MappableConfObject *obj, const std::string &name)
329 : Register(obj, name) {
330 set_description("Not implemented. " + description());
331 }
332
333 UnimplRegister(BankInterface *parent, std::string_view reg_name)
334 : Register(parent, reg_name) {
335 set_description("Not implemented. " + description());
336 }
337
338 uint64_t read(uint64_t enabled_bits) override {
339 SIM_LOG_UNIMPLEMENTED_STR(logged_once_read_ ? 3 : 1, bank_obj_ref(), 0,
340 fmt::format("Read from unimplemented register {}"
341 " (contents = {:#010x}).", name(),
342 get() & enabled_bits));
343 logged_once_read_ = true;
344 return get() & enabled_bits;
345 }
346
347 void write(uint64_t value, uint64_t enabled_bits) override {
348 SIM_LOG_UNIMPLEMENTED_STR(logged_once_write_ ? 3 : 1, bank_obj_ref(), 0,
349 fmt::format("Write to unimplemented register {} (value"
350 " written = {:#010x}, contents = {:#010x}).",
351 name(), value & enabled_bits, get()));
352 logged_once_write_ = true;
353 Register::write(value, enabled_bits);
354 }
355
356 private:
357 bool logged_once_read_ {false};
358 bool logged_once_write_ {false};
359};
360
361// The object functionality associated to a write access is
362// unimplemented. Read access is using default implementation.
364 public:
366 : Register(obj, name) {
367 set_description("Write access not implemented. " + description());
368 }
369
370 WriteUnimplRegister(BankInterface *parent, std::string_view reg_name)
371 : Register(parent, reg_name) {
372 set_description("Write access not implemented. " + description());
373 }
374
375 void write(uint64_t value, uint64_t enabled_bits) override {
376 SIM_LOG_UNIMPLEMENTED_STR(logged_once_ ? 3 : 1, bank_obj_ref(), 0,
377 fmt::format("Write to unimplemented register {} (value"
378 " written = {:#010x}, contents = {:#010x}).",
379 name(), value & enabled_bits, get()));
380 logged_once_ = true;
381 Register::write(value, enabled_bits);
382 }
383
384 private:
385 bool logged_once_ {false};
386};
387
388// The object functionality is unimplemented, but do not print
389// a lot of log-messages when reading or writing. Writes and
390// reads are implemented as default writes and reads.
392 public:
393 using Register::Register;
394
395 uint64_t read(uint64_t enabled_bits) override {
396 SIM_LOG_UNIMPLEMENTED_STR(logged_once_read_ ? 3 : 2, bank_obj_ref(), 0,
397 fmt::format("Read from unimplemented register {}"
398 " (contents = {:#010x}).", name(),
399 get() & enabled_bits));
400 logged_once_read_ = true;
401 return get() & enabled_bits;
402 }
403
404 void write(uint64_t value, uint64_t enabled_bits) override {
405 SIM_LOG_UNIMPLEMENTED_STR(logged_once_write_ ? 3 : 2, bank_obj_ref(), 0,
406 fmt::format("Write to unimplemented register {} (value"
407 " written = {:#010x}, contents = {:#010x}).",
408 name(), value & enabled_bits, get()));
409 logged_once_write_ = true;
410 Register::write(value, enabled_bits);
411 }
412
413 private:
414 bool logged_once_read_ {false};
415 bool logged_once_write_ {false};
416};
417
418// The object functionality is undocumented or poorly documented.
419// Writes and reads are implemented as default writes and reads.
421 public:
422 using Register::Register;
423
424 uint64_t read(uint64_t enabled_bits) override {
425 SIM_LOG_SPEC_VIOLATION_STR(logged_once_read_ ? 2 : 1, bank_obj_ref(), 0,
426 fmt::format("Read from poorly or non-documented"
427 " register {} (contents = {:#010x}).",
428 name(), get() & enabled_bits));
429 logged_once_read_ = true;
430 return get() & enabled_bits;
431 }
432
433 void write(uint64_t value, uint64_t enabled_bits) override {
435 logged_once_write_ ? 2 : 1, bank_obj_ref(), 0,
436 fmt::format("Write to poorly or non-documented register {}"
437 " (value written = {:#010x}, contents = {:#010x}).",
438 name(), value & enabled_bits, get()));
439 logged_once_write_ = true;
440 Register::write(value, enabled_bits);
441 }
442
443 private:
444 bool logged_once_read_ {false};
445 bool logged_once_write_ {false};
446};
447
448// The register is excluded from the address space of the containing bank.
450 public:
451 UnmappedRegister(MappableConfObject *obj, const std::string &name,
452 size_t number_of_bytes = 4, uint64_t init_value = 0)
453 : Register(obj, name) {
454 create_unmapped_register(number_of_bytes, init_value);
455 }
456
457 UnmappedRegister(BankInterface *parent, std::string_view reg_name,
458 size_t number_of_bytes = 4, uint64_t init_value = 0)
459 : Register(parent, reg_name) {
460 create_unmapped_register(number_of_bytes, init_value);
461 }
462
463 bool is_mapped() const override {
464 return false;
465 }
466
467 private:
468 void create_unmapped_register(size_t number_of_bytes,
469 uint64_t init_value) {
470 if (number_of_bytes > 8 || number_of_bytes == 0) {
471 SIM_LOG_ERROR(bank_obj_ref(), 0,
472 "The supported register size is [1-8] bytes");
473 return;
474 }
475 register_memory_t bytePointers;
476 for (unsigned i = 0; i < number_of_bytes; ++i) {
477 bytePointers.push_back(register_memory_.data() + i);
478 }
479 set_byte_pointers(bytePointers);
480 init("Unmapped. ", number_of_bytes, init_value);
481 }
482
483 std::array<uint8_t, 8> register_memory_;
484};
485
486// The object's functionality is not in the model's scope and has been
487// left unimplemented as a design decision. Software and hardware writes
488// and reads are implemented as default writes and reads. Debug registers
489// are a prime example of when to use this template. This is different from
490// unimplemented which is intended to be implement (if required) but is a
491// limitation in the current model.
493 public:
495 : Register(obj, name) {
496 set_description(std::string("Not implemented (design limitation). This")
497 + " register is a dummy register with no side effects. "
498 + description());
499 }
500
501 DesignLimitationRegister(BankInterface *parent, std::string_view reg_name)
502 : Register(parent, reg_name) {
503 set_description(std::string("Not implemented (design limitation). This")
504 + " register is a dummy register with no side effects. "
505 + description());
506 }
507};
508
509// The register is an alias for another register. All operations are forwarded
510// to the other register.
511class AliasRegister : public Register {
512 public:
513 AliasRegister(MappableConfObject *obj, const std::string &name,
514 const std::string &alias_name)
515 : Register(obj, name),
516 alias_name_(alias_name) {
517 init_alias();
518 }
519
520 AliasRegister(BankInterface *parent, std::string_view reg_name,
521 const std::string &alias_name)
522 : Register(parent, reg_name),
523 alias_name_(alias_name) {
524 init_alias();
525 }
526
527 bool is_read_only() const override {
528 return alias_->is_read_only();
529 }
530
531 bool is_mapped() const override {
532 return alias_->is_mapped();
533 }
534
535 uint64_t get() const override {
536 return alias_->get();
537 }
538
539 void set(uint64_t value) override {
540 alias_->set(value);
541 }
542
543 uint64_t read(uint64_t enabled_bits) override {
544 return alias_->read(enabled_bits);
545 }
546
547 void write(uint64_t value, uint64_t enabled_bits) override {
548 alias_->write(value, enabled_bits);
549 }
550
551 std::vector<field_t> fields_info() const override {
552 return alias_->fields_info();
553 }
554
555 private:
556 void init_alias() {
559 alias_name_) != static_cast<int>(Level::REGISTER)) {
560 std::string err = "Ignored invalid register name (" \
561 + alias_name_ + ")";
563 throw std::invalid_argument { err };
564 }
565 set_description("Alias register for register " + alias_name_ + ". "
566 + description());
567
568 alias_ = dev_obj()->get_iface<RegisterInterface>(alias_name_);
569 if (!alias_) {
570 // A limitation that depends on the register define order
571 std::string err = "The aliased register " + alias_name_ \
572 + " not found. Alter the register define order to make sure " \
573 + "it is defined before this register.";
575 throw std::invalid_argument { err };
576 }
577 }
578
579 std::string alias_name_;
580 RegisterInterface *alias_ {nullptr};
581};
582
583// The object value can be written only once
585 public:
586 using Register::Register;
587
588 void write(uint64_t value, uint64_t enabled_bits) override {
589 if (written_) {
591 fmt::format("Write to write-once register {} (value"
592 " written = {:#010x}, contents = {:#010x})",
593 name(), value & enabled_bits, get()));
594 return;
595 }
596 Register::write(value, enabled_bits);
597 written_ = true;
598 }
599
600 private:
601 bool written_ {false};
602};
603
604// Combinations of the basic templates
605// Software reads return the object value. The object value is
606// read-only for software then reset to 0 as a side-effect of the read.
608 public:
609 using ReadOnlyRegister::ReadOnlyRegister;
610
611 uint64_t read(uint64_t enabled_bits) override {
612 uint64_t value = get();
613 set(0);
614 return value & enabled_bits;
615 }
616};
617
618} // namespace simics
619
620#endif
Definition: register-templates.h:511
bool is_read_only() const override
Definition: register-templates.h:527
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:547
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:543
bool is_mapped() const override
Definition: register-templates.h:531
AliasRegister(MappableConfObject *obj, const std::string &name, const std::string &alias_name)
Definition: register-templates.h:513
AliasRegister(BankInterface *parent, std::string_view reg_name, const std::string &alias_name)
Definition: register-templates.h:520
void set(uint64_t value) override
Definition: register-templates.h:539
uint64_t get() const override
Definition: register-templates.h:535
std::vector< field_t > fields_info() const override
Definition: register-templates.h:551
Definition: bank-interface.h:45
virtual void add_register(const register_t &reg)=0
Definition: register-templates.h:39
BankRegister(BankInterface *bank_iface, Name reg_name, Description desc, Offset offset, ByteSize size, InitValue value, std::initializer_list< field_t > fields={}, Args... args)
Definition: register-templates.h:43
Definition: register-templates.h:132
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:136
Definition: register-templates.h:192
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:196
Definition: register-templates.h:492
DesignLimitationRegister(BankInterface *parent, std::string_view reg_name)
Definition: register-templates.h:501
DesignLimitationRegister(MappableConfObject *obj, const std::string &name)
Definition: register-templates.h:494
static bool is_valid_hierarchical_name(std::string_view name)
Definition: hierarchical-object.h:303
void set_description(std::string_view desc) override
Definition: hierarchical-object.h:160
static int level_of_hierarchical_name(std::string_view name)
Definition: hierarchical-object.h:332
Definition: register-templates.h:266
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:270
Definition: register-templates.h:53
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:57
Definition: mappable-conf-object.h:131
IFACE * get_iface(const std::string &name) const
Definition: mappable-conf-object.h:170
Definition: register-templates.h:241
void init(std::string_view desc, unsigned number_of_bytes, uint64_t init_val) override
Definition: register-templates.h:245
Definition: register-templates.h:61
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:65
Definition: register-templates.h:168
ReadConstantRegister(BankInterface *parent, std::string_view reg_name, uint64_t read_val=0)
Definition: register-templates.h:176
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:183
uint64_t read_val_
Definition: register-templates.h:188
ReadConstantRegister(MappableConfObject *dev_obj, const std::string &name, uint64_t read_val=0)
Definition: register-templates.h:170
Definition: register-templates.h:607
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:611
Definition: register-templates.h:75
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:83
bool is_read_only() const override
Definition: register-templates.h:79
Definition: register-templates.h:297
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:310
ReadUnimplRegister(MappableConfObject *obj, const std::string &name)
Definition: register-templates.h:299
ReadUnimplRegister(BankInterface *parent, std::string_view reg_name)
Definition: register-templates.h:304
virtual std::vector< field_t > fields_info() const =0
virtual bool is_mapped() const =0
virtual bool is_read_only() const =0
Definition: register.h:65
void set(uint64_t value) override
Definition: register.h:213
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register.h:324
void set_byte_pointers(const register_memory_t &byte_pointers) override
Definition: register.h:164
std::string_view name() const override
Definition: register.h:114
void init(std::string_view desc, unsigned number_of_bytes, uint64_t init_val) override
Definition: register.h:138
ConfObjectRef bank_obj_ref() const override
Definition: register.h:130
Register(MappableConfObject *dev_obj, const std::string &name)
Definition: register.h:68
const std::string & description() const override
Definition: register.h:122
BankInterface * parent() const override
Definition: register.h:445
uint64_t get() const override
Definition: register.h:194
unsigned number_of_bytes() const override
Definition: register.h:134
MappableConfObject * dev_obj() const override
Definition: register.h:126
Definition: register-templates.h:277
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:281
Definition: register-templates.h:211
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:215
Definition: register-templates.h:391
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:404
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:395
Definition: register-templates.h:420
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:433
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:424
Definition: register-templates.h:326
UnimplRegister(MappableConfObject *obj, const std::string &name)
Definition: register-templates.h:328
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:347
UnimplRegister(BankInterface *parent, std::string_view reg_name)
Definition: register-templates.h:333
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:338
Definition: register-templates.h:449
bool is_mapped() const override
Definition: register-templates.h:463
UnmappedRegister(MappableConfObject *obj, const std::string &name, size_t number_of_bytes=4, uint64_t init_value=0)
Definition: register-templates.h:451
UnmappedRegister(BankInterface *parent, std::string_view reg_name, size_t number_of_bytes=4, uint64_t init_value=0)
Definition: register-templates.h:457
virtual uint64_t get() const =0
virtual uint64_t read(uint64_t enabled_bits)=0
virtual void write(uint64_t value, uint64_t enabled_bits)=0
virtual void set(uint64_t value)=0
Definition: register-templates.h:158
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:162
Definition: register-templates.h:121
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:125
Definition: register-templates.h:146
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:150
Definition: register-templates.h:584
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:588
Definition: register-templates.h:100
uint64_t read(uint64_t enabled_bits) override
Definition: register-templates.h:104
Definition: register-templates.h:363
WriteUnimplRegister(MappableConfObject *obj, const std::string &name)
Definition: register-templates.h:365
void write(uint64_t value, uint64_t enabled_bits) override
Definition: register-templates.h:375
WriteUnimplRegister(BankInterface *parent, std::string_view reg_name)
Definition: register-templates.h:370
Definition: register-templates.h:220
void init(std::string_view desc, unsigned number_of_bytes, uint64_t init_val) override
Definition: register-templates.h:224
Literal type that extends size_t type.
Definition: common-types.h:27
Definition: hierarchical-object-name.h:37
#define SIM_LOG_UNIMPLEMENTED_STR(level, obj, group, str)
Definition: log.h:37
#define SIM_LOG_INFO_STR(level, obj, group, str)
Special macro to handle string object (for example, fmt::format)
Definition: log.h:31
#define SIM_LOG_ERROR_STR(obj, group, str)
Definition: log.h:40
#define SIM_LOG_SPEC_VIOLATION_STR(level, obj, group, str)
Definition: log.h:34
Definition: attr-value.h:23
std::string_view Description
Type used to describe a resource.
Definition: common-types.h:43
std::vector< uint8_t * > register_memory_t
Definition: register-type.h:52