lib/origen/chip_mode.rb in origen-0.60.7 vs lib/origen/chip_mode.rb in origen-0.60.8
- old
+ new
@@ -2,16 +2,18 @@
# Represents an SoC DFT/Operating mode - e.g. SCAN, RAMBIST, etc.
class ChipMode
attr_accessor :brief_description
attr_accessor :description
attr_writer :name
- attr_accessor :data_rate
+ attr_writer :data_rate
attr_accessor :data_rate_unit
attr_accessor :minimum_version_enabled
+
alias_writer :min_ver_enabled, :minimum_version_enabled
alias_writer :min_version_enabled, :minimum_version_enabled
attr_accessor :audience
+
alias_writer :full_name, :name
# Returns the object that owns the mode (the SoC instance usually)
attr_accessor :owner
attr_accessor :typical_voltage
alias_method :typ_voltage, :typical_voltage
@@ -45,19 +47,19 @@
if options[:absolute_number]
# The data rate unit was validated on init so it is good to go
# in theory but should still check if it returns a numeric
value = @data_rate.send(@data_rate_unit.to_sym)
if value.is_a?(Numeric)
- return value
+ value
else
Origen.log.error "@data_rate '#{@data_rate}' conversion using @data_rate_unit '#{@data_rate_unit}' did not product a Numeric, exiting..."
end
else
- return @data_rate
+ @data_rate
end
else
- return @data_rate
+ @data_rate
end
end
def respond_to_missing?(method_name, _include_private = false)
method_name[-1] == '?'
@@ -80,9 +82,10 @@
else
define_singleton_method(method_name) do
instance_variable_get(ivar)
end
end
+
send(method_name, *arguments, &block)
end
def to_s
id.to_s