Sha256: 4297d50084f4636a264a78c51060daca3e68db1fa2a64d100f8a26dd0f5ff217

Contents?: true

Size: 787 Bytes

Versions: 8

Compression:

Stored size: 787 Bytes

Contents

require 'origen/top_level'
module Origen
  module TopLevel
    # Like pins, except removes any pins which have their rtl_name
    # attribute set to 'nc'
    # Optionally pass in a type: option set to either :analog or :digital to
    # have only the pins with that type returned
    def rtl_pins(options = {})
      @rtl_pins ||= {}
      @rtl_pins[options[:type]] ||= begin
        opts = options.dup
        p = []
        pins.each do |name, pin|
          options = {}
          unless pin.rtl_name.to_s.downcase == 'nc' ||
                 (opts[:type] && pin.type && opts[:type] != pin.type)
            if pin.primary_group
              options[:group] = true
            end
            p << [name, pin, options]
          end
        end
        p
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
origen_sim-0.20.7 lib/origen_sim/origen/top_level.rb
origen_sim-0.20.6 lib/origen_sim/origen/top_level.rb
origen_sim-0.20.5 lib/origen_sim/origen/top_level.rb
origen_sim-0.20.4 lib/origen_sim/origen/top_level.rb
origen_sim-0.20.3 lib/origen_sim/origen/top_level.rb
origen_sim-0.20.2 lib/origen_sim/origen/top_level.rb
origen_sim-0.20.1 lib/origen_sim/origen/top_level.rb
origen_sim-0.20.0 lib/origen_sim/origen/top_level.rb