lib/origen/pins/pin.rb
# Add a location identifier to the pin, this is a free format field which can be a
# pin number or BGA co-ordinate for example.
#
# @example Adding a location by package
#   $dut.pin(:pin3).add_location "B3", :package => :p1
#   $dut.pin(:pin3).add_location "B2", :package => :p2
Add a location identifier to the pin, this is a free format field which can be a
pin number or BGA co-ordinate for example.
Add a location identifier to the pin this is a free format field which can be a pin number or BGA co - ordinate for example .
def add_location(str, options = {})
        packages = resolve_packages(options)
        if packages.empty?
          @location = str
          add_alias str.to_s.symbolize, package: :all, mode: :all, configuration: :all
        else
          packages.each do |package_id|
            package_id = package_id.respond_to?(:id) ? package_id.id : package_id
            myself.packages[package_id] ||= {}
            myself.packages[package_id][:location] = str
            add_alias str.to_s.symbolize, package: package_id, mode: :all, configuration: :all
          end
        end
      end
def add_location ( str , options = { } ) packages = resolve_packages ( options ) if packages . empty? @location = str add_alias str . to_s . symbolize , package : :all , mode : :all , configuration : :all else packages . each do | package_id | package_id = package_id . respond_to? ( :id ) ? package_id . id : package_id myself . packages [ package_id ] ||= { } myself . packages [ package_id ] [ :location ] = str add_alias str . to_s . symbolize , package : package_id , mode : :all , configuration : :all end end end
Add a location identifier to the pin, this is a free format field which can be a
pin number or BGA co-ordinate for example.
Add a location identifier to the pin this is a free format field which can be a pin number or BGA co - ordinate for example .
str
<not_specific>
options
<not_specific>
example
Adding a location by package $dut.pin(:pin3).add_location "B3", :package => :p1 $dut.pin(:pin3).add_location "B2", :package => :p2
Adding a location by package $dut . pin ( : pin3 ) . add_location " B3 " : package = > : p1 $dut . pin ( : pin3 ) . add_location " B2 " : package = > : p2