Class: Idl::RegFileElementType
Overview
General-purpose register file element type. Represents the type of one element in a named register file (e.g. F, V, X).
Direct Known Subclasses
Constant Summary
Constants inherited from Type
Type::KINDS, Type::QUALIFIERS, Type::TYPE_FROM_KIND
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Type
#kind, #max_width, #qualifiers, #width_ast
Instance Method Summary collapse
-
#initialize(name, width, max_width: nil) ⇒ RegFileElementType
constructor
A new instance of RegFileElementType.
- #to_cxx ⇒ Object
- #to_s ⇒ Object
Methods inherited from Type
#==, #ary?, #ary_type, #clone, #comparable_to?, #const?, #convertable_to?, #default, #enum_class, #equal_to?, from_json_schema, from_typename, #global?, #integral?, #known?, #make_const, #make_const!, #make_global, #make_known, #make_signed, #mutable?, #qualify, #runtime?, #signed?, #sub_type, #to_idl, #tuple_types, #width
Constructor Details
#initialize(name, width, max_width: nil) ⇒ RegFileElementType
Returns a new instance of RegFileElementType.
971 972 973 974 |
# File 'lib/idlc/type.rb', line 971 def initialize(name, width, max_width: nil) super(:bits, width:, max_width: max_width || width) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
969 970 971 |
# File 'lib/idlc/type.rb', line 969 def name @name end |
Instance Method Details
#to_cxx ⇒ Object
977 |
# File 'lib/idlc/type.rb', line 977 def to_cxx = "#{name}Reg" |
#to_s ⇒ Object
976 |
# File 'lib/idlc/type.rb', line 976 def to_s = "#{name}Reg" |