cross_origen 1.2.0 → 1.2.1
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/cross_origen/ip_xact.rb +21 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3aa045609ddda2f3de9f4fe4851f7ab31201e2b1bfcf2021caffabe3b0f0a3bd
|
4
|
+
data.tar.gz: a34da76233dad5ad6110c6632a0061b9b5092f380922effc4ad537c998adf6cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac3d2456ce9fa735d504a76640a5cd6b68901eb7d1c669bef46057d3f404c06186f3da57f2c47ad0dc2993180dcf892c874a12db6d7f0bc2a28a5bb2d1707035
|
7
|
+
data.tar.gz: 58941b7e05d5c9e82eaccf8057d823e6ddb5380c24aaf2e97cbaa2788a935f29b52d215b2035941b24135ed70768094bc9d169874605ac391d6ba83574181c15
|
data/config/version.rb
CHANGED
data/lib/cross_origen/ip_xact.rb
CHANGED
@@ -60,14 +60,28 @@ module CrossOrigen
|
|
60
60
|
size = fetch register.at_xpath('spirit:size'), get_text: true, to_i: true
|
61
61
|
addr_offset = fetch register.at_xpath('spirit:addressOffset'), get_text: true, to_dec: true
|
62
62
|
access = fetch register.at_xpath('spirit:access'), get_text: true
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
#
|
67
|
-
reset_value
|
63
|
+
# Determine if a reset is defined for the register
|
64
|
+
if register.at_xpath('spirit:reset').nil?
|
65
|
+
# If a reset does not exist, need to set the reset_value to 0, as Origen does not (yet) have a concept
|
66
|
+
# of a register without a reset.
|
67
|
+
reset_value = 0
|
68
68
|
else
|
69
|
-
#
|
70
|
-
reset_value =
|
69
|
+
# If a reset exists, determine the reset_value (required) and reset_mask (if defined)
|
70
|
+
reset_value = fetch register.at_xpath('spirit:reset/spirit:value'), get_text: true, to_dec: true
|
71
|
+
reset_mask = fetch register.at_xpath('spirit:reset/spirit:mask'), get_text: true, to_dec: true
|
72
|
+
# Issue #8 fix - reset_mask is optional, keep reset value as imported when a mask is not defined.
|
73
|
+
# Only perform AND-ing if mask is defined. Only zero-out the reset_value if reset_value was nil.
|
74
|
+
if reset_value.nil?
|
75
|
+
# Set default for reset_value attribute if none was provided and issue a warning.
|
76
|
+
reset_value = 0
|
77
|
+
Origen.log.warning "Register #{name.upcase} was defined as having a reset, but did not have a defined reset value. This is not compliant with IP-XACT standard."
|
78
|
+
Origen.log.warning "The reset value for #{name.upcase} has been defined as 0x0 as a result."
|
79
|
+
elsif reset_mask.nil?
|
80
|
+
# If mask is undefined, leave reset_value alone.
|
81
|
+
else
|
82
|
+
# Do a logical bitwise AND with the reset value and mask
|
83
|
+
reset_value = reset_value & reset_mask
|
84
|
+
end
|
71
85
|
end
|
72
86
|
# Future expansion: pull in HDL path as abs_path in Origen.
|
73
87
|
addr_block_obj.reg name, addr_offset, size: size, access: access, description: reg_description(register) do |reg|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cross_origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
97
|
version: 1.8.11
|
98
98
|
requirements: []
|
99
99
|
rubyforge_project:
|
100
|
-
rubygems_version: 2.7.
|
100
|
+
rubygems_version: 2.7.7
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: Translators for importing and exporting Origen data to/from 3rd party formats
|