Class: SystemRDL::Evaluator::RegInstance

Inherits:
Instance
  • Object
show all
Defined in:
lib/systemrdl/evaluator/reg.rb

Instance Attribute Summary collapse

Attributes inherited from Instance

#array_info, #definition, #instances, #name, #parent, #properties, #token_range

Instance Method Summary collapse

Methods inherited from Instance

#addrmap?, #array?, #array_indices, #array_sizes, #element_name, #field?, #finalize, #first_element?, #full_name, #initialize, #last_element?, #layer, #property, #property_value, #reg?, #regfile?, #revalidate, #root?, #structural_component?, #to_value, #validate

Constructor Details

This class inherits a constructor from SystemRDL::Evaluator::Instance

Instance Attribute Details

#addressObject

Returns the value of attribute address.



127
128
129
# File 'lib/systemrdl/evaluator/reg.rb', line 127

def address
  @address
end

#alignmentObject

Returns the value of attribute alignment.



129
130
131
# File 'lib/systemrdl/evaluator/reg.rb', line 129

def alignment
  @alignment
end

#strideObject

Returns the value of attribute stride.



128
129
130
# File 'lib/systemrdl/evaluator/reg.rb', line 128

def stride
  @stride
end

Instance Method Details

#accesswidthObject



139
140
141
# File 'lib/systemrdl/evaluator/reg.rb', line 139

def accesswidth
  property_value(:accesswidth).value
end

#definable?(definition) ⇒ Boolean

Returns:



131
132
133
# File 'lib/systemrdl/evaluator/reg.rb', line 131

def definable?(definition)
  definition.layer in :field
end

#instantiable?(definition) ⇒ Boolean

Returns:



135
136
137
# File 'lib/systemrdl/evaluator/reg.rb', line 135

def instantiable?(definition)
  definable?(definition)
end

#sizeObject



143
144
145
# File 'lib/systemrdl/evaluator/reg.rb', line 143

def size
  property_value(:regwidth).value / 8
end

#sw_readable?Boolean

Returns:



147
148
149
# File 'lib/systemrdl/evaluator/reg.rb', line 147

def sw_readable?
  instances.any?(&:sw_readable?)
end

#sw_writable?Boolean

Returns:



151
152
153
# File 'lib/systemrdl/evaluator/reg.rb', line 151

def sw_writable?
  instances.any?(&:sw_writable?)
end