class Origen::Pins::PowerPin
Attributes
Public Instance Methods
Source
# File lib/origen/pins/power_pin.rb, line 23 def voltage if voltages.size > 0 if voltages.size > 1 voltages else voltages.first end end end
Like voltages but if there is only one voltage known then it will be returned directly instead of being wrapped in an array. If no voltages are known this returns nil whereas voltages will return an empty array. For more than one voltages present this behaves like an alias of voltages.
Source
# File lib/origen/pins/power_pin.rb, line 14 def voltage=(val) @voltages = [val].flatten.uniq end
Set the operating voltage for the pin, can be a single value or an array
Source
# File lib/origen/pins/power_pin.rb, line 34 def voltages @voltages ||= [] end
Returns an array of known operating voltages for the given pin