udb-gen 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92f11f140e0d89cf83792ae8c4b426710967352ba39d226e979b65f1f06fed1c
4
- data.tar.gz: 55d515c69db630f9d1ba0c15fd8271f808a663469ebb998c50d46e15b40402c3
3
+ metadata.gz: b2a353bb670aef38deafd6d245e65a775286c937af330182fc53b35ec802c194
4
+ data.tar.gz: 8f253c3eed448208276fbe90ded81bf636e9da24245a3699b0db835649523d44
5
5
  SHA512:
6
- metadata.gz: 247ac625e6bf5362c903cd39255ec1627cb3caffb535954cf9d69bf0e6afb7171dceaa15a49c2078bbe0d5c59c6a612e22b77db266ba914eb0d3afda702c20be
7
- data.tar.gz: e597dc22ab56635f8ea312a69fee7c9766068ec1a0c6bdeee0c679d4258832b0777af499445a3062aa86b7fc59248a6a3a5a3a1a91f3bd327601ec2196643484
6
+ metadata.gz: d1abc8a7aebfea5496e03da328329a0a5bd87694d859f8c019b7d41b965d00d2362e1de52d8e4f52febc63868c54984bf3db65e780fe1128367180cf355b8218
7
+ data.tar.gz: 5b27425fd8881ace26153e8d57772f93c3736f8be11dc759c275cc2b517bc05c9300b2d6f092910e0a8f17cfc0b1b750a965f9cdf4efbf1212459b2e93b22d85
@@ -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 (ratification date or today).
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.ratification_date.nil? ? Date.today : version.ratification_date
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" }
@@ -5,5 +5,5 @@
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module UdbGen
8
- def self.version = "0.1.1"
8
+ def self.version = "0.1.2"
9
9
  end
@@ -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.1
4
+ version: 0.1.2
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-17 00:00:00.000000000 Z
11
+ date: 2026-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor