Skip to content

Commit 2c20ae5

Browse files
committed
Add Xqciu v0.3, renamed it to Xqci, renamed instructions to comply with toolchain conventions
Signed-off-by: Albert Yosher <[email protected]>
1 parent de3c63f commit 2c20ae5

File tree

179 files changed

+1201
-1100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+1201
-1100
lines changed

backends/arch_gen/lib/arch_gen.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,10 @@ def maybe_add_ext(ext_name)
702702

703703
merged_path = gen_merged_def(:ext, arch_path, arch_overlay_path)
704704

705-
ext_obj = YAML.load_file(merged_path)[ext_name]
705+
yaml_contents = YAML.load_file(merged_path)
706+
raise "In #{merged_path}, key does not match file name" unless yaml_contents.key?(ext_name)
707+
708+
ext_obj = yaml_contents[ext_name]
706709
ext_obj["name"] = ext_name
707710

708711
@implied_ext_map ||= {}

backends/ext_pdf_doc/templates/ext_pdf.adoc.erb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ Copyright <%= ext_version["ratification_date"].nil? ? Date.today.year : ext_vers
132132
Contributors to version <%= version["version"] %> of the specification (in alphabetical order) include: +
133133

134134
<%- version["contributors"].sort { |a, b| a["name"].split(" ").last <=> b["name"].split(" ").last }.each do |c| -%>
135-
* <%= c["name"] %> <<%= c["email"] %>> (<%= c["company"] %>)
135+
* <%= c["name"] %> <<%= c["email"] %>> (<%= c["company"] %>)
136+
136137
<%- end -%>
137138
<%- end -%>
138139

@@ -419,8 +420,14 @@ RV64::
419420
Description::
420421
<%= i.description %>
421422

423+
422424
Decode Variables::
423425

426+
<%- if i.multi_encoding? ? (i.decode_variables(32).empty? && i.decode_variables(64).empty?) : i.decode_variables(i.base.nil? ? 64 : i.base).empty? -%>
427+
428+
<%= i.name %> has no decode variables.
429+
430+
<%- else -%>
424431
<%- if i.multi_encoding? -%>
425432
RV32::
426433
+
@@ -446,7 +453,8 @@ RV64::
446453
<%= d.sext? ? 'signed ' : '' %>Bits<<%= d.size %>> <%= d.name %> = <%= d.extract %>;
447454
<%- end -%>
448455
----
449-
<%- end -%>
456+
<%- end # if multi_encoding? -%>
457+
<%- end # if no decode variables-%>
450458
451459
Operation::
452460
[source,idl,subs="specialchars,macros"]
@@ -491,4 +499,4 @@ h| Arguments l| <%= f.arguments_list_str.join (', ') %>
491499
----
492500
<%- end -%>
493501
494-
<%- end -%>
502+
<%- end -%>

cfgs/qc_iu/arch_overlay/csr/Xqciu/gen_mcliciX.rb renamed to cfgs/qc_iu/arch_overlay/csr/Xqci/gen_mcliciX.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
pend_template = <<~YAML
55
# yaml-language-server: $schema=../../../../../schemas/csr_schema.json
66
7-
mclicip<%= num %>:
7+
qc.mclicip<%= num %>:
88
long_name: IRQ Pending <%= num %>
99
address: 0x<%= (0x7f0 + num).to_s(16) %>
1010
length: 32
1111
priv_mode: M
12-
definedBy: Xqciu
12+
definedBy: Xqci
1313
description: |
1414
Pending bits for IRQs <%= num*32 %>-<%= (num + 1)*32 - 1 %>
1515
fields:
@@ -18,19 +18,19 @@
1818
type: RW
1919
reset_value: 0
2020
location: <%= i %>
21-
description: IRQ<%= num*32 + 1 %> pending
21+
description: IRQ<%= num*32 + i %> pending
2222
<%- end -%>
2323
YAML
2424

2525
en_template = <<~YAML
2626
# yaml-language-server: $schema=../../../../../schemas/csr_schema.json
2727
28-
mclicie<%= num %>:
28+
qc.mclicie<%= num %>:
2929
long_name: IRQ Enable <%= num %>
3030
address: 0x<%= (0x7f0 + num).to_s(16) %>
3131
length: 32
3232
priv_mode: M
33-
definedBy: Xqciu
33+
definedBy: Xqci
3434
description: |
3535
Enable bits for IRQs <%= num*32 %>-<%= (num + 1)*32 - 1 %>
3636
fields:
@@ -39,18 +39,18 @@
3939
type: RW
4040
reset_value: 0
4141
location: <%= i %>
42-
description: IRQ<%= num*32 + 1 %> enabled
42+
description: IRQ<%= num*32 + i %> enabled
4343
<%- end -%>
4444
YAML
4545

4646
root = File.dirname(__FILE__)
4747

4848
erb = ERB.new(pend_template, trim_mode: '-')
4949
8.times do |num|
50-
File.write("#{root}/mclicip#{num}.yaml", erb.result(binding))
50+
File.write("#{root}/qc.mclicip#{num}.yaml", erb.result(binding))
5151
end
5252

5353
erb = ERB.new(en_template, trim_mode: '-')
5454
8.times do |num|
55-
File.write("#{root}/mclicie#{num}.yaml", erb.result(binding))
55+
File.write("#{root}/qc.mclicie#{num}.yaml", erb.result(binding))
5656
end
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# yaml-language-server: $schema=../../../../../schemas/csr_schema.json
22

3-
mclicie0:
3+
qc.mclicie0:
44
long_name: IRQ Enable 0
55
address: 0x7f0
66
length: 32
77
priv_mode: M
8-
definedBy: Xqciu
8+
definedBy: Xqci
99
description: |
1010
Enable bits for IRQs 0-31
1111
fields:
1212
IRQ0:
1313
type: RW
1414
reset_value: 0
1515
location: 0
16-
description: IRQ1 enabled
16+
description: IRQ0 enabled
1717
IRQ1:
1818
type: RW
1919
reset_value: 0
@@ -23,149 +23,149 @@ mclicie0:
2323
type: RW
2424
reset_value: 0
2525
location: 2
26-
description: IRQ1 enabled
26+
description: IRQ2 enabled
2727
IRQ3:
2828
type: RW
2929
reset_value: 0
3030
location: 3
31-
description: IRQ1 enabled
31+
description: IRQ3 enabled
3232
IRQ4:
3333
type: RW
3434
reset_value: 0
3535
location: 4
36-
description: IRQ1 enabled
36+
description: IRQ4 enabled
3737
IRQ5:
3838
type: RW
3939
reset_value: 0
4040
location: 5
41-
description: IRQ1 enabled
41+
description: IRQ5 enabled
4242
IRQ6:
4343
type: RW
4444
reset_value: 0
4545
location: 6
46-
description: IRQ1 enabled
46+
description: IRQ6 enabled
4747
IRQ7:
4848
type: RW
4949
reset_value: 0
5050
location: 7
51-
description: IRQ1 enabled
51+
description: IRQ7 enabled
5252
IRQ8:
5353
type: RW
5454
reset_value: 0
5555
location: 8
56-
description: IRQ1 enabled
56+
description: IRQ8 enabled
5757
IRQ9:
5858
type: RW
5959
reset_value: 0
6060
location: 9
61-
description: IRQ1 enabled
61+
description: IRQ9 enabled
6262
IRQ10:
6363
type: RW
6464
reset_value: 0
6565
location: 10
66-
description: IRQ1 enabled
66+
description: IRQ10 enabled
6767
IRQ11:
6868
type: RW
6969
reset_value: 0
7070
location: 11
71-
description: IRQ1 enabled
71+
description: IRQ11 enabled
7272
IRQ12:
7373
type: RW
7474
reset_value: 0
7575
location: 12
76-
description: IRQ1 enabled
76+
description: IRQ12 enabled
7777
IRQ13:
7878
type: RW
7979
reset_value: 0
8080
location: 13
81-
description: IRQ1 enabled
81+
description: IRQ13 enabled
8282
IRQ14:
8383
type: RW
8484
reset_value: 0
8585
location: 14
86-
description: IRQ1 enabled
86+
description: IRQ14 enabled
8787
IRQ15:
8888
type: RW
8989
reset_value: 0
9090
location: 15
91-
description: IRQ1 enabled
91+
description: IRQ15 enabled
9292
IRQ16:
9393
type: RW
9494
reset_value: 0
9595
location: 16
96-
description: IRQ1 enabled
96+
description: IRQ16 enabled
9797
IRQ17:
9898
type: RW
9999
reset_value: 0
100100
location: 17
101-
description: IRQ1 enabled
101+
description: IRQ17 enabled
102102
IRQ18:
103103
type: RW
104104
reset_value: 0
105105
location: 18
106-
description: IRQ1 enabled
106+
description: IRQ18 enabled
107107
IRQ19:
108108
type: RW
109109
reset_value: 0
110110
location: 19
111-
description: IRQ1 enabled
111+
description: IRQ19 enabled
112112
IRQ20:
113113
type: RW
114114
reset_value: 0
115115
location: 20
116-
description: IRQ1 enabled
116+
description: IRQ20 enabled
117117
IRQ21:
118118
type: RW
119119
reset_value: 0
120120
location: 21
121-
description: IRQ1 enabled
121+
description: IRQ21 enabled
122122
IRQ22:
123123
type: RW
124124
reset_value: 0
125125
location: 22
126-
description: IRQ1 enabled
126+
description: IRQ22 enabled
127127
IRQ23:
128128
type: RW
129129
reset_value: 0
130130
location: 23
131-
description: IRQ1 enabled
131+
description: IRQ23 enabled
132132
IRQ24:
133133
type: RW
134134
reset_value: 0
135135
location: 24
136-
description: IRQ1 enabled
136+
description: IRQ24 enabled
137137
IRQ25:
138138
type: RW
139139
reset_value: 0
140140
location: 25
141-
description: IRQ1 enabled
141+
description: IRQ25 enabled
142142
IRQ26:
143143
type: RW
144144
reset_value: 0
145145
location: 26
146-
description: IRQ1 enabled
146+
description: IRQ26 enabled
147147
IRQ27:
148148
type: RW
149149
reset_value: 0
150150
location: 27
151-
description: IRQ1 enabled
151+
description: IRQ27 enabled
152152
IRQ28:
153153
type: RW
154154
reset_value: 0
155155
location: 28
156-
description: IRQ1 enabled
156+
description: IRQ28 enabled
157157
IRQ29:
158158
type: RW
159159
reset_value: 0
160160
location: 29
161-
description: IRQ1 enabled
161+
description: IRQ29 enabled
162162
IRQ30:
163163
type: RW
164164
reset_value: 0
165165
location: 30
166-
description: IRQ1 enabled
166+
description: IRQ30 enabled
167167
IRQ31:
168168
type: RW
169169
reset_value: 0
170170
location: 31
171-
description: IRQ1 enabled
171+
description: IRQ31 enabled

0 commit comments

Comments
 (0)