rggen-vhdl 0.9.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rggen/vhdl/bit_field/type/custom.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/rc_w0c_w1c_wc_woc.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/ro_rotrg.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/rof.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/rohw.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/row0trg_row1trg.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/rowo_rowotrg.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/rs_w0s_w1s_ws_wos.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/rw_rwtrg_w1.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/rwc.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/rwe_rwl.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/rwhw.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/rws.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/w0crs_w0src_w1crs_w1src_wcrs_wsrc.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/w0t_w1t.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/w0trg_w1trg.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/wo_wo1_wotrg.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type/wrc_wrs.erb +1 -1
- data/lib/rggen/vhdl/bit_field/type.rb +4 -0
- data/lib/rggen/vhdl/global/library_name.rb +16 -0
- data/lib/rggen/vhdl/register/type/default.erb +1 -1
- data/lib/rggen/vhdl/register/type/external.erb +1 -1
- data/lib/rggen/vhdl/register/type/indirect.erb +2 -5
- data/lib/rggen/vhdl/register/type/indirect.rb +15 -15
- data/lib/rggen/vhdl/register/type/rw.erb +1 -1
- data/lib/rggen/vhdl/register/type.rb +12 -0
- data/lib/rggen/vhdl/register_block/protocol/apb.erb +1 -1
- data/lib/rggen/vhdl/register_block/protocol/axi4lite.erb +1 -1
- data/lib/rggen/vhdl/register_block/protocol/wishbone.erb +1 -1
- data/lib/rggen/vhdl/register_block/protocol.rb +4 -0
- data/lib/rggen/vhdl/register_block/vhdl_top.erb +4 -1
- data/lib/rggen/vhdl/register_block/vhdl_top.rb +8 -0
- data/lib/rggen/vhdl/version.rb +1 -1
- data/lib/rggen/vhdl.rb +1 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a40b2314cf782eff83c05a24378bdcdcb3022dc19df32e1eb3cf3c9bc8270f0b
|
4
|
+
data.tar.gz: d3b5529f4247a8b1118859542328402bfc025290c1139b40c7d93ab62d6d4c2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b81bc63e6ab3ed5a4b0d4d948162ce575f604fb2de3f25d8941fe196ec6c8f399e8c3a909ecc239cb37e1e03ea314f220b88e83a8b80d33cc21519a900020eb
|
7
|
+
data.tar.gz: 76f2b1ac8d10a91750b1ea5c24ab5b75ba78d5ef54e8d9ad178b32dfbe7b73fab0551733281d3ebf808ccb3640fff5bc8cf17695bc1a38cf4ea89e06f2835821
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RgGen.define_simple_feature(:global, :library_name) do
|
4
|
+
configuration do
|
5
|
+
property :library_name, default: 'work'
|
6
|
+
property :use_default_library?, body: -> { library_name.casecmp?('work') }
|
7
|
+
|
8
|
+
input_pattern variable_name
|
9
|
+
|
10
|
+
build do |value|
|
11
|
+
pattern_matched? ||
|
12
|
+
(error "illegal input value for library name: #{value.inspect}")
|
13
|
+
@library_name = match_data.to_s
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,7 +1,4 @@
|
|
1
|
-
|
2
|
-
<%= indirect_match[i] %> <= '1' when unsigned(<%= field %>) = <%= value %> else '0';
|
3
|
-
<% end %>
|
4
|
-
u_register: entity work.rggen_indirect_register
|
1
|
+
u_register: entity <%= library_name %>.rggen_indirect_register
|
5
2
|
generic map (
|
6
3
|
READABLE => <%= readable? %>,
|
7
4
|
WRITABLE => <%= writable? %>,
|
@@ -9,7 +6,7 @@ u_register: entity work.rggen_indirect_register
|
|
9
6
|
OFFSET_ADDRESS => <%= offset_address %>,
|
10
7
|
BUS_WIDTH => <%= bus_width %>,
|
11
8
|
DATA_WIDTH => <%= width %>,
|
12
|
-
INDIRECT_MATCH_WIDTH => <%=
|
9
|
+
INDIRECT_MATCH_WIDTH => <%= index_match_width %>
|
13
10
|
)
|
14
11
|
port map (
|
15
12
|
i_clk => <%= clock %>,
|
@@ -2,33 +2,33 @@
|
|
2
2
|
|
3
3
|
RgGen.define_list_item_feature(:register, :type, :indirect) do
|
4
4
|
vhdl do
|
5
|
+
include RgGen::SystemVerilog::RTL::IndirectIndex
|
6
|
+
|
5
7
|
build do
|
6
|
-
signal :indirect_match, { width:
|
8
|
+
signal :indirect_match, { width: index_match_width }
|
7
9
|
end
|
8
10
|
|
9
|
-
main_code :register
|
11
|
+
main_code :register do |code|
|
12
|
+
indirect_index_matches(code)
|
13
|
+
code << process_template
|
14
|
+
end
|
10
15
|
|
11
16
|
private
|
12
17
|
|
13
|
-
def
|
14
|
-
|
18
|
+
def array_index_value(value, _width)
|
19
|
+
value
|
15
20
|
end
|
16
21
|
|
17
|
-
def
|
18
|
-
|
19
|
-
.collect_index_fields(register_block.bit_fields)
|
20
|
-
.map(&:value)
|
22
|
+
def fixed_index_value(value, _width)
|
23
|
+
value
|
21
24
|
end
|
22
25
|
|
23
|
-
def
|
24
|
-
|
25
|
-
register.index_entries.map do |entry|
|
26
|
-
entry.array_index? && loop_variables.shift || entry.value
|
27
|
-
end
|
26
|
+
def index_match_rhs(index)
|
27
|
+
indirect_match[index]
|
28
28
|
end
|
29
29
|
|
30
|
-
def
|
31
|
-
|
30
|
+
def index_match_lhs(field, value)
|
31
|
+
"'1' when unsigned(#{field}) = #{value} else '0'"
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -20,6 +20,10 @@ RgGen.define_list_feature(:register, :type) do
|
|
20
20
|
register.writable?
|
21
21
|
end
|
22
22
|
|
23
|
+
def library_name
|
24
|
+
configuration.library_name
|
25
|
+
end
|
26
|
+
|
23
27
|
def clock
|
24
28
|
register_block.clock
|
25
29
|
end
|
@@ -91,6 +95,14 @@ RgGen.define_list_feature(:register, :type) do
|
|
91
95
|
def bit_field_value
|
92
96
|
register.bit_field_value
|
93
97
|
end
|
98
|
+
|
99
|
+
def format_offsets(offsets)
|
100
|
+
if integer?(offsets.first)
|
101
|
+
super(offsets)
|
102
|
+
else
|
103
|
+
super([0, *offsets])
|
104
|
+
end
|
105
|
+
end
|
94
106
|
end
|
95
107
|
|
96
108
|
default_feature do
|
@@ -2,7 +2,10 @@ library ieee;
|
|
2
2
|
use ieee.std_logic_1164.all;
|
3
3
|
use ieee.numeric_std.all;
|
4
4
|
|
5
|
-
|
5
|
+
<% unless use_default_library? %>
|
6
|
+
library <%= library_name %>;
|
7
|
+
<% end %>
|
8
|
+
use <%= library_name %>.rggen_rtl.all;
|
6
9
|
|
7
10
|
entity <%= register_block.name %> is
|
8
11
|
generic (
|
@@ -42,6 +42,14 @@ RgGen.define_simple_feature(:register_block, :vhdl_top) do
|
|
42
42
|
|
43
43
|
private
|
44
44
|
|
45
|
+
def use_default_library?
|
46
|
+
configuration.use_default_library?
|
47
|
+
end
|
48
|
+
|
49
|
+
def library_name
|
50
|
+
configuration.library_name
|
51
|
+
end
|
52
|
+
|
45
53
|
def total_registers
|
46
54
|
register_block.files_and_registers.sum(&:count)
|
47
55
|
end
|
data/lib/rggen/vhdl/version.rb
CHANGED
data/lib/rggen/vhdl.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rggen-vhdl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.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: 2024-
|
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.33.
|
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.33.
|
26
|
+
version: 0.33.1
|
27
27
|
description: VHDL writer plugin for RgGen
|
28
28
|
email:
|
29
29
|
- rggen@googlegroups.com
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- lib/rggen/vhdl/component.rb
|
77
77
|
- lib/rggen/vhdl/factories.rb
|
78
78
|
- lib/rggen/vhdl/feature.rb
|
79
|
+
- lib/rggen/vhdl/global/library_name.rb
|
79
80
|
- lib/rggen/vhdl/register/tie_off_unused_signals.erb
|
80
81
|
- lib/rggen/vhdl/register/type.rb
|
81
82
|
- lib/rggen/vhdl/register/type/default.erb
|
@@ -125,8 +126,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
126
|
- !ruby/object:Gem::Version
|
126
127
|
version: '0'
|
127
128
|
requirements: []
|
128
|
-
rubygems_version: 3.5.
|
129
|
+
rubygems_version: 3.5.16
|
129
130
|
signing_key:
|
130
131
|
specification_version: 4
|
131
|
-
summary: rggen-vhdl-0.
|
132
|
+
summary: rggen-vhdl-0.10.1
|
132
133
|
test_files: []
|