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.33.1 lib/origen/fuses.rb
origen-0.33.0 lib/origen/fuses.rb
origen-0.32.1 lib/origen/fuses.rb
origen-0.32.0 lib/origen/fuses.rb
origen-0.31.0 lib/origen/fuses.rb
origen-0.30.0 lib/origen/fuses.rb
origen-0.29.0 lib/origen/fuses.rb
origen-0.28.2 lib/origen/fuses.rb
origen-0.28.1 lib/origen/fuses.rb
origen-0.28.0 lib/origen/fuses.rb
origen-0.27.0 lib/origen/fuses.rb
origen-0.26.0 lib/origen/fuses.rb
origen-0.25.1 lib/origen/fuses.rb
origen-0.25.0 lib/origen/fuses.rb
origen-0.24.0 lib/origen/fuses.rb
origen-0.23.0 lib/origen/fuses.rb
origen-0.22.0 lib/origen/fuses.rb
origen-0.21.0 lib/origen/fuses.rb