Sha256: 7c5fb8b75a504d272758b0ce330fb1e44248ff9f0c35e8fcd12e2889514d359b

Contents?: true

Size: 723 Bytes

Versions: 98

Compression:

Stored size: 723 Bytes

Contents

require_relative 'fuses/fuse_field'
module Origen
  module Fuses
    def fuses(expr = nil)
      if expr.nil?
        if @_fuses.nil?
          @_fuses = {}
        elsif @_fuses.is_a? Hash
          if @_fuses.empty?
            @_fuses
          else
            @_fuses.ids
          end
        else
          @_fuses = {}
        end
      else
        @_fuses.recursive_find_by_key(expr)
      end
    end

    def fuse_field(name, start_addr, size, options = {})
      @_fuses ||= {}
      if fuses.respond_to? :name
        Origen.log.error("Cannot create fuse field '#{name}', it already exists!")
        fail
      end
      @_fuses[name] = FuseField.new(name, start_addr, size, self, options)
    end
  end
end

Version data entries

98 entries across 98 versions & 1 rubygems

Version Path
origen-0.42.1 lib/origen/fuses.rb
origen-0.42.0 lib/origen/fuses.rb
origen-0.41.2 lib/origen/fuses.rb
origen-0.41.1 lib/origen/fuses.rb
origen-0.41.0 lib/origen/fuses.rb
origen-0.40.2 lib/origen/fuses.rb
origen-0.40.1 lib/origen/fuses.rb
origen-0.40.0 lib/origen/fuses.rb
origen-0.38.0 lib/origen/fuses.rb
origen-0.37.0 lib/origen/fuses.rb
origen-0.36.1 lib/origen/fuses.rb
origen-0.36.0 lib/origen/fuses.rb
origen-0.35.1 lib/origen/fuses.rb
origen-0.35.0 lib/origen/fuses.rb
origen-0.34.3 lib/origen/fuses.rb
origen-0.34.2 lib/origen/fuses.rb
origen-0.34.1 lib/origen/fuses.rb
origen-0.34.0 lib/origen/fuses.rb
origen-0.33.3 lib/origen/fuses.rb
origen-0.33.2 lib/origen/fuses.rb