Class: SystemRDL::Evaluator::ComponentInsts

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/systemrdl/evaluator/component_insts.rb

Instance Attribute Summary collapse

Attributes included from Common

#component, #parent, #token_range

Instance Method Summary collapse

Constructor Details

#initialize(insts, token_range) ⇒ ComponentInsts

Returns a new instance of ComponentInsts.



8
9
10
11
# File 'lib/systemrdl/evaluator/component_insts.rb', line 8

def initialize(insts, token_range)
  super(token_range)
  @insts = insts
end

Instance Attribute Details

#instsObject (readonly)

Returns the value of attribute insts.



13
14
15
# File 'lib/systemrdl/evaluator/component_insts.rb', line 13

def insts
  @insts
end

Instance Method Details

#connect(parent, component) ⇒ Object



15
16
17
18
# File 'lib/systemrdl/evaluator/component_insts.rb', line 15

def connect(parent, component)
  super
  @insts.each { |inst| inst.connect(self, component) }
end

#evaluate(instance, base, id, **optargs) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/systemrdl/evaluator/component_insts.rb', line 20

def evaluate(instance, base, id, **optargs)
  component_definition = find_component_definition(base, id, **optargs)
  check_recursive_instance(instance, component_definition)
  check_instantiable(instance, component_definition)

  @insts.each do |inst|
    inst.evaluate(instance, component_definition, **optargs)
  end
end