Module: OrigenSim::Generator

Extended by:
ActiveSupport::Concern
Defined in:
lib/origen_sim/generator.rb

Instance Method Summary collapse

Instance Method Details

#flow(filename = nil) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/origen_sim/generator.rb', line 10

def flow(filename = nil)
  if filename || Origen.file_handler.current_file
    filename ||= Origen.file_handler.current_file.basename('.rb').to_s
    # DH here need to reset the flow!!
    f = filename.to_sym
    return flow_sheets[f] if flow_sheets[f] # will return flow if already existing
    p = OrigenSim::Flow.new
    p.inhibit_output if Origen.interface.resources_mode?
    p.filename = f
    flow_sheets[f] = p
  end
end

#flow_sheetsObject



27
28
29
# File 'lib/origen_sim/generator.rb', line 27

def flow_sheets
  @@flow_sheets ||= {}
end

#reset_globalsObject



31
32
33
# File 'lib/origen_sim/generator.rb', line 31

def reset_globals
  @@flow_sheets = nil
end

#sheet_generatorsObject



35
36
37
# File 'lib/origen_sim/generator.rb', line 35

def sheet_generators
  []
end

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



23
24
25
# File 'lib/origen_sim/generator.rb', line 23

def test(name, options = {})
  flow.test(name, options)
end