Module: SystemRDL::Evaluator::BlockInstance

Includes:
ArrayInstance
Included in:
AddrMapInstance, MemInstance, RegFileInstance
Defined in:
lib/systemrdl/evaluator/block_component.rb

Instance Attribute Summary collapse

Attributes included from ArrayInstance

#array_info

Instance Method Summary collapse

Methods included from ArrayInstance

#array?, #array_indices, #array_sizes, #first_element?, #last_element?

Instance Attribute Details

#addressObject

Returns the value of attribute address.



21
22
23
# File 'lib/systemrdl/evaluator/block_component.rb', line 21

def address
  @address
end

#alignmentObject

Returns the value of attribute alignment.



23
24
25
# File 'lib/systemrdl/evaluator/block_component.rb', line 23

def alignment
  @alignment
end

#strideObject

Returns the value of attribute stride.



22
23
24
# File 'lib/systemrdl/evaluator/block_component.rb', line 22

def stride
  @stride
end

Instance Method Details

#accesswidthObject



25
26
27
# File 'lib/systemrdl/evaluator/block_component.rb', line 25

def accesswidth
  @accesswidth ||= instances.map(&:accesswidth).max
end

#sizeObject



29
30
31
# File 'lib/systemrdl/evaluator/block_component.rb', line 29

def size
  @size ||= instances.map { |inst| inst.address.value + inst.size }.max
end

#sw_readable?Boolean

Returns:



33
34
35
# File 'lib/systemrdl/evaluator/block_component.rb', line 33

def sw_readable?
  true
end

#sw_writable?Boolean

Returns:



37
38
39
# File 'lib/systemrdl/evaluator/block_component.rb', line 37

def sw_writable?
  true
end