Module: Origen::GlobalMethods
- Defined in:
- lib/origen/global_methods.rb
Constant Summary collapse
Instance Method Summary collapse
- #annotate(msg, options = {}) ⇒ Object
- #c1(msg, options = {}) ⇒ Object (also: #cc)
- #c2(msg, options = {}) ⇒ Object
- #dut ⇒ Object
- #global_binding ⇒ Object
-
#options ⇒ Object
private
The options passed to an ERB template.
- #pp(*args, &block) ⇒ Object (also: #pattern_section, #ps)
-
#render(*args, &block) ⇒ Object
Render an ERB template.
- #snip(*args, &block) ⇒ Object
- #ss(*args, &block) ⇒ Object (also: #step_comment)
- #tester ⇒ Object
- #undefined ⇒ Object
Instance Method Details
#annotate(msg, options = {}) ⇒ Object
4 5 6 |
# File 'lib/origen/global_methods.rb', line 4 def annotate(msg, = {}) Origen.app.tester.annotate(msg, ) end |
#c1(msg, options = {}) ⇒ Object Also known as: cc
8 9 10 |
# File 'lib/origen/global_methods.rb', line 8 def c1(msg, = {}) Origen.app.tester.c1(msg, ) end |
#c2(msg, options = {}) ⇒ Object
13 14 15 |
# File 'lib/origen/global_methods.rb', line 13 def c2(msg, = {}) Origen.app.tester.c2(msg, ) end |
#global_binding ⇒ Object
60 61 62 |
# File 'lib/origen/global_methods.rb', line 60 def global_binding binding end |
#options ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The options passed to an ERB template. Having it global like this is ugly, but it does allow a hash of options to always be available in templates even if the template is being rendered using a custom binding.
55 56 57 58 |
# File 'lib/origen/global_methods.rb', line 55 def $_target_options || Origen.generator.compiler. end |
#pp(*args, &block) ⇒ Object Also known as: pattern_section, ps
22 23 24 |
# File 'lib/origen/global_methods.rb', line 22 def pp(*args, &block) Origen.app.tester.pattern_section(*args, &block) end |
#render(*args, &block) ⇒ Object
Render an ERB template
33 34 35 36 37 38 39 |
# File 'lib/origen/global_methods.rb', line 33 def render(*args, &block) if $_compiler_stack && $_compiler_stack.last $_compiler_stack.last.render(*args, &block) else Origen.generator.compiler.render(*args, &block) end end |
#snip(*args, &block) ⇒ Object
28 29 30 |
# File 'lib/origen/global_methods.rb', line 28 def snip(*args, &block) Origen.app.tester.snip(*args, &block) end |
#ss(*args, &block) ⇒ Object Also known as: step_comment
17 18 19 |
# File 'lib/origen/global_methods.rb', line 17 def ss(*args, &block) Origen.app.tester.ss(*args, &block) end |
#tester ⇒ Object
45 46 47 |
# File 'lib/origen/global_methods.rb', line 45 def tester Origen.tester end |
#undefined ⇒ Object
64 65 66 |
# File 'lib/origen/global_methods.rb', line 64 def undefined Origen::UndefinedClass.instance end |