def pins(id = nil, options = {}, &_block)
      id, options = nil, id if id.is_a?(Hash)
      if id
        pin = Origen.pin_bank.find(id, options)
        unless pin
          puts <<-END
You have tried to reference pin :#{id} within #{self.class} but it does not exist, this could be
because the pin has not been defined yet or it is an alias that is not available in the current context.

If you meant to define the pin then use the add_pin method instead.

          END
          fail 'Pin not found'
        end
        pin
      else
        if options[:power_pin]
          Origen.pin_bank.power_pins
        elsif options[:ground_pin]
          Origen.pin_bank.ground_pins
        elsif options[:virtual_pin]
          Origen.pin_bank.virtual_pins
        elsif options[:other_pin]
          Origen.pin_bank.other_pins
        else
          Origen.pin_bank.pins
        end
      end
    end
def pins(id = nil, options = {}, &_block)
      id, options = nil, id if id.is_a?(Hash)
      if id
        pin = Origen.pin_bank.find(id, options)
        unless pin
          puts <<-END
You have tried to reference pin :#{id} within #{self.class} but it does not exist, this could be
because the pin has not been defined yet or it is an alias that is not available in the current context.

If you meant to define the pin then use the add_pin method instead.

          END
          fail 'Pin not found'
        end
        pin
      else
        if options[:power_pin]
          Origen.pin_bank.power_pins
        elsif options[:ground_pin]
          Origen.pin_bank.ground_pins
        elsif options[:virtual_pin]
          Origen.pin_bank.virtual_pins
        elsif options[:other_pin]
          Origen.pin_bank.other_pins
        else
          Origen.pin_bank.pins
        end
      end
    end
Permits access via object.pin(x), returns a hash of all pins if no id
 is specified.
 ==== Examples
   $top.pin(:done)
   $soc.pin(:port_a1)
   pin(:fail)          # Access directly from within the module