Method: OrigenTesters::Decompiler::Pattern#execute

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

#execute(options = {}) ⇒ Object

Executing a pattern consist of:

1. Doing some initial setup (timesets, initial pin states, etc.)
2. Executing anything that can be executed in the frontmatter
3. Executing the vectors 1-by-1.


286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'lib/origen_testers/decompiler/pattern.rb', line 286

def execute(options = {})
  if Origen.tester.timeset.nil?
    if first_vector?
      Origen.tester.set_timeset(first_timeset, 40)
    else
      Origen.log.error 'No first vector available and the timeset has not already been set!'
      Origen.log.error 'Please set the timeset yourself prior to calling #execute! in a pattern that does not contain a first vector.'
      fail(NoFirstVectorAvailable, "No first vector available for pattern '#{source}'. Cannot set a timeset to execute the pattern.")
    end
  end
  frontmatter.execute!
  each_vector_with_index do |vec, i|
    if Origen.debug?
      Origen.log.info("OrigenTesters: Executing Vector #{i}")
    end
    vec.execute!
  end

  self
end