rggen-verilog 0.10.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/rggen/verilog/rtl/bit_field/type/{rol.erb → rohw.erb} +1 -1
- data/lib/rggen/verilog/rtl/bit_field/type/{rol.rb → rohw.rb} +5 -5
- data/lib/rggen/verilog/rtl/bit_field/type/rwhw.erb +24 -0
- data/lib/rggen/verilog/rtl/bit_field/type/rwhw.rb +27 -0
- data/lib/rggen/verilog/rtl/bit_field/type/rws.erb +5 -4
- data/lib/rggen/verilog/rtl/bit_field/type/rws.rb +0 -3
- data/lib/rggen/verilog/rtl/register/type/indirect.erb +2 -3
- data/lib/rggen/verilog/rtl/register/type/indirect.rb +9 -3
- data/lib/rggen/verilog/version.rb +1 -1
- data/lib/rggen/verilog.rb +2 -1
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c3c718beffbd398b73e1783be15e50f6b9c3b103c122779b4d6baa848b9992f
|
4
|
+
data.tar.gz: 7efc7297a728743b96fb447f11e63ee59eb69840790970683a31506f8d4f8547
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2035b9d4163eb93c20afcaa4edd5809fabb1338ae8e4b2c2cc6440cae7fde49bbf179cdc4bcb76f65ffb33c61e66c859b694948f98fc27a78556a0f8614c6373
|
7
|
+
data.tar.gz: c1112eb1588ea48f963177b235a55e1251b7b9c4fa3802e6907ba752a6de695077207fa0472b76c1e44bd34b990b71a46318a178224459de85f8549e7b6988be
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2020-
|
3
|
+
Copyright (c) 2020-2024 Taichi Ishitani
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -68,7 +68,7 @@ Feedbacks, bus reports, questions and etc. are welcome! You can post them bu usi
|
|
68
68
|
|
69
69
|
## Copyright & License
|
70
70
|
|
71
|
-
Copyright © 2020-
|
71
|
+
Copyright © 2020-2024 Taichi Ishitani. RgGen::Verilog is licensed under the [MIT License](https://opensource.org/licenses/MIT), see [LICENSE](LICENSE) for futher details.
|
72
72
|
|
73
73
|
## Code of Conduct
|
74
74
|
|
@@ -14,7 +14,7 @@ rggen_bit_field #(
|
|
14
14
|
.o_sw_value (<%= bit_field_value %>),
|
15
15
|
.o_write_trigger (),
|
16
16
|
.o_read_trigger (),
|
17
|
-
.i_hw_write_enable (<%=
|
17
|
+
.i_hw_write_enable (<%= valid_signal %>),
|
18
18
|
.i_hw_write_data (<%= value_in[loop_variables] %>),
|
19
19
|
.i_hw_set (<%= fill_0(width) %>),
|
20
20
|
.i_hw_clear (<%= fill_0(width) %>),
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
RgGen.define_list_item_feature(:bit_field, :type, :
|
3
|
+
RgGen.define_list_item_feature(:bit_field, :type, :rohw) do
|
4
4
|
verilog_rtl do
|
5
5
|
build do
|
6
6
|
unless bit_field.reference?
|
7
|
-
input :
|
8
|
-
name: "i_#{full_name}
|
7
|
+
input :valid, {
|
8
|
+
name: "i_#{full_name}_valid", width: 1, array_size: array_size
|
9
9
|
}
|
10
10
|
end
|
11
11
|
input :value_in, {
|
@@ -18,8 +18,8 @@ RgGen.define_list_item_feature(:bit_field, :type, :rol) do
|
|
18
18
|
|
19
19
|
main_code :bit_field, from_template: true
|
20
20
|
|
21
|
-
def
|
22
|
-
reference_bit_field ||
|
21
|
+
def valid_signal
|
22
|
+
reference_bit_field || valid[loop_variables]
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
rggen_bit_field #(
|
2
|
+
.WIDTH (<%= width %>),
|
3
|
+
.INITIAL_VALUE (<%= initial_value %>)
|
4
|
+
) u_bit_field (
|
5
|
+
.i_clk (<%= clock %>),
|
6
|
+
.i_rst_n (<%= reset %>),
|
7
|
+
.i_sw_valid (<%= bit_field_valid %>),
|
8
|
+
.i_sw_read_mask (<%= bit_field_read_mask %>),
|
9
|
+
.i_sw_write_enable (1'b1),
|
10
|
+
.i_sw_write_mask (<%= bit_field_write_mask %>),
|
11
|
+
.i_sw_write_data (<%= bit_field_write_data %>),
|
12
|
+
.o_sw_read_data (<%= bit_field_read_data %>),
|
13
|
+
.o_sw_value (<%= bit_field_value %>),
|
14
|
+
.o_write_trigger (),
|
15
|
+
.o_read_trigger (),
|
16
|
+
.i_hw_write_enable (<%= valid_signal %>),
|
17
|
+
.i_hw_write_data (<%= value_in[loop_variables] %>),
|
18
|
+
.i_hw_set (<%= fill_0(width) %>),
|
19
|
+
.i_hw_clear (<%= fill_0(width) %>),
|
20
|
+
.i_value (<%= fill_0(width) %>),
|
21
|
+
.i_mask (<%= fill_1(width) %>),
|
22
|
+
.o_value (<%= value_out[loop_variables] %>),
|
23
|
+
.o_value_unmasked ()
|
24
|
+
);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RgGen.define_list_item_feature(:bit_field, :type, :rwhw) do
|
4
|
+
verilog_rtl do
|
5
|
+
build do
|
6
|
+
unless bit_field.reference?
|
7
|
+
input :valid, {
|
8
|
+
name: "i_#{full_name}_valid", width: 1, array_size: array_size
|
9
|
+
}
|
10
|
+
end
|
11
|
+
input :value_in, {
|
12
|
+
name: "i_#{full_name}", width: width, array_size: array_size
|
13
|
+
}
|
14
|
+
output :value_out, {
|
15
|
+
name: "o_#{full_name}", width: width, array_size: array_size
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
main_code :bit_field, from_template: true
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def valid_signal
|
24
|
+
reference_bit_field || valid[loop_variables]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
rggen_bit_field #(
|
2
2
|
.WIDTH (<%= width %>),
|
3
|
-
.INITIAL_VALUE (<%= initial_value %>)
|
3
|
+
.INITIAL_VALUE (<%= initial_value %>),
|
4
|
+
.HW_SET_WIDTH (1)
|
4
5
|
) u_bit_field (
|
5
6
|
.i_clk (<%= clock %>),
|
6
7
|
.i_rst_n (<%= reset %>),
|
@@ -13,9 +14,9 @@ rggen_bit_field #(
|
|
13
14
|
.o_sw_value (<%= bit_field_value %>),
|
14
15
|
.o_write_trigger (),
|
15
16
|
.o_read_trigger (),
|
16
|
-
.i_hw_write_enable (
|
17
|
-
.i_hw_write_data (<%=
|
18
|
-
.i_hw_set (<%=
|
17
|
+
.i_hw_write_enable (1'b0),
|
18
|
+
.i_hw_write_data (<%= fill_0(width) %>),
|
19
|
+
.i_hw_set (<%= set_signal %>),
|
19
20
|
.i_hw_clear (<%= fill_0(width) %>),
|
20
21
|
.i_value (<%= fill_0(width) %>),
|
21
22
|
.i_mask (<%= fill_1(width) %>),
|
@@ -8,9 +8,6 @@ RgGen.define_list_item_feature(:bit_field, :type, :rws) do
|
|
8
8
|
name: "i_#{full_name}_set", width: 1, array_size: array_size
|
9
9
|
}
|
10
10
|
end
|
11
|
-
input :value_in, {
|
12
|
-
name: "i_#{full_name}", width: width, array_size: array_size
|
13
|
-
}
|
14
11
|
output :value_out, {
|
15
12
|
name: "o_#{full_name}", width: width, array_size: array_size
|
16
13
|
}
|
@@ -5,8 +5,7 @@ rggen_indirect_register #(
|
|
5
5
|
.OFFSET_ADDRESS (<%= offset_address %>),
|
6
6
|
.BUS_WIDTH (<%= bus_width %>),
|
7
7
|
.DATA_WIDTH (<%= width %>),
|
8
|
-
.
|
9
|
-
.INDIRECT_INDEX_VALUE (<%= concat(index_values) %>)
|
8
|
+
.INDIRECT_MATCH_WIDTH (<%= index_match_width %>)
|
10
9
|
) u_register (
|
11
10
|
.i_clk (<%= clock %>),
|
12
11
|
.i_rst_n (<%= reset %>),
|
@@ -20,7 +19,7 @@ rggen_indirect_register #(
|
|
20
19
|
.o_register_status (<%= register_status %>),
|
21
20
|
.o_register_read_data (<%= register_read_data %>),
|
22
21
|
.o_register_value (<%= register_value %>),
|
23
|
-
.
|
22
|
+
.i_indirect_match (<%= indirect_match %>),
|
24
23
|
.o_bit_field_valid (<%= bit_field_valid %>),
|
25
24
|
.o_bit_field_read_mask (<%= bit_field_read_mask %>),
|
26
25
|
.o_bit_field_write_mask (<%= bit_field_write_mask %>),
|
@@ -5,14 +5,20 @@ RgGen.define_list_item_feature(:register, :type, :indirect) do
|
|
5
5
|
include RgGen::SystemVerilog::RTL::IndirectIndex
|
6
6
|
|
7
7
|
build do
|
8
|
-
wire :
|
9
|
-
name: '
|
8
|
+
wire :indirect_match, {
|
9
|
+
name: 'w_indirect_match', width: index_match_width
|
10
10
|
}
|
11
11
|
end
|
12
12
|
|
13
13
|
main_code :register do |code|
|
14
|
-
code
|
14
|
+
indirect_index_matches(code)
|
15
15
|
code << process_template
|
16
16
|
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def array_index_value(value, width)
|
21
|
+
value[0, width]
|
22
|
+
end
|
17
23
|
end
|
18
24
|
end
|
data/lib/rggen/verilog.rb
CHANGED
@@ -38,13 +38,14 @@ RgGen.setup_plugin :'rggen-verilog' do |plugin|
|
|
38
38
|
'verilog/rtl/bit_field/type/rc_w0c_w1c_wc_woc',
|
39
39
|
'verilog/rtl/bit_field/type/ro_rotrg',
|
40
40
|
'verilog/rtl/bit_field/type/rof',
|
41
|
-
'verilog/rtl/bit_field/type/
|
41
|
+
'verilog/rtl/bit_field/type/rohw',
|
42
42
|
'verilog/rtl/bit_field/type/row0trg_row1trg',
|
43
43
|
'verilog/rtl/bit_field/type/rowo_rowotrg',
|
44
44
|
'verilog/rtl/bit_field/type/rs_w0s_w1s_ws_wos',
|
45
45
|
'verilog/rtl/bit_field/type/rw_rwtrg_w1',
|
46
46
|
'verilog/rtl/bit_field/type/rwc',
|
47
47
|
'verilog/rtl/bit_field/type/rwe_rwl',
|
48
|
+
'verilog/rtl/bit_field/type/rwhw',
|
48
49
|
'verilog/rtl/bit_field/type/rws',
|
49
50
|
'verilog/rtl/bit_field/type/w0crs_w0src_w1crs_w1src_wcrs_wsrc',
|
50
51
|
'verilog/rtl/bit_field/type/w0t_w1t',
|
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.
|
4
|
+
version: 0.11.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:
|
11
|
+
date: 2024-11-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.
|
19
|
+
version: 0.33.1
|
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.
|
26
|
+
version: 0.33.1
|
27
27
|
description: Verilog write plugin for RgGen
|
28
28
|
email:
|
29
29
|
- rggen@googlegroups.com
|
@@ -45,8 +45,8 @@ files:
|
|
45
45
|
- lib/rggen/verilog/rtl/bit_field/type/ro_rotrg.rb
|
46
46
|
- lib/rggen/verilog/rtl/bit_field/type/rof.erb
|
47
47
|
- lib/rggen/verilog/rtl/bit_field/type/rof.rb
|
48
|
-
- lib/rggen/verilog/rtl/bit_field/type/
|
49
|
-
- lib/rggen/verilog/rtl/bit_field/type/
|
48
|
+
- lib/rggen/verilog/rtl/bit_field/type/rohw.erb
|
49
|
+
- lib/rggen/verilog/rtl/bit_field/type/rohw.rb
|
50
50
|
- lib/rggen/verilog/rtl/bit_field/type/row0trg_row1trg.erb
|
51
51
|
- lib/rggen/verilog/rtl/bit_field/type/row0trg_row1trg.rb
|
52
52
|
- lib/rggen/verilog/rtl/bit_field/type/rowo_rowotrg.erb
|
@@ -59,6 +59,8 @@ files:
|
|
59
59
|
- lib/rggen/verilog/rtl/bit_field/type/rwc.rb
|
60
60
|
- lib/rggen/verilog/rtl/bit_field/type/rwe_rwl.erb
|
61
61
|
- lib/rggen/verilog/rtl/bit_field/type/rwe_rwl.rb
|
62
|
+
- lib/rggen/verilog/rtl/bit_field/type/rwhw.erb
|
63
|
+
- lib/rggen/verilog/rtl/bit_field/type/rwhw.rb
|
62
64
|
- lib/rggen/verilog/rtl/bit_field/type/rws.erb
|
63
65
|
- lib/rggen/verilog/rtl/bit_field/type/rws.rb
|
64
66
|
- lib/rggen/verilog/rtl/bit_field/type/w0crs_w0src_w1crs_w1src_wcrs_wsrc.erb
|
@@ -125,8 +127,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
127
|
- !ruby/object:Gem::Version
|
126
128
|
version: '0'
|
127
129
|
requirements: []
|
128
|
-
rubygems_version: 3.5.
|
130
|
+
rubygems_version: 3.5.16
|
129
131
|
signing_key:
|
130
132
|
specification_version: 4
|
131
|
-
summary: rggen-verilog-0.
|
133
|
+
summary: rggen-verilog-0.11.1
|
132
134
|
test_files: []
|