Class: Udb::FullConfig

Inherits:
AbstractConfig show all
Defined in:
lib/udb/config.rb

Overview

This class represents a configuration that is "fully-configured" (e.g., SoC tapeout or fully-configured IP). # It has a complete list of extensions and parameters (all are a single value at this point). #

Instance Method Summary collapse

Constructor Details

#initialize(data, info)

NON-ABSTRACT METHODS #

Parameters:



381
382
383
384
385
386
387
388
389
390
391
# File 'lib/udb/config.rb', line 381

def initialize(data, info)
  super(data, info)

  @param_values = @data["params"]

  @mxlen = @data.dig("params", "MXLEN").freeze
  if @mxlen.nil?
    Udb.logger.error "Must set MXLEN for a full config"
    raise InvalidConfigError
  end
end

Instance Method Details

#fully_configured?Boolean

Returns:

  • (Boolean)


404
# File 'lib/udb/config.rb', line 404

def fully_configured? = true

#implemented_extensionsArray<Hash{String => String}>

Returns:

  • (Array<Hash{String => String}>)


413
414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/udb/config.rb', line 413

def implemented_extensions
  @implemented_extensions ||=
    if @data["implemented_extensions"].nil?
      []
    else
      @data["implemented_extensions"].map do |e|
        if e.is_a?(Array)
          { "name" => e[0], "version" => implemented_extension_version(e[1]) }
        elsif e.is_a?(Hash)
          { "name" => e.fetch("name"), "version" => implemented_extension_version(e.fetch("version")) }
        end
      end
    end
end

#mxlenInteger

Returns:

  • (Integer)


401
# File 'lib/udb/config.rb', line 401

def mxlen = @mxlen

#param_valuesHash{String => ParamValueType}

ABSTRACT METHODS OVERRIDDEN #

Returns:



398
# File 'lib/udb/config.rb', line 398

def param_values = @param_values

#partially_configured?Boolean

Returns:

  • (Boolean)


407
# File 'lib/udb/config.rb', line 407

def partially_configured? = false

#unconfigured?Boolean

Returns:

  • (Boolean)


410
# File 'lib/udb/config.rb', line 410

def unconfigured? = false