origen 0.7.14 → 0.7.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +1 -1
- data/lib/origen/controller.rb +4 -0
- data/lib/origen/model.rb +18 -0
- data/lib/origen/registers.rb +4 -0
- data/lib/origen/registers/reg.rb +33 -2
- data/templates/nanoc/Rules +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5515909ec26db7a8a2f402e66f46972f79ff4d62
|
4
|
+
data.tar.gz: f338f5a5fad2f8a92ba5035e7670a692e6bda8c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9386d160c9873e09742484e479b5ebde00332a106e20d52a3907a5c8a93ef567ef45e9e7fe2a8c9e5fcb6431de1e52e7dd05f386c1093f53a3bb3d99857ced92
|
7
|
+
data.tar.gz: 74f6309577983523713fc70b08bacc6cd06bba02bb6b8864e803e20b0dd02892a728faec5729c1a84a9d8db3dc97eb110c0b9c3092716110355d8bf4e51bce04
|
data/config/version.rb
CHANGED
data/lib/origen/controller.rb
CHANGED
data/lib/origen/model.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'active_support/concern'
|
2
2
|
require 'origen/memory'
|
3
|
+
require 'json'
|
3
4
|
module Origen
|
4
5
|
# Include this module to identify it as an SoC IP Block, this will automatically
|
5
6
|
# include common modules such as Pin and Register support
|
@@ -327,6 +328,23 @@ module Origen
|
|
327
328
|
end
|
328
329
|
end
|
329
330
|
|
331
|
+
def to_json(*args)
|
332
|
+
JSON.pretty_generate({
|
333
|
+
name: name,
|
334
|
+
address: base_address,
|
335
|
+
path: path,
|
336
|
+
blocks: sub_blocks.map do |name, block|
|
337
|
+
{
|
338
|
+
name: name,
|
339
|
+
address: block.base_address
|
340
|
+
}
|
341
|
+
end,
|
342
|
+
registers: regs.map do |name, reg|
|
343
|
+
reg
|
344
|
+
end
|
345
|
+
}, *args)
|
346
|
+
end
|
347
|
+
|
330
348
|
private
|
331
349
|
|
332
350
|
def _initialized
|
data/lib/origen/registers.rb
CHANGED
data/lib/origen/registers/reg.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'json'
|
1
2
|
module Origen
|
2
3
|
module Registers
|
3
4
|
# The register class can be used to represent not only h/ware resgisters,
|
@@ -363,8 +364,8 @@ module Origen
|
|
363
364
|
desc[0] = desc.first.sub(/\s*\*\*\s*#{escape_special_char(full_name(bitname))}\s*\*\*\s*-?\s*/, '')
|
364
365
|
end
|
365
366
|
end
|
366
|
-
desc.shift
|
367
|
-
desc.pop
|
367
|
+
desc.shift while desc.first && desc.first.strip.empty?
|
368
|
+
desc.pop while desc.last && desc.last.strip.empty?
|
368
369
|
desc
|
369
370
|
end
|
370
371
|
alias_method :descriptions, :description
|
@@ -1368,6 +1369,36 @@ module Origen
|
|
1368
1369
|
end
|
1369
1370
|
end
|
1370
1371
|
|
1372
|
+
def to_json(*args)
|
1373
|
+
JSON.pretty_generate({
|
1374
|
+
name: name,
|
1375
|
+
full_name: full_name,
|
1376
|
+
address: address,
|
1377
|
+
offset: offset,
|
1378
|
+
size: size,
|
1379
|
+
path: path,
|
1380
|
+
reset_value: reset_value,
|
1381
|
+
description: description(include_name: false, include_bit_values: false),
|
1382
|
+
bits: named_bits.map do |name, bit|
|
1383
|
+
{
|
1384
|
+
name: name,
|
1385
|
+
full_name: bit.full_name,
|
1386
|
+
position: bit.position,
|
1387
|
+
size: bit.size,
|
1388
|
+
reset_value: bit.reset_value,
|
1389
|
+
access: bit.access,
|
1390
|
+
description: bit.description(include_name: false, include_bit_values: false),
|
1391
|
+
bit_values: bit.bit_value_descriptions.map do |val, desc|
|
1392
|
+
{
|
1393
|
+
value: val,
|
1394
|
+
description: desc
|
1395
|
+
}
|
1396
|
+
end
|
1397
|
+
}
|
1398
|
+
end
|
1399
|
+
}, *args)
|
1400
|
+
end
|
1401
|
+
|
1371
1402
|
private
|
1372
1403
|
|
1373
1404
|
def _state_desc(bits)
|
data/templates/nanoc/Rules
CHANGED
@@ -36,7 +36,7 @@ compile '*' do
|
|
36
36
|
coderay: {css: :style}
|
37
37
|
filter :codeblocks
|
38
38
|
end
|
39
|
-
unless ["xml", "js", "css"].include?(item[:extension]) || item[:layout] == "none" || item[:layout] == "None"
|
39
|
+
unless ["xml", "js", "css", "json"].include?(item[:extension]) || item[:layout] == "none" || item[:layout] == "None"
|
40
40
|
item[:layout] = "bootstrap" if item[:layout] == "bootstrap3"
|
41
41
|
filter :bootstrap
|
42
42
|
layout item[:layout] || 'bootstrap'
|
@@ -53,7 +53,7 @@ end
|
|
53
53
|
#end
|
54
54
|
|
55
55
|
route '*' do
|
56
|
-
if item.binary? || ["xml", "js", "css"].include?(item[:extension])
|
56
|
+
if item.binary? || ["xml", "js", "css", "json"].include?(item[:extension])
|
57
57
|
# Write item with identifier /foo/ to /foo.ext
|
58
58
|
item.identifier.chop + '.' + item[:extension]
|
59
59
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
@@ -652,7 +652,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
652
652
|
version: 1.8.11
|
653
653
|
requirements: []
|
654
654
|
rubyforge_project:
|
655
|
-
rubygems_version: 2.
|
655
|
+
rubygems_version: 2.4.5
|
656
656
|
signing_key:
|
657
657
|
specification_version: 4
|
658
658
|
summary: The Semiconductor Developer's Kit
|