udb-gen 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/udb-gen/adoc_helpers.rb +12 -0
- data/lib/udb-gen/generators/ext_doc/generator.rb +0 -9
- data/lib/udb-gen/generators/ext_doc/helpers.rb +9 -2
- data/lib/udb-gen/generators/isa_explorer/table_builder.rb +0 -3
- data/lib/udb-gen/version.rb +1 -1
- data/templates/common/inst.adoc.erb +0 -25
- data/templates/manual/instruction.adoc.erb +0 -14
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c2f5a31e48c78ca6791ac5a41705916a42e238ff974de63d96013ad89ad16aea
|
|
4
|
+
data.tar.gz: caf7b20504a0c4e66fb850744818dd7c029ef3829b04fe80b8a91b8cee6871ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 138a853828fcd766f9f3fd1d48671073a5d681911d34d1864554347dc3814a8468fbce288dfb624fdae00014f99874881a8597d4d9120d6cb01b32c2f132e20d
|
|
7
|
+
data.tar.gz: a2ba8f8905197247bd475ab61e3593ddf21cc998b01ae79e85e0e30bd3a6f58350ad74428c0b586a3d55a97b6639e49426b49fba33357b62f71487672d0a1626
|
data/lib/udb-gen/adoc_helpers.rb
CHANGED
|
@@ -38,6 +38,10 @@ module UdbGen
|
|
|
38
38
|
+ \\
|
|
39
39
|
Change should be expected + \\
|
|
40
40
|
STATE
|
|
41
|
+
when "nonstandard-released"
|
|
42
|
+
<<~STATE
|
|
43
|
+
This document is the Release State. Changes will result in a new version number. + \\
|
|
44
|
+
STATE
|
|
41
45
|
else
|
|
42
46
|
raise "Unknown state: #{version.state}"
|
|
43
47
|
end
|
|
@@ -75,6 +79,14 @@ module UdbGen
|
|
|
75
79
|
Change should be expected
|
|
76
80
|
====
|
|
77
81
|
ADOC
|
|
82
|
+
when "nonstandard-released"
|
|
83
|
+
<<~ADOC
|
|
84
|
+
[WARNING]
|
|
85
|
+
This document is the Release State.
|
|
86
|
+
====
|
|
87
|
+
Changes will result in a new version number.
|
|
88
|
+
====
|
|
89
|
+
ADOC
|
|
78
90
|
else
|
|
79
91
|
raise "Unknown state: #{version.state}"
|
|
80
92
|
end
|
|
@@ -68,15 +68,6 @@ module UdbGen
|
|
|
68
68
|
desc "Do not generate a long descrption of each CSR field (just a summary table)"
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
option :pseudo do
|
|
72
|
-
T.bind(self, TTY::Option::Parameter::Option)
|
|
73
|
-
short "-p"
|
|
74
|
-
long "--p=type"
|
|
75
|
-
desc "Which pdeudocode(s) to include in the documentation"
|
|
76
|
-
permit ["sail", "idl", "both"]
|
|
77
|
-
default "idl"
|
|
78
|
-
end
|
|
79
|
-
|
|
80
71
|
option :format do
|
|
81
72
|
T.bind(self, TTY::Option::Parameter::Option)
|
|
82
73
|
short "-f"
|
|
@@ -18,10 +18,17 @@ module UdbGen
|
|
|
18
18
|
version.ratification_date.nil? ? Date.today.year.to_s : T.must(version.ratification_date).split("-")[0]
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
# Returns the revdate for a version
|
|
21
|
+
# Returns the revdate for a version: release date (for nonstandard-released),
|
|
22
|
+
# ratification date (for ratified), or today otherwise.
|
|
22
23
|
sig { params(version: Udb::ExtensionVersion).returns(T.any(String, Date)) }
|
|
23
24
|
def revdate(version)
|
|
24
|
-
version.
|
|
25
|
+
if version.state == "nonstandard-released"
|
|
26
|
+
version.release_date.nil? ? Date.today : version.release_date
|
|
27
|
+
elsif version.state == "ratified"
|
|
28
|
+
version.ratification_date.nil? ? Date.today : version.ratification_date
|
|
29
|
+
else
|
|
30
|
+
Date.today
|
|
31
|
+
end
|
|
25
32
|
end
|
|
26
33
|
|
|
27
34
|
# Returns the company name or "unknown".
|
|
@@ -213,9 +213,6 @@ module UdbGen
|
|
|
213
213
|
# Get array of profile releases and sort by name
|
|
214
214
|
sorted = @arch.profile_releases.sort_by(&:name)
|
|
215
215
|
|
|
216
|
-
# Remove Mock profile release if present.
|
|
217
|
-
sorted.delete_if { |pr| pr.name == "Mock" }
|
|
218
|
-
|
|
219
216
|
# Move RVI20 to the beginning of the array if it exists.
|
|
220
217
|
if sorted.any? { |pr| pr.name == "RVI20" }
|
|
221
218
|
sorted.delete_if { |pr| pr.name == "RVI20" }
|
data/lib/udb-gen/version.rb
CHANGED
|
@@ -3,19 +3,6 @@
|
|
|
3
3
|
SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
4
4
|
%>
|
|
5
5
|
|
|
6
|
-
<%
|
|
7
|
-
write_flag = ENV["PSEUDO"]
|
|
8
|
-
include_idl = include_sail = true
|
|
9
|
-
if write_flag
|
|
10
|
-
case write_flag.downcase.strip
|
|
11
|
-
when "idl"
|
|
12
|
-
include_sail = false
|
|
13
|
-
when "sail"
|
|
14
|
-
include_idl = false
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
%>
|
|
18
|
-
|
|
19
6
|
<%= anchor_for_udb_doc_inst(inst.name) %>
|
|
20
7
|
= <%= inst.name %>
|
|
21
8
|
|
|
@@ -90,23 +77,11 @@ RV64::
|
|
|
90
77
|
<%- end # if no decode variables-%>
|
|
91
78
|
|
|
92
79
|
<% unless inst.data["operation()"].nil? %>
|
|
93
|
-
<% if include_idl %>
|
|
94
80
|
Operation::
|
|
95
81
|
[source,idl,subs="specialchars,macros"]
|
|
96
82
|
----
|
|
97
83
|
<%= inst.fix_entities(inst.operation_ast.gen_adoc) %>
|
|
98
84
|
----
|
|
99
|
-
<% end %>
|
|
100
|
-
<% end %>
|
|
101
|
-
|
|
102
|
-
<% unless inst.data["sail()"].nil? %>
|
|
103
|
-
<% if include_sail %>
|
|
104
|
-
Sail::
|
|
105
|
-
[source,sail]
|
|
106
|
-
----
|
|
107
|
-
<%= inst.fix_entities(inst.data["sail()"]) %>
|
|
108
|
-
----
|
|
109
|
-
<% end %>
|
|
110
85
|
<% end %>
|
|
111
86
|
|
|
112
87
|
Included in::
|
|
@@ -53,27 +53,13 @@ RV64::
|
|
|
53
53
|
|
|
54
54
|
== Execution
|
|
55
55
|
|
|
56
|
-
[tabs]
|
|
57
|
-
====
|
|
58
56
|
<%- if inst.key?("operation()") -%>
|
|
59
|
-
IDL::
|
|
60
|
-
+
|
|
61
57
|
[source,idl,subs="specialchars,macros"]
|
|
62
58
|
----
|
|
63
59
|
<%= inst.fix_entities(inst.operation_ast.gen_adoc) %>
|
|
64
60
|
----
|
|
65
61
|
<%- end -%>
|
|
66
62
|
|
|
67
|
-
<%- if inst.key?("sail()") -%>
|
|
68
|
-
Sail::
|
|
69
|
-
+
|
|
70
|
-
[source,sail]
|
|
71
|
-
----
|
|
72
|
-
<%= inst.fix_entities(inst.data["sail()"]) %>
|
|
73
|
-
----
|
|
74
|
-
<%- end -%>
|
|
75
|
-
====
|
|
76
|
-
|
|
77
63
|
<% exception_list = inst.reachable_exceptions_str(inst.base.nil? ? cfg_arch.param_values["MXLEN"] : inst.base) -%>
|
|
78
64
|
<%- unless exception_list.empty? -%>
|
|
79
65
|
== Exceptions
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: udb-gen
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Derek Hower
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|