Class: OrigenTesters::CommandBasedTester

Inherits:
Object
  • Object
show all
Includes:
VectorBasedTester
Defined in:
lib/origen_testers/command_based_tester.rb

Overview

A base class that can be used to model command-based, rather than vector-based testers.

Instance Attribute Summary

Attributes included from API

#capture_style, #comment_level, #generating, #includes, #overlay_style

Attributes included from Timing

#level_period, #timing_toggled_pins

Attributes included from VectorGenerator

#compress, #expand_repeats, #vector_comments

Instance Method Summary collapse

Methods included from VectorBasedTester

#register_tester

Methods included from API

#annotate, #any_clocks_running?, #c1, #c2, #capture_memory, #capture_memory_config, #clocks_running, #comment_char, #comment_char=, #d10?, #diff_friendly_output=, #diff_friendly_output?, #doc?, #generate?, #generating_pattern?, #generating_program?, #ignore_fails, #igxl?, #import_test_time, #inhibit_vectors_and_comments, #is_command_based?, #is_vector_based?, #j750?, #j750_hpt?, #link?, #name, #pat_extension, #pattern_footer, #pattern_header, #pattern_section, #pins_need_toggling, #pop_running_clock, #program_comment_char, #program_comment_char=, #push_running_clock, #pxie6570?, #slice_repeats, #smt7?, #smt8?, #snip, #source_memory, #source_memory_config, #ss, #step_comment_prefix, #stil?, #transaction, #ultraflex?, #update_running_clocks, #v93k?

Methods included from Timing

_set_timeset_, called_timesets, called_timesets_by_name, current_period_in_ns, current_timeset, lookup_or_register_timeset, min_period_timeset, period_in_ns, period_in_secs, reset!, set_timeset, timeset, timeset?, timeset_changed, timesets, timesets!

Methods included from Timing::TimingAPI

#before_timeset_change, #called_timesets, #called_timesets_by_name, #count, #current_period_in_ns, #current_timeset, #cycles_to_time, #delay, #max_repeat_loop, #min_period_timeset, #min_repeat_loop, #period_in_ns, #period_in_secs, #set_timeset, #timeset?, #timesets, #timing_toggled_pins, #wait

Methods included from VectorGenerator

#_render, #add_microcode_to_last_or_cycle, #align, #align_to_last, #before_write_pattern_line, #current_pin_vals, #cycle_count, #dec_vec_count, #dont_compress, #dont_compress=, #execution_time_in_ns, #expand_vector, #format, #format_pin_state, #get_pingroup, #inc_cycle_count, #inc_vec_count, #inhibit_pin, #inhibited_pins, #last_object, #last_vector, #microcode, #ordered_pins, #ordered_pins_cache, #ordered_pins_name, #pingroup_map, #pipeline, #preset_next_vector, #push_comment, #push_vector, #regex_for_pin, #regex_for_pin_sub, #remove_store_from_vector, #render, #render_body, #render_footer, #render_header, #render_template, #reset_cycle_count, #stage, #track_and_format_comment, #track_and_format_vector, #update_pin_from_formatted_state, #update_vector, #update_vector_pin_val, #vec_count, #vector_group_size, #vector_group_size=, #with_vector_group_size

Constructor Details

#initializeCommandBasedTester

Returns a new instance of CommandBasedTester.



8
9
10
# File 'lib/origen_testers/command_based_tester.rb', line 8

def initialize
  @vector_based = false
end

Instance Method Details

#call_subroutine(sub) ⇒ Object

Concept of a subroutine not supported, print out an error to the output file to alert the user that execution has hit code that is not compatible with a command based tester.



29
30
31
# File 'lib/origen_testers/command_based_tester.rb', line 29

def call_subroutine(sub)
  microcode "Call_subroutine called to #{sub}"
end

#cycle(*_args) ⇒ Object

Concept of a cycle not supported, print out an error to the output file to alert the user that execution has hit code that is not compatible with a command based tester.



22
23
24
# File 'lib/origen_testers/command_based_tester.rb', line 22

def cycle(*_args)
  microcode '*** Cycle called ***'
end

#direct_write(str) ⇒ Object Also known as: dw

Write a string directly to the output file without being processed or modified in any way



14
15
16
# File 'lib/origen_testers/command_based_tester.rb', line 14

def direct_write(str)
  microcode str
end

#format_vector(vec) ⇒ Object



33
34
35
# File 'lib/origen_testers/command_based_tester.rb', line 33

def format_vector(vec)
  vec.microcode
end

#loop(_name = nil, number_of_loops) ⇒ Object Also known as: loop_vector

Loop the content embedded in the supplied block



38
39
40
41
42
# File 'lib/origen_testers/command_based_tester.rb', line 38

def loop(_name = nil, number_of_loops)
  number_of_loops.times do
    yield
  end
end