Class: RgGen::SystemVerilog::Common::Utility::InterfaceInstance

Inherits:
Object
  • Object
show all
Includes:
Core::Utility::AttributeSetter
Defined in:
lib/rggen/systemverilog/common/utility/interface_instance.rb

Instance Method Summary collapse

Constructor Details

#initialize(default_attributes = {}) ⇒ InterfaceInstance

Returns a new instance of InterfaceInstance.



10
11
12
13
# File 'lib/rggen/systemverilog/common/utility/interface_instance.rb', line 10

def initialize(default_attributes = {})
  apply_attributes(**default_attributes)
  block_given? && yield(self)
end

Instance Method Details

#identifierObject



32
33
34
35
36
37
# File 'lib/rggen/systemverilog/common/utility/interface_instance.rb', line 32

def identifier
  Identifier.new(name) do |identifier|
    identifier.__array_size__(array_size)
    identifier.__sub_identifiers__(variables)
  end
end

#instantiationObject Also known as: declaration



22
23
24
25
26
27
28
# File 'lib/rggen/systemverilog/common/utility/interface_instance.rb', line 22

def instantiation
  [
    interface_type,
    parameter_value_assignments,
    instance_identifier
  ].select(&:itself).join(' ')
end