Class: OrigenTesters::CommandBasedTester
- Inherits:
-
Object
- Object
- OrigenTesters::CommandBasedTester
- 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 Method Summary collapse
-
#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.
-
#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.
-
#direct_write(str) ⇒ Object
(also: #dw)
Write a string directly to the output file without being processed or modified in any way.
- #format_vector(vec) ⇒ Object
-
#initialize ⇒ CommandBasedTester
constructor
A new instance of CommandBasedTester.
-
#loop(_name = nil, number_of_loops) ⇒ Object
(also: #loop_vector)
Loop the content embedded in the supplied block.
Methods included from VectorBasedTester
Constructor Details
#initialize ⇒ CommandBasedTester
Returns a new instance of CommandBasedTester.
7 8 9 |
# File 'lib/origen_testers/command_based_tester.rb', line 7 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.
28 29 30 |
# File 'lib/origen_testers/command_based_tester.rb', line 28 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.
21 22 23 |
# File 'lib/origen_testers/command_based_tester.rb', line 21 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
13 14 15 |
# File 'lib/origen_testers/command_based_tester.rb', line 13 def direct_write(str) microcode str end |
#format_vector(vec) ⇒ Object
32 33 34 |
# File 'lib/origen_testers/command_based_tester.rb', line 32 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
37 38 39 40 41 |
# File 'lib/origen_testers/command_based_tester.rb', line 37 def loop(_name = nil, number_of_loops) # rubocop:disable Style/OptionalArguments number_of_loops.times do yield end end |