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.60.18 lib/origen/fuses.rb
origen-0.60.17 lib/origen/fuses.rb
origen-0.60.16 lib/origen/fuses.rb
origen-0.60.14 lib/origen/fuses.rb
origen-0.60.13 lib/origen/fuses.rb
origen-0.60.12 lib/origen/fuses.rb
origen-0.60.11 lib/origen/fuses.rb
origen-0.60.10 lib/origen/fuses.rb
origen-0.60.9 lib/origen/fuses.rb
origen-0.60.8 lib/origen/fuses.rb
origen-0.60.7 lib/origen/fuses.rb
origen-0.60.6 lib/origen/fuses.rb
origen-0.60.5 lib/origen/fuses.rb
origen-0.60.4 lib/origen/fuses.rb
origen-0.60.3 lib/origen/fuses.rb
origen-0.60.2 lib/origen/fuses.rb
origen-0.60.1 lib/origen/fuses.rb
origen-0.60.0 lib/origen/fuses.rb
origen-0.59.8 lib/origen/fuses.rb
origen-0.59.7 lib/origen/fuses.rb