Module: Origen::Pins::Timing
- Defined in:
- lib/origen_testers/origen_ext/pins/timing.rb,
lib/origen_testers/origen_ext/pins/timing/timeset.rb
Defined Under Namespace
Classes: Timeset
Instance Method Summary collapse
-
#current_period_in_secs ⇒ Float
(also: #current_period_in_seconds)
Returns the current timeset in seconds.
-
#current_timeset ⇒ Object
Returns the current timeset.
- #current_timeset=(t) ⇒ Object (also: #timeset=)
-
#current_timeset_period ⇒ Object
(also: #current_period_in_ns)
Returns the current timeset period.
- #current_timeset_period=(p) ⇒ Object (also: #current_period_in_ns=)
-
#timeset(*args, &block) ⇒ Object
If a block is given, defines/redefines the timeset.
Instance Method Details
#current_period_in_secs ⇒ Float Also known as: current_period_in_seconds
Returns the current timeset in seconds
31 32 33 |
# File 'lib/origen_testers/origen_ext/pins/timing.rb', line 31 def current_period_in_secs OrigenTesters::Timing.period_in_secs end |
#current_timeset ⇒ Object
Returns the current timeset
37 38 39 |
# File 'lib/origen_testers/origen_ext/pins/timing.rb', line 37 def current_timeset OrigenTesters::Timing.timeset end |
#current_timeset=(t) ⇒ Object Also known as: timeset=
18 19 20 |
# File 'lib/origen_testers/origen_ext/pins/timing.rb', line 18 def current_timeset=(t) OrigenTesters::Timing.set_timeset(t) end |
#current_timeset_period ⇒ Object Also known as: current_period_in_ns
Returns the current timeset period
24 25 26 |
# File 'lib/origen_testers/origen_ext/pins/timing.rb', line 24 def current_timeset_period OrigenTesters::Timing.period_in_ns end |
#current_timeset_period=(p) ⇒ Object Also known as: current_period_in_ns=
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/origen_testers/origen_ext/pins/timing.rb', line 6 def current_timeset_period=(p) if OrigenTesters::Timing.timeset.nil? Origen.app!.fail!( exception_class: OrigenTesters::Timing::InvalidModification, message: 'No current timeset has been defined! Cannot update the current timeset period!' ) else OrigenTesters::Timing.set_timeset(tester.timeset, p) end end |
#timeset(*args, &block) ⇒ Object
If a block is given, defines/redefines the timeset. If a name is given, retrieves that timeset. Otherwise, returns the current timeset.
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/origen_testers/origen_ext/pins/timing.rb', line 44 def timeset(*args, &block) if block_given? timesets(*args, &block) else if args.first timesets(args.first) else OrigenTesters::Timing.timeset end end end |