rggen-verilog 0.7.0 → 0.8.0

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: e74fcb34c71a5d9cdfa75d2ce6ee033ef65550e5cf3a225c2357d5e9beb2905f
4
- data.tar.gz: 7a109f65cbaddd4abe24ee50e0cefde064e1b4f8036294d66e8ab5d770e5a67a
3
+ metadata.gz: 3c4b37181e16fd1f97b0cbfc7fa45f58d7c69677930907dde6e60d2064d9842a
4
+ data.tar.gz: 4b245b8815da6fca8ea8bc4abf4c67c83f56c1534693c24851a767e22175e471
5
5
  SHA512:
6
- metadata.gz: 8b55c739e1a881baee014a5bc73521ba6066eb13a2a38e72b016e4debfaab4e4b6417e80ce11643e3350fda393a6f77d469c0d7758c77876bcb12bf4266ed66f
7
- data.tar.gz: c507b06be435d72c0c22633b9bbd756427dfa921ed50d78ff6dfe8de64aca7b623be5d114ff1047d4ebb448628ea300bbcaf24319ef0655a5519d6f2bb8a75e4
6
+ metadata.gz: 6fc8c0cc66ae71e65543274c7f50f3cd9876355528e6a55c71c83f8d75876f05a26518f357b8c7370710496c568a2b87305b8d3a0b5bc440c451e8a6838e0908
7
+ data.tar.gz: 8416671228b6589ee79b1db4f505d3c0af7053ca0ce4aedfa1c4e6dacc1b8210aa8e6a8d5dc8e12b6a1ae97a8836af07a61cd77b56ba49da2af014c368cf7dc4
@@ -4,8 +4,7 @@ rggen_default_register #(
4
4
  .ADDRESS_WIDTH (<%= address_width %>),
5
5
  .OFFSET_ADDRESS (<%= offset_address %>),
6
6
  .BUS_WIDTH (<%= bus_width %>),
7
- .DATA_WIDTH (<%= width %>),
8
- .REGISTER_INDEX (<%= register_index %>)
7
+ .DATA_WIDTH (<%= width %>)
9
8
  ) u_register (
10
9
  .i_clk (<%= clock %>),
11
10
  .i_rst_n (<%= reset %>),
@@ -34,12 +34,11 @@ RgGen.define_list_item_feature(:register, :type, :external) do
34
34
  private
35
35
 
36
36
  def start_address
37
- hex(register.offset_address, address_width)
37
+ hex(register.address_range.begin, address_width)
38
38
  end
39
39
 
40
40
  def end_address
41
- address = register.offset_address + register.byte_size - 1
42
- hex(address, address_width)
41
+ hex(register.address_range.last, address_width)
43
42
  end
44
43
  end
45
44
  end
@@ -7,7 +7,8 @@ rggen_apb_adapter #(
7
7
  .BASE_ADDRESS (<%= base_address %>),
8
8
  .BYTE_SIZE (<%= byte_size %>),
9
9
  .ERROR_STATUS (<%= error_status %>),
10
- .DEFAULT_READ_DATA (<%= default_read_data %>)
10
+ .DEFAULT_READ_DATA (<%= default_read_data %>),
11
+ .INSERT_SLICER (<%= insert_slicer %>)
11
12
  ) u_adapter (
12
13
  .i_clk (<%= register_block.clock %>),
13
14
  .i_rst_n (<%= register_block.reset %>),
@@ -9,6 +9,7 @@ rggen_axi4lite_adapter #(
9
9
  .BYTE_SIZE (<%= byte_size %>),
10
10
  .ERROR_STATUS (<%= error_status %>),
11
11
  .DEFAULT_READ_DATA (<%= default_read_data %>),
12
+ .INSERT_SLICER (<%= insert_slicer %>),
12
13
  .WRITE_FIRST (<%= write_first %>)
13
14
  ) u_adapter (
14
15
  .i_clk (<%= register_block.clock %>),
@@ -8,6 +8,7 @@ rggen_wishbone_adapter #(
8
8
  .BYTE_SIZE (<%= byte_size %>),
9
9
  .ERROR_STATUS (<%= error_status %>),
10
10
  .DEFAULT_READ_DATA (<%= default_read_data %>),
11
+ .INSERT_SLICER (<%= insert_slicer %>),
11
12
  .USE_STALL (<%= use_stall %>)
12
13
  ) u_adapter (
13
14
  .i_clk (<%= register_block.clock %>),
@@ -21,6 +21,9 @@ RgGen.define_list_feature(:register_block, :protocol) do
21
21
  parameter :default_read_data, {
22
22
  name: 'DEFAULT_READ_DATA', width: bus_width, default: 0
23
23
  }
24
+ parameter :insert_slicer, {
25
+ name: 'INSERT_SLICER', default: 0
26
+ }
24
27
  end
25
28
 
26
29
  private
@@ -6,6 +6,7 @@ RgGen.define_simple_feature(:bit_field, :verilog_rtl_header) do
6
6
  define_macro("#{full_name}_bit_width", width)
7
7
  define_macro("#{full_name}_bit_mask", mask)
8
8
  define_offset_macro
9
+ define_label_macros
9
10
  end
10
11
 
11
12
  private
@@ -27,5 +28,13 @@ RgGen.define_simple_feature(:bit_field, :verilog_rtl_header) do
27
28
  define_macro("#{full_name}_bit_offset", bit_field.lsb)
28
29
  end
29
30
  end
31
+
32
+ def define_label_macros
33
+ bit_field.labels.each do |label|
34
+ name = "#{full_name}_#{label.name}"
35
+ value = hex(label.value, bit_field.width)
36
+ define_macro(name, value)
37
+ end
38
+ end
30
39
  end
31
40
  end
@@ -16,7 +16,7 @@ RgGen.define_simple_feature(:register, :verilog_rtl_header) do
16
16
  end
17
17
 
18
18
  def byte_size
19
- register.byte_size(hierarchical: true)
19
+ register.total_byte_size(hierarchical: true)
20
20
  end
21
21
 
22
22
  def array?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RgGen
4
4
  module Verilog
5
- VERSION = '0.7.0'
5
+ VERSION = '0.8.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-verilog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-02 00:00:00.000000000 Z
11
+ date: 2023-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rggen-systemverilog
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.29.0
19
+ version: 0.30.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.29.0
26
+ version: 0.30.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -137,8 +137,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  requirements: []
140
- rubygems_version: 3.4.1
140
+ rubygems_version: 3.4.10
141
141
  signing_key:
142
142
  specification_version: 4
143
- summary: rggen-verilog-0.7.0
143
+ summary: rggen-verilog-0.8.0
144
144
  test_files: []