Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft : Added test cases for load address match trigger in sdtrig extension #487

Open
wants to merge 35 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ac1e9a3
Added test cases for load address match trigger in sdtrig extension
anuani21 Sep 3, 2024
16c1028
Merge branch 'dev' into Sdtrig
anuani21 Sep 3, 2024
222b4d6
Updated load test cases and added store, execute test cases with diff…
anuani21 Sep 30, 2024
04b414d
Merge branch 'dev' into Sdtrig
anuani21 Sep 30, 2024
d2e7cd8
updated tests
anuani21 Oct 4, 2024
dbb9090
Merge branch 'Sdtrig' of https://github.com/anuani21/riscv-arch-test …
anuani21 Oct 4, 2024
fc0c35e
Modified test cases
anuani21 Oct 4, 2024
02b07a3
Removed
anuani21 Oct 4, 2024
486cab3
Delete riscv-test-suite/rv32i_m/sdtrig/store_match5.S
anuani21 Oct 4, 2024
66801c4
Delete riscv-test-suite/rv32i_m/sdtrig/execute_match0.S
anuani21 Oct 4, 2024
65c0e80
Delete riscv-test-suite/rv32i_m/sdtrig/execute_match2.S
anuani21 Oct 4, 2024
491877e
Delete riscv-test-suite/rv32i_m/sdtrig/execute_match3.S
anuani21 Oct 4, 2024
c22ab26
Delete riscv-test-suite/rv32i_m/sdtrig/execute_match4.S
anuani21 Oct 4, 2024
c33f0d4
Delete riscv-test-suite/rv32i_m/sdtrig/execute_match5.S
anuani21 Oct 4, 2024
eab99bd
Delete riscv-test-suite/rv32i_m/sdtrig/load_match0.S
anuani21 Oct 4, 2024
0eaefef
Delete riscv-test-suite/rv32i_m/sdtrig/load_match1.S
anuani21 Oct 4, 2024
b401d05
Delete riscv-test-suite/rv32i_m/sdtrig/load_match2.S
anuani21 Oct 4, 2024
16949c0
Delete riscv-test-suite/rv32i_m/sdtrig/load_match3.S
anuani21 Oct 4, 2024
821d960
Delete riscv-test-suite/rv32i_m/sdtrig/load_match4.S
anuani21 Oct 4, 2024
29cc8b1
Delete riscv-test-suite/rv32i_m/sdtrig/load_match5.S
anuani21 Oct 4, 2024
2020acc
Delete riscv-test-suite/rv32i_m/sdtrig/store_match0.S
anuani21 Oct 4, 2024
9d52f76
Delete riscv-test-suite/rv32i_m/sdtrig/store_match1.S
anuani21 Oct 4, 2024
47f0808
Delete riscv-test-suite/rv32i_m/sdtrig/store_match2.S
anuani21 Oct 4, 2024
2198dd5
Delete riscv-test-suite/rv32i_m/sdtrig/store_match3.S
anuani21 Oct 4, 2024
18abd78
Delete riscv-test-suite/rv32i_m/sdtrig/store_match4.S
anuani21 Oct 4, 2024
b3abd20
Delete riscv-test-suite/rv32i_m/sdtrig/src directory
anuani21 Oct 4, 2024
c858b14
Updated test cases for execute,load and store operations
anuani21 Oct 4, 2024
717eaf8
Merge branch 'riscv-non-isa:dev' into Sdtrig
anuani21 Oct 15, 2024
2d0b254
Updated test cases
anuani21 Oct 15, 2024
61b43c4
Icount test cases
anuani21 Nov 1, 2024
8ea168a
Merge branch 'riscv-non-isa:dev' into Sdtrig
anuani21 Nov 1, 2024
a653af7
Merge branch 'dev' into Sdtrig
anuani21 Nov 8, 2024
1a9dee9
Merge branch 'dev' into Sdtrig
anuani21 Nov 14, 2024
be797f2
updated icount test cases in RV32 and RV64
anuani21 Nov 18, 2024
1b0e5d8
Merge branch 'Sdtrig' of https://github.com/anuani21/riscv-arch-test …
anuani21 Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions riscv-test-suite/env/arch_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,42 @@ rvtest_\__MODE__\()end:
// This section defines the required test format spec macros:
// RVTEST_[CODE/DATA/SIG]_[BEGIN/END]
//==============================================================================
#define CHECK_MISA_AND_SETUP_TRIGGERS() \
/* Set mtvec to the address of the trap handler */ \
la a0, trap_handler; \
csrw mtvec, a0; \
/* Read the misa value */ \
csrr t2, misa; \
RVTEST_SIGUPD(x1,t2); \
/* Check if the 18th bit is set in misa */ \
li t1, (1 << 18); \
and t2, t2, t1; \
/* Branch depending on the 18th bit value */ \
bnez t2, implement_mie; \
beqz t2, implement_tcontrol; \
\
/* Implement MIE setup if the 18th bit is set */ \
implement_mie: \
li t1, (1 << 3); /* Set the MIE bit in mstatus */ \
csrw mstatus, t1; \
csrr t4, mstatus; \
j resume_code; \
\
/* Implement tcontrol setup if the 18th bit is not set */ \
implement_tcontrol: \
li t3, (1 << 3); /* Set the TCONTROL bit */ \
csrw tcontrol, t3; \
csrr t4, tcontrol; \
j resume_code; \
\
resume_code: \
/* Write 0 to tselect, read back, and append to the signature */ \
csrw tselect, zero; \
csrr t0, tselect; \
RVTEST_SIGUPD(x1, t0); \
/* Set tdata1 to zero and read it back */ \
csrw tdata1, zero; \
csrr a3, tdata1;


/**************************** CODE BEGIN w/ TRAP HANDLER START *********************/
Expand Down
Loading