Top Level Namespace

Defined Under Namespace

Modules: C99, Enumerable, Origen Classes: Array, Bignum, Fixnum, Hash, Module, Numeric, Object, OptionParser, Range, String

Constant Summary collapse

ORIGEN_COMMAND_ALIASES =
{
  'g'         => 'generate',
  'p'         => 'program',
  't'         => 'target',
  '-t'        => 'target',          # For legacy reasons
  'e'         => 'environment',
  '-e'        => 'environment',
  'l'         => 'lsf',
  'i'         => 'interactive',
  'c'         => 'compile',
  'pl'        => 'plugin',
  '-v'        => 'version',
  '--version' => 'version',
  '-version'  => 'version',
  'm'         => 'mode'
}

Constants included from Origen::GlobalMethods

Origen::GlobalMethods::Flow, Origen::GlobalMethods::Pattern, Origen::GlobalMethods::Resources, Origen::GlobalMethods::User

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Origen::Utility::InputCapture

#find_space, #get_text, #split_long_line

Methods included from Origen::GlobalMethods

#annotate, #c1, #c2, #dut, #global_binding, #options, #pp, #render, #snip, #ss, #tester, #undefined

Class Method Details

._with_doc_tester(options) ⇒ Object



44
45
46
47
48
49
50
51
52
# File 'lib/origen/commands/program.rb', line 44

def self._with_doc_tester(options)
  if options[:doc]
    Origen.app.with_doc_tester do
      yield
    end
  else
    yield
  end
end

Instance Method Details

#_unmanaged_dirsObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/origen/commands/rc.rb', line 21

def _unmanaged_dirs
  # List of unmanaged files and directories for an Origen workspace
  unmanaged_dirs = Origen::RevisionControl::IGNORE_DIRS
  unmanaged_dirs += config.unmanaged_dirs || []

  # If the given dirs are not full paths then prefix with Origen.root
  unmanaged_dirs.map do |d|
    if Pathname.new(d).absolute?
      d
    else
      "#{Origen.root}/#{d}"
    end
  end
end

#_unmanaged_filesObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/origen/commands/rc.rb', line 5

def _unmanaged_files
  unmanaged_files = Origen::RevisionControl::IGNORE_FILES
  unmanaged_files += config.unmanaged_files || []
  # unmanaged_files += Origen.import_manager.all_symlinks || []

  # If the given files are not full paths then prefix with Origen.root, unless they
  # are wildcards
  unmanaged_files.map do |f|
    if f =~ /\*/ || Pathname.new(f).absolute?
      f
    else
      "#{Origen.root}/#{f}"
    end
  end
end

#debuggerObject



118
119
120
121
# File 'lib/origen/commands.rb', line 118

def debugger
  caller[0] =~ /.*\/(\w+\.rb):(\d+).*/
  puts "#{Regexp.last_match[1]}:#{Regexp.last_match[2]} - debugger statement ignored, run again with '-d' to enable it"
end

#min_ruby_versionObject



7
8
9
10
11
12
13
# File 'lib/origen/ruby_version_check.rb', line 7

def min_ruby_version
  if Origen.os.windows?
    '1.9.3'
  else
    '2.1.0'
  end
end

#require_type_or_id(options) ⇒ Object



5
6
7
8
9
10
# File 'lib/origen/commands/lsf.rb', line 5

def require_type_or_id(options)
  unless options[:id] || options[:type]
    puts 'You must supply a job type or ID'
    exit 1
  end
end

#ruby_acceptable_to_run?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/origen/ruby_version_check.rb', line 3

def ruby_acceptable_to_run?
  RUBY_VERSION >= min_ruby_version
end

#workspace_dirsObject



36
37
38
# File 'lib/origen/commands/rc.rb', line 36

def workspace_dirs
  "#{Origen.root} " + Origen.app.config.external_app_dirs.join(' ')
end