34 [[nodiscard]]
byte read(
size_t addr);
35 [[nodiscard]]
byte peek(
size_t addr)
const {
return ram[addr]; }
36 void write(
size_t addr,
byte value);
42 [[nodiscard]]
size_t size()
const {
return ram.
size(); }
64 std::vector<bool> completely_initialized_cacheline;
65 std::vector<std::bitset<CacheLine::SIZE>> uninitialized;
This class keeps track of which bytes in the Ram have been written to.
byte * getWriteCacheLine(size_t addr)
Ram & getUncheckedRam()
Give access to the unchecked Ram.
void write(size_t addr, byte value)
byte peek(size_t addr) const
const byte * getReadCacheLine(size_t addr) const
byte * getRWCacheLines(size_t addr, size_t size)
Generic Gang-of-Four Observer class, templatized edition.
This file implemented 3 utility functions: