Module: Origen::Tester::J750::Generator
- Extended by:
- ActiveSupport::Concern
- Included in:
- C99::J750Interface
- 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
- #at_flow_start ⇒ Object private
- #at_run_start ⇒ Object (also: #reset_globals) private
-
#flow(filename = Origen.file_handler.current_file.basename('.rb').to_s) ⇒ Object
Returns the current flow sheet (as defined by the name of the current top level flow source file).
-
#flow_generators ⇒ Object
Returns an array containing all flow sheet generators.
-
#flow_sheets ⇒ Object
Returns a hash containing all flow sheets.
-
#patgroup_sheets ⇒ Object
Returns a hash containing all pat group sheets.
-
#patgroups(filename = patgroups_filename) ⇒ Object
(also: #pat_groups, #pattern_groups)
Returns the current pattern groups sheet (as defined by the current value of patgroups_filename).
-
#patgroups_filename ⇒ Object
Returns the name of the current pat groups sheet.
-
#patgroups_filename=(name) ⇒ Object
Set the name of the current pattern groups sheet.
-
#patset_sheets ⇒ Object
Returns a hash containing all pat set sheets.
-
#patsets(filename = patsets_filename) ⇒ Object
(also: #pat_sets, #pattern_sets)
Returns the current pattern sets sheet (as defined by the current value of patsets_filename).
-
#patsets_filename ⇒ Object
Returns the name of the current pat sets sheet.
-
#patsets_filename=(name) ⇒ Object
Set the name of the current pattern sets sheet.
-
#resources_filename=(name) ⇒ Object
Convenience method to allow the current name for the test instance, patsets and patgroups sheets to be set to the same value.
-
#sheet_generators ⇒ Object
Returns an array containing all sheet generators where a sheet generator is a flow, test instance, patset or pat group sheet.
-
#test_instance_sheets ⇒ Object
Returns a hash containing all test instance sheets.
-
#test_instances(filename = test_instances_filename) ⇒ Object
Returns the current test instances sheet (as defined by the current value of test_instances_filename).
-
#test_instances_filename ⇒ Object
Returns the name of the current test instances sheet.
-
#test_instances_filename=(name) ⇒ Object
Set the name of the current test instances sheet.
Instance Method Details
#at_flow_start ⇒ Object
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 |
#at_run_start ⇒ Object 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 |
#flow(filename = Origen.file_handler.current_file.basename('.rb').to_s) ⇒ Object
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 |
#flow_generators ⇒ Object
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 |
#flow_sheets ⇒ Object
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 |
#patgroup_sheets ⇒ Object
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 |
#patgroups(filename = patgroups_filename) ⇒ Object 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 |
#patgroups_filename ⇒ Object
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 |
#patgroups_filename=(name) ⇒ Object
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 |
#patset_sheets ⇒ Object
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 |
#patsets(filename = patsets_filename) ⇒ Object 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 |
#patsets_filename ⇒ Object
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 |
#patsets_filename=(name) ⇒ Object
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 |
#resources_filename=(name) ⇒ Object
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 |
#sheet_generators ⇒ Object
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 |
#test_instance_sheets ⇒ Object
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 |
#test_instances(filename = test_instances_filename) ⇒ Object
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 |
#test_instances_filename ⇒ Object
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 |
#test_instances_filename=(name) ⇒ Object
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 |