Class: OrigenTesters::PatternCompilers::J750PatternCompiler

Inherits:
IGXLBasedPatternCompiler show all
Defined in:
lib/origen_testers/pattern_compilers/j750.rb

Instance Attribute Summary

Attributes inherited from BasePatternCompiler

#id, #jobs

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from IGXLBasedPatternCompiler

#bad_options, #find_jobs, #inspect_jobs, #options_ok?, #pinmap, #ready?, #to_list, #verify_pinmap_is_specified

Methods inherited from BasePatternCompiler

#clear, #count, #empty?, #inspect_options, #is_j750?, #is_ultraflex?, #is_v93k?, #name, #platform

Constructor Details

#initialize(id, options = {}) ⇒ J750PatternCompiler

Returns a new instance of J750PatternCompiler.



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/origen_testers/pattern_compilers/j750.rb', line 36

def initialize(id, options = {})
  super

  @user_options = {}.merge(@user_options)

  @job_options = {
    tester:   :j750,
    compiler: self.class.compiler,   # required
  }.merge(@job_options)

  # These are compiler options that are specific to J750 compiler (builds on options from IGXL-Based)
  # Set all of these compiler options that don't have args to true/flase.  if true then send compiler '-opt'
  @compiler_options = {
    compress:      false,     # Compress the compiled output file.
    extended:      false,     # Compiles the pattern for extended mode.
    scan_parallel: false,     # Expands scan vectors into parallel SVM/LVM vectors.
    svm_only:      false,     # Compile all vectors in the file for SVM.
    svm_subr_only: false,     # Only SVM subroutines in file being used.
  }.merge(@compiler_options)

  # These are compiler options that are specific to J750 compiler (builds on options from IGXL-Based)
  @compiler_options_with_args = {
    i:          nil,          # Includes paths to be passed to C++ preprocessor.
    lvm_size:   nil,          # Number of LVM vectors to allow in a single pattern.
    max_errors: nil,          # Number of errors that will cause compilation of the pattern file to be aborted.
    min_period: nil,          # Minimum period, in seconds, that will be used during a pattern burst.
  }.merge(@compiler_options_with_args)

  update_common_options(options)      # Update common options with default (see BasePatternCompiler)
  verify_pinmap_is_specified          # verify pinmap specified correctly - IGXL specific
  clean_and_verify_options            # Standard cleaning and verifying (see BasePatternCompiler)
end

Class Method Details

.atpc_setupObject

Pre-compile environment setup if necessary



15
16
17
# File 'lib/origen_testers/pattern_compilers/j750.rb', line 15

def self.atpc_setup
  Origen.site_config.origen_testers[:j750_atpc_setup]
end

.compilerObject

Resolves to correct compiler based on operating system



20
21
22
# File 'lib/origen_testers/pattern_compilers/j750.rb', line 20

def self.compiler
  Origen.running_on_windows? ? windows_compiler : linux_compiler
end

.compiler_cmdObject



24
25
26
# File 'lib/origen_testers/pattern_compilers/j750.rb', line 24

def self.compiler_cmd
  Pathname.new(compiler).absolute? ? compiler : eval('"' + compiler + '"')
end

.compiler_optionsObject



28
29
30
# File 'lib/origen_testers/pattern_compilers/j750.rb', line 28

def self.compiler_options
  "#{compiler_cmd} -help"
end

.compiler_versionObject



32
33
34
# File 'lib/origen_testers/pattern_compilers/j750.rb', line 32

def self.compiler_version
  "#{compiler_cmd} -version"
end

.linux_compilerObject

Linux compiler executable path



5
6
7
# File 'lib/origen_testers/pattern_compilers/j750.rb', line 5

def self.linux_compiler
  Origen.site_config.origen_testers[:j750_linux_pattern_compiler]
end

.windows_compilerObject

Windows compiler executable path



10
11
12
# File 'lib/origen_testers/pattern_compilers/j750.rb', line 10

def self.windows_compiler
  Origen.site_config.origen_testers[:j750_windows_pattern_compiler]
end

Instance Method Details

#run(list = nil, options = {}) ⇒ Object

Executes the compiler for each job in the queue



70
71
72
73
74
75
76
77
# File 'lib/origen_testers/pattern_compilers/j750.rb', line 70

def run(list = nil, options = {})
  fail "Error: the tester #{Origen.tester} is not an J750 tester,exiting..." unless is_j750?
  msg = "Error: application #{Origen.app.name} is running on Windows, "
  msg += 'to run the pattern compiler you must be on a Linux machine'
  fail msg if Origen.running_on_windows?

  super
end