origen 0.23.0 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/application.rb +3 -1
- data/config/version.rb +1 -1
- data/lib/origen.rb +1 -0
- data/lib/origen/application.rb +18 -13
- data/lib/origen/commands/new.rb +1 -1
- data/lib/origen/core_ext/bignum.rb +29 -27
- data/lib/origen/remote_manager.rb +1 -1
- data/lib/origen/revision_control/git.rb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 680531e26b7e211517e36649bd3d684d5d8452ef
|
4
|
+
data.tar.gz: aa8bde4fe52e7d10775eb9fc790baaf7f99a7fc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 933e06b3c0e4b4c4ce85a0c54ccd4e855ef1fdb9292b6d39828083bdffecc92df0434d28b4b38115c705b421922bfb43cdbc3cbd1470887f4b936189316ead83
|
7
|
+
data.tar.gz: dc94a81757cb13be94012c7d9cd699842c0075d10f4abf11882531e93b8333752a176ca5d0c1a9eb09f6a31fda2675ff6e058220cb6abffbd7fc5452eaefd020
|
data/config/application.rb
CHANGED
@@ -27,10 +27,12 @@ class OrigenCoreApplication < Origen::Application
|
|
27
27
|
}
|
28
28
|
|
29
29
|
config.remotes = [
|
30
|
+
# To include the OrigenAppGenerators documentation in the main guides
|
30
31
|
{
|
31
32
|
dir: "origen_app_generators",
|
32
33
|
rc_url: "https://github.com/Origen-SDK/origen_app_generators.git",
|
33
|
-
version: "
|
34
|
+
version: "v1.1.0",
|
35
|
+
development: true
|
34
36
|
}
|
35
37
|
]
|
36
38
|
|
data/config/version.rb
CHANGED
data/lib/origen.rb
CHANGED
@@ -75,6 +75,7 @@ unless defined? RGen::ORIGENTRANSITION
|
|
75
75
|
|
76
76
|
class GitError < OrigenError; status_code(11); end
|
77
77
|
class DesignSyncError < OrigenError; status_code(12); end
|
78
|
+
class RevisionControlUninitializedError < OrigenError; status_code(13); end
|
78
79
|
|
79
80
|
class << self
|
80
81
|
include Origen::Utility::TimeAndDate
|
data/lib/origen/application.rb
CHANGED
@@ -119,20 +119,25 @@ module Origen
|
|
119
119
|
def revision_controller(options = {})
|
120
120
|
if current?
|
121
121
|
if config.rc_url
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
122
|
+
begin
|
123
|
+
if config.rc_url =~ /^sync:/
|
124
|
+
@revision_controller ||= RevisionControl::DesignSync.new(
|
125
|
+
local: root,
|
126
|
+
remote: config.rc_url
|
127
|
+
)
|
128
|
+
elsif config.rc_url =~ /git/
|
129
|
+
@revision_controller ||= RevisionControl::Git.new(
|
130
|
+
local: root,
|
131
|
+
# If a workspace is based on a fork of the master repo, config.rc_url may not
|
132
|
+
# be correct
|
133
|
+
remote: (options[:uninitialized] ? config.rc_url : (RevisionControl::Git.origin || config.rc_url)),
|
134
|
+
allow_local_adjustment: true
|
135
|
+
)
|
135
136
|
|
137
|
+
end
|
138
|
+
# The rc_url has been defined, but the initial app checkin has not been done yet
|
139
|
+
rescue RevisionControlUninitializedError
|
140
|
+
@revision_controller = nil
|
136
141
|
end
|
137
142
|
elsif config.vault
|
138
143
|
@revision_controller ||= RevisionControl::DesignSync.new(
|
data/lib/origen/commands/new.rb
CHANGED
@@ -67,7 +67,7 @@ generators = [['http://rubygems.org', 'origen_app_generators']] + Array(Origen.s
|
|
67
67
|
if update_required
|
68
68
|
puts 'Fetching the latest app generators...'
|
69
69
|
FileUtils.rm_rf(generators_dir) if File.exist?(generators_dir)
|
70
|
-
FileUtils.
|
70
|
+
FileUtils.mkdir_p(generators_dir)
|
71
71
|
|
72
72
|
Dir.chdir generators_dir do
|
73
73
|
generators.each_with_index do |gen, i|
|
@@ -1,36 +1,38 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
unless Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4.0')
|
2
|
+
class Bignum
|
3
|
+
# Extend Fixnum to enable 10.cycles
|
4
|
+
def cycles
|
5
|
+
if block_given?
|
6
|
+
times do
|
7
|
+
yield
|
8
|
+
Origen.app.tester.cycle
|
9
|
+
end
|
10
|
+
else
|
11
|
+
Origen.app.tester.cycle(repeat: self)
|
8
12
|
end
|
9
|
-
else
|
10
|
-
Origen.app.tester.cycle(repeat: self)
|
11
13
|
end
|
12
|
-
|
13
|
-
alias_method :cycle, :cycles
|
14
|
+
alias_method :cycle, :cycles
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
else
|
20
|
-
if args.first.is_a?(Range)
|
21
|
-
msb = args.first.first
|
22
|
-
lsb = args.first.last
|
16
|
+
alias_method :old_bit_select, :[]
|
17
|
+
def [](*args)
|
18
|
+
if args.length == 1 && !args.first.is_a?(Range)
|
19
|
+
old_bit_select(args.first)
|
23
20
|
else
|
24
|
-
|
25
|
-
|
21
|
+
if args.first.is_a?(Range)
|
22
|
+
msb = args.first.first
|
23
|
+
lsb = args.first.last
|
24
|
+
else
|
25
|
+
msb = args.first
|
26
|
+
lsb = args.last
|
27
|
+
end
|
28
|
+
(self >> lsb) & 0.ones_comp(msb - lsb + 1)
|
26
29
|
end
|
27
|
-
(self >> lsb) & 0.ones_comp(msb - lsb + 1)
|
28
30
|
end
|
29
|
-
end
|
30
31
|
|
31
|
-
|
32
|
-
|
32
|
+
def ones_comp(num_bits)
|
33
|
+
self ^ ((1 << num_bits) - 1)
|
34
|
+
end
|
35
|
+
alias_method :ones_complement, :ones_comp
|
36
|
+
alias_method :ones_compliment, :ones_comp
|
33
37
|
end
|
34
|
-
alias_method :ones_complement, :ones_comp
|
35
|
-
alias_method :ones_compliment, :ones_comp
|
36
38
|
end
|
@@ -221,7 +221,7 @@ module Origen
|
|
221
221
|
# Add remotes from imports
|
222
222
|
Origen.app.plugins.each do |plugin|
|
223
223
|
plugin.config.remotes.each do |import_remote|
|
224
|
-
add_remote(import_remote)
|
224
|
+
add_remote(import_remote) unless import_remote[:development]
|
225
225
|
end
|
226
226
|
end
|
227
227
|
@remotes
|
@@ -362,7 +362,11 @@ module Origen
|
|
362
362
|
exit_status = wait_thr.value
|
363
363
|
unless exit_status.success?
|
364
364
|
if options[:check_errors]
|
365
|
-
|
365
|
+
if output.any? { |l| l =~ /Not a git repository/ }
|
366
|
+
fail RevisionControlUninitializedError
|
367
|
+
else
|
368
|
+
fail GitError, "This command failed: 'git #{command}'"
|
369
|
+
end
|
366
370
|
end
|
367
371
|
end
|
368
372
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -603,7 +603,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
603
603
|
version: 1.8.11
|
604
604
|
requirements: []
|
605
605
|
rubyforge_project:
|
606
|
-
rubygems_version: 2.
|
606
|
+
rubygems_version: 2.6.11
|
607
607
|
signing_key:
|
608
608
|
specification_version: 4
|
609
609
|
summary: The Semiconductor Developer's Kit
|