Sha256: 7c5fb8b75a504d272758b0ce330fb1e44248ff9f0c35e8fcd12e2889514d359b

Contents?: true

Size: 723 Bytes

Versions: 99

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

99 entries across 99 versions & 1 rubygems

Version Path
origen-0.54.5 lib/origen/fuses.rb
origen-0.54.4 lib/origen/fuses.rb
origen-0.54.3 lib/origen/fuses.rb
origen-0.54.2 lib/origen/fuses.rb
origen-0.54.1 lib/origen/fuses.rb
origen-0.54.0 lib/origen/fuses.rb
origen-0.53.1 lib/origen/fuses.rb
origen-0.53.0 lib/origen/fuses.rb
origen-0.52.4 lib/origen/fuses.rb
origen-0.52.3 lib/origen/fuses.rb
origen-0.52.2 lib/origen/fuses.rb
origen-0.52.1 lib/origen/fuses.rb
origen-0.52.0 lib/origen/fuses.rb
origen-0.51.3 lib/origen/fuses.rb
origen-0.51.2 lib/origen/fuses.rb
origen-0.51.1 lib/origen/fuses.rb
origen-0.51.0 lib/origen/fuses.rb
origen-0.50.0 lib/origen/fuses.rb
origen-0.44.0 lib/origen/fuses.rb
origen-0.43.0 lib/origen/fuses.rb