From df951d373f309b5f2e7db3942b80d5eca071235f Mon Sep 17 00:00:00 2001 From: Dingyi Zhao Date: Wed, 21 May 2025 12:07:13 +0800 Subject: [PATCH] fix(assignment1): correct switch-case for MPM Class 3 counters --- Exercises/assignment1.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Exercises/assignment1.md b/Exercises/assignment1.md index 999c4a7..9800610 100644 --- a/Exercises/assignment1.md +++ b/Exercises/assignment1.md @@ -42,8 +42,10 @@ Next, you need to add logic to expose these counters in the CSR. In [emulator.cp ```c++ case VX_DCR_MPM_CLASS_3: { // Add your custom counters here for Class 3: - CSR_READ_64(VX_CSR_MPM_TOTAL_ISSUED_WARPS, core_perf.total_issued_warps); - CSR_READ_64(VX_CSR_MPM_TOTAL_ACTIVE_THREADS, core_perf.total_active_threads); + switch (addr) { + CSR_READ_64(VX_CSR_MPM_TOTAL_ISSUED_WARPS, core_perf.total_issued_warps); + CSR_READ_64(VX_CSR_MPM_TOTAL_ACTIVE_THREADS, core_perf.total_active_threads); + } } break; ```