28#ifndef __MEM_TRANSLATION_GEN_HH__
29#define __MEM_TRANSLATION_GEN_HH__
41class TranslationGenConstIterator;
237 const auto orig(*
this);
251 return !(*
this == other);
255TranslationGenConstIterator
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
An iterator for pulling "Range" instances out of a TranslationGen.
TranslationGenConstIterator(const TranslationGen *parent, Addr start)
Construct a valid new iterator and set it's starting conditions.
bool operator!=(const TranslationGenConstIterator &other) const
bool operator==(const TranslationGenConstIterator &other) const
void update()
Use the vaddr of the "current" Range to update its other fields.
const TranslationGen * gen
TranslationGenConstIterator operator++(int)
std::forward_iterator_tag iterator_category
TranslationGenConstIterator()
Construct a blank iterator, used by end().
TranslationGen::Range current
TranslationGenConstIterator & operator++()
The increment operator, which is the main work horse of this class.
TranslationGenConstIterator & operator=(const TranslationGenConstIterator &other)
TranslationGenConstIterator(const TranslationGenConstIterator &other)
TranslationGen is a base class for a generator object which returns information about address transla...
friend class TranslationGenConstIterator
A const iterator class is provided so this generator can be used in a range based for loop.
TranslationGen(Addr new_start, Addr new_size)
The starting virtual address and the size of the entire region being translated.
TranslationGenConstIterator const_iterator
const_iterator begin() const
virtual ~TranslationGen()
const_iterator end() const
virtual void translate(Range &range) const =0
Subclasses implement this function to complete TranslationGen.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::unique_ptr< TranslationGen > TranslationGenPtr
constexpr decltype(nullptr) NoFault
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
This structure represents a single, contiguous translation, or carries information about whatever fau...