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:



285
286
287
288
289
290
291
292
# File 'lib/udb/config.rb', line 285

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

  @param_values = @data["params"]

  @mxlen = @data.dig("params", "MXLEN").freeze
  raise "Must set MXLEN for a configured config" if @mxlen.nil?
end

Instance Method Details

#fully_configured?Boolean

Returns:

  • (Boolean)


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

def fully_configured? = true

#implemented_extensionsArray<Hash{String => String}>

Returns:

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


314
315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'lib/udb/config.rb', line 314

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" => e[1] }
        else
          e
        end
      end
    end
end

#mxlenInteger

Returns:

  • (Integer)


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

def mxlen = @mxlen

#param_valuesHash{String => ParamValueType}

ABSTRACT METHODS OVERRIDDEN #

Returns:



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

def param_values = @param_values

#partially_configured?Boolean

Returns:

  • (Boolean)


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

def partially_configured? = false

#unconfigured?Boolean

Returns:

  • (Boolean)


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

def unconfigured? = false