rggen-systemverilog 0.25.0 → 0.25.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2fe4d8d918cc5291f84654d19f75670ef8fb49e9405e6b2dba2d2fb418ffacb
4
- data.tar.gz: a51b6c2fb4589c9c149132132c4087ed01bbfb6a31feccb5247d2056a90c7ede
3
+ metadata.gz: 4618b040c5d3d57ec1277788e3cfa5cc4363df8c2ddaa2d3d18bec10ed4a203d
4
+ data.tar.gz: b8af85fb8a83278de85ab9b6bdbe927f5c2e6d62143f7ef7b31088e03d52dccf
5
5
  SHA512:
6
- metadata.gz: b6c24fe9065345f7f8ba93bfa1fa3e481f5852a0025f0cfd20b9728475d96f359f028de870dc2523c145b84b009d4eb2ddbbd82b3cd286ba6217b6bc8a0b68c5
7
- data.tar.gz: c6a97f80b046acfbde8882fa85371267ba776d90bec180595c146fa9b44913a42453e348c17979a74253baeb00ed5e70448d10d6ba03a796048bdd42ded9a4b7
6
+ metadata.gz: '092893bb2e1429821c3455575f4eadcbc3ddb2e956e77f1e7bee3ad97b4e97738141d350aa8976b9c0dad1d276af1ddcd51a8c9539d562de8b59bded9be8f934'
7
+ data.tar.gz: a4b4824e9056ab2acf190869e90dcbe426ef367f267b95259a588e7d66a6c9237b1737caca8c84fd2f9b8afa97a2ba007203823223e8d685e9595d5908153f05
@@ -47,7 +47,7 @@ module RgGen
47
47
 
48
48
  def __create_new_identifier__(array_index_or_lsb, lsb_or_width, width)
49
49
  select = __create_select__(array_index_or_lsb, lsb_or_width, width)
50
- Identifier.new("#{@name}#{select}") do |identifier|
50
+ self.class.new("#{@name}#{select}") do |identifier|
51
51
  identifier.__sub_identifiers__(@sub_identifiers)
52
52
  end
53
53
  end
@@ -74,8 +74,11 @@ module RgGen
74
74
  end
75
75
 
76
76
  def __serialized_lsb__(array_index, lsb)
77
- serialized_index = __serialized_index__(array_index)
78
- array_lsb = __reduce_array__([@width, serialized_index], :*, 1)
77
+ index =
78
+ array_index
79
+ .yield_self(&method(:__serialized_index__))
80
+ .yield_self(&method(:__enclose_index_in_parenthesis))
81
+ array_lsb = __reduce_array__([@width, index], :*, 1)
79
82
  __reduce_array__([array_lsb, lsb], :+, 0)
80
83
  end
81
84
 
@@ -85,7 +88,10 @@ module RgGen
85
88
  .zip(__index_factors__)
86
89
  .map { |i, f| __calc_index_value__(i, f) }
87
90
  .yield_self { |values| __reduce_array__(values.reverse, :+, 0) }
88
- .yield_self { |index| integer?(index) && index || "(#{index})" }
91
+ end
92
+
93
+ def __enclose_index_in_parenthesis(index)
94
+ integer?(index) && index || "(#{index})"
89
95
  end
90
96
 
91
97
  def __index_factors__
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RgGen
4
4
  module SystemVerilog
5
- VERSION = '0.25.0'
5
+ VERSION = '0.25.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-systemverilog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.25.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-28 00:00:00.000000000 Z
11
+ date: 2021-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,5 +150,5 @@ requirements: []
150
150
  rubygems_version: 3.2.3
151
151
  signing_key:
152
152
  specification_version: 4
153
- summary: rggen-systemverilog-0.25.0
153
+ summary: rggen-systemverilog-0.25.1
154
154
  test_files: []