Class: Idl::CsrType
Overview
represents a CSR register
Constant Summary
Constants inherited from Type
Type::KINDS, Type::QUALIFIERS, Type::TYPE_FROM_KIND
Instance Attribute Summary collapse
-
#csr ⇒ Object
readonly
Returns the value of attribute csr.
Attributes inherited from Type
#kind, #max_width, #qualifiers, #width_ast
Instance Method Summary collapse
- #fields ⇒ Object
-
#initialize(csr, qualifiers: []) ⇒ CsrType
constructor
A new instance of CsrType.
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?, #name, #qualify, #runtime?, #signed?, #sub_type, #to_idl, #to_s, #tuple_types, #width
Constructor Details
#initialize(csr, qualifiers: []) ⇒ CsrType
Returns a new instance of CsrType.
765 766 767 |
# File 'lib/idlc/type.rb', line 765 def initialize(csr, qualifiers: []) super(:csr, name: csr.name, csr: csr, width: csr.max_length, qualifiers: qualifiers) end |
Instance Attribute Details
#csr ⇒ Object (readonly)
Returns the value of attribute csr.
762 763 764 |
# File 'lib/idlc/type.rb', line 762 def csr @csr end |
Instance Method Details
#fields ⇒ Object
770 771 772 773 774 |
# File 'lib/idlc/type.rb', line 770 def fields raise "fields are unknown" if @csr == :unknown @csr.fields end |