rggen-systemverilog 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rggen/systemverilog/ral.rb +2 -1
- data/lib/rggen/systemverilog/ral/bit_field/type/rwc_rws.rb +5 -0
- data/lib/rggen/systemverilog/ral/bit_field/type/{rwc_rwe_rwl.rb → rwe_rwl.rb} +0 -4
- data/lib/rggen/systemverilog/rtl.rb +4 -1
- data/lib/rggen/systemverilog/rtl/bit_field/type.rb +8 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rc_w0c_w1c.erb +2 -2
- data/lib/rggen/systemverilog/rtl/bit_field/type/rc_w0c_w1c.rb +0 -16
- data/lib/rggen/systemverilog/rtl/bit_field/type/rs_w0s_w1s.erb +2 -2
- data/lib/rggen/systemverilog/rtl/bit_field/type/rw_wo.erb +2 -2
- data/lib/rggen/systemverilog/rtl/bit_field/type/rwc.erb +10 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rwc.rb +26 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rwe.erb +10 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rwe.rb +26 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rwl.erb +10 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rwl.rb +26 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rws.erb +11 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rws.rb +30 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/w0trg_w1trg.erb +2 -2
- data/lib/rggen/systemverilog/rtl/register_block/protocol.rb +8 -0
- data/lib/rggen/systemverilog/rtl/register_block/protocol/apb.erb +2 -2
- data/lib/rggen/systemverilog/rtl/register_block/protocol/axi4lite.erb +2 -2
- data/lib/rggen/systemverilog/version.rb +1 -1
- metadata +14 -7
- data/lib/rggen/systemverilog/rtl/bit_field/type/rwc_rwe_rwl.erb +0 -16
- data/lib/rggen/systemverilog/rtl/bit_field/type/rwc_rwe_rwl.rb +0 -61
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19dd7072e4a6d974adff622812b8687a3f9d4124b28fed40ca2f4e6f4c7c0a60
|
4
|
+
data.tar.gz: e36c2c9907a4da9c7ff5cf38bbdbc76427a3a409be7b430d54064ffd51ae610f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b0585c58678e7e2826d8a8d933a8d74167d9118c969134057f61cd018035875d83df3e6a709e58c32f9df8ceb8b3474c022a2674d01a5aa3225e13c82ca6e71
|
7
|
+
data.tar.gz: 31fc31da516047f204f385e7fbb22316ad7edeb4252eebba47d0c571df77e5ec5078af1b9729248f784297a8f3bea1e5d654ce582b05c03535441f649ad713ec
|
@@ -9,7 +9,8 @@ module RgGen
|
|
9
9
|
FEATURES = [
|
10
10
|
'ral/bit_field/type',
|
11
11
|
'ral/bit_field/type/reserved_rof',
|
12
|
-
'ral/bit_field/type/
|
12
|
+
'ral/bit_field/type/rwc_rws',
|
13
|
+
'ral/bit_field/type/rwe_rwl',
|
13
14
|
'ral/bit_field/type/w0trg_w1trg',
|
14
15
|
'ral/register/type',
|
15
16
|
'ral/register/type/external',
|
@@ -15,7 +15,10 @@ module RgGen
|
|
15
15
|
'rtl/bit_field/type/rof',
|
16
16
|
'rtl/bit_field/type/rs_w0s_w1s',
|
17
17
|
'rtl/bit_field/type/rw_wo',
|
18
|
-
'rtl/bit_field/type/
|
18
|
+
'rtl/bit_field/type/rwc',
|
19
|
+
'rtl/bit_field/type/rwe',
|
20
|
+
'rtl/bit_field/type/rwl',
|
21
|
+
'rtl/bit_field/type/rws',
|
19
22
|
'rtl/bit_field/type/w0trg_w1trg',
|
20
23
|
'rtl/global/array_port_format',
|
21
24
|
'rtl/global/fold_sv_interface_port',
|
@@ -5,8 +5,8 @@
|
|
5
5
|
.WIDTH (<%= width %>),
|
6
6
|
.INITIAL_VALUE (<%= initial_value %>)
|
7
7
|
) u_bit_field (
|
8
|
-
.i_clk (<%=
|
9
|
-
.i_rst_n (<%=
|
8
|
+
.i_clk (<%= clock %>),
|
9
|
+
.i_rst_n (<%= reset%>),
|
10
10
|
.bit_field_if (<%= bit_field_if %>),
|
11
11
|
.i_set (<%= set[loop_variables] %>),
|
12
12
|
.i_mask (<%= mask %>),
|
@@ -1,21 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
RgGen.define_list_item_feature(:bit_field, :type, :rc) do
|
4
|
-
register_map do
|
5
|
-
read_only
|
6
|
-
reference use: true
|
7
|
-
initial_value require: true
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
RgGen.define_list_item_feature(:bit_field, :type, [:w0c, :w1c]) do
|
12
|
-
register_map do
|
13
|
-
read_write
|
14
|
-
reference use: true
|
15
|
-
initial_value require: true
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
3
|
RgGen.define_list_item_feature(:bit_field, :type, [:rc, :w0c, :w1c]) do
|
20
4
|
sv_rtl do
|
21
5
|
build do
|
@@ -5,8 +5,8 @@
|
|
5
5
|
.WIDTH (<%= width %>),
|
6
6
|
.INITIAL_VALUE (<%= initial_value %>)
|
7
7
|
) u_bit_field (
|
8
|
-
.i_clk (<%=
|
9
|
-
.i_rst_n (<%=
|
8
|
+
.i_clk (<%= clock %>),
|
9
|
+
.i_rst_n (<%= reset %>),
|
10
10
|
.bit_field_if (<%= bit_field_if %>),
|
11
11
|
.i_clear (<%= clear[loop_variables] %>),
|
12
12
|
.o_value (<%= value_out[loop_variables] %>)
|
@@ -2,8 +2,8 @@ rggen_bit_field_<%= bit_field.type %> #(
|
|
2
2
|
.WIDTH (<%= width %>),
|
3
3
|
.INITIAL_VALUE (<%= initial_value %>)
|
4
4
|
) u_bit_field (
|
5
|
-
.i_clk (<%=
|
6
|
-
.i_rst_n (<%=
|
5
|
+
.i_clk (<%= clock %>),
|
6
|
+
.i_rst_n (<%= reset %>),
|
7
7
|
.bit_field_if (<%= bit_field_if %>),
|
8
8
|
.o_value (<%= value_out[loop_variables] %>)
|
9
9
|
);
|
@@ -0,0 +1,10 @@
|
|
1
|
+
rggen_bit_field_rwc #(
|
2
|
+
.WIDTH (<%= width %>),
|
3
|
+
.INITIAL_VALUE (<%= initial_value %>)
|
4
|
+
) u_bit_field (
|
5
|
+
.i_clk (<%= clock %>),
|
6
|
+
.i_rst_n (<%= reset %>),
|
7
|
+
.bit_field_if (<%= bit_field_if %>),
|
8
|
+
.i_clear (<%= clear_signal %>),
|
9
|
+
.o_value (<%= value_out[loop_variables] %>)
|
10
|
+
);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RgGen.define_list_item_feature(:bit_field, :type, :rwc) do
|
4
|
+
sv_rtl do
|
5
|
+
build do
|
6
|
+
unless bit_field.reference?
|
7
|
+
input :register_block, :clear, {
|
8
|
+
name: "i_#{full_name}_clear", data_type: :logic, width: 1,
|
9
|
+
array_size: array_size, array_format: array_port_format
|
10
|
+
}
|
11
|
+
end
|
12
|
+
output :register_block, :value_out, {
|
13
|
+
name: "o_#{full_name}", data_type: :logic, width: width,
|
14
|
+
array_size: array_size, array_format: array_port_format
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
main_code :bit_field, from_template: true
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def clear_signal
|
23
|
+
reference_bit_field || clear[loop_variables]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
rggen_bit_field_rwe #(
|
2
|
+
.WIDTH (<%= width %>),
|
3
|
+
.INITIAL_VALUE (<%= initial_value %>)
|
4
|
+
) u_bit_field (
|
5
|
+
.i_clk (<%= clock %>),
|
6
|
+
.i_rst_n (<%= reset %>),
|
7
|
+
.bit_field_if (<%= bit_field_if %>),
|
8
|
+
.i_enable (<%= enable_signal %>),
|
9
|
+
.o_value (<%= value_out[loop_variables] %>)
|
10
|
+
);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RgGen.define_list_item_feature(:bit_field, :type, :rwe) do
|
4
|
+
sv_rtl do
|
5
|
+
build do
|
6
|
+
unless bit_field.reference?
|
7
|
+
input :register_block, :enable, {
|
8
|
+
name: "i_#{full_name}_enable", data_type: :logic, width: 1,
|
9
|
+
array_size: array_size, array_format: array_port_format
|
10
|
+
}
|
11
|
+
end
|
12
|
+
output :register_block, :value_out, {
|
13
|
+
name: "o_#{full_name}", data_type: :logic, width: width,
|
14
|
+
array_size: array_size, array_format: array_port_format
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
main_code :bit_field, from_template: true
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def enable_signal
|
23
|
+
reference_bit_field || enable[loop_variables]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
rggen_bit_field_rwl #(
|
2
|
+
.WIDTH (<%= width %>),
|
3
|
+
.INITIAL_VALUE (<%= initial_value %>)
|
4
|
+
) u_bit_field (
|
5
|
+
.i_clk (<%= clock %>),
|
6
|
+
.i_rst_n (<%= reset %>),
|
7
|
+
.bit_field_if (<%= bit_field_if %>),
|
8
|
+
.i_lock (<%= lock_signal %>),
|
9
|
+
.o_value (<%= value_out[loop_variables] %>)
|
10
|
+
);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RgGen.define_list_item_feature(:bit_field, :type, :rwl) do
|
4
|
+
sv_rtl do
|
5
|
+
build do
|
6
|
+
unless bit_field.reference?
|
7
|
+
input :register_block, :lock, {
|
8
|
+
name: "i_#{full_name}_lock", data_type: :logic, width: 1,
|
9
|
+
array_size: array_size, array_format: array_port_format
|
10
|
+
}
|
11
|
+
end
|
12
|
+
output :register_block, :value_out, {
|
13
|
+
name: "o_#{full_name}", data_type: :logic, width: width,
|
14
|
+
array_size: array_size, array_format: array_port_format
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
main_code :bit_field, from_template: true
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def lock_signal
|
23
|
+
reference_bit_field || lock[loop_variables]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
rggen_bit_field_rws #(
|
2
|
+
.WIDTH (<%= width %>),
|
3
|
+
.INITIAL_VALUE (<%= initial_value %>)
|
4
|
+
) u_bit_field (
|
5
|
+
.i_clk (<%= clock %>),
|
6
|
+
.i_rst_n (<%= reset %>),
|
7
|
+
.bit_field_if (<%= bit_field_if %>),
|
8
|
+
.i_set (<%= set_signal %>),
|
9
|
+
.i_value (<%= value_in[loop_variables] %>),
|
10
|
+
.o_value (<%= value_out[loop_variables] %>)
|
11
|
+
);
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RgGen.define_list_item_feature(:bit_field, :type, :rws) do
|
4
|
+
sv_rtl do
|
5
|
+
build do
|
6
|
+
unless bit_field.reference?
|
7
|
+
input :register_block, :set, {
|
8
|
+
name: "i_#{full_name}_set", data_type: :logic, width: 1,
|
9
|
+
array_size: array_size, array_format: array_port_format
|
10
|
+
}
|
11
|
+
end
|
12
|
+
input :register_block, :value_in, {
|
13
|
+
name: "i_#{full_name}", data_type: :logic, width: width,
|
14
|
+
array_size: array_size, array_format: array_port_format
|
15
|
+
}
|
16
|
+
output :register_block, :value_out, {
|
17
|
+
name: "o_#{full_name}", data_type: :logic, width: width,
|
18
|
+
array_size: array_size, array_format: array_port_format
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
main_code :bit_field, from_template: true
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def set_signal
|
27
|
+
reference_bit_field || set[loop_variables]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -2,8 +2,8 @@ rggen_bit_field_w01trg #(
|
|
2
2
|
.TRIGGER_VALUE (<%= trigger_value %>),
|
3
3
|
.WIDTH (<%= width %>)
|
4
4
|
) u_bit_field (
|
5
|
-
.i_clk (<%=
|
6
|
-
.i_rst_n (<%=
|
5
|
+
.i_clk (<%= clock %>),
|
6
|
+
.i_rst_n (<%= reset %>),
|
7
7
|
.bit_field_if (<%= bit_field_if %>),
|
8
8
|
.o_trigger (<%= trigger[loop_variables] %>)
|
9
9
|
);
|
@@ -86,6 +86,14 @@ RgGen.define_list_feature(:register_block, :protocol) do
|
|
86
86
|
register_block.total_registers
|
87
87
|
end
|
88
88
|
|
89
|
+
def clock
|
90
|
+
register_block.clock
|
91
|
+
end
|
92
|
+
|
93
|
+
def reset
|
94
|
+
register_block.reset
|
95
|
+
end
|
96
|
+
|
89
97
|
def register_if
|
90
98
|
register_block.register_if
|
91
99
|
end
|
@@ -3,8 +3,8 @@ rggen_apb_adapter #(
|
|
3
3
|
.BUS_WIDTH (<%= bus_width %>),
|
4
4
|
.REGISTERS (<%= total_registers %>)
|
5
5
|
) u_adapter (
|
6
|
-
.i_clk (<%=
|
7
|
-
.i_rst_n (<%=
|
6
|
+
.i_clk (<%= clock %>),
|
7
|
+
.i_rst_n (<%= reset %>),
|
8
8
|
.apb_if (<%= apb_if %>),
|
9
9
|
.register_if (<%= register_if %>)
|
10
10
|
);
|
@@ -4,8 +4,8 @@ rggen_axi4lite_adapter #(
|
|
4
4
|
.REGISTERS (<%= total_registers %>),
|
5
5
|
.WRITE_FIRST (<%= write_first %>)
|
6
6
|
) u_adapter (
|
7
|
-
.i_clk (<%=
|
8
|
-
.i_rst_n (<%=
|
7
|
+
.i_clk (<%= clock %>),
|
8
|
+
.i_rst_n (<%= reset %>),
|
9
9
|
.axi4lite_if (<%= axi4lite_if %>),
|
10
10
|
.register_if (<%= register_if %>)
|
11
11
|
);
|
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.
|
4
|
+
version: 0.14.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: 2019-
|
11
|
+
date: 2019-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docile
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description: '
|
55
|
+
description: 'SystemVerilog RTL and UVM RAL model generators for RgGen.
|
56
56
|
|
57
57
|
'
|
58
58
|
email:
|
@@ -84,7 +84,8 @@ files:
|
|
84
84
|
- lib/rggen/systemverilog/ral.rb
|
85
85
|
- lib/rggen/systemverilog/ral/bit_field/type.rb
|
86
86
|
- lib/rggen/systemverilog/ral/bit_field/type/reserved_rof.rb
|
87
|
-
- lib/rggen/systemverilog/ral/bit_field/type/
|
87
|
+
- lib/rggen/systemverilog/ral/bit_field/type/rwc_rws.rb
|
88
|
+
- lib/rggen/systemverilog/ral/bit_field/type/rwe_rwl.rb
|
88
89
|
- lib/rggen/systemverilog/ral/bit_field/type/w0trg_w1trg.rb
|
89
90
|
- lib/rggen/systemverilog/ral/feature.rb
|
90
91
|
- lib/rggen/systemverilog/ral/register/type.rb
|
@@ -110,8 +111,14 @@ files:
|
|
110
111
|
- lib/rggen/systemverilog/rtl/bit_field/type/rs_w0s_w1s.rb
|
111
112
|
- lib/rggen/systemverilog/rtl/bit_field/type/rw_wo.erb
|
112
113
|
- lib/rggen/systemverilog/rtl/bit_field/type/rw_wo.rb
|
113
|
-
- lib/rggen/systemverilog/rtl/bit_field/type/
|
114
|
-
- lib/rggen/systemverilog/rtl/bit_field/type/
|
114
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rwc.erb
|
115
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rwc.rb
|
116
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rwe.erb
|
117
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rwe.rb
|
118
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rwl.erb
|
119
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rwl.rb
|
120
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rws.erb
|
121
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rws.rb
|
115
122
|
- lib/rggen/systemverilog/rtl/bit_field/type/w0trg_w1trg.erb
|
116
123
|
- lib/rggen/systemverilog/rtl/bit_field/type/w0trg_w1trg.rb
|
117
124
|
- lib/rggen/systemverilog/rtl/feature.rb
|
@@ -159,5 +166,5 @@ requirements: []
|
|
159
166
|
rubygems_version: 3.0.3
|
160
167
|
signing_key:
|
161
168
|
specification_version: 4
|
162
|
-
summary: rggen-systemverilog-0.
|
169
|
+
summary: rggen-systemverilog-0.14.0
|
163
170
|
test_files: []
|
@@ -1,16 +0,0 @@
|
|
1
|
-
rggen_bit_field_<%= bit_field.type %> #(
|
2
|
-
.WIDTH (<%= width %>),
|
3
|
-
.INITIAL_VALUE (<%= initial_value %>)
|
4
|
-
) u_bit_field (
|
5
|
-
.i_clk (<%= register_block.clock %>),
|
6
|
-
.i_rst_n (<%= register_block.reset %>),
|
7
|
-
.bit_field_if (<%= bit_field_if %>),
|
8
|
-
<% if bit_field.type == :rwc %>
|
9
|
-
.i_clear (<%= control_signal %>),
|
10
|
-
<% elsif bit_field.type == :rwe %>
|
11
|
-
.i_enable (<%= control_signal %>),
|
12
|
-
<% else %>
|
13
|
-
.i_lock (<%= control_signal %>),
|
14
|
-
<% end %>
|
15
|
-
.o_value (<%= value_out[loop_variables] %>)
|
16
|
-
);
|
@@ -1,61 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RgGen.define_list_item_feature(:bit_field, :type, [:rwc, :rwe, :rwl]) do
|
4
|
-
sv_rtl do
|
5
|
-
build do
|
6
|
-
if clear_port?
|
7
|
-
input :register_block, :clear, {
|
8
|
-
name: "i_#{full_name}_clear", data_type: :logic, width: 1,
|
9
|
-
array_size: array_size, array_format: array_port_format
|
10
|
-
}
|
11
|
-
end
|
12
|
-
if enable_port?
|
13
|
-
input :register_block, :enable, {
|
14
|
-
name: "i_#{full_name}_enable", data_type: :logic, width: 1,
|
15
|
-
array_size: array_size, array_format: array_port_format
|
16
|
-
}
|
17
|
-
end
|
18
|
-
if lock_port?
|
19
|
-
input :register_block, :lock, {
|
20
|
-
name: "i_#{full_name}_lock", data_type: :logic, width: 1,
|
21
|
-
array_size: array_size, array_format: array_port_format
|
22
|
-
}
|
23
|
-
end
|
24
|
-
output :register_block, :value_out, {
|
25
|
-
name: "o_#{full_name}", data_type: :logic, width: width,
|
26
|
-
array_size: array_size, array_format: array_port_format
|
27
|
-
}
|
28
|
-
end
|
29
|
-
|
30
|
-
main_code :bit_field, from_template: true
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def clear_port?
|
35
|
-
bit_field.type == :rwc && !bit_field.reference?
|
36
|
-
end
|
37
|
-
|
38
|
-
def enable_port?
|
39
|
-
bit_field.type == :rwe && !bit_field.reference?
|
40
|
-
end
|
41
|
-
|
42
|
-
def lock_port?
|
43
|
-
bit_field.type == :rwl && !bit_field.reference?
|
44
|
-
end
|
45
|
-
|
46
|
-
def control_signal
|
47
|
-
reference_bit_field || control_port[loop_variables]
|
48
|
-
end
|
49
|
-
|
50
|
-
def control_port
|
51
|
-
case bit_field.type
|
52
|
-
when :rwc
|
53
|
-
clear
|
54
|
-
when :rwe
|
55
|
-
enable
|
56
|
-
when :rwl
|
57
|
-
lock
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|