Method: OrigenTesters::PatternCompilers#pattern_compilers

Defined in:
lib/origen_testers/pattern_compilers.rb

#pattern_compilers(id = nil, options = {}) ⇒ Object

Hash wrapper for compiler instances, defaults to display currently enabled tester platform. If no tester is set then user must supply a valid tester platform argument User can also supply alternate tester platform (i.e. not the current tester target)

pattern_compilers()                    => hash of compilers for current tester platform
pattern_compilers(id1)                 => inspect options of compiler 'id1' for current tester platfrom
pattern_compiler(platform: :v93k)      => hash of compilers for specified tester platfrom (v93k)
pattern_compiler(id2, platform: :v93k) => inspect options of compiler 'id2' for specified tester platfrom (v93k)


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/origen_testers/pattern_compilers.rb', line 22

def pattern_compilers(id = nil, options = {})
  id, options = nil, id if id.is_a? Hash
  plat = options[:platform] || platform     # use platform option or current tester platform

  # Build up empty hash structure for all supported plaforms
  @pattern_compilers ||= begin
    hash = {}
    PLATFORMS.keys.each { |p| hash[p] = {} }
    hash
  end

  @default_pattern_compiler ||= begin
    hash = {}
    PLATFORMS.keys.each { |p| hash[p] = nil }
    hash
  end

  if id.nil?
    @pattern_compilers[plat]
  else
    @pattern_compilers[plat][id].inspect_options
  end
end