origen 0.28.2 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/origen +14 -2
- data/config/version.rb +2 -2
- data/lib/origen.rb +72 -45
- data/lib/origen/application.rb +29 -19
- data/lib/origen/application/deployer.rb +3 -1
- data/lib/origen/application/runner.rb +10 -8
- data/lib/origen/chip_mode.rb +1 -1
- data/lib/origen/commands.rb +24 -12
- data/lib/origen/commands/version.rb +1 -1
- data/lib/origen/commands_global.rb +32 -8
- data/lib/origen/core_ext.rb +1 -2
- data/lib/origen/core_ext/enumerable.rb +2 -2
- data/lib/origen/core_ext/integer.rb +85 -0
- data/lib/origen/core_ext/numeric.rb +28 -4
- data/lib/origen/global_app.rb +9 -0
- data/lib/origen/log.rb +1 -1
- data/lib/origen/model_initializer.rb +6 -1
- data/lib/origen/netlist/list.rb +2 -2
- data/lib/origen/org_file.rb +125 -0
- data/lib/origen/org_file/interceptable.rb +44 -0
- data/lib/origen/org_file/interceptor.rb +100 -0
- data/lib/origen/parameters/set.rb +1 -1
- data/lib/origen/pins.rb +4 -0
- data/lib/origen/pins/function_proxy.rb +8 -0
- data/lib/origen/pins/pin.rb +90 -38
- data/lib/origen/pins/pin_collection.rb +61 -21
- data/lib/origen/ports/port.rb +1 -1
- data/lib/origen/registers.rb +1 -1
- data/lib/origen/registers/reg.rb +1 -1
- data/lib/origen/remote_manager.rb +25 -15
- data/lib/origen/site_config.rb +140 -13
- data/lib/origen/specs/checkers.rb +2 -2
- data/lib/origen/sub_blocks.rb +6 -1
- data/lib/origen/value.rb +119 -0
- data/lib/origen/value/bin_str_val.rb +72 -0
- data/lib/origen/value/hex_str_val.rb +100 -0
- data/origen_site_config.yml +15 -8
- metadata +12 -6
- data/lib/origen/core_ext/bignum.rb +0 -38
- data/lib/origen/core_ext/fixnum.rb +0 -56
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d5351ecf83d751f998bd4d0a533dd7bb741a08a
|
4
|
+
data.tar.gz: ea50032d8fbcf618062720ee47e40b8d0416cf0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 117326d05b4e9c7a7adc06d6ca8c16025eb31bae81db228922c965358e5898e6cd039f9fa8d6d8e38f61c63450850c60a1e408e87de86e3235847700d42ed761
|
7
|
+
data.tar.gz: 66b8a64e922594ada9b81c7369cbe8a468033aa6f4ac98452ed05716a346686229ff49b9ef55896378825c64a6614d834b7d2b7b1274c0cdc5e67b8fac500e45
|
data/bin/origen
CHANGED
@@ -43,6 +43,7 @@ else
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
# If running inside an application workspace
|
46
47
|
if origen_root
|
47
48
|
# Force everyone to have a consistent way of installing gems with bundler
|
48
49
|
ENV['BUNDLE_GEMFILE'] = File.join(origen_root, 'Gemfile')
|
@@ -58,6 +59,8 @@ if origen_root
|
|
58
59
|
end
|
59
60
|
|
60
61
|
boot_app = true
|
62
|
+
|
63
|
+
# If running outside an application and a user or central tool Origen bundle is to be used
|
61
64
|
elsif Origen.site_config.gem_manage_bundler && (Origen.site_config.user_install_enable || Origen.site_config.tool_repo_install_dir)
|
62
65
|
# Force everyone to have a consistent way of installing gems with bundler.
|
63
66
|
# In this case, we aren't running from an Origen application, so build everything at Origen.home instead
|
@@ -91,8 +94,17 @@ elsif Origen.site_config.gem_manage_bundler && (Origen.site_config.user_install_
|
|
91
94
|
ENV['BUNDLE_GEMFILE'] = gemfile
|
92
95
|
ENV['BUNDLE_PATH'] = File.expand_path(Origen.site_config.gem_install_dir)
|
93
96
|
ENV['BUNDLE_BIN'] = File.join(origen_root, 'lbin')
|
94
|
-
|
95
|
-
|
97
|
+
|
98
|
+
origen_exec = File.join(ENV['BUNDLE_BIN'], 'origen')
|
99
|
+
|
100
|
+
# If the user/tool bundle already exists but we have not been invoked through that, abort this thread
|
101
|
+
# and re-launch under the required bundler environment
|
102
|
+
if File.exist?(origen_exec) && !ENV['BUNDLE_BIN_PATH'] && File.exist?(ENV['BUNDLE_PATH'])
|
103
|
+
exec Gem.ruby, origen_exec, *ARGV
|
104
|
+
exit 0
|
105
|
+
else
|
106
|
+
boot_app = false
|
107
|
+
end
|
96
108
|
end
|
97
109
|
|
98
110
|
if origen_root && File.exist?(ENV['BUNDLE_GEMFILE']) && Origen.site_config.gem_manage_bundler && (boot_app || Origen.site_config.user_install_enable || Origen.site_config.tool_repo_install_dir)
|
data/config/version.rb
CHANGED
data/lib/origen.rb
CHANGED
@@ -65,6 +65,8 @@ unless defined? RGen::ORIGENTRANSITION
|
|
65
65
|
autoload :Tests, 'origen/tests'
|
66
66
|
autoload :PowerDomains, 'origen/power_domains'
|
67
67
|
autoload :Clocks, 'origen/clocks'
|
68
|
+
autoload :Value, 'origen/value'
|
69
|
+
autoload :OrgFile, 'origen/org_file'
|
68
70
|
|
69
71
|
attr_reader :switch_user
|
70
72
|
|
@@ -79,10 +81,23 @@ unless defined? RGen::ORIGENTRANSITION
|
|
79
81
|
class GitError < OrigenError; status_code(11); end
|
80
82
|
class DesignSyncError < OrigenError; status_code(12); end
|
81
83
|
class RevisionControlUninitializedError < OrigenError; status_code(13); end
|
84
|
+
class SyntaxError < OrigenError; status_code(14); end
|
82
85
|
|
83
86
|
class << self
|
84
87
|
include Origen::Utility::TimeAndDate
|
85
88
|
|
89
|
+
# Uniformly justifies the given help command line for display in a command line help output
|
90
|
+
def clean_help_line(str)
|
91
|
+
if str =~ /^\s\s\s\s\s\s\s*(.*)/
|
92
|
+
(' ' * 20) + Regexp.last_match(1)
|
93
|
+
# http://rubular.com/r/MKmU4xZgO2
|
94
|
+
elsif str =~ /^\s*([^\s]+)\s+*(.*)/
|
95
|
+
' ' + Regexp.last_match(1).ljust(19) + Regexp.last_match(2)
|
96
|
+
else
|
97
|
+
str
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
86
101
|
def enable_profiling
|
87
102
|
@profiling = true
|
88
103
|
end
|
@@ -272,17 +287,19 @@ unless defined? RGen::ORIGENTRANSITION
|
|
272
287
|
|
273
288
|
# Returns true if Origen is running in an application workspace
|
274
289
|
def in_app_workspace?
|
275
|
-
|
276
|
-
|
277
|
-
path
|
290
|
+
@in_app_workspace ||= begin
|
291
|
+
path = Pathname.new(Dir.pwd)
|
292
|
+
until path.root? || File.exist?(File.join(path, APP_CONFIG))
|
293
|
+
path = path.parent
|
294
|
+
end
|
295
|
+
!path.root?
|
278
296
|
end
|
279
|
-
!path.root?
|
280
297
|
end
|
281
298
|
|
282
299
|
# Shortcut method to find if Origen was invoked from within an application or from
|
283
300
|
# the global Origen install. This is just the opposite of in_app_workspace?
|
284
301
|
def running_globally?
|
285
|
-
!in_app_workspace?
|
302
|
+
@running_globally ||= !in_app_workspace?
|
286
303
|
end
|
287
304
|
alias_method :invoked_globally?, :running_globally?
|
288
305
|
|
@@ -299,7 +316,10 @@ unless defined? RGen::ORIGENTRANSITION
|
|
299
316
|
path = path.parent
|
300
317
|
end
|
301
318
|
if path.root?
|
302
|
-
|
319
|
+
@running_globally = true
|
320
|
+
path = Pathname.new($_origen_invocation_pwd || Dir.pwd)
|
321
|
+
else
|
322
|
+
@in_app_workspace = true
|
303
323
|
end
|
304
324
|
path
|
305
325
|
end
|
@@ -451,47 +471,54 @@ unless defined? RGen::ORIGENTRANSITION
|
|
451
471
|
# automatically the first time the application is referenced via Origen.app
|
452
472
|
def load_application(options = {})
|
453
473
|
@application ||= begin
|
454
|
-
#
|
455
|
-
#
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
# Don't understand the rules here, belt and braces approach for now to make
|
466
|
-
# sure that all Origen plugins are auto-required (otherwise Origen won't know
|
467
|
-
# about them to plug them into the application)
|
468
|
-
Bundler.require
|
469
|
-
Bundler.require(:development)
|
470
|
-
Bundler.require(:runtime)
|
471
|
-
Bundler.require(:default)
|
472
|
-
end
|
473
|
-
@plugins_loaded = true
|
474
|
-
# Now load the app
|
475
|
-
@loading_top_level = true
|
476
|
-
require File.join(root, APP_CONFIG)
|
477
|
-
@application = _applications_lookup[:root][root.to_s]
|
478
|
-
@loading_top_level = false
|
479
|
-
if @with_boot_environment
|
480
|
-
@application.plugins.disable_current
|
474
|
+
# If running globally (outside of an app workspace), instantiate a bare bones app to help
|
475
|
+
# many of Origen's features that expect an app to be present.
|
476
|
+
if running_globally?
|
477
|
+
@plugins_loaded = true
|
478
|
+
# Now load the app
|
479
|
+
@loading_top_level = true
|
480
|
+
require 'origen/global_app'
|
481
|
+
@application = _applications_lookup[:root][root.to_s]
|
482
|
+
@loading_top_level = false
|
483
|
+
@application_loaded = true
|
484
|
+
@application
|
481
485
|
else
|
482
|
-
|
486
|
+
# Make sure the top-level root is always in the load path, it seems that some existing
|
487
|
+
# plugins do some strange things to require stuff from the top-level app and rely on this
|
488
|
+
path = File.join(root, 'lib')
|
489
|
+
$LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
|
490
|
+
if File.exist?(File.join(root, 'Gemfile')) && !@with_boot_environment
|
491
|
+
# Don't understand the rules here, belt and braces approach for now to make
|
492
|
+
# sure that all Origen plugins are auto-required (otherwise Origen won't know
|
493
|
+
# about them to plug them into the application)
|
494
|
+
Bundler.require
|
495
|
+
Bundler.require(:development)
|
496
|
+
Bundler.require(:runtime)
|
497
|
+
Bundler.require(:default)
|
498
|
+
end
|
499
|
+
@plugins_loaded = true
|
500
|
+
# Now load the app
|
501
|
+
@loading_top_level = true
|
502
|
+
require File.join(root, APP_CONFIG)
|
503
|
+
@application = _applications_lookup[:root][root.to_s]
|
504
|
+
@loading_top_level = false
|
505
|
+
if @with_boot_environment
|
506
|
+
@application.plugins.disable_current
|
507
|
+
else
|
508
|
+
Origen.remote_manager.require!
|
509
|
+
end
|
510
|
+
boot = File.join(root, 'config', 'boot.rb')
|
511
|
+
require boot if File.exist?(boot)
|
512
|
+
env = File.join(root, 'config', 'environment.rb')
|
513
|
+
require env if File.exist?(env)
|
514
|
+
dev = File.join(root, 'config', 'development.rb')
|
515
|
+
require dev if File.exist?(dev)
|
516
|
+
validate_origen_dev_configuration!
|
517
|
+
([@application] + Origen.app.plugins).each(&:on_loaded)
|
518
|
+
@application_loaded = true
|
519
|
+
Array(@after_app_loaded_blocks).each { |b| b.call(@application) }
|
520
|
+
@application
|
483
521
|
end
|
484
|
-
boot = File.join(root, 'config', 'boot.rb')
|
485
|
-
require boot if File.exist?(boot)
|
486
|
-
env = File.join(root, 'config', 'environment.rb')
|
487
|
-
require env if File.exist?(env)
|
488
|
-
dev = File.join(root, 'config', 'development.rb')
|
489
|
-
require dev if File.exist?(dev)
|
490
|
-
validate_origen_dev_configuration!
|
491
|
-
([@application] + Origen.app.plugins).each(&:on_loaded)
|
492
|
-
@application_loaded = true
|
493
|
-
Array(@after_app_loaded_blocks).each { |b| b.call(@application) }
|
494
|
-
@application
|
495
522
|
end
|
496
523
|
end
|
497
524
|
|
data/lib/origen/application.rb
CHANGED
@@ -31,20 +31,26 @@ module Origen
|
|
31
31
|
# Somehow using the old import system and version file format we can get in here when
|
32
32
|
# loading the version, this can be removed in future when the imports API is retired
|
33
33
|
unless caller[0] =~ /version.rb.*/
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
if Origen.plugins_loaded? && !Origen.loading_top_level?
|
38
|
-
# This situation of a plugin being loaded after the top-level app could occur if the app
|
39
|
-
# doesn't require the plugin until later, in that case there is nothing the plugin owner
|
40
|
-
# can do and we just need to accept that this can happen.
|
41
|
-
# Origen.log.warning "The #{app.name} plugin is using a non-standard loading mechanism, upgrade to a newer version of it to get rid of this warning (please report a bug to its owner if this warning persists)"
|
34
|
+
if base.to_s == 'OrigenGlobalApplication'
|
35
|
+
app = base.instance
|
36
|
+
app.root = Origen.root
|
42
37
|
Origen.register_application(app)
|
43
|
-
# Origen.app.plugins << app
|
44
38
|
else
|
45
|
-
|
39
|
+
root = Pathname.new(caller[0].sub(/(\\|\/)?config(\\|\/)application.rb.*/, '')).realpath
|
40
|
+
app = base.instance
|
41
|
+
app.root = root.to_s
|
42
|
+
if Origen.plugins_loaded? && !Origen.loading_top_level?
|
43
|
+
# This situation of a plugin being loaded after the top-level app could occur if the app
|
44
|
+
# doesn't require the plugin until later, in that case there is nothing the plugin owner
|
45
|
+
# can do and we just need to accept that this can happen.
|
46
|
+
# Origen.log.warning "The #{app.name} plugin is using a non-standard loading mechanism, upgrade to a newer version of it to get rid of this warning (please report a bug to its owner if this warning persists)"
|
47
|
+
Origen.register_application(app)
|
48
|
+
# Origen.app.plugins << app
|
49
|
+
else
|
50
|
+
Origen.register_application(app)
|
51
|
+
end
|
52
|
+
app.add_lib_to_load_path!
|
46
53
|
end
|
47
|
-
app.add_lib_to_load_path!
|
48
54
|
end
|
49
55
|
end
|
50
56
|
|
@@ -372,15 +378,19 @@ END
|
|
372
378
|
def version(options = {})
|
373
379
|
@version = nil if options[:refresh]
|
374
380
|
return @version if @version
|
375
|
-
|
376
|
-
|
377
|
-
@version = Origen::VersionString.new(eval(namespace)::VERSION)
|
381
|
+
if Origen.running_globally?
|
382
|
+
@version = Origen.version
|
378
383
|
else
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
+
load File.join(root, 'config', 'version.rb')
|
385
|
+
if defined? eval(namespace)::VERSION
|
386
|
+
@version = Origen::VersionString.new(eval(namespace)::VERSION)
|
387
|
+
else
|
388
|
+
# The eval of the class is required here as somehow when plugins are imported under the old
|
389
|
+
# imports system and with the old version file format we can end up with two copies of the
|
390
|
+
# same class constant. Don't understand it, but it is fixed with the move to gems and the
|
391
|
+
# namespace-based version file format.
|
392
|
+
@version = Origen::VersionString.new(eval(self.class.to_s)::VERSION)
|
393
|
+
end
|
384
394
|
end
|
385
395
|
@version
|
386
396
|
end
|
@@ -61,7 +61,9 @@ module Origen
|
|
61
61
|
# which is will build and checkout as required
|
62
62
|
def git_repo
|
63
63
|
@git_repo ||= begin
|
64
|
-
|
64
|
+
local_path = "#{Origen.config.web_directory.gsub('/', '-').symbolize}"
|
65
|
+
local_path.gsub!(':', '-') if Origen.os.windows?
|
66
|
+
local = Pathname.new("#{Origen.app.workspace_manager.imports_directory}/git/#{local_path}")
|
65
67
|
if git_sub_dir
|
66
68
|
remote = Origen.config.web_directory.sub("\/#{git_sub_dir}", '')
|
67
69
|
else
|
@@ -228,14 +228,16 @@ module Origen
|
|
228
228
|
# submitted the job.
|
229
229
|
Origen.file_handler.set_output_directory(options.merge(create: Origen.running_locally?))
|
230
230
|
Origen.file_handler.set_reference_directory(options.merge(create: Origen.running_locally?))
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
231
|
+
unless Origen.running_globally?
|
232
|
+
tmp = "#{Origen.root}/tmp"
|
233
|
+
FileUtils.mkdir(tmp) unless File.exist?(tmp)
|
234
|
+
if Origen.running_locally?
|
235
|
+
mkdir Origen::Log.log_file_directory
|
236
|
+
mkdir "#{Origen.root}/.lsf"
|
237
|
+
end
|
238
|
+
if options[:lsf]
|
239
|
+
mkdir Origen.app.lsf_manager.log_file_directory
|
240
|
+
end
|
239
241
|
end
|
240
242
|
end
|
241
243
|
|
data/lib/origen/chip_mode.rb
CHANGED
@@ -46,7 +46,7 @@ module Origen
|
|
46
46
|
# The data rate unit was validated on init so it is good to go
|
47
47
|
# in theory but should still check if it returns a numeric
|
48
48
|
value = @data_rate.send(@data_rate_unit.to_sym)
|
49
|
-
if
|
49
|
+
if value.is_a?(Numeric)
|
50
50
|
return value
|
51
51
|
else
|
52
52
|
Origen.log.error "@data_rate '#{@data_rate}' conversion using @data_rate_unit '#{@data_rate_unit}' did not product a Numeric, exiting..."
|
data/lib/origen/commands.rb
CHANGED
@@ -217,7 +217,7 @@ if shared_commands && shared_commands.size != 0
|
|
217
217
|
end
|
218
218
|
|
219
219
|
# Get a list of registered plugins and get the global launcher
|
220
|
-
@global_launcher = Origen._applications_lookup[:name].map do |plugin_name, plugin|
|
220
|
+
@global_launcher = Origen._applications_lookup[:name].dup.map do |plugin_name, plugin|
|
221
221
|
shared = plugin.config.shared || {}
|
222
222
|
if shared[:global_launcher]
|
223
223
|
file = "#{plugin.root}/#{shared[:global_launcher]}"
|
@@ -253,6 +253,8 @@ else
|
|
253
253
|
Usage: origen COMMAND [ARGS]
|
254
254
|
|
255
255
|
The core origen commands are:
|
256
|
+
EOT
|
257
|
+
cmds = <<-EOT
|
256
258
|
environment Display or set the environment (short-cut alias: "e")
|
257
259
|
target Display or set the target (short-cut alias: "t")
|
258
260
|
mode Display or set the mode (short-cut alias: "m")
|
@@ -269,32 +271,42 @@ The core origen commands are:
|
|
269
271
|
web Web page tools, see -h for details
|
270
272
|
time Tools for test time analysis and forecasting
|
271
273
|
lint Lint and style check (and correct) your application code
|
272
|
-
|
273
274
|
EOT
|
275
|
+
cmds.split(/\n/).each do |line|
|
276
|
+
puts Origen.clean_help_line(line)
|
277
|
+
end
|
278
|
+
puts
|
274
279
|
if @application_commands && !@application_commands.empty?
|
275
|
-
puts
|
276
|
-
|
277
|
-
|
278
|
-
|
280
|
+
puts 'In addition to these the application has added:'
|
281
|
+
@application_commands.split(/\n/).each do |cmds|
|
282
|
+
cmds.split(/\n/).each do |line|
|
283
|
+
puts Origen.clean_help_line(line)
|
284
|
+
end
|
285
|
+
end
|
286
|
+
puts
|
279
287
|
end
|
280
288
|
|
281
289
|
if @plugin_commands && !@plugin_commands.empty?
|
282
290
|
puts 'The following commands are provided by plugins:'
|
283
|
-
@plugin_commands.each do |
|
284
|
-
|
291
|
+
@plugin_commands.each do |cmds|
|
292
|
+
cmds.split(/\n/).each do |line|
|
293
|
+
puts Origen.clean_help_line(line)
|
294
|
+
end
|
285
295
|
end
|
296
|
+
puts
|
286
297
|
end
|
287
298
|
|
288
299
|
if @global_launcher && !@global_launcher.empty?
|
289
|
-
puts ''
|
290
300
|
puts 'The following global commands are provided by plugins:'
|
291
|
-
@global_commands.each do |
|
292
|
-
|
301
|
+
@global_commands.each do |cmds|
|
302
|
+
cmds.split(/\n/).each do |line|
|
303
|
+
puts Origen.clean_help_line(line)
|
304
|
+
end
|
293
305
|
end
|
306
|
+
puts
|
294
307
|
end
|
295
308
|
|
296
309
|
puts <<-EOT
|
297
|
-
|
298
310
|
All commands can be run with -d (or --debugger) to enable the debugger.
|
299
311
|
All commands can be run with --coverage to enable code coverage.
|
300
312
|
Many commands can be run with -h (or --help) for more information.
|
@@ -1,2 +1,2 @@
|
|
1
|
-
puts "Application: #{Origen.app.version}" if Origen.app_loaded?
|
1
|
+
puts "Application: #{Origen.app.version}" if Origen.app_loaded? && !Origen.running_globally?
|
2
2
|
puts " Origen: #{Origen.version}"
|
@@ -23,10 +23,29 @@ if ENV['BUNDLE_GEMFILE']
|
|
23
23
|
Bundler.require(:development)
|
24
24
|
Bundler.require(:runtime)
|
25
25
|
Bundler.require(:default)
|
26
|
+
else
|
27
|
+
# If we're not running from a Bundler build, which we aren't here,
|
28
|
+
# get a list of installed system gems. Go through this list finding and get any that has a dependency
|
29
|
+
# on Origen. If so, assume that gem is a plugin.
|
30
|
+
# For all plugins, require it to register as a plugin.
|
31
|
+
# The global handler below will take it from there.
|
32
|
+
Gem::Specification.each do |gem|
|
33
|
+
gem.dependencies.each do |d|
|
34
|
+
if d.name == 'origen'
|
35
|
+
require gem.name
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
26
39
|
end
|
27
40
|
|
41
|
+
# Load the global app and an empty target, this helps to ensure that all of Origen's functionality
|
42
|
+
# is available to global commands, since many features implicitly assume the presence of an app
|
43
|
+
Origen.app
|
44
|
+
Origen.target.temporary = -> {}
|
45
|
+
Origen.load_target
|
46
|
+
|
28
47
|
# Get a list of registered plugins and get the global launcher
|
29
|
-
@global_launcher = Origen._applications_lookup[:name].map do |plugin_name, plugin|
|
48
|
+
@global_launcher = Origen._applications_lookup[:name].dup.map do |plugin_name, plugin|
|
30
49
|
shared = plugin.config.shared || {}
|
31
50
|
if shared[:global_launcher]
|
32
51
|
file = "#{plugin.root}/#{shared[:global_launcher]}"
|
@@ -90,25 +109,30 @@ else
|
|
90
109
|
Usage: origen COMMAND [ARGS]
|
91
110
|
|
92
111
|
The following commands are available:
|
112
|
+
EOT
|
113
|
+
cmds = <<-EOT
|
93
114
|
new Create a new Origen application or plugin. "origen new my_app" creates a
|
94
115
|
new origen application workspace in "./my_app"
|
95
116
|
interactive Start an interactive Origen console (short-cut alias: "i"), this is just
|
96
117
|
IRB with the 'origen' lib loaded automatically
|
97
118
|
EOT
|
98
|
-
|
119
|
+
cmds.split(/\n/).each do |line|
|
120
|
+
puts Origen.clean_help_line(line)
|
121
|
+
end
|
122
|
+
puts
|
99
123
|
if @global_launcher && !@global_launcher.empty?
|
100
|
-
puts ''
|
101
124
|
puts 'The following global commands are provided by plugins:'
|
102
|
-
@global_commands.each do |
|
103
|
-
|
125
|
+
@global_commands.each do |cmds|
|
126
|
+
cmds.split(/\n/).each do |line|
|
127
|
+
puts Origen.clean_help_line(line)
|
128
|
+
end
|
104
129
|
end
|
130
|
+
puts
|
105
131
|
end
|
106
132
|
|
107
133
|
puts <<-EOT
|
108
|
-
|
109
134
|
Many commands can be run with -h (or --help) for more information.
|
135
|
+
|
110
136
|
EOT
|
111
|
-
# fetch Automatically creates the workspace for the requested plugin and
|
112
|
-
# populates the latest version of the plugin (short-cut alias: "f")
|
113
137
|
exit 0
|
114
138
|
end
|