Class: OrigenTesters::IGXLBasedTester::Base::Pinmap
- Inherits:
-
Object
- Object
- OrigenTesters::IGXLBasedTester::Base::Pinmap
- Includes:
- Generator
- Defined in:
- lib/origen_testers/igxl_based_tester/base/pinmap.rb
Direct Known Subclasses
Constant Summary collapse
- PIN_TYPES =
['I/O', 'I', 'O']
- PWR_TYPES =
['Power']
- UTL_TYPES =
['Utility', 'I/O', 'I', 'O']
Instance Attribute Summary collapse
-
#pin_groups ⇒ Object
Returns the value of attribute pin_groups.
-
#pins ⇒ Object
Returns the value of attribute pins.
-
#power_pins ⇒ Object
Returns the value of attribute power_pins.
-
#utility_pins ⇒ Object
Returns the value of attribute utility_pins.
Attributes included from Generator
Instance Method Summary collapse
- #add_group_pin(grp_name, pin_name, attrs = {}) ⇒ Object
- #add_pin(pin_name, attrs = {}) ⇒ Object
- #add_power_pin(pin_name, attrs = {}) ⇒ Object
- #add_utility_pin(pin_name, attrs = {}) ⇒ Object
- #finalize(options = {}) ⇒ Object
-
#initialize ⇒ Pinmap
constructor
:nodoc:.
- #platform ⇒ Object
Methods included from Generator
#close, #collection, #collection=, #compiler, #current_dir, #dont_diff=, execute_source, #file_extension, #file_pipeline, #filename, #filename=, #identity_map, #import, #inhibit_output, #name, #on_close, original_reference_file, original_reference_file=, #output_file, #output_inhibited?, #reference_file, #render, #set_flow_description, #stats, #to_be_written?, #write_from_template, #write_to_file
Constructor Details
#initialize ⇒ Pinmap
:nodoc:
16 17 18 19 20 21 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 16 def initialize # :nodoc: @pins = {} @pin_groups = Hash.new { |h, k| h[k] = {} } @power_pins = {} @utility_pins = {} end |
Instance Attribute Details
#pin_groups ⇒ Object
Returns the value of attribute pin_groups.
8 9 10 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 8 def pin_groups @pin_groups end |
#pins ⇒ Object
Returns the value of attribute pins.
7 8 9 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 7 def pins @pins end |
#power_pins ⇒ Object
Returns the value of attribute power_pins.
9 10 11 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 9 def power_pins @power_pins end |
#utility_pins ⇒ Object
Returns the value of attribute utility_pins.
10 11 12 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 10 def utility_pins @utility_pins end |
Instance Method Details
#add_group_pin(grp_name, pin_name, attrs = {}) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 38 def add_group_pin(grp_name, pin_name, attrs = {}) attrs = { type: 'I/O', comment: '' }.merge(attrs) grp_name = grp_name.to_sym unless grp_name.is_a? Symbol pin_name = pin_name.to_sym unless pin_name.is_a? Symbol if PIN_TYPES.include? attrs[:type] type = attrs[:type] else Origen.log.error "Pinmap group pin type '#{attrs[:type]}' must be set to one of the following: #{PIN_TYPES.join(', ')} for pin '#{pin_name}'" fail end @pin_groups[grp_name][pin_name] = { type: attrs[:type], comment: attrs[:comment] } end |
#add_pin(pin_name, attrs = {}) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 23 def add_pin(pin_name, attrs = {}) attrs = { type: 'I/O', comment: '' }.merge(attrs) pin_name = pin_name.to_sym unless pin_name.is_a? Symbol if PIN_TYPES.include? attrs[:type] type = attrs[:type] else Origen.log.error "Pinmap individual pin type '#{attrs[:type]}' must be set to one of the following: #{PIN_TYPES.join(', ')} for pin '#{pin_name}'" fail end @pins[pin_name] = { type: type, comment: attrs[:comment] } end |
#add_power_pin(pin_name, attrs = {}) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 54 def add_power_pin(pin_name, attrs = {}) attrs = { type: 'Power', comment: '' }.merge(attrs) pin_name = pin_name.to_sym unless pin_name.is_a? Symbol if PWR_TYPES.include? attrs[:type] type = attrs[:type] else Origen.log.error "Pinmap powerpin type '#{attrs[:type]}' must be set to one of the following: #{PWR_TYPES.join(', ')} for pin '#{pin_name}'" fail end @power_pins[pin_name] = { type: attrs[:type], comment: attrs[:comment] } end |
#add_utility_pin(pin_name, attrs = {}) ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 69 def add_utility_pin(pin_name, attrs = {}) attrs = { type: 'Utility', comment: '' }.merge(attrs) pin_name = pin_name.to_sym unless pin_name.is_a? Symbol if UTL_TYPES.include? attrs[:type] type = attrs[:type] else Origen.log.error "Pinmap utility pin type '#{attrs[:type]}' must be set to one of the following: #{UTL_TYPES.join(', ')} for pin '#{pin_name}'" fail end @utility_pins[pin_name] = { type: attrs[:type], comment: attrs[:comment] } end |
#finalize(options = {}) ⇒ Object
84 85 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 84 def finalize( = {}) end |
#platform ⇒ Object
87 88 89 |
# File 'lib/origen_testers/igxl_based_tester/base/pinmap.rb', line 87 def platform Origen.interface.platform end |