Class: Udb::ManualVersion
- Inherits:
-
TopLevelDatabaseObject
- Object
- DatabaseObject
- TopLevelDatabaseObject
- Udb::ManualVersion
- Defined in:
- lib/udb/obj/manual.rb
Instance Method Summary collapse
-
#csrs ⇒ Array<Csr>
All csrs defined in this version.
-
#extensions ⇒ Array<ExtensionVersion>
Array of extension versions in this manual version.
-
#instructions ⇒ Array<Instruction>
All instructions defined in this version.
-
#isa_manual_tree ⇒ String
The git tree-ish of riscv-isa-manual used by this version.
-
#manual ⇒ Manual
The manual this version belongs to.
-
#marketing_version ⇒ String
Version name used by marketing.
-
#path ⇒ String
Path to the directory containing contents.yaml file for this version.
- #repo_path=(path) ⇒ Object
- #state ⇒ Object
-
#uses_isa_manual? ⇒ Boolean
Whether or not this version is using riscv-isa-manual as a source.
-
#version ⇒ String
Semantic version number.
-
#volumes ⇒ Array<ManualVolume>
All volumes defined in this manual version.
Constructor Details
This class inherits a constructor from Udb::TopLevelDatabaseObject
Instance Method Details
#csrs ⇒ Array<Csr>
Returns All csrs defined in this version.
188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/udb/obj/manual.rb', line 188 def csrs return @csrs unless @csrs.nil? @csrs = [] extensions.each do |ext| ext_obj = @cfg_arch.extension(ext.name) ext_obj.csrs.each do |csr| @csrs << csr end end @csrs = @csrs.uniq(&:name) end |
#extensions ⇒ Array<ExtensionVersion>
Returns Array of extension versions in this manual version.
167 168 169 170 171 |
# File 'lib/udb/obj/manual.rb', line 167 def extensions return @extensions unless @extensions.nil? @extensions = volumes.map(&:extensions).flatten.uniq end |
#instructions ⇒ Array<Instruction>
Returns All instructions defined in this version.
174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/udb/obj/manual.rb', line 174 def instructions return @instructions unless @instructions.nil? @instructions = [] extensions.each do |ext| ext_obj = @cfg_arch.extension(ext.name) ext_obj.instructions.each do |inst| @instructions << inst end end @instructions = @instructions.uniq(&:name) end |
#isa_manual_tree ⇒ String
Returns The git tree-ish of riscv-isa-manual used by this version.
150 |
# File 'lib/udb/obj/manual.rb', line 150 def isa_manual_tree = @data["isa_manual_tree"] |
#manual ⇒ Manual
Returns The manual this version belongs to.
126 127 128 129 130 131 132 133 |
# File 'lib/udb/obj/manual.rb', line 126 def manual return @manual unless @manual.nil? @manual = @arch.ref(@data["manual"]["$ref"]) raise "Error: manual #{@data['manual']['$ref']} is not found" if @manual.nil? @manual end |
#marketing_version ⇒ String
Returns Version name used by marketing.
139 |
# File 'lib/udb/obj/manual.rb', line 139 def marketing_version = @data["marketing_version"] |
#path ⇒ String
Returns Path to the directory containing contents.yaml file for this version.
142 143 144 |
# File 'lib/udb/obj/manual.rb', line 142 def path File.dirname(@data["$source"]) end |
#repo_path=(path) ⇒ Object
201 202 203 204 |
# File 'lib/udb/obj/manual.rb', line 201 def repo_path=(path) @repo_path = path volumes.each { |v| v.repo_path = path } end |
#state ⇒ Object
164 |
# File 'lib/udb/obj/manual.rb', line 164 def state = @data["state"] |
#uses_isa_manual? ⇒ Boolean
Returns Whether or not this version is using riscv-isa-manual as a source.
147 |
# File 'lib/udb/obj/manual.rb', line 147 def uses_isa_manual? = @data["uses_isa_manual"] == true |
#version ⇒ String
Returns Semantic version number.
136 |
# File 'lib/udb/obj/manual.rb', line 136 def version = @data["version"] |
#volumes ⇒ Array<ManualVolume>
Returns All volumes defined in this manual version.
153 154 155 156 157 158 159 160 161 162 |
# File 'lib/udb/obj/manual.rb', line 153 def volumes return @volumes unless @volumes.nil? @volumes = [] @data["volumes"].each do |volume| @volumes << ManualVolume.new(volume, self) end @volumes end |