Class: C99::DocInterface

Inherits:
Object show all
Includes:
Origen::Tester::Doc::Generator
Defined in:
lib/c99/doc_interface.rb

Instance Method Summary collapse

Methods included from Origen::Tester::Doc::Generator

#at_flow_start, #at_run_start, #doc_comments, #doc_comments_capture, #doc_comments_consume, #doc_comments_discard, #filter_source, #flow, #flow_generators, #flows, #sheet_generators, #tests

Constructor Details

#initialize(_options = {}) ⇒ DocInterface

Options passed to Flow.create and Library.create will be passed in here, use as desired to configure your interface



7
8
# File 'lib/c99/doc_interface.rb', line 7

def initialize(_options = {})
end

Instance Method Details

#block_loop(name, options) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/c99/doc_interface.rb', line 31

def block_loop(name, options)
  if options[:by_block]
    tests.group do |group|
      group.name = name
      $nvm.blocks.each_with_index do |block, i|
        yield block, i, group
      end
    end
  else
    yield
  end
end

#func(name, options = {}) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/c99/doc_interface.rb', line 16

def func(name, options = {})
  options = {
    duration: :static
  }.merge(options)

  block_loop(name, options) do |_block, i, group|
    ins = tests.add(name, options)
    if group
      flow.test(group, options) if i == 0
    else
      flow.test(ins, options)
    end
  end
end

#log(_msg) ⇒ Object



13
14
# File 'lib/c99/doc_interface.rb', line 13

def log(_msg)
end

#para(name, options = {}) ⇒ Object



47
48
49
50
51
52
53
54
# File 'lib/c99/doc_interface.rb', line 47

def para(name, options = {})
  options = {
    high_voltage: false
  }.merge(options)
  ins = tests.add(name, options)
  ins.dc_category = 'NVM_PARA'
  flow.test(ins, options)
end

#por(_options = {}) ⇒ Object



44
45
# File 'lib/c99/doc_interface.rb', line 44

def por(_options = {})
end

#resources_filename=(*_args) ⇒ Object



10
11
# File 'lib/c99/doc_interface.rb', line 10

def resources_filename=(*_args)
end