origen 0.60.7 → 0.60.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/rubocop/easy.yml +4875 -308
- data/config/rubocop/strict.yml +4875 -308
- data/config/version.rb +1 -1
- data/lib/origen/application/configuration.rb +6 -3
- data/lib/origen/application/deployer.rb +4 -4
- data/lib/origen/application/environment.rb +4 -2
- data/lib/origen/application/lsf.rb +23 -4
- data/lib/origen/application/lsf_manager.rb +48 -52
- data/lib/origen/application/plugins.rb +7 -7
- data/lib/origen/application/release.rb +5 -3
- data/lib/origen/application/runner.rb +5 -6
- data/lib/origen/application/statistics.rb +1 -0
- data/lib/origen/application/target.rb +9 -6
- data/lib/origen/application/version_tracker.rb +4 -5
- data/lib/origen/application/workspace_manager.rb +5 -2
- data/lib/origen/application.rb +9 -9
- data/lib/origen/boot/api.rb +3 -0
- data/lib/origen/boot/app.rb +28 -30
- data/lib/origen/boot.rb +1 -0
- data/lib/origen/bugs.rb +2 -2
- data/lib/origen/chip_mode.rb +7 -4
- data/lib/origen/chip_package.rb +50 -53
- data/lib/origen/chips/chip.rb +8 -4
- data/lib/origen/chips.rb +16 -12
- data/lib/origen/client.rb +1 -0
- data/lib/origen/clocks/clock.rb +8 -7
- data/lib/origen/clocks/clocks_collection.rb +2 -1
- data/lib/origen/code_generators/actions.rb +1 -1
- data/lib/origen/code_generators/base.rb +1 -1
- data/lib/origen/code_generators.rb +3 -0
- data/lib/origen/commands/archive.rb +1 -1
- data/lib/origen/commands/compile.rb +2 -2
- data/lib/origen/commands/fetch.rb +1 -1
- data/lib/origen/commands/generate.rb +3 -3
- data/lib/origen/commands/interactive.rb +6 -7
- data/lib/origen/commands/lint.rb +1 -1
- data/lib/origen/commands/lsf.rb +2 -2
- data/lib/origen/commands/new.rb +1 -1
- data/lib/origen/commands/plugin.rb +2 -2
- data/lib/origen/commands/program.rb +3 -3
- data/lib/origen/commands/rc.rb +4 -4
- data/lib/origen/commands/save.rb +1 -1
- data/lib/origen/commands/time.rb +4 -6
- data/lib/origen/commands/web.rb +5 -2
- data/lib/origen/commands.rb +1 -1
- data/lib/origen/componentable.rb +1 -0
- data/lib/origen/controller.rb +11 -13
- data/lib/origen/core_ext/array.rb +2 -1
- data/lib/origen/core_ext/enumerable.rb +4 -2
- data/lib/origen/core_ext/hash.rb +5 -6
- data/lib/origen/core_ext/integer.rb +2 -4
- data/lib/origen/core_ext/object.rb +2 -2
- data/lib/origen/core_ext/option_parser/optparse.rb +1 -1
- data/lib/origen/core_ext/string.rb +8 -8
- data/lib/origen/database/key_value_store.rb +12 -14
- data/lib/origen/database/key_value_stores.rb +1 -0
- data/lib/origen/errata/hw_erratum.rb +1 -1
- data/lib/origen/errata.rb +7 -8
- data/lib/origen/features/feature.rb +1 -0
- data/lib/origen/features.rb +4 -6
- data/lib/origen/file_handler.rb +8 -7
- data/lib/origen/fuses/fuse_field.rb +2 -2
- data/lib/origen/generator/compiler.rb +2 -4
- data/lib/origen/generator/job.rb +3 -2
- data/lib/origen/generator/pattern.rb +3 -3
- data/lib/origen/generator/pattern_finder.rb +6 -5
- data/lib/origen/generator/pattern_sequence.rb +3 -0
- data/lib/origen/generator/renderer.rb +3 -4
- data/lib/origen/generator/resources.rb +1 -1
- data/lib/origen/generator/stage.rb +3 -0
- data/lib/origen/limits/limit.rb +14 -11
- data/lib/origen/limits/limit_set.rb +2 -1
- data/lib/origen/loader.rb +4 -2
- data/lib/origen/log.rb +3 -2
- data/lib/origen/memory.rb +1 -0
- data/lib/origen/model.rb +10 -4
- data/lib/origen/models.rb +2 -2
- data/lib/origen/netlist/list.rb +1 -0
- data/lib/origen/netlist.rb +5 -7
- data/lib/origen/org_file/interceptor.rb +1 -1
- data/lib/origen/org_file.rb +4 -1
- data/lib/origen/parameters/set.rb +1 -0
- data/lib/origen/parameters.rb +3 -1
- data/lib/origen/pins/pin.rb +18 -12
- data/lib/origen/pins/pin_bank.rb +3 -0
- data/lib/origen/pins/pin_clock.rb +3 -2
- data/lib/origen/pins/pin_collection.rb +3 -0
- data/lib/origen/pins/timing/wave.rb +5 -0
- data/lib/origen/pins.rb +7 -1
- data/lib/origen/ports.rb +1 -1
- data/lib/origen/power_domains/power_domain.rb +5 -2
- data/lib/origen/power_domains/power_domains_collection.rb +2 -1
- data/lib/origen/registers/bit.rb +21 -17
- data/lib/origen/registers/bit_collection.rb +15 -6
- data/lib/origen/registers/reg.rb +34 -28
- data/lib/origen/registers.rb +25 -24
- data/lib/origen/remote_manager.rb +3 -2
- data/lib/origen/revision_control/base.rb +1 -4
- data/lib/origen/revision_control/design_sync.rb +10 -10
- data/lib/origen/revision_control/git.rb +4 -2
- data/lib/origen/site_config/config.rb +3 -1
- data/lib/origen/site_config.rb +3 -0
- data/lib/origen/specs/checkers.rb +12 -8
- data/lib/origen/specs/doc_resource.rb +3 -4
- data/lib/origen/specs/spec.rb +5 -1
- data/lib/origen/specs/version_history.rb +1 -1
- data/lib/origen/specs.rb +52 -37
- data/lib/origen/sub_blocks.rb +20 -14
- data/lib/origen/top_level.rb +2 -1
- data/lib/origen/users/user.rb +4 -5
- data/lib/origen/utility/csv_data.rb +6 -4
- data/lib/origen/utility/diff.rb +9 -9
- data/lib/origen/utility/file_diff.rb +4 -0
- data/lib/origen/utility/input_capture.rb +6 -6
- data/lib/origen/utility/mailer.rb +8 -11
- data/lib/origen/utility/time_and_date.rb +1 -2
- data/lib/origen/utility.rb +2 -2
- data/lib/origen/value.rb +2 -1
- data/lib/origen/version_string.rb +33 -41
- data/lib/origen.rb +62 -64
- data/origen_app_generators/origen_app_generators.gemspec +1 -1
- metadata +9 -27
- data/config/rubocop/easy_disabled.yml +0 -275
- data/config/rubocop/easy_enabled.yml +0 -727
- data/config/rubocop/strict_disabled.yml +0 -251
- data/config/rubocop/strict_enabled.yml +0 -751
@@ -32,11 +32,11 @@ Usage: origen compile [space separated files, lists or directories] [options]
|
|
32
32
|
EOT
|
33
33
|
opts.on('-e', '--environment NAME', String, 'Override the default environment, NAME can be a full path or a fragment of an environment file name') { |e| options[:environment] = e }
|
34
34
|
opts.on('-t', '--target NAME', String, 'Override the default target, NAME can be a full path or a fragment of a target file name') { |t| options[:target] = t }
|
35
|
-
opts.on('-pl', '--plugin PLUGIN_NAME', String, 'Set current plugin') { |pl_n|
|
35
|
+
opts.on('-pl', '--plugin PLUGIN_NAME', String, 'Set current plugin') { |pl_n| options[:current_plugin] = pl_n }
|
36
36
|
opts.on('-l', '--lsf [ACTION]', [:clear, :add], "Submit jobs to the LSF, optionally specify whether to 'clear' or 'add' to existing jobs") { |a| options[:lsf] = true; options[:lsf_action] = a }
|
37
37
|
opts.on('-w', '--wait', 'Wait for LSF processing to complete') { options[:wait_for_lsf_completion] = true }
|
38
38
|
opts.on('-c', '--continue', 'Continue on error (to the next file)') { options[:continue] = true }
|
39
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
39
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
40
40
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
41
41
|
opts.on('-f', '--file FILE', String, 'Override the default log file') { |o| options[:log_file] = o }
|
42
42
|
opts.on('-o', '--output DIR', String, 'Override the default output directory') { |o| options[:output] = o }
|
@@ -12,7 +12,7 @@ By default this will always create the workspace at './[PLUGIN_NAME]'
|
|
12
12
|
Usage: origen fetch [PLUGIN_NAME] [options]
|
13
13
|
END
|
14
14
|
opts.on('-o', '--outputdir PATH', 'User defined destination directory of the plugin workspace') { |o| options[:outputdir] = o }
|
15
|
-
opts.on('-v', '--version VERSION', 'User requested plugin/gem version') {
|
15
|
+
opts.on('-v', '--version VERSION', 'User requested plugin/gem version') { |v| options[:version] = v }
|
16
16
|
opts.on('-h', '--help', 'Show this message') { puts opts; exit }
|
17
17
|
end.parse!
|
18
18
|
|
@@ -12,7 +12,7 @@ opt_parser = OptionParser.new do |opts|
|
|
12
12
|
opts.on('-l', '--lsf [ACTION]', [:clear, :add], "Submit jobs to the LSF, optionally specify whether to 'clear' or 'add' to existing jobs") { |a| options[:lsf] = true; options[:lsf_action] = a }
|
13
13
|
opts.on('-w', '--wait', 'Wait for LSF processing to complete') { options[:wait_for_lsf_completion] = true }
|
14
14
|
opts.on('-c', '--continue', 'Continue on error (to the next pattern)') { options[:continue] = true }
|
15
|
-
opts.on('-pl', '--plugin PLUGIN_NAME', String, 'Set current plugin') { |pl_n|
|
15
|
+
opts.on('-pl', '--plugin PLUGIN_NAME', String, 'Set current plugin') { |pl_n| options[:current_plugin] = pl_n }
|
16
16
|
opts.on('-f', '--file FILE', String, 'Override the default log file') { |o| options[:log_file] = o }
|
17
17
|
opts.on('-o', '--output DIR', String, 'Override the default output directory') { |o| options[:output] = o }
|
18
18
|
opts.on('-r', '--reference DIR', String, 'Override the default reference directory') { |o| options[:reference] = o }
|
@@ -22,7 +22,7 @@ opt_parser = OptionParser.new do |opts|
|
|
22
22
|
opts.on('--html', 'Generate into html format') { options[:html] = true }
|
23
23
|
opts.on('--nocom', 'No comments in the generated pattern') { options[:no_comments] = true }
|
24
24
|
opts.on('-seq', '--sequence NAME', String, 'Generate multiple patterns into a single concurrent pattern sequence') { |o| options[:sequence] = o }
|
25
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
25
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
26
26
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
27
27
|
# Apply any application option extensions to the OptionParser
|
28
28
|
Origen::CommandHelpers.extend_options(opts, app_options, options)
|
@@ -56,7 +56,7 @@ _with_doc_tester(options) do
|
|
56
56
|
Origen.app.plugins.temporary = options[:current_plugin] if options[:current_plugin]
|
57
57
|
Origen.environment.temporary = options[:environment] if options[:environment]
|
58
58
|
Origen.target.temporary = options[:target] if options[:target]
|
59
|
-
Origen.app.load_target!
|
59
|
+
Origen.app.load_target! # This initial load is required to apply any configuration
|
60
60
|
# options present in the target, it will loaded again before
|
61
61
|
# each generate/compile job
|
62
62
|
Origen.app.runner.generate(options)
|
@@ -36,9 +36,9 @@ Usage: origen i [options]
|
|
36
36
|
END
|
37
37
|
opts.on('-e', '--environment NAME', String, 'Override the default environment, NAME can be a full path or a fragment of an environment file name') { |e| options[:environment] = e }
|
38
38
|
opts.on('-t', '--target NAME', String, 'Override the default target, NAME can be a full path or a fragment of a target file name') { |t| options[:target] = t }
|
39
|
-
opts.on('-pl', '--plugin PLUGIN_NAME', String, 'Set current plugin') { |pl_n|
|
39
|
+
opts.on('-pl', '--plugin PLUGIN_NAME', String, 'Set current plugin') { |pl_n| options[:current_plugin] = pl_n }
|
40
40
|
opts.on('-p', '--pry', 'Use Pry for the session (instead of IRB)') { options[:pry] = true }
|
41
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
41
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
42
42
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
43
43
|
# Apply any application option extensions to the OptionParser
|
44
44
|
Origen::CommandHelpers.extend_options(opts, app_options, options)
|
@@ -59,7 +59,7 @@ Usage: origen i [options]
|
|
59
59
|
begin
|
60
60
|
if defined?(Pry) && options[:pry]
|
61
61
|
include ConsoleMethods
|
62
|
-
# rubocop:disable Debugger, EmptyLines
|
62
|
+
# rubocop:disable Lint/Debugger, Layout/EmptyLines
|
63
63
|
|
64
64
|
|
65
65
|
|
@@ -75,13 +75,12 @@ Usage: origen i [options]
|
|
75
75
|
|
76
76
|
|
77
77
|
|
78
|
-
# rubocop:enable Debugger, EmptyLines
|
78
|
+
# rubocop:enable Lint/Debugger, Layout/EmptyLines
|
79
79
|
else
|
80
80
|
IRB::ExtendCommandBundle.send :include, Origen::ConsoleMethods
|
81
81
|
IRB.start
|
82
82
|
end
|
83
|
-
|
84
|
-
|
85
|
-
|
83
|
+
ensure
|
84
|
+
listeners_for(:interactive_shutdown).each(&:interactive_shutdown)
|
86
85
|
end
|
87
86
|
end
|
data/lib/origen/commands/lint.rb
CHANGED
@@ -20,7 +20,7 @@ http://origen.freescale.net/origen/latest/guides/utilities/lint/
|
|
20
20
|
opts.on('-n', '--no-correct', "Don't correct errors automatically (override if the app default is set to auto correct)") { options[:no_correct] = true }
|
21
21
|
opts.on('-e', '--easy', 'Be less strict, most checks run with this flag enabled can be corrected automatically') { options[:easy] = true }
|
22
22
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
23
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
23
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
24
24
|
# Apply any application option extensions to the OptionParser
|
25
25
|
Origen::CommandHelpers.extend_options(opts, app_options, options)
|
26
26
|
opts.separator ''
|
data/lib/origen/commands/lsf.rb
CHANGED
@@ -46,7 +46,7 @@ Usage: origen lsf [options]
|
|
46
46
|
EOT
|
47
47
|
opts.on('-v', '--verbose', 'Show job details') { options[:verbose] = true }
|
48
48
|
opts.on('-r', '--resubmit', 'Re-submit jobs') { options[:resubmit] = true }
|
49
|
-
opts.on('-c', '--clear', 'Clear jobs') {
|
49
|
+
opts.on('-c', '--clear', 'Clear jobs') { options[:clear] = true }
|
50
50
|
opts.on('-l', '--log', 'Build a log file from the completed jobs') { options[:log] = true }
|
51
51
|
# opts.on("-k", "--kill", "Kill jobs") { options[:kill] = true }
|
52
52
|
types = [:queuing, :running, :lost, :passed, :failed, :all]
|
@@ -55,7 +55,7 @@ Usage: origen lsf [options]
|
|
55
55
|
opts.on('-w', '--wait', 'Wait for LSF processing to complete') { options[:wait_for_lsf_completion] = true }
|
56
56
|
# opts.on("-e", "--execute", "Execute....") { options[:execute] = true }
|
57
57
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
58
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
58
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
59
59
|
# Apply any application option extensions to the OptionParser
|
60
60
|
Origen::CommandHelpers.extend_options(opts, app_options, options)
|
61
61
|
opts.separator ''
|
data/lib/origen/commands/new.rb
CHANGED
@@ -25,7 +25,7 @@ https://origen-sdk.org/origen_app_generators
|
|
25
25
|
|
26
26
|
Usage: origen new [APP_NAME] [options]
|
27
27
|
END
|
28
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
28
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
29
29
|
opts.on('-f', '--fetch', 'Fetch the latest versions of the app generators, otherwise happens every 24hrs') { options[:fetch] = true }
|
30
30
|
opts.separator ''
|
31
31
|
opts.on('-h', '--help', 'Show this message') { puts opts; exit }
|
@@ -35,8 +35,8 @@ The following commands are available:
|
|
35
35
|
|
36
36
|
The following options are available:
|
37
37
|
EOT
|
38
|
-
opts.on('-a', '--allr', 'List all plugins/gems (including external)') {
|
39
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
38
|
+
opts.on('-a', '--allr', 'List all plugins/gems (including external)') { options[:debugger] = true }
|
39
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
40
40
|
opts.on('-h', '--help', 'Show this message') { puts opts; exit }
|
41
41
|
end
|
42
42
|
|
@@ -12,7 +12,7 @@ opt_parser = OptionParser.new do |opts|
|
|
12
12
|
opts.on('-l', '--lsf [ACTION]', [:clear, :add], "Submit jobs to the LSF, optionally specify whether to 'clear' or 'add' to existing jobs") { |a| options[:lsf] = true; options[:lsf_action] = a }
|
13
13
|
opts.on('-w', '--wait', 'Wait for LSF processing to complete') { options[:wait_for_lsf_completion] = true }
|
14
14
|
opts.on('-c', '--continue', 'Continue on error (to the next file)') { options[:continue] = true }
|
15
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
15
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
16
16
|
opts.on('-f', '--file FILE', String, 'Override the default log file') { |o| options[:log_file] = o }
|
17
17
|
opts.on('-pl', '--plugin PLUGIN_NAME', String, 'Set current plugin') { |pl_n| options[:current_plugin] = pl_n }
|
18
18
|
opts.on('-o', '--output DIR', String, 'Override the default output directory') { |o| options[:output] = o }
|
@@ -21,7 +21,7 @@ opt_parser = OptionParser.new do |opts|
|
|
21
21
|
opts.on('--doc', 'Generate into doc (yaml) format, requires a Doc interface to be setup in your application') { options[:doc] = true }
|
22
22
|
opts.on('-q', '--queue NAME', String, 'Specify the LSF queue, default is short') { |o| options[:queue] = o }
|
23
23
|
opts.on('-p', '--project NAME', String, 'Specify the LSF project, default is msg.te') { |o| options[:project] = o }
|
24
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
24
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
25
25
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
26
26
|
# Apply any application option extensions to the OptionParser
|
27
27
|
Origen::CommandHelpers.extend_options(opts, app_options, options)
|
@@ -55,7 +55,7 @@ _with_doc_tester(options) do
|
|
55
55
|
Origen.app.plugins.temporary = options[:current_plugin] if options[:current_plugin]
|
56
56
|
Origen.environment.temporary = options[:environment] if options[:environment]
|
57
57
|
Origen.target.temporary = options[:target] if options[:target]
|
58
|
-
Origen.app.load_target!
|
58
|
+
Origen.app.load_target! # This initial load is required to apply any configuration
|
59
59
|
# options present in the target, it will loaded again before
|
60
60
|
# each generate/compile job
|
61
61
|
|
data/lib/origen/commands/rc.rb
CHANGED
@@ -131,7 +131,7 @@ The following options are available:
|
|
131
131
|
# Apply any application option extensions to the OptionParser
|
132
132
|
Origen::CommandHelpers.extend_options(opts, app_options, options)
|
133
133
|
opts.separator ''
|
134
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
134
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
135
135
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
136
136
|
opts.separator ''
|
137
137
|
opts.separator "The following options apply to the 'tag' command only:"
|
@@ -369,13 +369,13 @@ The following options are available:
|
|
369
369
|
filelist = Origen.app.rc.unmanaged.reject do |file|
|
370
370
|
reject = false
|
371
371
|
unmanaged_dirs.each do |dir_filter|
|
372
|
-
if file =~ /^#{Regexp.escape(dir_filter)}\//i
|
372
|
+
if file =~ /^#{Regexp.escape(dir_filter)}\//i # dir matching
|
373
373
|
reject = true
|
374
374
|
end
|
375
375
|
end
|
376
376
|
unless reject
|
377
377
|
unmanaged_files.each do |file_filter|
|
378
|
-
if file_filter =~ /\*/
|
378
|
+
if file_filter =~ /\*/ # wildcard used
|
379
379
|
temp_file_filter = file_filter.gsub('.', '___') # replace . with ___
|
380
380
|
temp_file_filter2 = temp_file_filter.sub(/\*/, '') # remove *
|
381
381
|
temp_file = file.gsub('.', '___') # replace . with __
|
@@ -383,7 +383,7 @@ The following options are available:
|
|
383
383
|
reject = true
|
384
384
|
end
|
385
385
|
else
|
386
|
-
if file.downcase == file_filter.downcase
|
386
|
+
if file.downcase == file_filter.downcase # exact match
|
387
387
|
reject = true
|
388
388
|
end
|
389
389
|
end
|
data/lib/origen/commands/save.rb
CHANGED
@@ -13,7 +13,7 @@ Usage: origen save TYPE [options]
|
|
13
13
|
valid TYPE values: all, new, changed
|
14
14
|
EOT
|
15
15
|
opts.on('-f', '--file FILE', String, 'Override the default log file') { |o| options[:log_file] = o }
|
16
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
16
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
17
17
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
18
18
|
# Apply any application option extensions to the OptionParser
|
19
19
|
Origen::CommandHelpers.extend_options(opts, app_options, options)
|
data/lib/origen/commands/time.rb
CHANGED
@@ -24,9 +24,9 @@ Usage: origen time CMD [args] [options]
|
|
24
24
|
|
25
25
|
STOP
|
26
26
|
opts.on('-n', '--name FILE', String, 'Use the given named reference instead of the default') { |o| options[:ref_name] = o }
|
27
|
-
opts.on('-s', '--summary', 'Output flow summary results only (instead of details for each test)') {
|
27
|
+
opts.on('-s', '--summary', 'Output flow summary results only (instead of details for each test)') { options[:summary] = true }
|
28
28
|
opts.on('-t', '--target NAME1,NAME2,NAME3', Array, 'Override the default target, NAME can be a full path or a fragment of a target file name') { |t| options[:target] = t }
|
29
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
29
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
30
30
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
31
31
|
opts.on('-f', '--file FILE', String, 'Override the default log file') { |o| options[:log_file] = o }
|
32
32
|
# Apply any application option extensions to the OptionParser
|
@@ -75,8 +75,7 @@ when 'new'
|
|
75
75
|
file: "#{Origen.top}/templates/time/rules.rb.erb",
|
76
76
|
output: "#{Origen.root}/config/test_time",
|
77
77
|
quiet: true,
|
78
|
-
check_for_changes: false
|
79
|
-
)
|
78
|
+
check_for_changes: false)
|
80
79
|
# Add this to the environment if not already present...
|
81
80
|
env = "#{Origen.root}/config/environment.rb"
|
82
81
|
unless File.readlines(env).any? { |l| l =~ /config\/test_time\/rules/ }
|
@@ -99,8 +98,7 @@ when 'new'
|
|
99
98
|
file: "#{Origen.top}/templates/time/filter.rb.erb",
|
100
99
|
output: "#{Origen.root}/config/test_time",
|
101
100
|
quiet: true,
|
102
|
-
check_for_changes: false
|
103
|
-
)
|
101
|
+
check_for_changes: false)
|
104
102
|
# Add this to the environment if not already present...
|
105
103
|
env = "#{Origen.root}/config/environment.rb"
|
106
104
|
unless File.readlines(env).any? { |l| l =~ /config\/test_time\/filter/ }
|
data/lib/origen/commands/web.rb
CHANGED
@@ -39,14 +39,14 @@ The following options are available:
|
|
39
39
|
END
|
40
40
|
opts.on('-e', '--environment NAME', String, 'Override the default environment, NAME can be a full path or a fragment of an environment file name') { |e| options[:environment] = e }
|
41
41
|
opts.on('-t', '--target NAME', String, 'Override the default target, NAME can be a full path or a fragment of a target file name') { |t| options[:target] = t }
|
42
|
-
opts.on('-r', '--remote', 'Use in conjunction with the compile command to deploy files to a remote web server') {
|
42
|
+
opts.on('-r', '--remote', 'Use in conjunction with the compile command to deploy files to a remote web server') { options[:remote] = true }
|
43
43
|
opts.on('-a', '--api', 'Generate API documentation after compiling') { options[:api] = true }
|
44
44
|
opts.on('--archive ID', String, 'Archive the documents after compiling or deploying remotely') do |id|
|
45
45
|
options[:archive] = id
|
46
46
|
require "#{Origen.top}/helpers/url"
|
47
47
|
Origen::Generator::Compiler::Helpers.archive_name = id
|
48
48
|
end
|
49
|
-
opts.on('-d', '--debugger', 'Enable the debugger') {
|
49
|
+
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
50
50
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
51
51
|
opts.on('--no-serve', "Don't serve the website after compiling without the remote option") { options[:no_serve] = true }
|
52
52
|
opts.on('-c', '--comment COMMENT', String, 'Supply a commit comment when deploying to Git') { |o| options[:comment] = o }
|
@@ -75,7 +75,10 @@ The following options are available:
|
|
75
75
|
def self._start_server
|
76
76
|
# Get the current host
|
77
77
|
require 'socket'
|
78
|
+
# gethostbyname is deprecated in favor of Addrinfo#getaddrinfo
|
79
|
+
# rubocop:disable Lint/DeprecatedClassMethods
|
78
80
|
host = Socket.gethostbyname(Socket.gethostname).first.downcase
|
81
|
+
# rubocop:enable Lint/DeprecatedClassMethods
|
79
82
|
|
80
83
|
# Get a free port
|
81
84
|
port = 8000 # preferred port
|
data/lib/origen/commands.rb
CHANGED
data/lib/origen/componentable.rb
CHANGED
data/lib/origen/controller.rb
CHANGED
@@ -75,19 +75,17 @@ module Origen
|
|
75
75
|
|
76
76
|
# Returns the controller's model
|
77
77
|
def model
|
78
|
-
@model ||=
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
end
|
90
|
-
end
|
78
|
+
@model ||= if self.class.path_to_model
|
79
|
+
m = eval(self.class.path_to_model)
|
80
|
+
if m
|
81
|
+
if m.respond_to?(:_controller=)
|
82
|
+
m.send(:_controller=, self)
|
83
|
+
end
|
84
|
+
else
|
85
|
+
fail "No model object found at path: #{self.class.path_to_model}"
|
86
|
+
end
|
87
|
+
m
|
88
|
+
end
|
91
89
|
end
|
92
90
|
|
93
91
|
# When compared to another object, a controller will consider itself equal if either the controller
|
@@ -29,11 +29,11 @@ module Enumerable
|
|
29
29
|
unless options[:ignore].empty? || options[:select].empty?
|
30
30
|
fail "Cannot have the same arguments for 'ignore' and 'select' options" unless (options[:ignore] & options[:select]).empty?
|
31
31
|
end
|
32
|
-
if
|
32
|
+
if respond_to?(:empty?) && empty?
|
33
33
|
list_array << self if options[:nil_or_empty]
|
34
34
|
else
|
35
35
|
each do |k, v|
|
36
|
-
|
36
|
+
is_a?(Hash) ? item = v : item = k
|
37
37
|
klass = item.class.to_s
|
38
38
|
superklass = item.class.superclass.to_s
|
39
39
|
if options[:flatten].include? item.class
|
@@ -50,6 +50,7 @@ module Enumerable
|
|
50
50
|
else
|
51
51
|
next unless options[:select].empty? || options[:select].include?(item.class) || PRIMATIVES.any? { |klass| item.is_a?(klass) }
|
52
52
|
next if options[:ignore].include?(item.class)
|
53
|
+
|
53
54
|
case item
|
54
55
|
when NilClass
|
55
56
|
list_array << item if options[:nil_or_empty]
|
@@ -64,6 +65,7 @@ module Enumerable
|
|
64
65
|
list_array += item.list(options)
|
65
66
|
when String
|
66
67
|
next if item.empty? && options[:nil_or_empty] == false
|
68
|
+
|
67
69
|
list_array << item
|
68
70
|
else
|
69
71
|
list_array << item
|
data/lib/origen/core_ext/hash.rb
CHANGED
@@ -32,8 +32,7 @@ class Hash
|
|
32
32
|
when Symbol then 'k == filter'
|
33
33
|
when NilClass then true
|
34
34
|
else true
|
35
|
-
|
36
|
-
# rubocop:disable UnusedBlockArgument
|
35
|
+
end
|
37
36
|
filtered_hash = select do |k, v|
|
38
37
|
[TrueClass, FalseClass].include?(select_logic.class) ? select_logic : !!eval(select_logic)
|
39
38
|
end
|
@@ -66,16 +65,16 @@ class Hash
|
|
66
65
|
elsif key.is_a? Regexp
|
67
66
|
search_results[k] = v if key.match(k.to_s)
|
68
67
|
else
|
69
|
-
return v if
|
68
|
+
return v if k == key
|
70
69
|
end
|
71
70
|
end
|
72
71
|
end
|
73
72
|
if search_results.empty?
|
74
|
-
|
73
|
+
nil
|
75
74
|
elsif search_results.size == 1
|
76
|
-
|
75
|
+
search_results.values.first
|
77
76
|
else
|
78
|
-
|
77
|
+
search_results
|
79
78
|
end
|
80
79
|
end
|
81
80
|
end
|
@@ -3,7 +3,7 @@ class Object
|
|
3
3
|
# ultimately returns nil if no value is found.
|
4
4
|
def try(*methods)
|
5
5
|
methods.each do |method|
|
6
|
-
if
|
6
|
+
if respond_to?(method)
|
7
7
|
val = send(method)
|
8
8
|
return val if val
|
9
9
|
end
|
@@ -21,7 +21,7 @@ class Object
|
|
21
21
|
# 'hi'.origen_subblock? #=> false
|
22
22
|
# @see https://origen-sdk.org/origen/guides/models/defining/#Adding_Sub_Blocks
|
23
23
|
def origen_subblock?
|
24
|
-
|
24
|
+
is_a?(Origen::Model) || is_a?(Origen::Controller) || is_a?(Origen::SubBlocks::Placeholder)
|
25
25
|
end
|
26
26
|
alias_method :origen_sub_block?, :origen_subblock?
|
27
27
|
end
|
@@ -6,7 +6,7 @@ class OptionParser
|
|
6
6
|
def parse!(*args)
|
7
7
|
lsf_options = ARGV.dup
|
8
8
|
orig_parse!(*args)
|
9
|
-
lsf_options -= ARGV
|
9
|
+
lsf_options -= ARGV # Now contains all original options
|
10
10
|
|
11
11
|
# Pick whether we should be using the application's LSF instance or Origen's
|
12
12
|
# global LSF instance
|
@@ -11,7 +11,7 @@ end
|
|
11
11
|
|
12
12
|
class String
|
13
13
|
def to_dec
|
14
|
-
if
|
14
|
+
if is_verilog_number?
|
15
15
|
verilog_to_dec
|
16
16
|
elsif match(/^0[x,o,d,b]\S+/)
|
17
17
|
_to_dec(self)
|
@@ -92,6 +92,7 @@ class String
|
|
92
92
|
while match_str.length > 0
|
93
93
|
md = match_str.match(regex)
|
94
94
|
break unless md
|
95
|
+
|
95
96
|
matches << md
|
96
97
|
match_str = md.post_match
|
97
98
|
end
|
@@ -165,25 +166,24 @@ class String
|
|
165
166
|
# Attempt to convert a String to a boolean answer
|
166
167
|
def to_bool
|
167
168
|
if self == true || self =~ (/^(true|t|yes|y|1)$/i)
|
168
|
-
|
169
|
-
elsif self == false ||
|
170
|
-
|
171
|
-
else
|
172
|
-
return nil
|
169
|
+
true
|
170
|
+
elsif self == false || empty? || self =~ (/^(false|f|no|n|0)$/i)
|
171
|
+
false
|
173
172
|
end
|
174
173
|
end
|
175
174
|
|
176
175
|
# Check if a String is a numeric
|
177
176
|
def is_numeric?
|
178
177
|
return true if self =~ /\A\d+\Z/
|
178
|
+
|
179
179
|
true if Float(self) rescue false # rubocop:disable Style/RescueModifier
|
180
180
|
end
|
181
181
|
alias_method :numeric?, :is_numeric?
|
182
182
|
|
183
183
|
# Convert the String to a Numeric (Float or Integer)
|
184
184
|
def to_numeric
|
185
|
-
if
|
186
|
-
if to_i == to_f
|
185
|
+
if numeric?
|
186
|
+
if to_i == to_f # rubocop:disable Lint/FloatComparison
|
187
187
|
to_i
|
188
188
|
else
|
189
189
|
to_f
|
@@ -24,7 +24,7 @@ module Origen
|
|
24
24
|
refresh if persisted?
|
25
25
|
store[key] = val
|
26
26
|
save_to_file
|
27
|
-
val
|
27
|
+
val # rubocop:disable Lint/Void
|
28
28
|
end
|
29
29
|
|
30
30
|
# Force a refresh of the database
|
@@ -91,17 +91,15 @@ module Origen
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def store
|
94
|
-
@store ||=
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
end
|
104
|
-
end
|
94
|
+
@store ||= if file.exist?
|
95
|
+
load_from_file
|
96
|
+
elsif persisted? && dssc.managed_by_design_sync?(file)
|
97
|
+
refresh
|
98
|
+
load_from_file
|
99
|
+
else
|
100
|
+
@uncommitted = true
|
101
|
+
{ refresh_interval_in_minutes: 60 }
|
102
|
+
end
|
105
103
|
end
|
106
104
|
|
107
105
|
def load_from_file
|
@@ -124,9 +122,9 @@ module Origen
|
|
124
122
|
Marshal.dump(store, f)
|
125
123
|
end
|
126
124
|
if private?
|
127
|
-
FileUtils.chmod(
|
125
|
+
FileUtils.chmod(0o600, file)
|
128
126
|
else
|
129
|
-
FileUtils.chmod(
|
127
|
+
FileUtils.chmod(0o664, file)
|
130
128
|
end
|
131
129
|
if persisted?
|
132
130
|
dssc.check_in file, new: true, keep: true, branch: 'Trunk'
|
@@ -31,7 +31,7 @@ module Origen
|
|
31
31
|
# Software workaround object associated with erratum
|
32
32
|
attr_accessor :sw_workaround
|
33
33
|
|
34
|
-
def initialize(id, ip_block, overview
|
34
|
+
def initialize(id, ip_block, overview = {}, status = {}, sw_workaround = {})
|
35
35
|
@id = id
|
36
36
|
@ip_block = ip_block
|
37
37
|
@title = overview[:title]
|
data/lib/origen/errata.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module Origen
|
2
2
|
module Errata
|
3
|
-
autoload :HwErratum,
|
3
|
+
autoload :HwErratum, 'origen/errata/hw_erratum'
|
4
4
|
autoload :SwErratumWorkaround, 'origen/errata/sw_erratum_workaround'
|
5
5
|
|
6
|
-
|
6
|
+
attr_writer :_errata
|
7
7
|
|
8
|
-
|
8
|
+
attr_writer :_sw_workarounds
|
9
9
|
|
10
10
|
# Define and instantiate an erratum object
|
11
11
|
def erratum(id, ip_block, overview = {}, status = {}, sw_workaround = {})
|
@@ -40,12 +40,12 @@ module Origen
|
|
40
40
|
|
41
41
|
# Return nil if there are no errata that meet criteria
|
42
42
|
if errata_found.empty?
|
43
|
-
|
43
|
+
nil
|
44
44
|
# If only one errata meets criteria, return that HwErratum object
|
45
45
|
elsif errata_found.size == 1
|
46
46
|
errata_found.values.first.values.first.values.first
|
47
47
|
else
|
48
|
-
|
48
|
+
errata_found
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -72,11 +72,11 @@ module Origen
|
|
72
72
|
sw_workarounds_found[id] = workarounds
|
73
73
|
end
|
74
74
|
if sw_workarounds_found.empty?
|
75
|
-
|
75
|
+
nil
|
76
76
|
elsif sw_workarounds_found.size == 1
|
77
77
|
sw_workarounds_found.values.first # .values.first
|
78
78
|
else
|
79
|
-
|
79
|
+
sw_workarounds_found
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
@@ -107,7 +107,6 @@ module Origen
|
|
107
107
|
# when NilClass then true # Return all specs if a filter is set to nil (i.e. user doesn't care about this filter)
|
108
108
|
# else true
|
109
109
|
# end
|
110
|
-
# rubocop:disable UnusedBlockArgument
|
111
110
|
# filtered_hash = hash.select do |k, v|
|
112
111
|
# [TrueClass, FalseClass].include?(select_logic.class) ? select_logic : eval(select_logic)
|
113
112
|
# end
|