Sha256: c8d285006e609f4356cbe8edb53fa07ae46e43b38fdbe1ab00fe58bbc17b4055

Contents?: true

Size: 1.35 KB

Versions: 36

Compression:

Stored size: 1.35 KB

Contents

module OrigenTesters
  module SmartestBasedTester
    def self.suitable_decompiler_for(pattern: nil, tester: nil, **options)
      if pattern && (Pathname(pattern).extname == '.avc')
        OrigenTesters::SmartestBasedTester::Pattern
      elsif tester && tester == 'v93k'
        OrigenTesters::SmartestBasedTester::Pattern
      end
    end
    extend OrigenTesters::Decompiler::API
    register_decompiler(self)

    class Pattern < OrigenTesters::Decompiler::Pattern
      require_relative './decompiler/avc'
      extend Avc

      @platform = 'v93k'
      @splitter_config = {
        pinlist_start: /^FORMAT/,

        # The vectors start will be picked up right after the pinlist is parsed.
        # We'll throw away any whitespace we encounter between the pinlist and
        #   first vector element though.
        vectors_start: proc do |line:, index:, current_indices:|
          # The pinlist was encountered. Start the vectors at the next line
          # that's not just whitespace
          if current_indices[:pinlist_start] && line !~ /^\s/
            next true
          end
          false
        end,

        # V93K doesn't have any endmatter, or vector end delimiter, so just
        # grab vectors until the end of the file is reached.
        vectors_end:   -1
      }

      @platform_tokens = {
        comment_start: '#'
      }
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
origen_testers-0.52.8 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.52.7 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.52.6 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.52.5 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.52.4 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.52.3 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.52.1 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.52.0 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.51.5 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.51.4 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.51.3 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.51.2 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.51.1 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.51.0 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.50.0 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.49.4 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.49.3 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.49.2 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.49.1 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.49.0 lib/origen_testers/smartest_based_tester/decompiler.rb