Class: SystemRDL::Evaluator::ComponentInst
- Inherits:
-
Object
- Object
- SystemRDL::Evaluator::ComponentInst
- Includes:
- Common
- Defined in:
- lib/systemrdl/evaluator/component_insts.rb
Instance Attribute Summary collapse
-
#inst_id ⇒ Object
readonly
Returns the value of attribute inst_id.
Attributes included from Common
#component, #parent, #token_range
Instance Method Summary collapse
- #evaluate(instance, component_definition, inst_type, **optargs) ⇒ Object
-
#initialize(inst_id, inst_values, token_range) ⇒ ComponentInst
constructor
A new instance of ComponentInst.
Methods included from Common
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_id ⇒ Object (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 |