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
Source
# 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
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
Source
# 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
Returns the currently selected timeset, or nil
Also aliased as: timeset
Source
# 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
Set the current timeset, this will be called automatically if the timeset is changed via tester.set_timeset
Also aliased as: timeset=
Source
# File lib/origen/pins/timing.rb, line 71 def current_timeset_period @current_timeset_period end
Returns the current timeset period or nil
Source
# File lib/origen/pins/timing.rb, line 66 def current_timeset_period=(val) @current_timeset_period = val end
Set the current timeset period, this will be called automatically if the timeset is changed via tester.set_timeset
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