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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d127d3c6a39b412a8556608b10b6ec2ef9a1ccaa
4
- data.tar.gz: fa1b288892a6654704aed6a79ae29cb7c4f3af83
3
+ metadata.gz: 680531e26b7e211517e36649bd3d684d5d8452ef
4
+ data.tar.gz: aa8bde4fe52e7d10775eb9fc790baaf7f99a7fc7
5
5
  SHA512:
6
- metadata.gz: edae522a13effe32a3fa24b6f28c85587cd108f24d63f7f3543221e5c656dc227e77500d632e25559e87fb76cf7166737a502aa7e2500601538d95cb07051564
7
- data.tar.gz: 0431396fa522702e504b037a11aeec790cc7500d1853366e8be3e8e27a56f5642bd0bbf98b8f0b0c11050786831872a7253577e7d4de5cc534dd9cc68a307ef8
6
+ metadata.gz: 933e06b3c0e4b4c4ce85a0c54ccd4e855ef1fdb9292b6d39828083bdffecc92df0434d28b4b38115c705b421922bfb43cdbc3cbd1470887f4b936189316ead83
7
+ data.tar.gz: dc94a81757cb13be94012c7d9cd699842c0075d10f4abf11882531e93b8333752a176ca5d0c1a9eb09f6a31fda2675ff6e058220cb6abffbd7fc5452eaefd020
@@ -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: "1006fe8",
34
+ version: "v1.1.0",
35
+ development: true
34
36
  }
35
37
  ]
36
38
 
data/config/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
- MINOR = 23
3
+ MINOR = 24
4
4
  BUGFIX = 0
5
5
  DEV = nil
6
6
 
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
@@ -119,20 +119,25 @@ module Origen
119
119
  def revision_controller(options = {})
120
120
  if current?
121
121
  if config.rc_url
122
- if config.rc_url =~ /^sync:/
123
- @revision_controller ||= RevisionControl::DesignSync.new(
124
- local: root,
125
- remote: config.rc_url
126
- )
127
- elsif config.rc_url =~ /git/
128
- @revision_controller ||= RevisionControl::Git.new(
129
- local: root,
130
- # If a workspace is based on a fork of the master repo, config.rc_url may not
131
- # be correct
132
- remote: (options[:uninitialized] ? config.rc_url : (RevisionControl::Git.origin || config.rc_url)),
133
- allow_local_adjustment: true
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(
@@ -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.mkdir(generators_dir)
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
- class Bignum
2
- # Extend Fixnum to enable 10.cycles
3
- def cycles
4
- if block_given?
5
- times do
6
- yield
7
- Origen.app.tester.cycle
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
- end
13
- alias_method :cycle, :cycles
14
+ alias_method :cycle, :cycles
14
15
 
15
- alias_method :old_bit_select, :[]
16
- def [](*args)
17
- if args.length == 1 && !args.first.is_a?(Range)
18
- old_bit_select(args.first)
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
- msb = args.first
25
- lsb = args.last
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
- def ones_comp(num_bits)
32
- self ^ ((1 << num_bits) - 1)
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
- fail GitError, "This command failed: 'git #{command}'"
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.23.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-08-25 00:00:00.000000000 Z
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.5.1
606
+ rubygems_version: 2.6.11
607
607
  signing_key:
608
608
  specification_version: 4
609
609
  summary: The Semiconductor Developer's Kit