Class: OrigenTesters::SmartestBasedTester::Base::PatternCompiler

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

Direct Known Subclasses

V93K::PatternCompiler

Instance Attribute Summary collapse

Attributes included from Generator

#output_directory

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) ⇒ PatternCompiler

Returns a new instance of PatternCompiler.



10
11
12
# File 'lib/origen_testers/smartest_based_tester/base/pattern_compiler.rb', line 10

def initialize(flow = nil)
  @part_patterns = []
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



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

def filename
  @filename
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#part_patternsObject

Returns the value of attribute part_patterns.



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

def part_patterns
  @part_patterns
end

Instance Method Details

#patternsObject



20
21
22
23
24
# File 'lib/origen_testers/smartest_based_tester/base/pattern_compiler.rb', line 20

def patterns
  (references[:main][:all] + references[:main][:ate]).map do |p|
    p.strip.sub(/\..*/, '')
  end.uniq.sort
end

#referencesObject



26
27
28
# File 'lib/origen_testers/smartest_based_tester/base/pattern_compiler.rb', line 26

def references
  Origen.interface.all_pattern_references[id]
end

#subroutinesObject



14
15
16
17
18
# File 'lib/origen_testers/smartest_based_tester/base/pattern_compiler.rb', line 14

def subroutines
  (references[:subroutine][:all] + references[:subroutine][:ate]).map do |p|
    p.strip.sub(/\..*/, '')
  end.uniq.sort
end

#to_be_written?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/origen_testers/smartest_based_tester/base/pattern_compiler.rb', line 30

def to_be_written?
  tester.smt7?
end