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.



105
106
107
108
109
# File 'lib/systemrdl/evaluator/component_insts.rb', line 105

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.



111
112
113
# File 'lib/systemrdl/evaluator/component_insts.rb', line 111

def inst_id
  @inst_id
end

Instance Method Details

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



113
114
115
116
117
# File 'lib/systemrdl/evaluator/component_insts.rb', line 113

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