rggen 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8557db72205fd083dafe52498b9739d454ad263472beb66607409ca4641fd0b2
4
- data.tar.gz: e5373123cdf438cf0a8d59a8c98d80268baaa3733eb97e76ff3b9215a3e5cd3a
3
+ metadata.gz: d2a8d729d006b9018f50cd1859191ba69eac8ffff986644c75b727606efe2cd9
4
+ data.tar.gz: f0f31ea88bc75e766a6aaba4205e1b38c172f80649b3641dc0923e242de37fb0
5
5
  SHA512:
6
- metadata.gz: c68809dcf02ebbc254eb88b7b54fde450213bfbbcdb18b0c83bfd319fdfa711fbda93b94108a3521a131e57b93db2ff2f689c8935a97c646a63bd6d7b40b08e9
7
- data.tar.gz: a433ecd75b2c6ee8d2a34ecc654b0cf4672530bd5bc7f86c62e9db132cff032a757e6ad7098f8ca49573b5f6867b47335d1cdeccbbcde7824b83fcc1226a1785
6
+ metadata.gz: beb719d28bf108dd444a090d0a08d4b99bf486368aa45f9cdd9e2ce34637fdc4f593a34b15934be3bb15456bc73da22ef08edab49c6d2c5eeb8325403491e94b
7
+ data.tar.gz: 51f8948e0709eaf8468e860dc71c71937e398b03cc2b59b61a875dfef3ba31345f5433b35548ac3d22c95797492febee2ed665ef313f5d146a1c4ec02ccd8da7
@@ -173,8 +173,6 @@ list_item :bit_field, :type do
173
173
  :array_port_format
174
174
  ] => :configuration
175
175
 
176
- available? { !bit_field.reserved? }
177
-
178
176
  build do
179
177
  interface :bit_field, :bit_field_sub_if,
180
178
  type: :rggen_bit_field_if,
@@ -0,0 +1,6 @@
1
+ rggen_bit_field_ro #(
2
+ .WIDTH (<%= width %>)
3
+ ) u_bit_field (
4
+ .bit_field_if (<%= bit_field_sub_if %>),
5
+ .i_value (<%= default_value %>)
6
+ );
@@ -3,8 +3,16 @@ list_item :bit_field, :type, :reserved do
3
3
  reserved
4
4
  end
5
5
 
6
+ rtl do
7
+ generate_code_from_template :bit_field
8
+
9
+ def default_value
10
+ hex(0, width)
11
+ end
12
+ end
13
+
6
14
  ral do
7
15
  access :ro
8
- hdl_path { '' }
16
+ hdl_path { "g_#{bit_field.name}.u_bit_field.i_value" }
9
17
  end
10
18
  end
@@ -194,12 +194,8 @@ list_item :register, :type do
194
194
 
195
195
  private
196
196
 
197
- def actual_bit_fields
198
- @non_reserved_bit_fields ||= register.bit_fields.reject(&:reserved?)
199
- end
200
-
201
197
  def total_bit_fields
202
- actual_bit_fields.size
198
+ register.bit_fields.size
203
199
  end
204
200
 
205
201
  def address_range
@@ -234,7 +230,7 @@ list_item :register, :type do
234
230
  end
235
231
 
236
232
  def valid_bits_value
237
- actual_bit_fields.inject(0) do |bits, bit_field|
233
+ register.bit_fields.inject(0) do |bits, bit_field|
238
234
  bits | (((1 << bit_field.width) - 1) << bit_field.lsb)
239
235
  end
240
236
  end
@@ -1,6 +1,6 @@
1
1
  module RgGen
2
2
  MAJOR = 0
3
3
  MINOR = 8
4
- TEENY = 1
4
+ TEENY = 2
5
5
  VERSION = "#{MAJOR}.#{MINOR}.#{TEENY}".freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-15 00:00:00.000000000 Z
11
+ date: 2019-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubi
@@ -150,6 +150,7 @@ files:
150
150
  - lib/rggen/builtins/bit_field/reference.rb
151
151
  - lib/rggen/builtins/bit_field/rtl_top.rb
152
152
  - lib/rggen/builtins/bit_field/type.rb
153
+ - lib/rggen/builtins/bit_field/types/reserved.erb
153
154
  - lib/rggen/builtins/bit_field/types/reserved.rb
154
155
  - lib/rggen/builtins/bit_field/types/ro.erb
155
156
  - lib/rggen/builtins/bit_field/types/ro.rb