Class: Origen::Pins::PinCollection
- Inherits:
-
Object
- Object
- Origen::Pins::PinCollection
- Defined in:
- lib/origen_testers/origen_ext/pins/pin_collection.rb
Instance Method Summary collapse
-
#ate_hardware(options = {}) ⇒ Object
Returns ATE Hardware information for the pin_collection (channel # and instrument type) on a given tester site (default = 0), based on a given tester channelmap (default_channelmap) and a given tester configuration (default_testerconfig).
-
#channel(options = {}) ⇒ Object
Returns the channel number for the pin_collection on a given tester site (default = 0), based on a given tester channel map (default_channelmap).
-
#instrument_type(options = {}) ⇒ Object
Returns the instrument type for the pin_collection on a given tester site (default = 0), based on a given tester channel map (default_channelmap) and a given tester configuration (default_testerconfig).
Instance Method Details
#ate_hardware(options = {}) ⇒ Object
Returns ATE Hardware information for the pin_collection (channel # and instrument type) on a given tester site (default = 0), based on a given tester channelmap (default_channelmap) and a given tester configuration (default_testerconfig). # Optionally user can specify site, channelmap, or testerconfig.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/origen_testers/origen_ext/pins/pin_collection.rb', line 47 def ate_hardware( = {}) = { chanmapname: $tester.default_channelmap, # Default is to use default_channelmap site: 0, # Default is to use site 0. testerconfigname: $tester.default_testerconfig # Default is to use default_testerconfig }.merge() unless $tester.channelmap[[:chanmapname]] fail "You must first import the tester channel map (e.g. $tester.channelmap = \"probe_x32\") before calling pin.channel" end unless $tester.testerconfig[[:testerconfigname]] fail "You must first import the tester configuration (e.g. $tester.testerconfig = \"UflexConfigA\") before calling pin.instrument_type" end if Origen.top_level.power_pin_groups.keys.include?(name) # Power Pin Groups do not need :ppmu, but need :supply instrumentinfo = Struct.new(:channel, :instrument, :chanmapname, :site, :testerconfigname, :supply) @channel = $tester.get_tester_channel([:chanmapname], name, [:site]) @instrument = $tester.get_tester_instrument([:testerconfigname], $tester.get_tester_channel([:chanmapname], name, [:site]).split('.')[0].to_i) + $tester.is_vhdvs_hc([:chanmapname], name, [:site]).to_s + $tester.is_hexvs_plus([:testerconfigname], @channel.split('.')[0].to_i).to_s + $tester.is_vhdvs_plus([:testerconfigname], @channel.split('.')[0].to_i).to_s + $tester.merged_channels([:chanmapname], name, [:site]).to_s @supply = $tester.ate_hardware(@instrument).supply instrumentinfo.new(@channel, @instrument, [:chanmapname], [:site], [:testerconfigname], @supply) else # Collecting information of individual members and put in arrays instrumentinfo = Struct.new(:members, :channel, :instrument, :chanmapname, :site, :testerconfigname, :ppmu) @members = [] @channel = [] @instrument = [] @ppmu = [] Origen.top_level.pin_groups(name).map(&:id).each do |pinname| @members << Origen.top_level.pins(pinname).name @channel << $tester.get_tester_channel([:chanmapname], Origen.top_level.pins(pinname).name, [:site]) @instrument << $tester.get_tester_instrument([:testerconfigname], $tester.get_tester_channel([:chanmapname], Origen.top_level.pins(pinname).name, [:site]).split('.')[0].to_i) @ppmu << $tester.ate_hardware($tester.get_tester_instrument([:testerconfigname], $tester.get_tester_channel([:chanmapname], Origen.top_level.pins(pinname).name, [:site]).split('.')[0].to_i)).ppmu end instrumentinfo.new(@members, @channel, @instrument, [:chanmapname], [:site], [:testerconfigname], @ppmu) end end |
#channel(options = {}) ⇒ Object
Returns the channel number for the pin_collection on a given tester site (default = 0), based on a given tester channel map (default_channelmap). Optionally user can specify site or channelmap.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/origen_testers/origen_ext/pins/pin_collection.rb', line 10 def channel( = {}) = { chanmapname: $tester.default_channelmap, # Default is to use default_channelmap site: 0 # Default is to use site 0. }.merge() unless $tester.channelmap[[:chanmapname]] fail "You must first import the tester channel map (e.g. $tester.channelmap = \"probe_x32\") before calling pin.channel" end channelinfo = Struct.new(:channel, :chanmapname, :site) channelinfo.new($tester.get_tester_channel([:chanmapname], name, [:site]), [:chanmapname], [:site]) end |
#instrument_type(options = {}) ⇒ Object
Returns the instrument type for the pin_collection on a given tester site (default = 0), based on a given tester channel map (default_channelmap) and a given tester configuration (default_testerconfig). Optionally user can specify site, channelmap, or testerconfig.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/origen_testers/origen_ext/pins/pin_collection.rb', line 26 def instrument_type( = {}) = { chanmapname: $tester.default_channelmap, # Default is to use default_channelmap site: 0, # Default is to use site 0. testerconfigname: $tester.default_testerconfig # Default is to use default_testerconfig }.merge() unless $tester.channelmap[[:chanmapname]] fail "You must first import the tester channel map (e.g. $tester.channelmap = \"probe_x32\") before calling pin.channel" end unless $tester.testerconfig[[:testerconfigname]] fail "You must first import the tester configuration (e.g. $tester.testerconfig = \"UflexConfigA\") before calling pin.instrument_type" end instrumentinfo = Struct.new(:instrument, :chanmapname, :site, :testerconfigname) instrumentinfo.new($tester.get_tester_instrument([:testerconfigname], $tester.get_tester_channel([:chanmapname], name, [:site]).split('.')[0].to_i), [:chanmapname], [:site], [:testerconfigname]) end |