Skip to content

Commit

Permalink
[cheshire] Make collateral variables volatile
Browse files Browse the repository at this point in the history
  • Loading branch information
mp-17 committed Jan 13, 2025
1 parent 91645e5 commit da22938
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cheshire/sw/include/rvv_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ volatile uint32_t *rf_mmu_req_gen_lat = reg32(&__base_regs, CHESHIRE_MMU_REQ_GEN
// RVV Tests //
///////////////

// Helper test variables
typedef uint64_t vcsr_dump_t [5];
volatile uint64_t exception;
volatile uint64_t mtval;
volatile uint64_t mcause;
volatile uint64_t magic_out;
// Return counter to ease debug
volatile uint64_t ret_cnt;

#if (PRINTF == 1)
#define FAIL { printf("FAIL. retval: \d\n", ret_cnt + 1); return ret_cnt + 1; }
#else
Expand Down Expand Up @@ -163,15 +172,6 @@ volatile uint32_t *rf_mmu_req_gen_lat = reg32(&__base_regs, CHESHIRE_MMU_REQ_GEN
#define RVV_TEST_AVL(EEW) (VLMAX / (EEW))
#endif

// Helper test variables
typedef uint64_t vcsr_dump_t [5];
uint64_t exception;
uint64_t mtval;
uint64_t mcause;
uint64_t magic_out;
// Return counter to ease debug
uint64_t ret_cnt;

void enable_rvv() {
// Enalbe RVV by seting MSTATUS.VS
asm volatile (" li t0, %0 " :: "i"(MSTATUS_VS));
Expand Down

0 comments on commit da22938

Please sign in to comment.