lib/origen/pins/pin.rb
# Causes the pin to continuously drive 1 for 2 seconds and then drive 0 for 2 seconds.
#
# This is not an API that is intended to be used within a pattern. Rather it is a debug aid when
# setting up something like a bench test environment that uses Origen Link. For example you would
# call this method on a pin from a console session, then confirm with a multimeter that the pin
# is toggling on the relevant hardware.
#
# Call Pin#goodbye to stop it.
#
# @example Call from an origen console like this
#
#   dut.pin(:tdi).hello
Causes the pin to continuously drive 1 for 2 seconds and then drive 0 for 2 seconds.
This is not an API that is intended to be used within a pattern. Rather it is a debug aid when
setting up something like a bench test environment that uses Origen Link. For example you would
call this method on a pin from a console session, then confirm with a multimeter that the pin
is toggling on the relevant hardware.

Call Pin#goodbye to stop it.
Causes the pin to continuously drive 1 for 2 seconds and then drive 0 for 2 seconds . This is not an API that is intended to be used within a pattern . Rather it is a debug aid when setting up something like a bench test environment that uses Origen Link . For example you would call this method on a pin from a console session then confirm with a multimeter that the pin is toggling on the relevant hardware . Call Pin#goodbye to stop it .
def hello
        drive_hi
        @@hello_pins ||= []
        @@hello_pins << myself unless @@hello_pins.include?(myself)
        @@hello_loop ||= Thread.new do
          loop do
            @@hello_pins.each(&:toggle)
            if $tester
              $tester.set_timeset('hello_world', 40) unless $tester.timeset
              $tester.cycle
            end
            sleep 2
          end
        end
        puts "Pin #{name} is toggling with a period of 2 seconds"
      end
def hello drive_hi @@hello_pins ||= [ ] @@hello_pins << myself unless @@hello_pins . include? ( myself ) @@hello_loop ||= Thread . new do loop do @@hello_pins . each ( & :toggle ) if $tester $tester . set_timeset ( 'hello_world' , 40 ) unless $tester . timeset $tester . cycle end sleep 2 end end puts "Pin #{name} is toggling with a period of 2 seconds" end
Causes the pin to continuously drive 1 for 2 seconds and then drive 0 for 2 seconds.
Causes the pin to continuously drive 1 for 2 seconds and then drive 0 for 2 seconds .
# Add a dummy timeset if one is not set yet, doesn't really matter what it is in this case # and better not to force the user to setup a debug workaround due to running outside of a pattern
example
Call from an origen console like this dut.pin(:tdi).hello
Call from an origen console like this dut . pin ( : tdi ) . hello