Method: OrigenTesters::Decompiler::Pattern#add_pins

Defined in:
lib/origen_testers/decompiler/pattern.rb

#add_pinsArray

Adds any pins in the decompiled pattern to the DUT which are not already present.

Returns:

  • (Array)

    Any pin names that were added to the DUT.



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/origen_testers/decompiler/pattern.rb', line 257

def add_pins
  #        pin_sizes = pat_model.pattern_model.pin_sizes
  #        pat_model.pinlist.each_with_index do |(name, pin), i|
  #          dut.add_pin(name, size: pin_sizes[i]) unless dut.has_pin?(name)
  #        end
  retn = []
  if first_vector?
    pin_sizes.each do |pin, size|
      unless dut.has_pin?(pin)
        dut.add_pin(pin, size: size)
        retn << pin
      end
    end
  else
    fail(NoFirstVectorAvailable, "No first vector available for pattern '#{source}'. Cannot add pins to the DUT '#{dut.class.name}'")
  end
  retn
end