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 #
292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/udb/config.rb', line 292 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 configured config" raise InvalidConfigError end end |
Instance Method Details
#fully_configured? ⇒ Boolean
315 |
# File 'lib/udb/config.rb', line 315 def fully_configured? = true |
#implemented_extensions ⇒ Array<Hash{String => String}>
324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/udb/config.rb', line 324 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] } elsif e.is_a?(Hash) { "name" => e.fetch("name"), "version" => RequirementSpec.new(e.fetch("version")).version_spec.to_s } end end end end |
#mxlen ⇒ Integer
312 |
# File 'lib/udb/config.rb', line 312 def mxlen = @mxlen |
#param_values ⇒ Hash{String => ParamValueType}
ABSTRACT METHODS OVERRIDDEN #
309 |
# File 'lib/udb/config.rb', line 309 def param_values = @param_values |
#partially_configured? ⇒ Boolean
318 |
# File 'lib/udb/config.rb', line 318 def partially_configured? = false |
#unconfigured? ⇒ Boolean
321 |
# File 'lib/udb/config.rb', line 321 def unconfigured? = false |