Class regbit_compound_t
Defined in File sim_types.h
Class Documentation
-
class regbit_compound_t
regbit_compound_t allows to model a register field that is split in separate locations Under the hood, it is an array of regbit_t, each representing a piece of the field. It can be iterated over, like a standard container, yielding the regbit pieces.
Public Functions
-
regbit_compound_t() = default
-
regbit_compound_t(const regbit_compound_t &other)
-
inline std::vector<regbit_t>::const_iterator begin() const
Returns a iterator to the beginning of the regbit pieces.
-
inline std::vector<regbit_t>::const_iterator end() const
Returns a iterator to the end of the regbit pieces.
-
inline size_t size() const
Returns the number of pieces.
-
bool addr_match(reg_addr_t addr) const
Returns true if the addr matches any of the regbit pieces.
-
uint64_t compound(uint8_t regvalue, size_t index) const
Returns a compound value that can be OR’s together with.
-
uint8_t extract(uint64_t v, size_t index) const
Extracts a compound value for a specified regbit piece.
-
int bitcount() const
Returns the number of bits in the field.
-
regbit_compound_t &operator=(const std::vector<regbit_t> &v)
Assigns the regbit pieces.
-
regbit_compound_t &operator=(const regbit_compound_t &other)
Assigns the compound.
-
regbit_compound_t() = default