Namespaces | |
| namespace | detail |
| namespace | iface |
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 | Inquiry : bool { Inquiry = true , NonInquiry = false } |
| enum class | ByteOrder { BE , LE } |
| enum class | CallbackType : int { AR = 1 , AW , BR , BW } |
| enum class | Level { BANK = 0 , REGISTER = 1 , FIELD = 2 } |
Functions | |
| 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_enum< T >::value &&!std::is_base_of< ConnectBase, 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_enum< T >::value &&!std::is_base_of< ConnectBase, 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) |
| 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) |
| template<typename TParent > | |
| void | create_hierarchy_from_register_data (ConfClass *cls, std::initializer_list< bank_t > register_data) |
| std::pair< size_t, size_t > | overlap_range (size_t r1_start, size_t r1_end, size_t r2_start, size_t r2_end) |
| int | array_index (const std::string &name) |
| Return the array index if name is using an array format like array[N]. | |
| std::vector< std::string > | expand_names (const std::string &name, const char delimiter='.') |
| If name contains an array indicator, i.e. | |
| 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. | |
| 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. | |
| template<typename IFACE > | |
| IFACE * | get_interface (conf_object_t *obj) |
| Return the Simics C++ interface class from a configuration object. | |
| 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 | ) |
Return the array index if name is using an array format like array[N].
Otherwise, -1 is returned.
|
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++ standard type.
|
inline |
| void simics::create_hierarchy_from_register_data | ( | ConfClass * | cls, |
| const bank_t & | bank | ||
| ) |
| 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.
| IFACE * simics::get_interface | ( | conf_object_t * | obj | ) |
Return the Simics C++ interface class from a configuration object.
| ConfClassPtr simics::make_bank_port | ( | const std::string & | name, |
| const std::string & | desc | ||
| ) |
| 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. |
| 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 | ||
| ) |
|
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++ standard type T to Simics attr_value_t.