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.48.3 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.48.2 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.48.1 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.48.0 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.47.0 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.46.1 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.46.0 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.45.4 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.45.3 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.45.2 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.45.1 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.45.0 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.44.1 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.44.0 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.43.0 lib/origen_testers/smartest_based_tester/decompiler.rb
origen_testers-0.42.0 lib/origen_testers/smartest_based_tester/decompiler.rb