Skip to content

Commit 34d0c72

Browse files
authored
Draft: Add m/s-mode CLIC interrupt testcases
This is a draft version of the m-mode (Smclic), s-mode (Ssclic) CLIC interrupt testcases using clint MSW and MTIMER macros. Note: pulls are not yet available for spike or sail that support CLIC but these testcases should help enable their development. This pull requires: riscv-software-src/riscv-config#169, riscv-software-src/riscof#106 riscv-software-src/riscv-isa-sim#1596 To include m-mode CLIC interrupt tests in riscof testlist flow, add Smclic to riscof yaml file, e.g.: spike/spike_isa.yaml: ISA: RV32IMCZicsr_Zifencei_Smclic To include s-mode CLIC interrupt tests in riscof testlist flow, add Ssclic to riscof yaml file, e.g.: spike/spike_isa.yaml: ISA: RV32IMCZicsr_Zifencei_Ssclic Signed-off-by: Dan Smathers <[email protected]>
1 parent 547805c commit 34d0c72

File tree

2 files changed

+150
-0
lines changed

2 files changed

+150
-0
lines changed

coverage/rvi_smclic.cgf

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
clicdirect-01:
2+
config:
3+
- check ISA:=regex(.*I.*Zicsr.*Smclic.*); def rvtest_mtrap_routine=True
4+
csr_comb:
5+
mcause >> (xlen-1) == 1: 0
6+
7+
cliclevel-01:
8+
config:
9+
- check ISA:=regex(.*I.*Zicsr.*Smclic.*); def rvtest_mtrap_routine=True
10+
csr_comb:
11+
mcause >> (xlen-1) == 1: 0
12+
13+
cliclevel-02:
14+
config:
15+
- check ISA:=regex(.*I.*Zicsr.*Smclic.*); def rvtest_mtrap_routine=True
16+
csr_comb:
17+
mcause >> (xlen-1) == 1: 0
18+
19+
cliclevel-03:
20+
config:
21+
- check ISA:=regex(.*I.*Zicsr.*Smclic.*); def rvtest_mtrap_routine=True
22+
csr_comb:
23+
mcause >> (xlen-1) == 1: 0
24+
25+
cliclevel-04:
26+
config:
27+
- check ISA:=regex(.*I.*Zicsr.*Smclic.*); def rvtest_mtrap_routine=True
28+
csr_comb:
29+
mcause >> (xlen-1) == 1: 0
30+
31+
clicnomint-01:
32+
config:
33+
- check ISA:=regex(.*I.*Zicsr.*Smclic.*); def rvtest_mtrap_routine=True
34+
csr_comb:
35+
mcause >> (xlen-1) == 0: 0
36+
37+
clicnomint-02:
38+
config:
39+
- check ISA:=regex(.*I.*Zicsr.*Smclic.*); def rvtest_mtrap_routine=True
40+
csr_comb:
41+
mcause >> (xlen-1) == 0: 0
42+
43+
clicnomint-03:
44+
config:
45+
- check ISA:=regex(.*I.*Zicsr.*Smclic.*); def rvtest_mtrap_routine=True
46+
csr_comb:
47+
mcause >> (xlen-1) == 0: 0
48+
49+
clicwfi-01:
50+
config:
51+
- check ISA:=regex(.*I.*Zicsr.*Smclic.*); def rvtest_mtrap_routine=True
52+
csr_comb:
53+
mcause >> (xlen-1) == 1: 0
54+

coverage/rvi_ssclic.cgf

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
sclicdeleg-01:
2+
config:
3+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
4+
csr_comb:
5+
mcause >> (xlen-1) == 1: 0
6+
7+
sclicmdisable-01:
8+
config:
9+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
10+
csr_comb:
11+
mcause >> (xlen-1) == 0: 0
12+
13+
sclicmdisable-02:
14+
config:
15+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
16+
csr_comb:
17+
mcause >> (xlen-1) == 0: 0
18+
19+
sclicmdisable-03:
20+
config:
21+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
22+
csr_comb:
23+
mcause >> (xlen-1) == 0: 0
24+
25+
sclicnodeleg-01:
26+
config:
27+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
28+
csr_comb:
29+
mcause >> (xlen-1) == 1: 0
30+
31+
sclicorder-01:
32+
config:
33+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
34+
csr_comb:
35+
mcause >> (xlen-1) == 1: 0
36+
37+
sclicorder-02:
38+
config:
39+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
40+
csr_comb:
41+
mcause >> (xlen-1) == 1: 0
42+
43+
sclicorder-03:
44+
config:
45+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
46+
csr_comb:
47+
mcause >> (xlen-1) == 1: 0
48+
49+
sclicorder-04:
50+
config:
51+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
52+
csr_comb:
53+
mcause >> (xlen-1) == 1: 0
54+
55+
sclicprivorder-01:
56+
config:
57+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
58+
csr_comb:
59+
mcause >> (xlen-1) == 1: 0
60+
61+
sclicprivorder-02:
62+
config:
63+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
64+
csr_comb:
65+
mcause >> (xlen-1) == 1: 0
66+
67+
sclicprivorder-03:
68+
config:
69+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
70+
csr_comb:
71+
mcause >> (xlen-1) == 1: 0
72+
73+
sclicsdisable-01:
74+
config:
75+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
76+
csr_comb:
77+
mcause >> (xlen-1) == 0: 0
78+
79+
sclicsdisable-02:
80+
config:
81+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
82+
csr_comb:
83+
mcause >> (xlen-1) == 0: 0
84+
85+
sclicsdisable-03:
86+
config:
87+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
88+
csr_comb:
89+
mcause >> (xlen-1) == 0: 0
90+
91+
sclicwfi-01:
92+
config:
93+
- check ISA:=regex(.*I.*Zicsr.*Ssclic.*); def rvtest_mtrap_routine=True
94+
csr_comb:
95+
mcause >> (xlen-1) == 1: 0
96+

0 commit comments

Comments
 (0)