origen 0.7.35 → 0.7.36
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/utility.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1118662c21d50b42e5f844b07a727e4bdf7aa669
|
4
|
+
data.tar.gz: 9e1479f4346e08d9e04495ded26ee4fab9a09de4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfb87c30e2a997642ef231e6a1c32a9f502d36d54a6ea1be474bbf01b8ad66078c100bf7a925552537bb884fe697208c1e4f7385aa74937d20582897fca41fcd
|
7
|
+
data.tar.gz: ea5afacc77fa582f6d8869026d292dc7bbe82bf9fac94d712a576cd43c84e7b7baa9cbcb4487e82316ecc93dd47fb4121ad36042f827338e8d751e609b85172d
|
data/config/version.rb
CHANGED
data/lib/origen/utility.rb
CHANGED
@@ -54,6 +54,10 @@ module Origen
|
|
54
54
|
# that are not all of the same type are expanded, e.g. -010s-3S6
|
55
55
|
outstr = ''
|
56
56
|
regex = '^'
|
57
|
+
r = reg_or_val.size % 4
|
58
|
+
unless r == 0
|
59
|
+
regex += '(' + ('.' * r) + ')'
|
60
|
+
end
|
57
61
|
(reg_or_val.size / 4).times { regex += '(....)' }
|
58
62
|
regex += '$'
|
59
63
|
Regexp.new(regex) =~ regval
|
@@ -62,12 +66,15 @@ module Origen
|
|
62
66
|
(reg_or_val.size / 4).times do |n| # now grouped by nibble
|
63
67
|
nibbles << Regexp.last_match[n + 1]
|
64
68
|
end
|
69
|
+
unless r == 0
|
70
|
+
nibbles << Regexp.last_match[(reg_or_val.size / 4) + 1]
|
71
|
+
end
|
65
72
|
|
66
73
|
nibbles.each_with_index do |nibble, i|
|
67
74
|
# If contains any special chars...
|
68
75
|
if nibble =~ /[XSV]/
|
69
76
|
# If all the same...
|
70
|
-
if nibble
|
77
|
+
if nibble.split('').all? { |c| c == nibble[0] }
|
71
78
|
outstr += nibble[0, 1] # .to_s
|
72
79
|
# Otherwise present this nibble in 'binary' format
|
73
80
|
else
|