Class: OrigenTesters::Charz::ShmooRoutine

Inherits:
Routine
  • Object
show all
Defined in:
lib/origen_testers/charz/routines/shmoo_routine.rb

Overview

A 2D search or “Shmoo” routine

Instance Attribute Summary collapse

Attributes inherited from Routine

#id, #name

Instance Method Summary collapse

Methods inherited from Routine

#method_missing

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, options = {}, &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_resObject

Returns the search resolution value for the x dimension's spec search.

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_specSymbol, String

Returns the spec parameter of interest for the x dimension.

Returns:

  • (Symbol, String)

    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_startNumeric

Returns the starting search value for the x dimension's spec search.

Returns:

  • (Numeric)

    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_stopNumeric

Returns the stopping search value for the x dimension's spec search.

Returns:

  • (Numeric)

    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_resObject

Returns the search resolution value for the x dimension's spec search.

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_specSymbol, String

Returns the spec parameter of interest for the x dimension.

Returns:

  • (Symbol, String)

    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_startNumeric

Returns the starting search value for the x dimension's spec search.

Returns:

  • (Numeric)

    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_stopNumeric

Returns the stopping search value for the x dimension's spec search.

Returns:

  • (Numeric)

    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

Returns:

  • (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