Class: OrigenTesters::SmartestBasedTester::Base::PatternMaster

Inherits:
Object
  • Object
show all
Includes:
Generator
Defined in:
lib/origen_testers/smartest_based_tester/base/pattern_master.rb

Direct Known Subclasses

V93K::PatternMaster

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Generator

#close, #collection, #collection=, #compiler, #current_dir, #dont_diff=, execute_source, #file_extension, #file_pipeline, #finalize, #identity_map, #import, #inhibit_output, #name, #on_close, original_reference_file, original_reference_file=, #output_file, #output_inhibited?, #platform, #reference_file, #render, #set_flow_description, #stats, #write_from_template, #write_to_file

Constructor Details

#initialize(flow = nil) ⇒ PatternMaster

Returns a new instance of PatternMaster.



11
12
13
14
# File 'lib/origen_testers/smartest_based_tester/base/pattern_master.rb', line 11

def initialize(flow = nil)
  @flow = flow
  @paths = {}
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



9
10
11
# File 'lib/origen_testers/smartest_based_tester/base/pattern_master.rb', line 9

def filename
  @filename
end

#flowObject (readonly)

Returns the value of attribute flow.



8
9
10
# File 'lib/origen_testers/smartest_based_tester/base/pattern_master.rb', line 8

def flow
  @flow
end

#idObject

Returns the value of attribute id.



9
10
11
# File 'lib/origen_testers/smartest_based_tester/base/pattern_master.rb', line 9

def id
  @id
end

#pathsObject (readonly)

Returns the value of attribute paths.



8
9
10
# File 'lib/origen_testers/smartest_based_tester/base/pattern_master.rb', line 8

def paths
  @paths
end

#subdirectoryObject

Returns the value of attribute subdirectory.



9
10
11
# File 'lib/origen_testers/smartest_based_tester/base/pattern_master.rb', line 9

def subdirectory
  @subdirectory
end

Instance Method Details

#patternsObject

def add(name, options = {})

name, subdir = extract_subdir(name, options)
name += '.binl.gz' unless name =~ /binl.gz$/
# Don't want to ask Origen to compile these, but do want them in the v93k
# compile list
if name =~ /_part\d+\.binl\.gz$/
  Origen.interface.pattern_compiler.part_patterns << name
else
  Origen.interface.referenced_patterns << name
end
paths[subdir] ||= []
# Just add it, duplicates will be removed at render time
paths[subdir] << name unless paths[subdir].include?(name)

end



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/origen_testers/smartest_based_tester/base/pattern_master.rb', line 43

def patterns
  return_arr = (references[:subroutine][:all] + references[:subroutine][:ate] +
    references[:main][:all] + references[:main][:ate]).map do |p|
    p = p.strip
    p += '.binl.gz' unless p =~ /binl.gz$/
  end.uniq
  if $tester.multiport
    return_arr += (references[:main][:all] + references[:main][:ate]).map do |p|
      p = p.strip
      p = $tester.multiport_name(p)
      p += '.binl.gz' unless p =~ /.binl.gz$/
    end.uniq
  end
  return_arr
end

#referencesObject



59
60
61
# File 'lib/origen_testers/smartest_based_tester/base/pattern_master.rb', line 59

def references
  Origen.interface.all_pattern_references[id]
end

#to_be_written?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/origen_testers/smartest_based_tester/base/pattern_master.rb', line 63

def to_be_written?
  tester.smt7?
end