Sha256: 64c7ec02cf0202bfceadd04fac91ba6ca0e789a9077952d78895ccbc5c648610

Contents?: true

Size: 922 Bytes

Versions: 2

Compression:

Stored size: 922 Bytes

Contents

module OrigenTesters
  class IGXLBasedTester
    class Parser
      class DCSpec
        attr_accessor :parser
        attr_accessor :name, :categories
        alias_method :symbol, :name

        def initialize(name, categories, options = {})
          @parser = options[:parser]
          @name = name
          @categories = categories
          @values = {}
        end

        def add_values(components)
          @categories.each_with_index do |category, i|
            @values[category] ||= {}
            @values[category]['Typ'] ||= components[5 + (i * 3) + 0]
            @values[category]['Min'] ||= components[5 + (i * 3) + 1]
            @values[category]['Max'] ||= components[5 + (i * 3) + 2]
          end
        end

        def lookup(category, selector)
          if v == @values[category]
            v[selector]
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
origen_testers-0.13.2 lib/origen_testers/igxl_based_tester/parser/dc_spec.rb
origen_testers-0.10.0 lib/origen_testers/igxl_based_tester/parser/dc_spec.rb