Module: Origen::Tester::Ultraflex::Generator

Extended by:
ActiveSupport::Concern
Defined in:
lib/origen/tester/ultraflex/generator.rb,
lib/origen/tester/ultraflex/generator/flow.rb,
lib/origen/tester/ultraflex/generator/patset.rb,
lib/origen/tester/ultraflex/generator/patsets.rb,
lib/origen/tester/ultraflex/generator/patgroup.rb,
lib/origen/tester/ultraflex/generator/patgroups.rb,
lib/origen/tester/ultraflex/generator/flow_line.rb,
lib/origen/tester/ultraflex/generator/test_instance.rb,
lib/origen/tester/ultraflex/generator/test_instances.rb,
lib/origen/tester/ultraflex/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) 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.



173
174
175
176
177
178
179
180
# File 'lib/origen/tester/ultraflex/generator.rb', line 173

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



129
130
131
132
133
134
135
# File 'lib/origen/tester/ultraflex/generator.rb', line 129

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



105
106
107
# File 'lib/origen/tester/ultraflex/generator.rb', line 105

def flow_sheets
  @@flow_sheets ||= {}
end

- (Object) patgroup_sheets

Returns a hash containing all pat group sheets



110
111
112
# File 'lib/origen/tester/ultraflex/generator.rb', line 110

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.



188
189
190
191
192
193
194
# File 'lib/origen/tester/ultraflex/generator.rb', line 188

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



90
91
92
# File 'lib/origen/tester/ultraflex/generator.rb', line 90

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.



75
76
77
# File 'lib/origen/tester/ultraflex/generator.rb', line 75

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

- (Object) patset_sheets

Returns a hash containing all pat set sheets



100
101
102
# File 'lib/origen/tester/ultraflex/generator.rb', line 100

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.



157
158
159
160
161
162
163
# File 'lib/origen/tester/ultraflex/generator.rb', line 157

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



85
86
87
# File 'lib/origen/tester/ultraflex/generator.rb', line 85

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.



68
69
70
# File 'lib/origen/tester/ultraflex/generator.rb', line 68

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

- (Object) reset_globals



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/origen/tester/ultraflex/generator.rb', line 26

def reset_globals
  flow.reset_globals
  @@test_instances_filename = nil
  @@patsets_filename = nil
  @@patgroups_filename = nil
  @@test_instances_filename = nil
  @@patsets_filename = nil
  @@patgroups_filename = nil
  @@test_instance_sheets = nil
  @@patset_sheets = nil
  @@flow_sheets = nil
  @@patgroup_sheets = nil
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 ultraflex interface

resources_filename = "common"

# The above is equivalent to:

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


52
53
54
55
56
# File 'lib/origen/tester/ultraflex/generator.rb', line 52

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



117
118
119
120
121
122
123
124
125
# File 'lib/origen/tester/ultraflex/generator.rb', line 117

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



95
96
97
# File 'lib/origen/tester/ultraflex/generator.rb', line 95

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.



143
144
145
146
147
148
149
# File 'lib/origen/tester/ultraflex/generator.rb', line 143

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



80
81
82
# File 'lib/origen/tester/ultraflex/generator.rb', line 80

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.



61
62
63
# File 'lib/origen/tester/ultraflex/generator.rb', line 61

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