Class: OrigenTesters::Charz::ShmooRoutine
- Defined in:
- lib/origen_testers/charz/routines/shmoo_routine.rb
Overview
A 2D search or “Shmoo” routine
Instance Attribute Summary collapse
-
#x_res ⇒ Object
The search resolution value for the x dimension's spec search.
-
#x_spec ⇒ Symbol, String
The spec parameter of interest for the x dimension.
-
#x_start ⇒ Numeric
The starting search value for the x dimension's spec search.
-
#x_stop ⇒ Numeric
The stopping search value for the x dimension's spec search.
-
#y_res ⇒ Object
The search resolution value for the x dimension's spec search.
-
#y_spec ⇒ Symbol, String
The spec parameter of interest for the x dimension.
-
#y_start ⇒ Numeric
The starting search value for the x dimension's spec search.
-
#y_stop ⇒ Numeric
The stopping search value for the x dimension's spec search.
Attributes inherited from Routine
Instance Method Summary collapse
- #attrs_ok? ⇒ Boolean
-
#initialize(id, options = {}, &block) ⇒ ShmooRoutine
constructor
A new instance of ShmooRoutine.
Methods inherited from Routine
Constructor Details
#initialize(id, options = {}, &block) ⇒ ShmooRoutine
Returns a new instance of ShmooRoutine.
24 25 26 27 |
# File 'lib/origen_testers/charz/routines/shmoo_routine.rb', line 24 def initialize(id, = {}, &block) super attrs_ok? end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class OrigenTesters::Charz::Routine
Instance Attribute Details
#x_res ⇒ Object
Returns the search resolution value for the x dimension's spec search.
13 |
# File 'lib/origen_testers/charz/routines/shmoo_routine.rb', line 13 attr_accessor :x_start, :x_stop, :x_res, :x_spec |
#x_spec ⇒ Symbol, String
Returns the spec parameter of interest for the x dimension.
13 |
# File 'lib/origen_testers/charz/routines/shmoo_routine.rb', line 13 attr_accessor :x_start, :x_stop, :x_res, :x_spec |
#x_start ⇒ Numeric
Returns the starting search value for the x dimension's spec search.
13 14 15 |
# File 'lib/origen_testers/charz/routines/shmoo_routine.rb', line 13 def x_start @x_start end |
#x_stop ⇒ Numeric
Returns the stopping search value for the x dimension's spec search.
13 |
# File 'lib/origen_testers/charz/routines/shmoo_routine.rb', line 13 attr_accessor :x_start, :x_stop, :x_res, :x_spec |
#y_res ⇒ Object
Returns the search resolution value for the x dimension's spec search.
22 |
# File 'lib/origen_testers/charz/routines/shmoo_routine.rb', line 22 attr_accessor :y_start, :y_stop, :y_res, :y_spec |
#y_spec ⇒ Symbol, String
Returns the spec parameter of interest for the x dimension.
22 |
# File 'lib/origen_testers/charz/routines/shmoo_routine.rb', line 22 attr_accessor :y_start, :y_stop, :y_res, :y_spec |
#y_start ⇒ Numeric
Returns the starting search value for the x dimension's spec search.
22 23 24 |
# File 'lib/origen_testers/charz/routines/shmoo_routine.rb', line 22 def y_start @y_start end |
#y_stop ⇒ Numeric
Returns the stopping search value for the x dimension's spec search.
22 |
# File 'lib/origen_testers/charz/routines/shmoo_routine.rb', line 22 attr_accessor :y_start, :y_stop, :y_res, :y_spec |
Instance Method Details
#attrs_ok? ⇒ Boolean
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/origen_testers/charz/routines/shmoo_routine.rb', line 29 def attrs_ok? return if @quality_check == false @required_attrs ||= [:x_start, :x_stop, :x_res, :x_spec, :y_start, :y_stop, :y_res, :y_spec] attrs = @required_attrs.map { |attr| instance_variable_get("@#{attr}") } if attrs.compact.size != @required_attrs.size Origen.log.error "ShmooRoutine #{@id}: unspecified attributes, each of #{@required_attrs} must have a value" fail end return if @attr_value_check == false # not sure if I want this check, if so need to scope out if step count is common # if [@x_start, @x_stop, @x_res].all? { |attr| attr.is_a? Numeric } # unless @x_res <= (@x_start - @x_stop).abs # Origen.log.error "ShmooRoutine #{@id}: Search x_resolution (#{@x_res} is larger than the search x_range (#{@x_start - @x_stop).abs})" # fail # end # end # if [@y_start, @y_stop, @y_res].all? { |attr| attr.is_a? Numeric } # unless @y_res <= (@y_start - @y_stop).abs # Origen.log.error "ShmooRoutine #{@id}: Search y_resolution (#{@y_res} is larger than the search y_range (#{@y_start - @y_stop).abs})" # fail # end # end unless @x_spec != @y_spec Origen.log.error "ShmooRoutine #{@id}: Search x_spec is identical to y_spec" fail end end |