Namespaces | |
| namespace | detail |
| namespace | iface |
Classes | |
| class | AfterCall |
| class | AfterCallInterface |
| class | AfterEvent |
| class | AfterInterface |
| class | AliasRegister |
| class | Attribute |
| Represents a Simics attribute. More... | |
| struct | AttributeAccessor |
| A container of get and set callbacks for a class member variable. More... | |
| class | AttrValue |
| class | Bank |
| Base class to represent a Simics register bank. More... | |
| struct | BankAccess |
| class | BankInstrumentationSubscribeConnection |
| class | BankInterface |
| An interface implemented by a Simics bank. More... | |
| class | BankIssueCallbacksInterface |
| class | BankPort |
| Extends Port with bank required interfaces. More... | |
| class | BankPortInterface |
| class | BankRegister |
| class | BigEndianBank |
| class | ClassAttribute |
| Represents a Simics class attribute. More... | |
| class | ClearOnReadField |
| class | ClearOnReadRegister |
| class | ConfClass |
| Represents Simics C type conf_class_t. More... | |
| class | ConfObject |
| Base class for all Simics configuration objects. More... | |
| class | ConfObjectInterface |
| Abstract C++ interface contains methods for register model defined behavior after the construction and before the destruction. More... | |
| class | ConfObjectRef |
| Represents Simics C type conf_object_t. More... | |
| class | Connect |
| A class for connecting with another Simics object. More... | |
| class | ConnectBase |
| A base class for Simics C++ interface connect class. More... | |
| class | ConnectConfig |
| By default, all interfaces in the Connect class are required. More... | |
| class | ConnectToDescendant |
| class | ConstantField |
| class | ConstantRegister |
| class | CycleEvent |
| Cycle-based event type. More... | |
| class | CycleEventInterface |
| class | DesignLimitationField |
| class | DesignLimitationRegister |
| class | EnableAfterCall |
| class | Event |
| The Event class allows users to define callbacks that will be executed after a specified delay. More... | |
| struct | EventInfo |
| class | EventInterface |
| An event is required to implement the interface. More... | |
| class | ExtendRegisterWithOffset |
| class | Field |
| Base class to represent a Simics field. More... | |
| class | FieldInterface |
| class | FunctionCall |
| class | HierarchicalObject |
| Base class for Bank, Register, and Field classes. More... | |
| class | HierarchicalObjectInterface |
| Interface for hierarchical objects used in bank register modeling. More... | |
| class | IgnoreField |
| class | IgnoreRegister |
| class | IgnoreWriteField |
| class | IgnoreWriteRegister |
| class | MallocAllocator |
| class | MapNameToInterface |
| class | MapNameToInterfaceObject |
| Class that supports get/set a pointer to IFACE with a string name. More... | |
| class | MappableConfObject |
| class | MapTarget |
| class | MapTargetConnect |
| class | MemberFunctionCall |
| class | MissPatternBank |
| class | MmAllocator |
| class | None |
| class | ObjectFactory |
| A factory for creating instances of ConfObject-derived classes. More... | |
| class | ObjectFactoryInterface |
| Interface for a factory pattern to create ConfObject instances. More... | |
| class | ObjectFactoryWithArg |
| A factory for creating instances of ConfObject-derived classes with an argument. More... | |
| class | OnesField |
| class | OnesRegister |
| class | Port |
| Extends ConfObject to add utilities to a Simics port object. More... | |
| class | PortBank |
| class | Read0Field |
| class | Read0Register |
| class | ReadConstantField |
| class | ReadConstantRegister |
| class | ReadOnlyClearOnReadField |
| class | ReadOnlyClearOnReadRegister |
| class | ReadOnlyField |
| class | ReadOnlyRegister |
| class | ReadUnimplField |
| class | ReadUnimplRegister |
| class | RegBankFunctionCall |
| class | Register |
| Base class to represent a Simics register. More... | |
| class | RegisterClassWithSimics |
| Utility class for automatic registration of C++ classes with Simics. More... | |
| class | RegisterField |
| class | RegisterInterface |
| class | ReservedField |
| class | ReservedRegister |
| class | SharedMemoryBank |
| Normally a bank allocates memory from the device object using the name of the bank as the key. More... | |
| class | SilentConstantField |
| class | SilentConstantRegister |
| class | SilentUnimplField |
| class | SilentUnimplRegister |
| class | SimpleBankPort |
| class | StepEvent |
| Not commonly used for device model. Step-based event type. More... | |
| class | StepEventInterface |
| class | TimeEvent |
| Time-based event type. More... | |
| class | TimeEventInterface |
| class | UndocumentedField |
| class | UndocumentedRegister |
| class | UnimplField |
| class | UnimplRegister |
| class | UnmappedRegister |
| class | ValueAccessorInterface |
| class | ValueMutatorInterface |
| class | Write0OnlyField |
| class | Write0OnlyRegister |
| class | Write1ClearsField |
| class | Write1ClearsRegister |
| class | Write1OnlyField |
| class | Write1OnlyRegister |
| class | WriteOnceField |
| class | WriteOnceRegister |
| class | WriteOnlyField |
| class | WriteOnlyRegister |
| class | WriteUnimplField |
| class | WriteUnimplRegister |
| class | ZerosField |
| class | ZerosRegister |
Typedefs | |
| using | attr_getter = std::add_pointer_t< attr_value_t(conf_object_t *)> |
| using | attr_setter = std::add_pointer_t< set_error_t(conf_object_t *, attr_value_t *)> |
| using | ConfClassPtr = std::unique_ptr< ConfClass > |
| using | ev_callback = std::add_pointer_t< void(conf_object_t *, void *)> |
| using | ev_destroy = ev_callback |
| using | ev_value_getter = std::add_pointer_t< attr_value_t(conf_object_t *obj, void *data)> |
| using | ev_value_setter = std::add_pointer_t< void *(conf_object_t *obj, attr_value_t value)> |
| using | ev_describe = std::add_pointer_t< char *(conf_object_t *obj, void *data)> |
| using | bits_type = std::vector< std::pair< uint8_t *, uint8_t > > |
| using | LogGroups = std::initializer_list< std::string > |
| Type used for log group names. | |
| using | bank_t = std::tuple< Name, Description, std::vector< register_t > > |
| using | bank_memory_t = std::unordered_map< Offset, uint8_t > |
| using | Name = detail::HierarchicalObjectName |
| Type used to name a resource. | |
| using | Description = std::string_view |
| Type used to describe a resource. | |
| using | Offset = detail::ConstSizeT |
| Type used for memory address offset. | |
| using | BitWidth = detail::ConstSizeT |
| Type used for the number/width of bit. | |
| using | InitValue = detail::ConstSizeT |
| Type used for initial value. | |
| using | ByteSize = detail::ConstSizeT |
| Type used for the number/size of byte TODO(xiuliang): add valid value checker? | |
| using | Stride = detail::ConstSizeT |
| Type used for the stride of register/field array. | |
| using | field_t = std::tuple< Name, Description, Offset, BitWidth > |
| using | register_t = std::tuple< Name, Description, Offset, ByteSize, InitValue, std::vector< field_t > > |
| using | register_memory_t = std::vector< uint8_t * > |
Enumerations | |
| enum class | ByteOrder { BE , LE } |
| enum class | CallbackType : int { AR = 1 , AW , BR , BW } |
| enum class | Inquiry : bool { Inquiry = true , NonInquiry = false } |
| enum class | Level { BANK = 0 , REGISTER = 1 , FIELD = 2 } |
| Enum representing the hierarchy level of an object. More... | |
Functions | |
| template<typename Class , typename... Args> | |
| constexpr auto | make_reg_bank_function_call (void(Class::*func)(Args...), const std::string &name) |
| template<typename... Args> | |
| constexpr void | check_function_call (void(*func)(Args...)) |
| template<typename Class , typename... Args> | |
| constexpr void | check_function_call (void(Class::*func)(Args...)) |
| template<typename... Args> | |
| constexpr auto | make_function_call (void(*func)(Args...), const std::string &name) |
| template<typename Class , typename... Args> | |
| constexpr auto | make_function_call (void(Class::*func)(Args...), const std::string &name) |
| void | checkSizeOverflowSimicsAttribute (size_t size) |
| The maximum supported size for a Simics attribute dictionary/list/data is 2**32-1 bytes. | |
| template<typename T > | |
| std::enable_if< std::is_enum< T >::value, attr_value_t >::type | std_to_attr (const T &src) |
| Function transforms C++ enum type T to Simics attr_value_t. | |
| template<typename T > | |
| std::enable_if< std::is_base_of< ConnectBase, T >::value, attr_value_t >::type | std_to_attr (const T &src) |
| Function transforms C++ ConnectBase type T to Simics attr_value_t. | |
| template<typename T > | |
| std::enable_if< std::is_pointer< T >::value, attr_value_t >::type | std_to_attr (const T &src) |
| Function transforms C++ pointer type T to Simics attr_value_t. | |
| template<typename T > | |
| std::enable_if<!std::is_enum< T >::value &&!std::is_base_of< ConnectBase, T >::value &&!std::is_pointer< T >::value, attr_value_t >::type | std_to_attr (const T &src) |
| Function transforms C++ standard type T to Simics attr_value_t. | |
| template<typename T > | |
| std::enable_if< std::is_enum< T >::value, T >::type | attr_to_std (attr_value_t src) |
| Function transforms Simics attr_value_t to C++ enum type. | |
| template<typename T > | |
| std::enable_if< std::is_base_of< ConnectBase, T >::value, T >::type | attr_to_std (attr_value_t src) |
| Function transforms Simics attr_value_t to C++ ConnectBase derived type. | |
| template<typename T > | |
| std::enable_if< std::is_pointer< T >::value, T >::type | attr_to_std (attr_value_t src) |
| Function transforms Simics attr_value_t to C++ pointer. | |
| template<typename T > | |
| std::enable_if<!std::is_enum< T >::value &&!std::is_base_of< ConnectBase, T >::value &&!std::is_pointer< T >::value, T >::type | attr_to_std (attr_value_t src) |
| Function transforms Simics attr_value_t to C++ standard type. | |
| template<typename T > | |
| std::string | attr_type_str () |
| template<typename TBankPort > | |
| ConfClassPtr | make_bank_port (const std::string &name, const std::string &desc) |
| Creates a bank port configuration class with specified attributes. | |
| template<typename TBankPort , typename TArg > | |
| ConfClassPtr | make_bank_port (const std::string &name, const std::string &desc, TArg *arg) |
| template<typename TParent > | |
| void | create_hierarchy_from_register_data (ConfClass *cls, const bank_t &bank) |
| Registers bank data as port objects within a configuration class hierarchy. | |
| template<typename TParent > | |
| void | create_hierarchy_from_register_data (ConfClass *cls, std::initializer_list< bank_t > register_data) |
| template<typename T > | |
| void | decorate_class (...) |
| Overload it with specific implementation by including the other header before this file. | |
| template<typename T > | |
| ConfClassPtr | make_class (const std::string &name, const std::string &short_desc, const std::string &description, const class_kind_t kind=Sim_Class_Kind_Vanilla) |
| A factory method to create a ConfClassPtr which associate with the C++ class T. | |
| template<typename T , typename A > | |
| ConfClassPtr | make_class (const std::string &name, const std::string &short_desc, const std::string &description, A *constructor_arg, const class_kind_t kind=Sim_Class_Kind_Vanilla) |
| A factory method to create a ConfClassPtr which associate with the C++ class T with argument A. | |
| bool | operator== (const ConfObjectRef &lhs, const ConfObjectRef &rhs) |
| Compares two ConfObjectRef objects for equality. | |
| bool | operator!= (const ConfObjectRef &lhs, const ConfObjectRef &rhs) |
| template<typename T > | |
| T * | from_obj (conf_object_t *obj) |
| Utility function to convert a conf_object_t* to a pointer to C++ class derived from simics::ConfObject. | |
| int | array_index (const std::string &name) |
| This function looks for a pattern in the input string that resembles an array index, specifically a substring enclosed in square brackets (e.g., "array[2]"). | |
| std::vector< std::string > | expand_names (const std::string &name, const char delimiter='.') |
| If name contains an array indicator, i.e. | |
| std::pair< size_t, size_t > | overlap_range (size_t r1_start, size_t r1_end, size_t r2_start, size_t r2_end) |
| Given two ranges [r1_start, r1_end) and [r2_start, r2_end), return the overlap range [o_start, o_end) | |
| size_t | hash_str (const std::string &name) |
| Hashes a string to a size_t value. | |
| using simics::attr_getter = typedef std::add_pointer_t<attr_value_t(conf_object_t *)> |
| using simics::attr_setter = typedef std::add_pointer_t<set_error_t(conf_object_t *, attr_value_t *)> |
| using simics::bank_memory_t = typedef std::unordered_map<Offset, uint8_t> |
| using simics::bank_t = typedef std::tuple<Name, Description, std::vector<register_t> > |
| using simics::bits_type = typedef std::vector<std::pair<uint8_t *, uint8_t> > |
| using simics::BitWidth = typedef detail::ConstSizeT |
Type used for the number/width of bit.
| using simics::ByteSize = typedef detail::ConstSizeT |
Type used for the number/size of byte TODO(xiuliang): add valid value checker?
| using simics::ConfClassPtr = typedef std::unique_ptr<ConfClass> |
| using simics::Description = typedef std::string_view |
Type used to describe a resource.
| using simics::ev_callback = typedef std::add_pointer_t<void(conf_object_t *, void *)> |
| using simics::ev_describe = typedef std::add_pointer_t<char *(conf_object_t *obj, void *data)> |
| using simics::ev_destroy = typedef ev_callback |
| using simics::ev_value_getter = typedef std::add_pointer_t<attr_value_t(conf_object_t *obj, void *data)> |
| using simics::ev_value_setter = typedef std::add_pointer_t<void *(conf_object_t *obj, attr_value_t value)> |
| using simics::field_t = typedef std::tuple<Name, Description, Offset, BitWidth> |
| using simics::InitValue = typedef detail::ConstSizeT |
Type used for initial value.
| using simics::LogGroups = typedef std::initializer_list<std::string> |
Type used for log group names.
| using simics::Name = typedef detail::HierarchicalObjectName |
Type used to name a resource.
| using simics::Offset = typedef detail::ConstSizeT |
Type used for memory address offset.
| using simics::register_memory_t = typedef std::vector<uint8_t *> |
| using simics::register_t = typedef std::tuple<Name, Description, Offset, ByteSize, InitValue, std::vector<field_t> > |
| using simics::Stride = typedef detail::ConstSizeT |
Type used for the stride of register/field array.
|
strong |
|
strong |
|
strong |
|
strong |
| int simics::array_index | ( | const std::string & | name | ) |
This function looks for a pattern in the input string that resembles an array index, specifically a substring enclosed in square brackets (e.g., "array[2]").
It supports only single-dimensional arrays and returns the index as an integer.
| name | The string representation of the array (e.g., "array[2]"). |
|
inline |
Function transforms Simics attr_value_t to C++ enum type.
|
inline |
Function transforms Simics attr_value_t to C++ ConnectBase derived type.
|
inline |
Function transforms Simics attr_value_t to C++ pointer.
|
inline |
Function transforms Simics attr_value_t to C++ standard type.
|
inline |
|
constexpr |
|
constexpr |
|
inline |
The maximum supported size for a Simics attribute dictionary/list/data is 2**32-1 bytes.
| void simics::create_hierarchy_from_register_data | ( | ConfClass * | cls, |
| const bank_t & | bank | ||
| ) |
Registers bank data as port objects within a configuration class hierarchy.
This function facilitates the registration of bank data as port objects, using the provided configuration class (ConfClass) and bank information (bank_t). It supports two overloads: one for a single bank and another for multiple banks using an std::initializer_list.
| TParent | The parent type used in the bank port creation process. |
| cls | The configuration class where the bank ports are registered. |
| bank | The bank data containing name, description, and registers. The caller must ensure that the bank parameter is not a temporary object (e.g., not an rvalue or a local variable that goes out of scope). The address of the bank object will be stored and used after the function call, so it must remain valid for the lifetime of the simulation. |
| void simics::create_hierarchy_from_register_data | ( | ConfClass * | cls, |
| std::initializer_list< bank_t > | register_data | ||
| ) |
| void simics::decorate_class | ( | ... | ) |
Overload it with specific implementation by including the other header before this file.
| std::vector< std::string > simics::expand_names | ( | const std::string & | name, |
| const char | delimiter = '.' |
||
| ) |
If name contains an array indicator, i.e.
port[N], return a list that contains all expanded index names, i.e. port[0], port[1], ... Otherwise a list with only the name is returned. Multi-dimensional arrays are not supported. Multi-level names with level delimiter is supported, i.e. a[N].b[M] is expanded to N * M names.
|
inline |
Utility function to convert a conf_object_t* to a pointer to C++ class derived from simics::ConfObject.
For performance reasons we cannot use dynamic_cast here, we should use static_cast. The static_assert makes it safe to use static_cast from void* to T*. The intermediate static_cast from void* to ConfObject* avoids undefined behavior if the conf-object data points to a class that does not have ConfObject as first base class.
| size_t simics::hash_str | ( | const std::string & | name | ) |
Hashes a string to a size_t value.
| ConfClassPtr simics::make_bank_port | ( | const std::string & | name, |
| const std::string & | desc | ||
| ) |
Creates a bank port configuration class with specified attributes.
This template function provides two overloads for instantiating a configuration class for a bank port, using the provided name and description. It leverages the make_class function to create the class and then adds bank-specific properties to it. The function supports optional additional arguments for enhanced flexibility.
| TBankPort | The type of the bank port to be created. |
| TArg | (Overload 2) The type of the additional argument passed to the bank port creation process. |
| name | The name of the bank port configuration class. |
| desc | The description of the bank port configuration class. |
Overload 2:
| name | The name of the bank port configuration class. |
| desc | The description of the bank port configuration class. |
| arg | A pointer to an additional argument used in the bank port creation process. |
Return Value:
ConfClassPtr). | ConfClassPtr simics::make_bank_port | ( | const std::string & | name, |
| const std::string & | desc, | ||
| TArg * | arg | ||
| ) |
| ConfClassPtr simics::make_class | ( | const std::string & | name, |
| const std::string & | short_desc, | ||
| const std::string & | description, | ||
| A * | constructor_arg, | ||
| const class_kind_t | kind = Sim_Class_Kind_Vanilla |
||
| ) |
A factory method to create a ConfClassPtr which associate with the C++ class T with argument A.
It calls init_class if T defines it.
| name | the name of the creating class. |
| short_desc | a short class description for the class. |
| description | a description string describes the class. |
| constructor_arg | argument passed to the object factory constructor. |
| kind | an enum determine if the configuration object should be saved when a checkpoint is created. |
| ConfClassPtr simics::make_class | ( | const std::string & | name, |
| const std::string & | short_desc, | ||
| const std::string & | description, | ||
| const class_kind_t | kind = Sim_Class_Kind_Vanilla |
||
| ) |
A factory method to create a ConfClassPtr which associate with the C++ class T.
It calls init_class if T defines it.
| name | the name of the creating class. |
| short_desc | a short class description for the class. |
| description | a description string describes the class. |
| kind | an enum determine if the configuration object should be saved when a checkpoint is created. |
|
constexpr |
|
constexpr |
|
constexpr |
| bool simics::operator!= | ( | const ConfObjectRef & | lhs, |
| const ConfObjectRef & | rhs | ||
| ) |
| bool simics::operator== | ( | const ConfObjectRef & | lhs, |
| const ConfObjectRef & | rhs | ||
| ) |
Compares two ConfObjectRef objects for equality.
Two ConfObjectRef objects are considered equal if both their object() and port_name() are same.
| std::pair< size_t, size_t > simics::overlap_range | ( | size_t | r1_start, |
| size_t | r1_end, | ||
| size_t | r2_start, | ||
| size_t | r2_end | ||
| ) |
Given two ranges [r1_start, r1_end) and [r2_start, r2_end), return the overlap range [o_start, o_end)
|
inline |
Function transforms C++ enum type T to Simics attr_value_t.
|
inline |
Function transforms C++ ConnectBase type T to Simics attr_value_t.
|
inline |
Function transforms C++ pointer type T to Simics attr_value_t.
|
inline |
Function transforms C++ standard type T to Simics attr_value_t.