origen 0.7.2 → 0.7.3
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/config/version.rb +1 -1
- data/lib/origen/registers/bit_collection.rb +25 -3
- 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: 55916e76f5bdf501c90b99100958b5679c2cdb3f
|
4
|
+
data.tar.gz: bdb95336085bf8ebcdef8ad13a3a822c8019381f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb6d9bb6cdd345f83eb5c5b1644e2fb5e5e1c8f0e3eebee828cc54a2ab6503b6429a095633ba783d2b485a6692115ea7870366c12e0ee72f4198d2496bb308b7
|
7
|
+
data.tar.gz: a28f70593e2d10c39353f2f5e897d2c0561fd13a7b6cbe0f2a8c9586b8933596802e9291bf1fb8cbfdcc05c7c3de26383440a0e63e9aa12250b42590ecc114bb
|
data/config/version.rb
CHANGED
@@ -98,16 +98,38 @@ module Origen
|
|
98
98
|
# not intended to be inserted into production pattern logic.
|
99
99
|
def sync
|
100
100
|
if tester.try(:link?)
|
101
|
-
|
102
|
-
|
101
|
+
preserve_flags do
|
102
|
+
v = tester.capture do
|
103
|
+
store!
|
104
|
+
end
|
105
|
+
reverse_each.with_index do |bit, i|
|
106
|
+
bit.write(v.first[i])
|
107
|
+
end
|
103
108
|
end
|
104
|
-
write(v.first)
|
105
109
|
parent
|
106
110
|
else
|
107
111
|
Origen.log.warning 'Sync is not supported on the current tester driver, register not updated'
|
108
112
|
end
|
109
113
|
end
|
110
114
|
|
115
|
+
# At the end of the given block, the status flags of all bits will be restored to the state that
|
116
|
+
# they were upon entry to the block
|
117
|
+
def preserve_flags
|
118
|
+
orig = []
|
119
|
+
each do |bit|
|
120
|
+
orig << [bit.overlay_str, bit.is_to_be_read?, bit.is_to_be_stored?]
|
121
|
+
end
|
122
|
+
yield
|
123
|
+
each do |bit|
|
124
|
+
bit.clear_flags
|
125
|
+
flags = orig.shift
|
126
|
+
bit.overlay(flags[0])
|
127
|
+
bit.read if flags[1]
|
128
|
+
bit.store if flags[2]
|
129
|
+
end
|
130
|
+
self
|
131
|
+
end
|
132
|
+
|
111
133
|
# Copies all data and flags from one bit collection (or reg) object to another
|
112
134
|
#
|
113
135
|
# This method will accept a dumb value as the argument, in which case it is essentially a write,
|
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.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|