Skip to content

Commit

Permalink
Rename Specification -> Architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
dhower-qc committed Dec 10, 2024
1 parent dc4ba07 commit 9bccf9e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
20 changes: 1 addition & 19 deletions lib/arch_def.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

include TemplateHelpers

class ArchDef < Specification
class ArchDef < Architecture
extend Forwardable

# @return [Idl::Compiler] The IDL compiler
Expand All @@ -57,24 +57,6 @@ class ArchDef < Specification
# * 'rv64' - A generic RV64 architecture, with only one parameter set (XLEN == 64)
attr_reader :name

# def_delegator :@specification, :ref

# Specification::OBJS.each do |obj_info|
# def_delegator :@specification, obj_info[:fn_name].to_sym
# def_delegator :@specification, "#{obj_info[:fn_name]}_hash".to_sym

# fn_name = ActiveSupport::Inflector.pluralize(obj_info[:fn_name]).to_sym
# define_method(fn_name) do
# obj = @obj_cache[fn_name]
# return obj unless obj.nil?

# puts "populating #{fn_name}"

# @obj_cache[fn_name] =
# @specification.send(fn_name).map { |spec_obj| spec_obj.clone(arch_def: self) }
# end
# end

def_delegators \
:@config, \
:fully_configured?, :partially_configured?, :unconfigured?, :configured?, \
Expand Down
4 changes: 2 additions & 2 deletions lib/arch_obj_models/obj.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def initialize(path, result)

attr_reader :data, :data_path, :specification, :arch_def, :name, :long_name, :description

# @return [Specification] If only a specification (no config) is known
# @return [Architecture] If only a specification (no config) is known
# @return [ArchDef] If a specification and config is known
attr_reader :arch

Expand Down Expand Up @@ -189,7 +189,7 @@ def initialize(data, data_path, arch: nil)
if arch.is_a?(ArchDef)
@arch_def = arch
@specification = arch
elsif arch.is_a?(Specification)
elsif arch.is_a?(Architecture)
@specification = arch
end
@arch = arch
Expand Down
4 changes: 2 additions & 2 deletions lib/specification.rb → lib/architecture.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
require_relative "arch_obj_models/portfolio"
require_relative "arch_obj_models/profile"

# represents an entire RISC-V Specification.
# represents an entire RISC-V Architecture.
#
# Could be either the standard spec (defined by RISC-V International)
# of a custom spec (defined as an overlay in cfgs/)
class Specification
class Architecture
# @return [Pathname] Path to the directory with the standard YAML files
attr_reader :path

Expand Down

0 comments on commit 9bccf9e

Please sign in to comment.