Module: Origen::Tester::J750::Generator

Extended by:
ActiveSupport::Concern
Defined in:
lib/origen/tester/j750/generator.rb,
lib/origen/tester/j750/generator/flow.rb,
lib/origen/tester/j750/generator/patset.rb,
lib/origen/tester/j750/generator/patsets.rb,
lib/origen/tester/j750/generator/patgroup.rb,
lib/origen/tester/j750/generator/flow_line.rb,
lib/origen/tester/j750/generator/patgroups.rb,
lib/origen/tester/j750/generator/test_instance.rb,
lib/origen/tester/j750/generator/test_instances.rb,
lib/origen/tester/j750/generator/test_instance_group.rb

Defined Under Namespace

Classes: Flow, FlowLine, Patgroup, Patgroups, Patset, Patsets, TestInstance, TestInstanceGroup, TestInstances

Instance Method Summary (collapse)

Instance Method Details

- (Object) at_flow_start

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
30
31
# File 'lib/origen/tester/j750/generator.rb', line 27

def at_flow_start
  @@test_instances_filename = nil
  @@patsets_filename = nil
  @@patgroups_filename = nil
end

- (Object) at_run_start Also known as: reset_globals

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



34
35
36
37
38
39
40
# File 'lib/origen/tester/j750/generator.rb', line 34

def at_run_start
  flow.at_run_start
  @@test_instance_sheets = nil
  @@patset_sheets = nil
  @@flow_sheets = nil
  @@patgroup_sheets = nil
end

- (Object) flow(filename = Origen.file_handler.current_file.basename('.rb').to_s)

Returns the current flow sheet (as defined by the name of the current top level flow source file).

Pass in a filename argument to have a specific sheet returned instead.

If the sheet does not exist yet it will be created.



176
177
178
179
180
181
182
183
# File 'lib/origen/tester/j750/generator.rb', line 176

def flow(filename = Origen.file_handler.current_file.basename('.rb').to_s)
  f = filename.to_sym
  return flow_sheets[f] if flow_sheets[f]
  p = Flow.new
  p.inhibit_output if Origen.interface.resources_mode?
  p.filename = f
  flow_sheets[f] = p
end

- (Object) flow_generators

Returns an array containing all flow sheet generators. All Origen program generators must implement this method



132
133
134
135
136
137
138
# File 'lib/origen/tester/j750/generator.rb', line 132

def flow_generators
  g = []
  flow_sheets.each do |_name, sheet|
    g << sheet
  end
  g
end

- (Object) flow_sheets

Returns a hash containing all flow sheets



108
109
110
# File 'lib/origen/tester/j750/generator.rb', line 108

def flow_sheets
  @@flow_sheets ||= {}
end

- (Object) patgroup_sheets

Returns a hash containing all pat group sheets



113
114
115
# File 'lib/origen/tester/j750/generator.rb', line 113

def patgroup_sheets
  @@patgroup_sheets ||= {}
end

- (Object) patgroups(filename = patgroups_filename) Also known as: pat_groups, pattern_groups

Returns the current pattern groups sheet (as defined by the current value of patgroups_filename).

Pass in a filename argument to have a specific sheet returned instead.

If the sheet does not exist yet it will be created.



191
192
193
194
195
196
197
# File 'lib/origen/tester/j750/generator.rb', line 191

def patgroups(filename = patgroups_filename)
  f = filename.to_sym
  return patgroup_sheets[f] if patgroup_sheets[f]
  p = Patgroups.new
  p.filename = f
  patgroup_sheets[f] = p
end

- (Object) patgroups_filename

Returns the name of the current pat groups sheet



93
94
95
# File 'lib/origen/tester/j750/generator.rb', line 93

def patgroups_filename
  @@patgroups_filename ||= 'global'
end

- (Object) patgroups_filename=(name)

Set the name of the current pattern groups sheet. This does not change the name of the current sheet, but rather sets the name of the sheet that will be generated the next time you access patgroups.



78
79
80
# File 'lib/origen/tester/j750/generator.rb', line 78

def patgroups_filename=(name)
  @@patgroups_filename = name
end

- (Object) patset_sheets

Returns a hash containing all pat set sheets



103
104
105
# File 'lib/origen/tester/j750/generator.rb', line 103

def patset_sheets
  @@patset_sheets ||= {}
end

- (Object) patsets(filename = patsets_filename) Also known as: pat_sets, pattern_sets

Returns the current pattern sets sheet (as defined by the current value of patsets_filename).

Pass in a filename argument to have a specific sheet returned instead.

If the sheet does not exist yet it will be created.



160
161
162
163
164
165
166
# File 'lib/origen/tester/j750/generator.rb', line 160

def patsets(filename = patsets_filename)
  f = filename.to_sym
  return patset_sheets[f] if patset_sheets[f]
  p = Patsets.new
  p.filename = f
  patset_sheets[f] = p
end

- (Object) patsets_filename

Returns the name of the current pat sets sheet



88
89
90
# File 'lib/origen/tester/j750/generator.rb', line 88

def patsets_filename
  @@patsets_filename ||= 'global'
end

- (Object) patsets_filename=(name)

Set the name of the current pattern sets sheet. This does not change the name of the current sheet, but rather sets the name of the sheet that will be generated the next time you access patsets.



71
72
73
# File 'lib/origen/tester/j750/generator.rb', line 71

def patsets_filename=(name)
  @@patsets_filename = name
end

- (Object) resources_filename=(name)

Convenience method to allow the current name for the test instance, patsets and patgroups sheets to be set to the same value.

# my j750 interface

resources_filename = "common"

# The above is equivalent to:

test_instances_filename = "common"
patsets_filename = "common"
patgroups_filename = "common"


55
56
57
58
59
# File 'lib/origen/tester/j750/generator.rb', line 55

def resources_filename=(name)
  self.test_instances_filename = name
  self.patsets_filename = name
  self.patgroups_filename = name
end

- (Object) sheet_generators

Returns an array containing all sheet generators where a sheet generator is a flow, test instance, patset or pat group sheet. All Origen program generators must implement this method



120
121
122
123
124
125
126
127
128
# File 'lib/origen/tester/j750/generator.rb', line 120

def sheet_generators # :nodoc:
  g = []
  [flow_sheets, test_instance_sheets, patset_sheets, patgroup_sheets].each do |sheets|
    sheets.each do |_name, sheet|
      g << sheet
    end
  end
  g
end

- (Object) test_instance_sheets

Returns a hash containing all test instance sheets



98
99
100
# File 'lib/origen/tester/j750/generator.rb', line 98

def test_instance_sheets
  @@test_instance_sheets ||= {}
end

- (Object) test_instances(filename = test_instances_filename)

Returns the current test instances sheet (as defined by the current value of test_instances_filename).

Pass in a filename argument to have a specific sheet returned instead.

If the sheet does not exist yet it will be created.



146
147
148
149
150
151
152
# File 'lib/origen/tester/j750/generator.rb', line 146

def test_instances(filename = test_instances_filename)
  f = filename.to_sym
  return test_instance_sheets[f] if test_instance_sheets[f]
  t = TestInstances.new
  t.filename = f
  test_instance_sheets[f] = t
end

- (Object) test_instances_filename

Returns the name of the current test instances sheet



83
84
85
# File 'lib/origen/tester/j750/generator.rb', line 83

def test_instances_filename
  @@test_instances_filename ||= 'global'
end

- (Object) test_instances_filename=(name)

Set the name of the current test instances sheet. This does not change the name of the current sheet, but rather sets the name of the sheet that will be generated the next time you access test_instances.



64
65
66
# File 'lib/origen/tester/j750/generator.rb', line 64

def test_instances_filename=(name)
  @@test_instances_filename = name
end