module Origen::Pins::Timing

Top-level manager for the devices pin timing setups, an instance of this class is automatically instantiated and available as dut.timing

Public Instance Methods

add_timeset(*args, &block) click to toggle source

Add a very basic timeset where all pins will have default waves, which will drive for the whole cycle and compare at 50% of the current period

add_timeset :func
# File lib/origen/pins/timing.rb, line 15
def add_timeset(*args, &block)
  if block_given?
    timesets(*args, &block)
  else
    timesets(args.first) {}
  end
end
current_timeset(*args, &block) click to toggle source

Returns the currently selected timeset, or nil

# File lib/origen/pins/timing.rb, line 40
def current_timeset(*args, &block)
  if block_given?
    timesets(*args, &block)
  else
    if args.first
      timesets(args.first)
    else
      timesets[@current_timeset]
    end
  end
end
Also aliased as: timeset
current_timeset=(id) click to toggle source

Set the current timeset, this will be called automatically if the timeset is changed via tester.set_timeset

# File lib/origen/pins/timing.rb, line 55
def current_timeset=(id)
  if timesets[id]
    @current_timeset = id
  else
    fail "Timeset #{id} has not been defined!"
  end
end
Also aliased as: timeset=
current_timeset_period() click to toggle source

Returns the current timeset period or nil

# File lib/origen/pins/timing.rb, line 71
def current_timeset_period
  @current_timeset_period
end
current_timeset_period=(val) click to toggle source

Set the current timeset period, this will be called automatically if the timeset is changed via tester.set_timeset

# File lib/origen/pins/timing.rb, line 66
def current_timeset_period=(val)
  @current_timeset_period = val
end
timeset(*args, &block)
Alias for: current_timeset
timeset=(id)
Alias for: current_timeset=
timesets(name = nil, options = {}) { |timesets| ... } click to toggle source
# File lib/origen/pins/timing.rb, line 23
def timesets(name = nil, options = {})
  name, options = nil, name if name.is_a?(Hash)
  @timesets ||= {}.with_indifferent_access
  # If defining a new timeset
  if block_given?
    @timesets[name] ||= Timeset.new(name)
    yield @timesets[name]
  else
    if name
      @timesets[name]
    else
      @timesets
    end
  end
end