Class: Origen::Tester::V93K::Generator::PatternMaster

Inherits:
Object
  • Object
show all
Includes:
Generator
Defined in:
lib/origen/tester/v93k/generator/pattern_master.rb

Constant Summary

TEMPLATE =
"#{Origen.top}/lib/origen/tester/v93k/generator/templates/template.pmfl.erb"

Instance Method Summary (collapse)

Methods included from Generator

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

Instance Method Details

- (Object) add(name, options = {})



10
11
12
13
14
15
16
# File 'lib/origen/tester/v93k/generator/pattern_master.rb', line 10

def add(name, options = {})
  check_for_duplicates(name)
  record_pattern(name)
  p = Pattern.new(name, options)
  collection << p
  p
end

- (Boolean) duplicate?(name, options = {})

Returns true if the given pattern name has already been added to the current pattern master file.

Pass in :global => true for all pattern sets sheets to be considered.

Returns:

  • (Boolean)


22
23
24
25
26
27
28
29
# File 'lib/origen/tester/v93k/generator/pattern_master.rb', line 22

def duplicate?(name, options = {})
  files = existing_patterns[name]
  if files && !files.empty?
    options[:global] || files.include?(filename)
  else
    false
  end
end