origen 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/origen +3 -1
- data/config/application.rb +8 -0
- data/config/version.rb +1 -1
- data/lib/c99/nvm.rb +4 -0
- data/lib/origen.rb +8 -3
- data/lib/origen/commands/web.rb +2 -1
- data/lib/origen/core_ext/numeric.rb +34 -0
- data/lib/origen/registers.rb +17 -2
- data/lib/origen/registers/bit_collection.rb +2 -1
- data/lib/origen/remote_manager.rb +1 -24
- data/lib/origen/revision_control/design_sync.rb +1 -0
- data/lib/origen/sub_blocks.rb +1 -0
- 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: d127d3c6a39b412a8556608b10b6ec2ef9a1ccaa
|
4
|
+
data.tar.gz: fa1b288892a6654704aed6a79ae29cb7c4f3af83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edae522a13effe32a3fa24b6f28c85587cd108f24d63f7f3543221e5c656dc227e77500d632e25559e87fb76cf7166737a502aa7e2500601538d95cb07051564
|
7
|
+
data.tar.gz: 0431396fa522702e504b037a11aeec790cc7500d1853366e8be3e8e27a56f5642bd0bbf98b8f0b0c11050786831872a7253577e7d4de5cc534dd9cc68a307ef8
|
data/bin/origen
CHANGED
@@ -178,7 +178,9 @@ rescue Exception => e
|
|
178
178
|
# case the application code is responsible for printing a helpful error message.
|
179
179
|
# This will intercept all other exits, e.g. via 'fail "Something has done wrong"', and split the stack
|
180
180
|
# dump to separate all in-application references from Origen core/plugin references.
|
181
|
-
|
181
|
+
if e.is_a?(SystemExit)
|
182
|
+
exit e.status
|
183
|
+
else
|
182
184
|
puts
|
183
185
|
if Origen.app_loaded?
|
184
186
|
puts 'COMPLETE CALL STACK'
|
data/config/application.rb
CHANGED
@@ -26,6 +26,14 @@ class OrigenCoreApplication < Origen::Application
|
|
26
26
|
#:files => ["lib", "config/application.rb"],
|
27
27
|
}
|
28
28
|
|
29
|
+
config.remotes = [
|
30
|
+
{
|
31
|
+
dir: "origen_app_generators",
|
32
|
+
rc_url: "https://github.com/Origen-SDK/origen_app_generators.git",
|
33
|
+
version: "1006fe8",
|
34
|
+
}
|
35
|
+
]
|
36
|
+
|
29
37
|
#config.lsf.project = "origen core"
|
30
38
|
|
31
39
|
config.web_directory = "git@github.com:Origen-SDK/Origen-SDK.github.io.git/origen"
|
data/config/version.rb
CHANGED
data/lib/c99/nvm.rb
CHANGED
@@ -101,6 +101,10 @@ module C99
|
|
101
101
|
bits 13..8, :upper, description: 'This is dreg3 bit upper'
|
102
102
|
bit 7..0, :lower, writable: false, reset: 0x55, description: "This is dreg3 bit lower\nThis is dreg3 bit lower line 2"
|
103
103
|
end
|
104
|
+
|
105
|
+
reg :dreg4, 0x1000, size: 8, description: "** Data Register 4 **\nThis is dreg4" do
|
106
|
+
bit 7..0, :busy, reset: 0x55, description: "**Busy Bits** - These do something super cool\n\n0 | Job0\n1 | Job1\n10 | Job2\n11 | Job3\n100 | Job4\n101 | Job5\n110 | Job6\n111 | Job7\n1000 | Job8\n1001 | Job9\n1010 | Job10\n1011 | Job11\n1100 | Job12\n1101 | Job13\n1110 | Job14\n1111 | Job15\n10000 | Job16\n10001 | Job17\n10010 | Job18"
|
107
|
+
end
|
104
108
|
end
|
105
109
|
end
|
106
110
|
end
|
data/lib/origen.rb
CHANGED
@@ -4,6 +4,10 @@ unless defined? RGen::ORIGENTRANSITION
|
|
4
4
|
require 'English'
|
5
5
|
require 'pathname'
|
6
6
|
require 'pry'
|
7
|
+
# require these here to make required files consistent between global commands invoke globally and global commands
|
8
|
+
# invoked from an application workspace
|
9
|
+
require 'colored'
|
10
|
+
require 'fileutils'
|
7
11
|
# Keep a note of the pwd at the time when Origen was first loaded, this is initially used
|
8
12
|
# by the site_config lookup.
|
9
13
|
$_origen_invocation_pwd ||= Pathname.pwd
|
@@ -587,12 +591,13 @@ unless defined? RGen::ORIGENTRANSITION
|
|
587
591
|
# Use User.current to retrieve the current user, this is an internal API that will
|
588
592
|
# be cleaned up (removed) in future
|
589
593
|
# @api private
|
590
|
-
def current_user
|
594
|
+
def current_user(options = {})
|
595
|
+
@current_user = nil if options[:refresh]
|
591
596
|
if app_loaded? || in_app_workspace?
|
592
597
|
return @switch_user unless @switch_user.nil?
|
593
|
-
application.current_user
|
598
|
+
@current_user ||= application.current_user
|
594
599
|
else
|
595
|
-
User.new(User.current_user_id)
|
600
|
+
@current_user ||= User.new(User.current_user_id)
|
596
601
|
end
|
597
602
|
end
|
598
603
|
|
data/lib/origen/commands/web.rb
CHANGED
@@ -135,13 +135,14 @@ The following options are available:
|
|
135
135
|
when 'new'
|
136
136
|
_build_web_dir
|
137
137
|
when 'compile'
|
138
|
-
Origen.app.load_target!
|
139
138
|
if options[:remote]
|
139
|
+
Origen.app.load_target!
|
140
140
|
_require_web_directory
|
141
141
|
_deployer.prepare!(options)
|
142
142
|
# If the whole site has been requested that start from a clean slate
|
143
143
|
_build_web_dir if ARGV.empty?
|
144
144
|
else
|
145
|
+
Origen.app.load_target!(force_debug: true)
|
145
146
|
Origen.set_development_mode
|
146
147
|
end
|
147
148
|
options[:files] = ARGV.dup
|
@@ -29,6 +29,40 @@ class Numeric
|
|
29
29
|
result
|
30
30
|
end
|
31
31
|
|
32
|
+
def as_units(units)
|
33
|
+
if self >= 1_000_000_000_000_000
|
34
|
+
"#{self / 1_000_000_000_000_000.0}P#{units}"
|
35
|
+
elsif self >= 1_000_000_000_000
|
36
|
+
"#{self / 1_000_000_000_000.0}T#{units}"
|
37
|
+
elsif self >= 1_000_000_000
|
38
|
+
"#{self / 1_000_000_000.0}G#{units}"
|
39
|
+
elsif self >= 1_000_000
|
40
|
+
"#{self / 1_000_000.0}M#{units}"
|
41
|
+
elsif self >= 1_000
|
42
|
+
"#{self / 1_000.0}k#{units}"
|
43
|
+
elsif self >= 1
|
44
|
+
"#{self}#{units}"
|
45
|
+
elsif self >= 1e-3
|
46
|
+
"#{self * 1_000}m#{units}"
|
47
|
+
elsif self >= 1e-6
|
48
|
+
"#{self * 1_000_000}u#{units}"
|
49
|
+
elsif self >= 1e-9
|
50
|
+
"#{self * 1_000_000_000}n#{units}"
|
51
|
+
elsif self >= 1e-12
|
52
|
+
"#{self * 1_000_000_000_000}p#{units}"
|
53
|
+
elsif self >= 1e-15
|
54
|
+
"#{self * 1_000_000_000_000_000}a#{units}"
|
55
|
+
else
|
56
|
+
"%.3e#{units}" % self
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
%w(Hz hz Ts ts bps sps ohm Ohm a A v V s S).each do |m|
|
61
|
+
define_method "as_#{m}" do
|
62
|
+
as_units(m)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
32
66
|
# Msps ==> Mega samples per second
|
33
67
|
|
34
68
|
%w(GHz Ghz GTs Gts Gsps).each do |m|
|
data/lib/origen/registers.rb
CHANGED
@@ -507,8 +507,10 @@ module Origen
|
|
507
507
|
end
|
508
508
|
alias_method :has_reg, :has_reg?
|
509
509
|
|
510
|
-
# Returns
|
511
|
-
#
|
510
|
+
# Returns
|
511
|
+
# -the register object matching the given name
|
512
|
+
# -or a hash of all registes matching a given regular expression
|
513
|
+
# -or a hash of all registers, associated with a feature, if no name is specified.
|
512
514
|
#
|
513
515
|
# Can also be used to define a new register if a block is supplied in which case
|
514
516
|
# it is equivalent to calling add_reg with a block.
|
@@ -520,6 +522,7 @@ module Origen
|
|
520
522
|
# Example use cases:
|
521
523
|
# reg(:reg2)
|
522
524
|
# reg(:name => :reg2)
|
525
|
+
# reg('/reg2/')
|
523
526
|
if !args.empty? && args.size == 1 && (args[0].class != Hash || (args[0].key?(:name) && args[0].size == 1))
|
524
527
|
if args[0].class == Hash
|
525
528
|
name = args[0][:name]
|
@@ -527,6 +530,9 @@ module Origen
|
|
527
530
|
end
|
528
531
|
if has_reg(name)
|
529
532
|
return _registers[name]
|
533
|
+
elsif name =~ /\/(.+)\//
|
534
|
+
regex = Regexp.last_match(1)
|
535
|
+
return match_registers(regex)
|
530
536
|
else
|
531
537
|
if Origen.config.strict_errors
|
532
538
|
puts ''
|
@@ -593,6 +599,15 @@ module Origen
|
|
593
599
|
|
594
600
|
private
|
595
601
|
|
602
|
+
def match_registers(regex)
|
603
|
+
regs_to_return = RegCollection.new(self)
|
604
|
+
_registers.each do |k, v|
|
605
|
+
regs_to_return[k] = v if k.to_s.match(/#{regex}/)
|
606
|
+
end
|
607
|
+
regs_to_return
|
608
|
+
end
|
609
|
+
alias_method :regs_match, :match_registers
|
610
|
+
|
596
611
|
def reg_missing_error(params)
|
597
612
|
if Origen.config.strict_errors
|
598
613
|
puts ''
|
@@ -225,10 +225,11 @@ module Origen
|
|
225
225
|
end
|
226
226
|
|
227
227
|
def bit_value_descriptions(_bitname = nil)
|
228
|
+
options = _bitname.is_a?(Hash) ? _bitname : {}
|
228
229
|
if name == :unknown
|
229
230
|
[]
|
230
231
|
else
|
231
|
-
@reg.bit_value_descriptions(name)
|
232
|
+
@reg.bit_value_descriptions(name, options)
|
232
233
|
end
|
233
234
|
end
|
234
235
|
|
@@ -216,9 +216,7 @@ module Origen
|
|
216
216
|
@remotes = {}
|
217
217
|
top_level_remotes
|
218
218
|
top_level_remotes.each do |remote|
|
219
|
-
|
220
|
-
add_remote(remote)
|
221
|
-
end
|
219
|
+
add_remote(remote)
|
222
220
|
end
|
223
221
|
# Add remotes from imports
|
224
222
|
Origen.app.plugins.each do |plugin|
|
@@ -233,31 +231,10 @@ module Origen
|
|
233
231
|
Origen.app.config.remotes #+ Origen.app.config.remotes_dev (there are no core remotes at this time)
|
234
232
|
end
|
235
233
|
|
236
|
-
# Walks down an import tree recursively yielding all nested imports, if
|
237
|
-
# the imported application has not been populated yet then it will
|
238
|
-
# not return any nested imports.
|
239
|
-
#
|
240
|
-
# This will also update the required origen version if a app
|
241
|
-
# instance is encountered that requires a newer version than the current
|
242
|
-
# version.
|
243
|
-
def traverse_remotes(remote, &block)
|
244
|
-
yield remote
|
245
|
-
if remote_present?(remote)
|
246
|
-
app = Origen.application_instance(origen_root_for(remote), reload: true)
|
247
|
-
app.config.remotes.each do |remote|
|
248
|
-
traverse_remotes(remote, &block)
|
249
|
-
end
|
250
|
-
end
|
251
|
-
end
|
252
|
-
|
253
234
|
def remotes
|
254
235
|
@remotes ||= resolve_remotes
|
255
236
|
end
|
256
237
|
|
257
|
-
def remote_present?(remote)
|
258
|
-
!!origen_root_for(remote, accept_missing: true)
|
259
|
-
end
|
260
|
-
|
261
238
|
# Conflicts are resolved by the following rules:
|
262
239
|
# * A path reference always wins.
|
263
240
|
# * If two different paths are found an errors will be raised.
|
@@ -316,6 +316,7 @@ module Origen
|
|
316
316
|
# Screen out common redundant output
|
317
317
|
unless line =~ /^Logging/ || line == '' ||
|
318
318
|
line =~ /V(\d+\.\d+-\d+|\d.\d+)/ || # Screen out something like "V5.1-1205" or "V6R2010"
|
319
|
+
line =~ /^3DEXPERIENCER\d+x$/ || # Screen out something like '3DEXPERIENCER2016x'
|
319
320
|
line.strip.empty?
|
320
321
|
output << line.strip
|
321
322
|
end
|
data/lib/origen/sub_blocks.rb
CHANGED
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.23.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-
|
11
|
+
date: 2017-08-25 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.
|
606
|
+
rubygems_version: 2.5.1
|
607
607
|
signing_key:
|
608
608
|
specification_version: 4
|
609
609
|
summary: The Semiconductor Developer's Kit
|