Skip to content

Commit e23b48d

Browse files
author
Derek Hower
committed
iss build clean
1 parent 419011f commit e23b48d

Some content is hidden

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

51 files changed

+1089
-695
lines changed

Rakefile

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# frozen_string_literal: true
22

3+
$jobs = ENV["JOBS"].nil? ? 1 : ENV["JOBS"].to_i
4+
Rake.application.options.thread_pool_size = $jobs
5+
puts "Running with #{Rake.application.options.thread_pool_size} job(s)"
6+
37
require "etc"
48

59
$root = Pathname.new(__FILE__).dirname.realpath
@@ -20,17 +24,21 @@ end
2024
directory "#{$root}/.stamps"
2125

2226
def cfg_arch_for(config_name)
23-
Rake::Task["#{$root}/.stamps/resolve-#{config_name}.stamp"].invoke
27+
$cfg_arch_for_mutex ||= Thread::Mutex.new
28+
29+
$cfg_arch_for_mutex.synchronize do
30+
Rake::Task["#{$root}/.stamps/resolve-#{config_name}.stamp"].invoke
2431

25-
@cfg_archs ||= {}
26-
return @cfg_archs[config_name] if @cfg_archs.key?(config_name)
32+
$cfg_archs ||= {}
33+
return $cfg_archs[config_name] if $cfg_archs.key?(config_name)
2734

28-
@cfg_archs[config_name] =
29-
ConfiguredArchitecture.new(
30-
config_name,
31-
$root / "gen" / "resolved_arch" / config_name,
32-
overlay_path: $root / "cfgs" / config_name / "arch_overlay"
33-
)
35+
$cfg_archs[config_name] =
36+
ConfiguredArchitecture.new(
37+
config_name,
38+
$root / "gen" / "resolved_arch" / config_name,
39+
overlay_path: $root / "cfgs" / config_name / "arch_overlay"
40+
)
41+
end
3442
end
3543

3644
namespace :gen do

arch/csr/misa.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ fields:
118118
type(): |
119119
return (implemented?(ExtensionName::H) && MUTABLE_MISA_H) ? CsrFieldType::RW : CsrFieldType::RO;
120120
definedBy: H
121-
reset_value: 1
121+
reset_value(): |
122+
return implemented?(ExtensionName::H) ? 1 : 0;
122123
I:
123124
location: 8
124125
description: |

arch/inst/C/c.fld.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ description: |
1010
to the base address in register rs1.
1111
It expands to `fld` `rd, offset(rs1)`.
1212
definedBy:
13-
allOf:
14-
- C
15-
- D
13+
anyOf:
14+
- allOf:
15+
- C
16+
- D
17+
- Zcd
1618
base: 32
1719
assembly: xd, imm(xs1)
1820
encoding:

arch/inst/C/c.fldsp.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ description: |
1010
to the stack pointer, x2.
1111
It expands to `fld` `rd, offset(x2)`.
1212
definedBy:
13-
allOf:
14-
- C
15-
- D
13+
anyOf:
14+
- allOf:
15+
- C
16+
- D
17+
- Zcd
1618
assembly: fd, imm(sp)
1719
encoding:
1820
match: 001-----------10

arch/inst/C/c.fsd.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ description: |
1010
to the base address in register rs1.
1111
It expands to `fsd` `rs2, offset(rs1)`.
1212
definedBy:
13-
allOf:
14-
- C
15-
- D
13+
anyOf:
14+
- allOf:
15+
- C
16+
- D
17+
- Zcd
1618
assembly: xs2, imm(xs1)
1719
encoding:
1820
match: 101-----------00

arch/inst/C/c.fsdsp.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ description: |
1010
to the stack pointer, x2.
1111
It expands to `fsd` `rs2, offset(x2)`.
1212
definedBy:
13-
allOf:
14-
- C
15-
- D
13+
anyOf:
14+
- allOf:
15+
- C
16+
- D
17+
- Zcd
1618
assembly: fs2, imm(sp)
1719
encoding:
1820
match: 101-----------10

arch/inst/C/c.slli.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,22 @@ definedBy:
1313
- Zca
1414
assembly: xd, shamt
1515
encoding:
16-
match: 000-----------10
17-
variables:
18-
- name: shamt
19-
location: 12|6-2
20-
- name: rd
21-
location: 11-7
22-
not: 0
16+
RV32:
17+
match: 0000----------10
18+
variables:
19+
- name: shamt
20+
location: 6-2
21+
- name: rd
22+
location: 11-7
23+
not: 0
24+
RV64:
25+
match: 000-----------10
26+
variables:
27+
- name: shamt
28+
location: 12|6-2
29+
- name: rd
30+
location: 11-7
31+
not: 0
2332
access:
2433
s: always
2534
u: always

arch/inst/C/c.srai.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,20 @@ definedBy:
1414
- Zca
1515
assembly: xd, shamt
1616
encoding:
17-
match: 100-01--------01
18-
variables:
19-
- name: shamt
20-
location: 12|6-2
21-
- name: rd
22-
location: 9-7
17+
RV32:
18+
match: 100001--------01
19+
variables:
20+
- name: shamt
21+
location: 6-2
22+
- name: rd
23+
location: 9-7
24+
RV64:
25+
match: 100-01--------01
26+
variables:
27+
- name: shamt
28+
location: 12|6-2
29+
- name: rd
30+
location: 9-7
2331
access:
2432
s: always
2533
u: always

arch/inst/C/c.srli.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,20 @@ definedBy:
1414
- Zca
1515
assembly: xd, shamt
1616
encoding:
17-
match: 100-00--------01
18-
variables:
19-
- name: shamt
20-
location: 12|6-2
21-
- name: rd
22-
location: 9-7
17+
RV32:
18+
match: 100000--------01
19+
variables:
20+
- name: shamt
21+
location: 6-2
22+
- name: rd
23+
location: 9-7
24+
RV64:
25+
match: 100-00--------01
26+
variables:
27+
- name: shamt
28+
location: 12|6-2
29+
- name: rd
30+
location: 9-7
2331
access:
2432
s: always
2533
u: always

arch/isa/globals.isa

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,8 +1151,10 @@ function access_check {
11511151
}
11521152

11531153
# check PMP
1154-
if (!pmp_check<access_size>(paddr[PHYS_ADDR_WIDTH-1:0], type)) {
1155-
raise(fault_type, from_mode, vaddr);
1154+
if (implemented?(ExtensionName::Smpmp)) {
1155+
if (!pmp_check<access_size>(paddr[PHYS_ADDR_WIDTH-1:0], type)) {
1156+
raise(fault_type, from_mode, vaddr);
1157+
}
11561158
}
11571159
}
11581160
}

0 commit comments

Comments
 (0)