Class: OrigenTesters::SmartestBasedTester::Base::PatternMaster
- Inherits:
-
Object
- Object
- OrigenTesters::SmartestBasedTester::Base::PatternMaster
- Includes:
- Generator
- Defined in:
- lib/origen_testers/smartest_based_tester/base/pattern_master.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#flow ⇒ Object
readonly
Returns the value of attribute flow.
-
#id ⇒ Object
Returns the value of attribute id.
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
-
#subdirectory ⇒ Object
Returns the value of attribute subdirectory.
Attributes included from Generator
Instance Method Summary collapse
-
#initialize(flow = nil) ⇒ PatternMaster
constructor
A new instance of PatternMaster.
-
#patterns ⇒ Object
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 =~ /_partd.binl.gz$/ Origen.interface.pattern_compiler.part_patterns << name else Origen.interface.referenced_patterns << name end paths ||= [] # Just add it, duplicates will be removed at render time paths << name unless paths.include?(name) end.
- #references ⇒ Object
- #to_be_written? ⇒ Boolean
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
#filename ⇒ Object
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 |
#flow ⇒ Object (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 |
#id ⇒ Object
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 |
#paths ⇒ Object (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 |
#subdirectory ⇒ Object
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
#patterns ⇒ Object
def add(name, options = {})
name, subdir = extract_subdir(name, )
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 |
#references ⇒ Object
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
63 64 65 |
# File 'lib/origen_testers/smartest_based_tester/base/pattern_master.rb', line 63 def to_be_written? tester.smt7? end |