The Sparta Modeling Framework
|
Describes an architected Register. More...
#include <Register.hpp>
Public Types | |
typedef uint16_t | HintsT |
Register hint flags. The flags are not part of sparta but should be defined by the model. | |
typedef uint16_t | RegDomainT |
Register Domain. The flags are not part of sparta but should be defined by the model. | |
Public Attributes | |
const ident_type | id |
ID. Must be unique within a register set. | |
const char * | name |
String identifier for this register which distinguishes it from its neighbors. Must adhere to TreeNode::validateName. Must NOT be NULL. | |
const group_num_type | group_num |
Numeric identifer for the group to which this register belongs. This identifies the group for fast lookups in a register set by group. It is up to the user of a RegisterSet to give meaning to group numbers. Group numbers must consistently map to the same group string within a RegisterSet. If set to anything but GROUP_NUM_NONE, group must be set to something other than sparta::TreeNode::GROUP_NAME_NONE. Internally, a lookup-vector is built for fast queries, so low numbers should be used. | |
const char * | group |
String name of group in which this register resides (e.g. gpr). Must NOT be NULL. See sparta::TreeNode::TreeNode. It is up to the user of a RegisterSet to give meaning to group names. All Definitions in the same RegisterSet must contain consistent (group_num:group) mappings. | |
const group_idx_type | group_idx |
Index of register within group. See sparta::TreeNode::TreeNode. Internally, a lookup-vector is built for fast queries, so low indexes should be used. | |
const char * | desc |
Description. Must NOT be NULL. | |
const size_type | bytes |
Size of this register in bytes. Non-byte multiples are not supported. | |
const std::vector< Field::Definition > | fields |
Vector of field definitions. Use like so for empty fields: { name, group_num,..., bytes, {}, aliases ... }; and like so for values { name, group_num,..., bytes, { {"afield","right here",0,1} }, aliases ... };. | |
const std::vector< bank_idx_type > | bank_membership |
Vector of bank indexes of banks in which this register is accessible. | |
const char ** | aliases |
Null-terminated array of of char*s (e.g. {"a", "b", 0}). If there are no aliases, this may be 0. | |
const ident_type | subset_of |
ID of register of which this is a subset. If INVALID_ID, has no effect. | |
const size_type | subset_offset |
Offset (in Bytes) into regster of which this is a subset. subset_offset+(this->bytes) must be <= the size (bytes) of the register of which this is a subset (this->subset_of). This field has no effect if subset_of=INVALID_ID. | |
const unsigned char * | initial_value |
Initial value of this register. | |
const HintsT | hints |
const RegDomainT | regdomain |
const bool | writable = true |
Writable flag, taken from the register definition. | |
Describes an architected Register.
Can be constructed with initializer list as in:
Definition at line 547 of file Register.hpp.
typedef uint16_t sparta::RegisterBase::Definition::HintsT |
Register hint flags. The flags are not part of sparta but should be defined by the model.
Definition at line 669 of file Register.hpp.
typedef uint16_t sparta::RegisterBase::Definition::RegDomainT |
Register Domain. The flags are not part of sparta but should be defined by the model.
Definition at line 676 of file Register.hpp.
const char** sparta::RegisterBase::Definition::aliases |
Null-terminated array of of char*s (e.g. {"a", "b", 0}). If there are no aliases, this may be 0.
Definition at line 644 of file Register.hpp.
const std::vector<bank_idx_type> sparta::RegisterBase::Definition::bank_membership |
Vector of bank indexes of banks in which this register is accessible.
Definition at line 638 of file Register.hpp.
const size_type sparta::RegisterBase::Definition::bytes |
Size of this register in bytes. Non-byte multiples are not supported.
Definition at line 602 of file Register.hpp.
const char* sparta::RegisterBase::Definition::desc |
Description. Must NOT be NULL.
Definition at line 596 of file Register.hpp.
const std::vector<Field::Definition> sparta::RegisterBase::Definition::fields |
Vector of field definitions. Use like so for empty fields: { name, group_num,..., bytes, {}, aliases ... }; and like so for values { name, group_num,..., bytes, { {"afield","right here",0,1} }, aliases ... };.
Definition at line 610 of file Register.hpp.
const char* sparta::RegisterBase::Definition::group |
String name of group in which this register resides (e.g. gpr). Must NOT be NULL. See sparta::TreeNode::TreeNode. It is up to the user of a RegisterSet to give meaning to group names. All Definitions in the same RegisterSet must contain consistent (group_num:group) mappings.
Definition at line 583 of file Register.hpp.
const group_idx_type sparta::RegisterBase::Definition::group_idx |
Index of register within group. See sparta::TreeNode::TreeNode. Internally, a lookup-vector is built for fast queries, so low indexes should be used.
Definition at line 591 of file Register.hpp.
const group_num_type sparta::RegisterBase::Definition::group_num |
Numeric identifer for the group to which this register belongs. This identifies the group for fast lookups in a register set by group. It is up to the user of a RegisterSet to give meaning to group numbers. Group numbers must consistently map to the same group string within a RegisterSet. If set to anything but GROUP_NUM_NONE, group must be set to something other than sparta::TreeNode::GROUP_NAME_NONE. Internally, a lookup-vector is built for fast queries, so low numbers should be used.
Definition at line 573 of file Register.hpp.
const HintsT sparta::RegisterBase::Definition::hints |
Definition at line 670 of file Register.hpp.
const ident_type sparta::RegisterBase::Definition::id |
ID. Must be unique within a register set.
Definition at line 552 of file Register.hpp.
const unsigned char* sparta::RegisterBase::Definition::initial_value |
Initial value of this register.
Definition at line 663 of file Register.hpp.
const char* sparta::RegisterBase::Definition::name |
String identifier for this register which distinguishes it from its neighbors. Must adhere to TreeNode::validateName. Must NOT be NULL.
Definition at line 559 of file Register.hpp.
const RegDomainT sparta::RegisterBase::Definition::regdomain |
Definition at line 677 of file Register.hpp.
const ident_type sparta::RegisterBase::Definition::subset_of |
ID of register of which this is a subset. If INVALID_ID, has no effect.
Definition at line 650 of file Register.hpp.
const size_type sparta::RegisterBase::Definition::subset_offset |
Offset (in Bytes) into regster of which this is a subset. subset_offset+(this->bytes) must be <= the size (bytes) of the register of which this is a subset (this->subset_of). This field has no effect if subset_of=INVALID_ID.
Definition at line 658 of file Register.hpp.
const bool sparta::RegisterBase::Definition::writable = true |
Writable flag, taken from the register definition.
Definition at line 682 of file Register.hpp.