Class: Origen::Tester::Ultraflex::Parser::DCSpec
- Inherits:
-
Object
- Object
- Origen::Tester::Ultraflex::Parser::DCSpec
- Defined in:
- lib/origen/tester/ultraflex/parser/dc_spec.rb
Instance Attribute Summary (collapse)
-
- (Object) categories
Returns the value of attribute categories.
-
- (Object) name
(also: #symbol)
Returns the value of attribute name.
-
- (Object) parser
Returns the value of attribute parser.
Instance Method Summary (collapse)
- - (Object) add_values(components)
-
- (DCSpec) initialize(name, categories, options = {})
constructor
A new instance of DCSpec.
- - (Object) lookup(category, selector)
Constructor Details
- (DCSpec) initialize(name, categories, options = {})
Returns a new instance of DCSpec
10 11 12 13 14 15 |
# File 'lib/origen/tester/ultraflex/parser/dc_spec.rb', line 10 def initialize(name, categories, = {}) @parser = [:parser] @name = name @categories = categories @values = {} end |
Instance Attribute Details
- (Object) categories
Returns the value of attribute categories
7 8 9 |
# File 'lib/origen/tester/ultraflex/parser/dc_spec.rb', line 7 def categories @categories end |
- (Object) name Also known as: symbol
Returns the value of attribute name
7 8 9 |
# File 'lib/origen/tester/ultraflex/parser/dc_spec.rb', line 7 def name @name end |
- (Object) parser
Returns the value of attribute parser
6 7 8 |
# File 'lib/origen/tester/ultraflex/parser/dc_spec.rb', line 6 def parser @parser end |
Instance Method Details
- (Object) add_values(components)
17 18 19 20 21 22 23 24 |
# File 'lib/origen/tester/ultraflex/parser/dc_spec.rb', line 17 def add_values(components) @categories.each_with_index do |category, i| @values[category] ||= {} @values[category]['Typ'] ||= components[5 + (i * 3) + 0] @values[category]['Min'] ||= components[5 + (i * 3) + 1] @values[category]['Max'] ||= components[5 + (i * 3) + 2] end end |
- (Object) lookup(category, selector)
26 27 28 29 30 31 |
# File 'lib/origen/tester/ultraflex/parser/dc_spec.rb', line 26 def lookup(category, selector) v = @values[category] if v v[selector] end end |