Sha256: a254caeeed6826b3b76c1f1be9a1b4f491efb26f9aebee1ee1698246b328eb50

Contents?: true

Size: 937 Bytes

Versions: 36

Compression:

Stored size: 937 Bytes

Contents

require 'origen/pins/timing/timeset'

module Origen
  module Pins
    module Timing
      class Timeset
        attr_reader :_timeset_

        # Bind to the original initialize method in Origen and add registering
        # the DUT timeset to the tester.
        @orig_init = instance_method(:initialize)
        define_method(:initialize) do |*args|
          self.class.instance_variable_get(:@orig_init).bind(self).call(*args)
          instance_variable_set(:@_timeset_, OrigenTesters::Timing.lookup_or_register_timeset(self))
        end

        # Defer any missing methods to the corresponding timeset object on the tester side.
        # If the method isn't found their either, raise the standard NoMethod error.
        def method_missing(m, *args, &block)
          if _timeset_.respond_to?(m)
            _timeset_.send(m, *args, &block)
          else
            super
          end
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
origen_testers-0.48.3 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.48.2 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.48.1 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.48.0 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.47.0 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.46.1 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.46.0 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.45.4 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.45.3 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.45.2 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.45.1 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.45.0 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.44.1 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.44.0 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.43.0 lib/origen_testers/origen_ext/pins/timing/timeset.rb
origen_testers-0.42.0 lib/origen_testers/origen_ext/pins/timing/timeset.rb