rggen-verilog 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/rggen/verilog/bit_field/type/row0trg_row1trg.erb +16 -0
- data/lib/rggen/verilog/bit_field/type/row0trg_row1trg.rb +28 -0
- data/lib/rggen/verilog/bit_field/type/w0trg_w1trg.erb +11 -9
- data/lib/rggen/verilog/version.rb +1 -1
- data/lib/rggen/verilog.rb +37 -38
- metadata +8 -7
- data/lib/rggen/verilog/setup.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92ebf6366cd316b67c1baff2f0298b9240a2c570cf1660ec808ed952f763f114
|
4
|
+
data.tar.gz: d3cd1664b3e5441c5b09867236012b917c29a0a9dd306c5e781b5c8a215b4b9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4cf77051fb8dcf8e5516c030a874d7183cca68d2b7e9ca7fe550100cd23fef13e31fd915836ab8d439fe468efb5ffcb33a350f71eda030a81a37a76346c2345
|
7
|
+
data.tar.gz: 1f2e154e8fbe2444127d99d4bcca05c6042058c19ac46b6d2337a3b288ac7a511b3bc77ea88f08cdb5882667e56b74649d5db54f5ba7ea0db6f1fbb7a35f1667
|
data/README.md
CHANGED
@@ -60,7 +60,8 @@ $ simulator \
|
|
60
60
|
|
61
61
|
Feedbacks, bus reports, questions and etc. are welcome! You can post them bu using following ways:
|
62
62
|
|
63
|
-
* [GitHub Issue Tracker](https://github.com/rggen/rggen
|
63
|
+
* [GitHub Issue Tracker](https://github.com/rggen/rggen/issues)
|
64
|
+
* [GitHub Discussions](https://github.com/rggen/rggen/discussions)
|
64
65
|
* [Chat Room](https://gitter.im/rggen/rggen)
|
65
66
|
* [Mailing List](https://groups.google.com/d/forum/rggen)
|
66
67
|
* [Mail](mailto:rggen@googlegroups.com)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
rggen_bit_field_w01trg #(
|
2
|
+
.TRIGGER_VALUE (<%= trigger_value %>),
|
3
|
+
.WIDTH (<%= width %>)
|
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
|
+
.i_value (<%= reference_or_value_in %>),
|
15
|
+
.o_trigger (<%= trigger[loop_variables] %>)
|
16
|
+
);
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RgGen.define_list_item_feature(:bit_field, :type, [:row0trg, :row1trg]) do
|
4
|
+
verilog do
|
5
|
+
build do
|
6
|
+
unless bit_field.reference?
|
7
|
+
input :value_in, {
|
8
|
+
name: "i_#{full_name}", width: width, array_size: array_size
|
9
|
+
}
|
10
|
+
end
|
11
|
+
output :trigger, {
|
12
|
+
name: "o_#{full_name}_trigger", width: width, array_size: array_size
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
main_code :bit_field, from_template: true
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def trigger_value
|
21
|
+
bin({ row0trg: 0, row1trg: 1 }[bit_field.type], 1)
|
22
|
+
end
|
23
|
+
|
24
|
+
def reference_or_value_in
|
25
|
+
reference_bit_field || value_in[loop_variables]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -2,13 +2,15 @@ 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
|
7
|
-
.
|
8
|
-
.
|
9
|
-
.
|
10
|
-
.
|
11
|
-
.
|
12
|
-
.
|
13
|
-
.
|
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
|
+
.i_value (<%= fill_0(width) %>),
|
15
|
+
.o_trigger (<%= trigger[loop_variables] %>)
|
14
16
|
);
|
data/lib/rggen/verilog.rb
CHANGED
@@ -8,44 +8,43 @@ require_relative 'verilog/component'
|
|
8
8
|
require_relative 'verilog/feature'
|
9
9
|
require_relative 'verilog/factories'
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
extend Core::Plugin
|
11
|
+
RgGen.setup_plugin :'rggen-verilog' do |plugin|
|
12
|
+
plugin.version RgGen::Verilog::VERSION
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
plugin.files [
|
22
|
-
'verilog/bit_field/type',
|
23
|
-
'verilog/bit_field/type/rc_w0c_w1c_wc_woc',
|
24
|
-
'verilog/bit_field/type/ro_rotrg',
|
25
|
-
'verilog/bit_field/type/rof',
|
26
|
-
'verilog/bit_field/type/rowo_rowotrg',
|
27
|
-
'verilog/bit_field/type/rs_w0s_w1s_ws_wos',
|
28
|
-
'verilog/bit_field/type/rw_rwtrg_w1',
|
29
|
-
'verilog/bit_field/type/rwc',
|
30
|
-
'verilog/bit_field/type/rwe_rwl',
|
31
|
-
'verilog/bit_field/type/rws',
|
32
|
-
'verilog/bit_field/type/w0crs_w0src_w1crs_w1src_wcrs_wsrc',
|
33
|
-
'verilog/bit_field/type/w0t_w1t',
|
34
|
-
'verilog/bit_field/type/w0trg_w1trg',
|
35
|
-
'verilog/bit_field/type/wo_wo1_wotrg',
|
36
|
-
'verilog/bit_field/type/wrc_wrs',
|
37
|
-
'verilog/bit_field/verilog_top',
|
38
|
-
'verilog/register/type',
|
39
|
-
'verilog/register/type/external',
|
40
|
-
'verilog/register/type/indirect',
|
41
|
-
'verilog/register/verilog_top',
|
42
|
-
'verilog/register_block/protocol',
|
43
|
-
'verilog/register_block/protocol/apb',
|
44
|
-
'verilog/register_block/protocol/axi4lite',
|
45
|
-
'verilog/register_block/protocol/wishbone',
|
46
|
-
'verilog/register_block/verilog_top',
|
47
|
-
'verilog/register_file/verilog_top'
|
48
|
-
]
|
49
|
-
end
|
14
|
+
plugin.register_component :verilog do
|
15
|
+
component RgGen::Verilog::Component,
|
16
|
+
RgGen::Verilog::ComponentFactory
|
17
|
+
feature RgGen::Verilog::Feature,
|
18
|
+
RgGen::Verilog::FeatureFactory
|
50
19
|
end
|
20
|
+
|
21
|
+
plugin.files [
|
22
|
+
'verilog/register_block/verilog_top',
|
23
|
+
'verilog/register_block/protocol',
|
24
|
+
'verilog/register_block/protocol/apb',
|
25
|
+
'verilog/register_block/protocol/axi4lite',
|
26
|
+
'verilog/register_block/protocol/wishbone',
|
27
|
+
'verilog/register_file/verilog_top',
|
28
|
+
'verilog/register/verilog_top',
|
29
|
+
'verilog/register/type',
|
30
|
+
'verilog/register/type/external',
|
31
|
+
'verilog/register/type/indirect',
|
32
|
+
'verilog/bit_field/verilog_top',
|
33
|
+
'verilog/bit_field/type',
|
34
|
+
'verilog/bit_field/type/rc_w0c_w1c_wc_woc',
|
35
|
+
'verilog/bit_field/type/ro_rotrg',
|
36
|
+
'verilog/bit_field/type/rof',
|
37
|
+
'verilog/bit_field/type/row0trg_row1trg',
|
38
|
+
'verilog/bit_field/type/rowo_rowotrg',
|
39
|
+
'verilog/bit_field/type/rs_w0s_w1s_ws_wos',
|
40
|
+
'verilog/bit_field/type/rw_rwtrg_w1',
|
41
|
+
'verilog/bit_field/type/rwc',
|
42
|
+
'verilog/bit_field/type/rwe_rwl',
|
43
|
+
'verilog/bit_field/type/rws',
|
44
|
+
'verilog/bit_field/type/w0crs_w0src_w1crs_w1src_wcrs_wsrc',
|
45
|
+
'verilog/bit_field/type/w0t_w1t',
|
46
|
+
'verilog/bit_field/type/w0trg_w1trg',
|
47
|
+
'verilog/bit_field/type/wo_wo1_wotrg',
|
48
|
+
'verilog/bit_field/type/wrc_wrs'
|
49
|
+
]
|
51
50
|
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.
|
4
|
+
version: 0.5.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: 2022-
|
11
|
+
date: 2022-07-05 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.27.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.
|
26
|
+
version: 0.27.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,6 +56,8 @@ files:
|
|
56
56
|
- lib/rggen/verilog/bit_field/type/ro_rotrg.rb
|
57
57
|
- lib/rggen/verilog/bit_field/type/rof.erb
|
58
58
|
- lib/rggen/verilog/bit_field/type/rof.rb
|
59
|
+
- lib/rggen/verilog/bit_field/type/row0trg_row1trg.erb
|
60
|
+
- lib/rggen/verilog/bit_field/type/row0trg_row1trg.rb
|
59
61
|
- lib/rggen/verilog/bit_field/type/rowo_rowotrg.erb
|
60
62
|
- lib/rggen/verilog/bit_field/type/rowo_rowotrg.rb
|
61
63
|
- lib/rggen/verilog/bit_field/type/rs_w0s_w1s_ws_wos.erb
|
@@ -99,7 +101,6 @@ files:
|
|
99
101
|
- lib/rggen/verilog/register_block/verilog_macros.erb
|
100
102
|
- lib/rggen/verilog/register_block/verilog_top.rb
|
101
103
|
- lib/rggen/verilog/register_file/verilog_top.rb
|
102
|
-
- lib/rggen/verilog/setup.rb
|
103
104
|
- lib/rggen/verilog/utility.rb
|
104
105
|
- lib/rggen/verilog/utility/local_scope.rb
|
105
106
|
- lib/rggen/verilog/version.rb
|
@@ -107,7 +108,7 @@ homepage: https://github.com/rggen/rggen-verilog
|
|
107
108
|
licenses:
|
108
109
|
- MIT
|
109
110
|
metadata:
|
110
|
-
bug_tracker_uri: https://github.com/rggen/rggen
|
111
|
+
bug_tracker_uri: https://github.com/rggen/rggen/issues
|
111
112
|
mailing_list_uri: https://groups.google.com/d/forum/rggen
|
112
113
|
rubygems_mfa_required: 'true'
|
113
114
|
source_code_uri: https://github.com/rggen/rggen-verilog
|
@@ -130,5 +131,5 @@ requirements: []
|
|
130
131
|
rubygems_version: 3.3.3
|
131
132
|
signing_key:
|
132
133
|
specification_version: 4
|
133
|
-
summary: rggen-verilog-0.
|
134
|
+
summary: rggen-verilog-0.5.0
|
134
135
|
test_files: []
|
data/lib/rggen/verilog/setup.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rggen/verilog'
|
4
|
-
|
5
|
-
RgGen.register_plugin RgGen::Verilog do |builder|
|
6
|
-
builder.load_plugin 'rggen/systemverilog/rtl/setup'
|
7
|
-
builder.enable :register_block, [:verilog_top]
|
8
|
-
builder.enable :register_file, [:verilog_top]
|
9
|
-
builder.enable :register, [:verilog_top]
|
10
|
-
builder.enable :bit_field, [:verilog_top]
|
11
|
-
end
|