Class: SystemRDL::Evaluator::ComponentInst

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

Methods included from Common

#connect

Constructor Details

#initialize(inst_id, inst_values, token_range) ⇒ ComponentInst

Returns a new instance of ComponentInst.



67
68
69
70
71
# File 'lib/systemrdl/evaluator/component_insts.rb', line 67

def initialize(inst_id, inst_values, token_range)
  super(token_range)
  @inst_id = inst_id
  @inst_values = inst_values
end

Instance Attribute Details

#inst_idObject (readonly)

Returns the value of attribute inst_id.



73
74
75
# File 'lib/systemrdl/evaluator/component_insts.rb', line 73

def inst_id
  @inst_id
end

Instance Method Details

#evaluate(instance, component_definition, **optargs) ⇒ Object



75
76
77
78
# File 'lib/systemrdl/evaluator/component_insts.rb', line 75

def evaluate(instance, component_definition, **optargs)
  inst_values = eval_inst_values(instance, **optargs)
  component_definition.create_instances(instance, @inst_id.value, inst_values, @token_range, **optargs)
end