Class: Udb::FullConfig
- Inherits:
-
AbstractConfig
- Object
- AbstractConfig
- Udb::FullConfig
- 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
- #fully_configured? ⇒ Boolean
- #implemented_extensions ⇒ Array<Hash{String => String}>
-
#initialize(data, info)
constructor
NON-ABSTRACT METHODS #.
- #mxlen ⇒ Integer
-
#param_values ⇒ Hash{String => ParamValueType}
ABSTRACT METHODS OVERRIDDEN #.
- #partially_configured? ⇒ Boolean
- #unconfigured? ⇒ Boolean
Constructor Details
#initialize(data, info)
NON-ABSTRACT METHODS #
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
404 |
# File 'lib/udb/config.rb', line 404 def fully_configured? = true |
#implemented_extensions ⇒ 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 |
#mxlen ⇒ Integer
401 |
# File 'lib/udb/config.rb', line 401 def mxlen = @mxlen |
#param_values ⇒ Hash{String => ParamValueType}
ABSTRACT METHODS OVERRIDDEN #
398 |
# File 'lib/udb/config.rb', line 398 def param_values = @param_values |
#partially_configured? ⇒ Boolean
407 |
# File 'lib/udb/config.rb', line 407 def partially_configured? = false |
#unconfigured? ⇒ Boolean
410 |
# File 'lib/udb/config.rb', line 410 def unconfigured? = false |