Class: OrigenTesters::PatternCompilers::UltraFLEXPatternCompiler

Inherits:
IGXLBasedPatternCompiler show all
Defined in:
lib/origen_testers/pattern_compilers/ultraflex.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 = {}) ⇒ UltraFLEXPatternCompiler

Returns a new instance of UltraFLEXPatternCompiler.



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
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/origen_testers/pattern_compilers/ultraflex.rb', line 36

def initialize(id, options = {})
  super

  @user_options = {}.merge(@user_options)

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

  # These are compiler options that are specific to UltraFLEX (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 = {
    lock:       false,              # prevents pattern from being reverse compiled or opened in PatternTool
    multiinst:  false,              # indicates more than one instrument is connected to a single pin
    nocompress: false,              # do not compress pattern data blocks
    stdin:      false,              # Compile data from standard input. Do not use -cpp or specify any pattern file(s) when using this option.
  }.merge(@compiler_options)

  # These are compiler options that are specific to UltraFLEX (builds on options from IGXL-Based)
  @compiler_options_with_args = {
    pat_version:         nil,       # version of pattern file to compile
    scan_type:           nil,       # type of scan data
    includes:            nil,       # include paths to be passed to C- preprocessor.
    post_processor:      nil,       # <pathname> customer's post-process executable.
    post_processor_args: nil,       # <args> customer's post-process executable arguments
    cdl_cache:           nil,       # 'yes' | 'no', turns on/off CDL caching, default on compiler side is 'yes'
    init_pattern:        nil,       # <pattern>, uses the specified pattern module/file/set as an init patterns
    check_set_msb:       nil,       # 'yes' | 'no', turns on/off check the 'set' or 'set_infinite' opcode
    time_domain:         nil,       # <time domain>, specifies time domain for pins in patterns
    allow_mto_dash:      nil,       # Turn on/off support for channel data runtime repeat,i.e. vector dash in MTO patterns. Default value is "no".
    check_vm_min_size:   nil,       # Turns on/off the check on minimum size of a VM pattern. Default value is "yes".
    check_vm_mod_size:   nil,       # Turns on/off the check on a VM pattern module size. Default value is "yes".
    check_oob_size:      nil,       # Turns on/off the check on size of OOB regions. Yes means size must be modulo 10. Default value is "no".
    allow_mixed_1x2x:    nil,       # Turns on/off the support of mixed 1x/2x pin groups. Default value is "no".
    allow_differential:  nil,       # Turns on/off support for differential pins. Default value is "yes".
    allow_scan_in_srm:   nil,       # Allow/disallow scan vectors in SRM pattern modules. Default value is "no".
    vm_block_size:       nil,       # Specifies uncompressed size in bytes of a pattern data block
  }.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/ultraflex.rb', line 15

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

.compilerObject

Resolves to correct compiler based on operating system



20
21
22
# File 'lib/origen_testers/pattern_compilers/ultraflex.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/ultraflex.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/ultraflex.rb', line 28

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

.compiler_versionObject



32
33
34
# File 'lib/origen_testers/pattern_compilers/ultraflex.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/ultraflex.rb', line 5

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

.windows_compilerObject

Windows compiler executable path



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

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

Instance Method Details

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

Executes the compiler for each job in the queue



82
83
84
85
86
87
88
89
# File 'lib/origen_testers/pattern_compilers/ultraflex.rb', line 82

def run(list = nil, options = {})
  fail "Error: the tester #{Origen.tester} is not an Ultrflex tester,exiting..." unless is_ultraflex?
  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