rggen-systemverilog 0.25.1 → 0.27.0
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 +3 -2
- data/lib/rggen/systemverilog/common/utility/identifier.rb +1 -1
- data/lib/rggen/systemverilog/ral/bit_field/type/rotrg_rwtrg_wotrg.rb +9 -0
- data/lib/rggen/systemverilog/ral/bit_field/type/row0trg_row1trg.rb +5 -0
- data/lib/rggen/systemverilog/ral/bit_field/type/rowo_rowotrg.rb +8 -0
- data/lib/rggen/systemverilog/ral/bit_field/type.rb +19 -6
- data/lib/rggen/systemverilog/ral/register_common.rb +1 -1
- data/lib/rggen/systemverilog/ral.rb +24 -27
- data/lib/rggen/systemverilog/rtl/bit_field/sv_rtl_top.rb +0 -16
- data/lib/rggen/systemverilog/rtl/bit_field/type/rc_w0c_w1c_wc_woc.erb +2 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/{ro.erb → ro_rotrg.erb} +8 -4
- data/lib/rggen/systemverilog/rtl/bit_field/type/ro_rotrg.rb +40 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rof.erb +5 -2
- data/lib/rggen/systemverilog/rtl/bit_field/type/row0trg_row1trg.erb +10 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/{ro.rb → row0trg_row1trg.rb} +10 -2
- data/lib/rggen/systemverilog/rtl/bit_field/type/rowo_rowotrg.erb +21 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rowo_rowotrg.rb +52 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rs_w0s_w1s_ws_wos.erb +2 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/{rw_w1_wo_wo1.erb → rw_rwtrg_w1.erb} +4 -2
- data/lib/rggen/systemverilog/rtl/bit_field/type/rw_rwtrg_w1.rb +46 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rwc.erb +2 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rwe_rwl.erb +2 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/rws.erb +2 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/w0crs_w0src_w1crs_w1src_wcrs_wsrc.erb +2 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/w0t_w1t.erb +2 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/w0trg_w1trg.erb +1 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/wo_wo1_wotrg.erb +22 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/wo_wo1_wotrg.rb +38 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type/wrc_wrs.erb +2 -0
- data/lib/rggen/systemverilog/rtl/bit_field/type.rb +15 -0
- data/lib/rggen/systemverilog/rtl/register/type/default.erb +0 -1
- data/lib/rggen/systemverilog/rtl/register/type/external.rb +5 -54
- data/lib/rggen/systemverilog/rtl/register/type/indirect.erb +0 -1
- data/lib/rggen/systemverilog/rtl/register/type.rb +12 -0
- data/lib/rggen/systemverilog/rtl/register_block/protocol/apb.rb +3 -60
- data/lib/rggen/systemverilog/rtl/register_block/protocol/axi4lite.rb +4 -118
- data/lib/rggen/systemverilog/rtl/register_block/protocol/wishbone.erb +17 -0
- data/lib/rggen/systemverilog/rtl/register_block/protocol/wishbone.rb +26 -0
- data/lib/rggen/systemverilog/rtl/register_block/protocol.rb +2 -1
- data/lib/rggen/systemverilog/rtl/register_block/sv_rtl_macros.erb +12 -0
- data/lib/rggen/systemverilog/rtl.rb +38 -41
- data/lib/rggen/systemverilog/version.rb +1 -1
- metadata +22 -13
- data/lib/rggen/systemverilog/ral/setup.rb +0 -8
- data/lib/rggen/systemverilog/rtl/bit_field/type/rw_w1_wo_wo1.rb +0 -24
- data/lib/rggen/systemverilog/rtl/global/fold_sv_interface_port.rb +0 -28
- data/lib/rggen/systemverilog/rtl/setup.rb +0 -14
@@ -3,6 +3,10 @@
|
|
3
3
|
RgGen.define_list_feature(:bit_field, :type) do
|
4
4
|
sv_rtl do
|
5
5
|
base_feature do
|
6
|
+
pre_code :bit_field do |code|
|
7
|
+
code << bit_field_if_connection << nl
|
8
|
+
end
|
9
|
+
|
6
10
|
private
|
7
11
|
|
8
12
|
def array_port_format
|
@@ -17,6 +21,10 @@ RgGen.define_list_feature(:bit_field, :type) do
|
|
17
21
|
bit_field.width
|
18
22
|
end
|
19
23
|
|
24
|
+
def lsb
|
25
|
+
bit_field.lsb(bit_field.local_index)
|
26
|
+
end
|
27
|
+
|
20
28
|
def clock
|
21
29
|
register_block.clock
|
22
30
|
end
|
@@ -52,6 +60,13 @@ RgGen.define_list_feature(:bit_field, :type) do
|
|
52
60
|
def loop_variables
|
53
61
|
bit_field.loop_variables
|
54
62
|
end
|
63
|
+
|
64
|
+
def bit_field_if_connection
|
65
|
+
macro_call(
|
66
|
+
'rggen_connect_bit_field_if',
|
67
|
+
[register.bit_field_if, bit_field_if, lsb, width]
|
68
|
+
)
|
69
|
+
end
|
55
70
|
end
|
56
71
|
|
57
72
|
factory do
|
@@ -3,63 +3,14 @@
|
|
3
3
|
RgGen.define_list_item_feature(:register, :type, :external) do
|
4
4
|
sv_rtl do
|
5
5
|
build do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
else
|
13
|
-
output :valid, {
|
14
|
-
name: "o_#{register.name}_valid", width: 1
|
15
|
-
}
|
16
|
-
output :access, {
|
17
|
-
name: "o_#{register.name}_access", width: '$bits(rggen_access)'
|
18
|
-
}
|
19
|
-
output :address, {
|
20
|
-
name: "o_#{register.name}_address", width: address_width
|
21
|
-
}
|
22
|
-
output :write_data, {
|
23
|
-
name: "o_#{register.name}_data", width: bus_width
|
24
|
-
}
|
25
|
-
output :strobe, {
|
26
|
-
name: "o_#{register.name}_strobe", width: byte_width
|
27
|
-
}
|
28
|
-
input :ready, {
|
29
|
-
name: "i_#{register.name}_ready", width: 1
|
30
|
-
}
|
31
|
-
input :status, {
|
32
|
-
name: "i_#{register.name}_status", width: 2
|
33
|
-
}
|
34
|
-
input :read_data, {
|
35
|
-
name: "i_#{register.name}_data", width: bus_width
|
36
|
-
}
|
37
|
-
interface :bus_if, {
|
38
|
-
name: 'bus_if', interface_type: 'rggen_bus_if',
|
39
|
-
parameter_values: [address_width, bus_width],
|
40
|
-
variables: [
|
41
|
-
'valid', 'access', 'address', 'write_data', 'strobe',
|
42
|
-
'ready', 'status', 'read_data'
|
43
|
-
]
|
44
|
-
}
|
45
|
-
end
|
6
|
+
interface_port :bus_if, {
|
7
|
+
name: "#{register.name}_bus_if",
|
8
|
+
interface_type: 'rggen_bus_if',
|
9
|
+
modport: 'master'
|
10
|
+
}
|
46
11
|
end
|
47
12
|
|
48
13
|
main_code :register, from_template: true
|
49
|
-
main_code :register do |code|
|
50
|
-
unless configuration.fold_sv_interface_port?
|
51
|
-
[
|
52
|
-
[valid, bus_if.valid],
|
53
|
-
[access, bus_if.access],
|
54
|
-
[address, bus_if.address],
|
55
|
-
[write_data, bus_if.write_data],
|
56
|
-
[strobe, bus_if.strobe],
|
57
|
-
[bus_if.ready, ready],
|
58
|
-
[bus_if.status, "rggen_status'(#{status})"],
|
59
|
-
[bus_if.read_data, read_data]
|
60
|
-
].map { |lhs, rhs| code << assign(lhs, rhs) << nl }
|
61
|
-
end
|
62
|
-
end
|
63
14
|
|
64
15
|
private
|
65
16
|
|
@@ -5,7 +5,6 @@ rggen_indirect_register #(
|
|
5
5
|
.OFFSET_ADDRESS (<%= offset_address %>),
|
6
6
|
.BUS_WIDTH (<%= bus_width %>),
|
7
7
|
.DATA_WIDTH (<%= width %>),
|
8
|
-
.VALID_BITS (<%= valid_bits %>),
|
9
8
|
.INDIRECT_INDEX_WIDTH (<%= index_width %>),
|
10
9
|
.INDIRECT_INDEX_VALUE (<%= concat(index_values) %>)
|
11
10
|
) u_register (
|
@@ -5,6 +5,11 @@ RgGen.define_list_feature(:register, :type) do
|
|
5
5
|
base_feature do
|
6
6
|
include RgGen::SystemVerilog::RTL::RegisterType
|
7
7
|
|
8
|
+
pre_code :register do |code|
|
9
|
+
register.bit_fields.empty? ||
|
10
|
+
(code << tie_off_unused_signals << nl)
|
11
|
+
end
|
12
|
+
|
8
13
|
private
|
9
14
|
|
10
15
|
def register_if
|
@@ -14,6 +19,13 @@ RgGen.define_list_feature(:register, :type) do
|
|
14
19
|
def bit_field_if
|
15
20
|
register.bit_field_if
|
16
21
|
end
|
22
|
+
|
23
|
+
def tie_off_unused_signals
|
24
|
+
macro_call(
|
25
|
+
'rggen_tie_off_unused_signals',
|
26
|
+
[width, valid_bits, bit_field_if]
|
27
|
+
)
|
28
|
+
end
|
17
29
|
end
|
18
30
|
|
19
31
|
default_feature do
|
@@ -21,68 +21,11 @@ RgGen.define_list_item_feature(:register_block, :protocol, :apb) do
|
|
21
21
|
|
22
22
|
sv_rtl do
|
23
23
|
build do
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}
|
28
|
-
else
|
29
|
-
input :psel, {
|
30
|
-
name: 'i_psel', width: 1
|
31
|
-
}
|
32
|
-
input :penable, {
|
33
|
-
name: 'i_penable', width: 1
|
34
|
-
}
|
35
|
-
input :paddr, {
|
36
|
-
name: 'i_paddr', width: address_width
|
37
|
-
}
|
38
|
-
input :pprot, {
|
39
|
-
name: 'i_pprot', width: 3
|
40
|
-
}
|
41
|
-
input :pwrite, {
|
42
|
-
name: 'i_pwrite', width: 1
|
43
|
-
}
|
44
|
-
input :pstrb, {
|
45
|
-
name: 'i_pstrb', width: byte_width
|
46
|
-
}
|
47
|
-
input :pwdata, {
|
48
|
-
name: 'i_pwdata', width: bus_width
|
49
|
-
}
|
50
|
-
output :pready, {
|
51
|
-
name: 'o_pready', width: 1
|
52
|
-
}
|
53
|
-
output :prdata, {
|
54
|
-
name: 'o_prdata', width: bus_width
|
55
|
-
}
|
56
|
-
output :pslverr, {
|
57
|
-
name: 'o_pslverr', width: 1
|
58
|
-
}
|
59
|
-
interface :apb_if, {
|
60
|
-
name: 'apb_if', interface_type: 'rggen_apb_if',
|
61
|
-
parameter_values: [address_width, bus_width],
|
62
|
-
variables: [
|
63
|
-
'psel', 'penable', 'paddr', 'pprot', 'pwrite', 'pstrb', 'pwdata',
|
64
|
-
'pready', 'prdata', 'pslverr'
|
65
|
-
]
|
66
|
-
}
|
67
|
-
end
|
24
|
+
interface_port :apb_if, {
|
25
|
+
name: 'apb_if', interface_type: 'rggen_apb_if', modport: 'slave'
|
26
|
+
}
|
68
27
|
end
|
69
28
|
|
70
29
|
main_code :register_block, from_template: true
|
71
|
-
main_code :register_block do |code|
|
72
|
-
unless configuration.fold_sv_interface_port?
|
73
|
-
[
|
74
|
-
[apb_if.psel, psel],
|
75
|
-
[apb_if.penable, penable],
|
76
|
-
[apb_if.paddr, paddr],
|
77
|
-
[apb_if.pprot, pprot],
|
78
|
-
[apb_if.pwrite, pwrite],
|
79
|
-
[apb_if.pstrb, pstrb],
|
80
|
-
[apb_if.pwdata, pwdata],
|
81
|
-
[pready, apb_if.pready],
|
82
|
-
[prdata, apb_if.prdata],
|
83
|
-
[pslverr, apb_if.pslverr]
|
84
|
-
].each { |lhs, rhs| code << assign(lhs, rhs) << nl }
|
85
|
-
end
|
86
|
-
end
|
87
30
|
end
|
88
31
|
end
|
@@ -19,132 +19,18 @@ RgGen.define_list_item_feature(:register_block, :protocol, :axi4lite) do
|
|
19
19
|
parameter :write_first, {
|
20
20
|
name: 'WRITE_FIRST', data_type: :bit, default: 1
|
21
21
|
}
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
}
|
27
|
-
else
|
28
|
-
input :awvalid, {
|
29
|
-
name: 'i_awvalid', width: 1
|
30
|
-
}
|
31
|
-
output :awready, {
|
32
|
-
name: 'o_awready', width: 1
|
33
|
-
}
|
34
|
-
input :awid, {
|
35
|
-
name: 'i_awid', width: id_port_width
|
36
|
-
}
|
37
|
-
input :awaddr, {
|
38
|
-
name: 'i_awaddr', width: address_width
|
39
|
-
}
|
40
|
-
input :awprot, {
|
41
|
-
name: 'i_awprot', width: 3
|
42
|
-
}
|
43
|
-
input :wvalid, {
|
44
|
-
name: 'i_wvalid', width: 1
|
45
|
-
}
|
46
|
-
output :wready, {
|
47
|
-
name: 'o_wready', width: 1
|
48
|
-
}
|
49
|
-
input :wdata, {
|
50
|
-
name: 'i_wdata', width: bus_width
|
51
|
-
}
|
52
|
-
input :wstrb, {
|
53
|
-
name: 'i_wstrb', width: byte_width
|
54
|
-
}
|
55
|
-
output :bvalid, {
|
56
|
-
name: 'o_bvalid', width: 1
|
57
|
-
}
|
58
|
-
output :bid, {
|
59
|
-
name: 'o_bid', width: id_port_width
|
60
|
-
}
|
61
|
-
input :bready, {
|
62
|
-
name: 'i_bready', width: 1
|
63
|
-
}
|
64
|
-
output :bresp, {
|
65
|
-
name: 'o_bresp', width: 2
|
66
|
-
}
|
67
|
-
input :arvalid, {
|
68
|
-
name: 'i_arvalid', width: 1
|
69
|
-
}
|
70
|
-
output :arready, {
|
71
|
-
name: 'o_arready', width: 1
|
72
|
-
}
|
73
|
-
input :arid, {
|
74
|
-
name: 'i_arid', width: id_port_width
|
75
|
-
}
|
76
|
-
input :araddr, {
|
77
|
-
name: 'i_araddr', width: address_width
|
78
|
-
}
|
79
|
-
input :arprot, {
|
80
|
-
name: 'i_arprot', width: 3
|
81
|
-
}
|
82
|
-
output :rvalid, {
|
83
|
-
name: 'o_rvalid', width: 1
|
84
|
-
}
|
85
|
-
input :rready, {
|
86
|
-
name: 'i_rready', width: 1
|
87
|
-
}
|
88
|
-
output :rid, {
|
89
|
-
name: 'o_rid', width: id_port_width
|
90
|
-
}
|
91
|
-
output :rdata, {
|
92
|
-
name: 'o_rdata', width: bus_width
|
93
|
-
}
|
94
|
-
output :rresp, {
|
95
|
-
name: 'o_rresp', width: 2
|
96
|
-
}
|
97
|
-
interface :axi4lite_if, {
|
98
|
-
name: 'axi4lite_if', interface_type: 'rggen_axi4lite_if',
|
99
|
-
parameter_values: [id_width, address_width, bus_width],
|
100
|
-
variables: [
|
101
|
-
'awvalid', 'awready', 'awid', 'awaddr', 'awprot',
|
102
|
-
'wvalid', 'wready', 'wdata', 'wstrb',
|
103
|
-
'bvalid', 'bready', 'bid', 'bresp',
|
104
|
-
'arvalid', 'arready', 'arid', 'araddr', 'arprot',
|
105
|
-
'rvalid', 'rready', 'rid', 'rdata', 'rresp'
|
106
|
-
]
|
107
|
-
}
|
108
|
-
end
|
22
|
+
interface_port :axi4lite_if, {
|
23
|
+
name: 'axi4lite_if',
|
24
|
+
interface_type: 'rggen_axi4lite_if', modport: 'slave'
|
25
|
+
}
|
109
26
|
end
|
110
27
|
|
111
28
|
main_code :register_block, from_template: true
|
112
|
-
main_code :register_block do |code|
|
113
|
-
configuration.fold_sv_interface_port? || assign_axi4lite_signals(code)
|
114
|
-
end
|
115
29
|
|
116
30
|
private
|
117
31
|
|
118
32
|
def id_port_width
|
119
33
|
"((#{id_width}>0)?#{id_width}:1)"
|
120
34
|
end
|
121
|
-
|
122
|
-
def assign_axi4lite_signals(code)
|
123
|
-
[
|
124
|
-
[axi4lite_if.awvalid, awvalid],
|
125
|
-
[awready, axi4lite_if.awready],
|
126
|
-
[axi4lite_if.awid, awid],
|
127
|
-
[axi4lite_if.awaddr, awaddr],
|
128
|
-
[axi4lite_if.awprot, awprot],
|
129
|
-
[axi4lite_if.wvalid, wvalid],
|
130
|
-
[wready, axi4lite_if.wready],
|
131
|
-
[axi4lite_if.wdata, wdata],
|
132
|
-
[axi4lite_if.wstrb, wstrb],
|
133
|
-
[bvalid, axi4lite_if.bvalid],
|
134
|
-
[axi4lite_if.bready, bready],
|
135
|
-
[bid, axi4lite_if.bid],
|
136
|
-
[bresp, axi4lite_if.bresp],
|
137
|
-
[axi4lite_if.arvalid, arvalid],
|
138
|
-
[arready, axi4lite_if.arready],
|
139
|
-
[axi4lite_if.arid, arid],
|
140
|
-
[axi4lite_if.araddr, araddr],
|
141
|
-
[axi4lite_if.arprot, arprot],
|
142
|
-
[rvalid, axi4lite_if.rvalid],
|
143
|
-
[axi4lite_if.rready, rready],
|
144
|
-
[rid, axi4lite_if.rid],
|
145
|
-
[rdata, axi4lite_if.rdata],
|
146
|
-
[rresp, axi4lite_if.rresp]
|
147
|
-
].each { |lhs, rhs| code << assign(lhs, rhs) << nl }
|
148
|
-
end
|
149
35
|
end
|
150
36
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
rggen_wishbone_adapter #(
|
2
|
+
.ADDRESS_WIDTH (<%= address_width %>),
|
3
|
+
.LOCAL_ADDRESS_WIDTH (<%= local_address_width %>),
|
4
|
+
.BUS_WIDTH (<%= bus_width %>),
|
5
|
+
.REGISTERS (<%= total_registers %>),
|
6
|
+
.PRE_DECODE (<%= pre_decode %>),
|
7
|
+
.BASE_ADDRESS (<%= base_address %>),
|
8
|
+
.BYTE_SIZE (<%= byte_size %>),
|
9
|
+
.ERROR_STATUS (<%= error_status %>),
|
10
|
+
.DEFAULT_READ_DATA (<%= default_read_data %>),
|
11
|
+
.USE_STALL (<%= use_stall %>)
|
12
|
+
) u_adapter (
|
13
|
+
.i_clk (<%= clock %>),
|
14
|
+
.i_rst_n (<%= reset %>),
|
15
|
+
.wishbone_if (<%= wishbone_if %>),
|
16
|
+
.register_if (<%= register_if %>)
|
17
|
+
);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RgGen.define_list_item_feature(:register_block, :protocol, :wishbone) do
|
4
|
+
configuration do
|
5
|
+
verify(:component) do
|
6
|
+
error_condition { configuration.bus_width > 64 }
|
7
|
+
message do
|
8
|
+
'bus width over 64 bit is not supported: ' \
|
9
|
+
"#{configuration.bus_width}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
sv_rtl do
|
15
|
+
build do
|
16
|
+
parameter :use_stall, {
|
17
|
+
name: 'USE_STALL', data_type: :bit, default: 1
|
18
|
+
}
|
19
|
+
interface_port :wishbone_if, {
|
20
|
+
name: 'wishbone_if', interface_type: 'rggen_wishbone_if', modport: 'slave'
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
main_code :register_block, from_template: true
|
25
|
+
end
|
26
|
+
end
|
@@ -7,3 +7,15 @@
|
|
7
7
|
assign RIF.read_data[LSB+:WIDTH] = FIF.read_data; \
|
8
8
|
assign RIF.value[LSB+:WIDTH] = FIF.value;
|
9
9
|
`endif
|
10
|
+
`ifndef rggen_tie_off_unused_signals
|
11
|
+
`define rggen_tie_off_unused_signals(WIDTH, VALID_BITS, RIF) \
|
12
|
+
if (1) begin : __g_tie_off \
|
13
|
+
genvar __i; \
|
14
|
+
for (__i = 0;__i < WIDTH;++__i) begin : g \
|
15
|
+
if (!(((VALID_BITS) >> __i) & 1'b1)) begin : g \
|
16
|
+
assign RIF.read_data[__i] = 1'b0; \
|
17
|
+
assign RIF.value[__i] = 1'b0; \
|
18
|
+
end \
|
19
|
+
end \
|
20
|
+
end
|
21
|
+
`endif
|
@@ -8,47 +8,44 @@ require_relative 'rtl/register_type'
|
|
8
8
|
require_relative 'rtl/indirect_index'
|
9
9
|
require_relative 'rtl/bit_field_index'
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
module RTL
|
14
|
-
extend Core::Plugin
|
11
|
+
RgGen.setup_plugin :'rggen-sv-rtl' do |plugin|
|
12
|
+
plugin.version RgGen::SystemVerilog::VERSION
|
15
13
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
feature Feature, Common::FeatureFactory
|
22
|
-
end
|
23
|
-
|
24
|
-
plugin.files [
|
25
|
-
'rtl/bit_field/sv_rtl_top',
|
26
|
-
'rtl/bit_field/type',
|
27
|
-
'rtl/bit_field/type/rc_w0c_w1c_wc_woc',
|
28
|
-
'rtl/bit_field/type/ro',
|
29
|
-
'rtl/bit_field/type/rof',
|
30
|
-
'rtl/bit_field/type/rs_w0s_w1s_ws_wos',
|
31
|
-
'rtl/bit_field/type/rw_w1_wo_wo1',
|
32
|
-
'rtl/bit_field/type/rwc',
|
33
|
-
'rtl/bit_field/type/rwe_rwl',
|
34
|
-
'rtl/bit_field/type/rws',
|
35
|
-
'rtl/bit_field/type/w0crs_w0src_w1crs_w1src_wcrs_wsrc',
|
36
|
-
'rtl/bit_field/type/w0t_w1t',
|
37
|
-
'rtl/bit_field/type/w0trg_w1trg',
|
38
|
-
'rtl/bit_field/type/wrc_wrs',
|
39
|
-
'rtl/global/array_port_format',
|
40
|
-
'rtl/global/fold_sv_interface_port',
|
41
|
-
'rtl/register/sv_rtl_top',
|
42
|
-
'rtl/register/type',
|
43
|
-
'rtl/register/type/external',
|
44
|
-
'rtl/register/type/indirect',
|
45
|
-
'rtl/register_block/protocol',
|
46
|
-
'rtl/register_block/protocol/apb',
|
47
|
-
'rtl/register_block/protocol/axi4lite',
|
48
|
-
'rtl/register_block/sv_rtl_top',
|
49
|
-
'rtl/register_file/sv_rtl_top'
|
50
|
-
]
|
51
|
-
end
|
52
|
-
end
|
14
|
+
plugin.register_component :sv_rtl do
|
15
|
+
component RgGen::SystemVerilog::Common::Component,
|
16
|
+
RgGen::SystemVerilog::Common::ComponentFactory
|
17
|
+
feature RgGen::SystemVerilog::RTL::Feature,
|
18
|
+
RgGen::SystemVerilog::Common::FeatureFactory
|
53
19
|
end
|
20
|
+
|
21
|
+
plugin.files [
|
22
|
+
'rtl/global/array_port_format',
|
23
|
+
'rtl/register_block/sv_rtl_top',
|
24
|
+
'rtl/register_block/protocol',
|
25
|
+
'rtl/register_block/protocol/apb',
|
26
|
+
'rtl/register_block/protocol/axi4lite',
|
27
|
+
'rtl/register_block/protocol/wishbone',
|
28
|
+
'rtl/register_file/sv_rtl_top',
|
29
|
+
'rtl/register/sv_rtl_top',
|
30
|
+
'rtl/register/type',
|
31
|
+
'rtl/register/type/external',
|
32
|
+
'rtl/register/type/indirect',
|
33
|
+
'rtl/bit_field/sv_rtl_top',
|
34
|
+
'rtl/bit_field/type',
|
35
|
+
'rtl/bit_field/type/rc_w0c_w1c_wc_woc',
|
36
|
+
'rtl/bit_field/type/ro_rotrg',
|
37
|
+
'rtl/bit_field/type/rof',
|
38
|
+
'rtl/bit_field/type/row0trg_row1trg',
|
39
|
+
'rtl/bit_field/type/rowo_rowotrg',
|
40
|
+
'rtl/bit_field/type/rs_w0s_w1s_ws_wos',
|
41
|
+
'rtl/bit_field/type/rw_rwtrg_w1',
|
42
|
+
'rtl/bit_field/type/rwc',
|
43
|
+
'rtl/bit_field/type/rwe_rwl',
|
44
|
+
'rtl/bit_field/type/rws',
|
45
|
+
'rtl/bit_field/type/w0crs_w0src_w1crs_w1src_wcrs_wsrc',
|
46
|
+
'rtl/bit_field/type/w0t_w1t',
|
47
|
+
'rtl/bit_field/type/w0trg_w1trg',
|
48
|
+
'rtl/bit_field/type/wo_wo1_wotrg',
|
49
|
+
'rtl/bit_field/type/wrc_wrs'
|
50
|
+
]
|
54
51
|
end
|
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.27.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:
|
11
|
+
date: 2022-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -56,6 +56,9 @@ files:
|
|
56
56
|
- lib/rggen/systemverilog/ral.rb
|
57
57
|
- lib/rggen/systemverilog/ral/bit_field/type.rb
|
58
58
|
- lib/rggen/systemverilog/ral/bit_field/type/rof.rb
|
59
|
+
- lib/rggen/systemverilog/ral/bit_field/type/rotrg_rwtrg_wotrg.rb
|
60
|
+
- lib/rggen/systemverilog/ral/bit_field/type/row0trg_row1trg.rb
|
61
|
+
- lib/rggen/systemverilog/ral/bit_field/type/rowo_rowotrg.rb
|
59
62
|
- lib/rggen/systemverilog/ral/bit_field/type/rwc_rws.rb
|
60
63
|
- lib/rggen/systemverilog/ral/bit_field/type/rwe_rwl.rb
|
61
64
|
- lib/rggen/systemverilog/ral/bit_field/type/w0trg_w1trg.rb
|
@@ -71,20 +74,23 @@ files:
|
|
71
74
|
- lib/rggen/systemverilog/ral/register_common.rb
|
72
75
|
- lib/rggen/systemverilog/ral/register_file/sv_ral_model.erb
|
73
76
|
- lib/rggen/systemverilog/ral/register_file/sv_ral_model.rb
|
74
|
-
- lib/rggen/systemverilog/ral/setup.rb
|
75
77
|
- lib/rggen/systemverilog/rtl.rb
|
76
78
|
- lib/rggen/systemverilog/rtl/bit_field/sv_rtl_top.rb
|
77
79
|
- lib/rggen/systemverilog/rtl/bit_field/type.rb
|
78
80
|
- lib/rggen/systemverilog/rtl/bit_field/type/rc_w0c_w1c_wc_woc.erb
|
79
81
|
- lib/rggen/systemverilog/rtl/bit_field/type/rc_w0c_w1c_wc_woc.rb
|
80
|
-
- lib/rggen/systemverilog/rtl/bit_field/type/
|
81
|
-
- lib/rggen/systemverilog/rtl/bit_field/type/
|
82
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/ro_rotrg.erb
|
83
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/ro_rotrg.rb
|
82
84
|
- lib/rggen/systemverilog/rtl/bit_field/type/rof.erb
|
83
85
|
- lib/rggen/systemverilog/rtl/bit_field/type/rof.rb
|
86
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/row0trg_row1trg.erb
|
87
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/row0trg_row1trg.rb
|
88
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rowo_rowotrg.erb
|
89
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rowo_rowotrg.rb
|
84
90
|
- lib/rggen/systemverilog/rtl/bit_field/type/rs_w0s_w1s_ws_wos.erb
|
85
91
|
- lib/rggen/systemverilog/rtl/bit_field/type/rs_w0s_w1s_ws_wos.rb
|
86
|
-
- lib/rggen/systemverilog/rtl/bit_field/type/
|
87
|
-
- lib/rggen/systemverilog/rtl/bit_field/type/
|
92
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rw_rwtrg_w1.erb
|
93
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/rw_rwtrg_w1.rb
|
88
94
|
- lib/rggen/systemverilog/rtl/bit_field/type/rwc.erb
|
89
95
|
- lib/rggen/systemverilog/rtl/bit_field/type/rwc.rb
|
90
96
|
- lib/rggen/systemverilog/rtl/bit_field/type/rwe_rwl.erb
|
@@ -97,12 +103,13 @@ files:
|
|
97
103
|
- lib/rggen/systemverilog/rtl/bit_field/type/w0t_w1t.rb
|
98
104
|
- lib/rggen/systemverilog/rtl/bit_field/type/w0trg_w1trg.erb
|
99
105
|
- lib/rggen/systemverilog/rtl/bit_field/type/w0trg_w1trg.rb
|
106
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/wo_wo1_wotrg.erb
|
107
|
+
- lib/rggen/systemverilog/rtl/bit_field/type/wo_wo1_wotrg.rb
|
100
108
|
- lib/rggen/systemverilog/rtl/bit_field/type/wrc_wrs.erb
|
101
109
|
- lib/rggen/systemverilog/rtl/bit_field/type/wrc_wrs.rb
|
102
110
|
- lib/rggen/systemverilog/rtl/bit_field_index.rb
|
103
111
|
- lib/rggen/systemverilog/rtl/feature.rb
|
104
112
|
- lib/rggen/systemverilog/rtl/global/array_port_format.rb
|
105
|
-
- lib/rggen/systemverilog/rtl/global/fold_sv_interface_port.rb
|
106
113
|
- lib/rggen/systemverilog/rtl/indirect_index.rb
|
107
114
|
- lib/rggen/systemverilog/rtl/partial_sum.rb
|
108
115
|
- lib/rggen/systemverilog/rtl/register/sv_rtl_top.rb
|
@@ -117,19 +124,21 @@ files:
|
|
117
124
|
- lib/rggen/systemverilog/rtl/register_block/protocol/apb.rb
|
118
125
|
- lib/rggen/systemverilog/rtl/register_block/protocol/axi4lite.erb
|
119
126
|
- lib/rggen/systemverilog/rtl/register_block/protocol/axi4lite.rb
|
127
|
+
- lib/rggen/systemverilog/rtl/register_block/protocol/wishbone.erb
|
128
|
+
- lib/rggen/systemverilog/rtl/register_block/protocol/wishbone.rb
|
120
129
|
- lib/rggen/systemverilog/rtl/register_block/sv_rtl_macros.erb
|
121
130
|
- lib/rggen/systemverilog/rtl/register_block/sv_rtl_top.rb
|
122
131
|
- lib/rggen/systemverilog/rtl/register_file/sv_rtl_top.rb
|
123
132
|
- lib/rggen/systemverilog/rtl/register_index.rb
|
124
133
|
- lib/rggen/systemverilog/rtl/register_type.rb
|
125
|
-
- lib/rggen/systemverilog/rtl/setup.rb
|
126
134
|
- lib/rggen/systemverilog/version.rb
|
127
135
|
homepage: https://github.com/rggen/rggen-systemverilog
|
128
136
|
licenses:
|
129
137
|
- MIT
|
130
138
|
metadata:
|
131
|
-
bug_tracker_uri: https://github.com/rggen/rggen
|
139
|
+
bug_tracker_uri: https://github.com/rggen/rggen/issues
|
132
140
|
mailing_list_uri: https://groups.google.com/d/forum/rggen
|
141
|
+
rubygems_mfa_required: 'true'
|
133
142
|
source_code_uri: https://github.com/rggen/rggen-systemverilog
|
134
143
|
wiki_uri: https://github.com/rggen/rggen/wiki
|
135
144
|
post_install_message:
|
@@ -140,15 +149,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
149
|
requirements:
|
141
150
|
- - ">="
|
142
151
|
- !ruby/object:Gem::Version
|
143
|
-
version: '2.
|
152
|
+
version: '2.6'
|
144
153
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
154
|
requirements:
|
146
155
|
- - ">="
|
147
156
|
- !ruby/object:Gem::Version
|
148
157
|
version: '0'
|
149
158
|
requirements: []
|
150
|
-
rubygems_version: 3.
|
159
|
+
rubygems_version: 3.3.3
|
151
160
|
signing_key:
|
152
161
|
specification_version: 4
|
153
|
-
summary: rggen-systemverilog-0.
|
162
|
+
summary: rggen-systemverilog-0.27.0
|
154
163
|
test_files: []
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RgGen.define_list_item_feature(:bit_field, :type, [:rw, :w1, :wo, :wo1]) do
|
4
|
-
sv_rtl do
|
5
|
-
build do
|
6
|
-
output :value_out, {
|
7
|
-
name: "o_#{full_name}", width: width,
|
8
|
-
array_size: array_size, array_format: array_port_format
|
9
|
-
}
|
10
|
-
end
|
11
|
-
|
12
|
-
main_code :bit_field, from_template: true
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
def read_action
|
17
|
-
bit_field.readable? && 'RGGEN_READ_DEFAULT' || 'RGGEN_READ_NONE'
|
18
|
-
end
|
19
|
-
|
20
|
-
def write_once
|
21
|
-
[:w1, :wo1].include?(bit_field.type) && 1 || 0
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|