diff options
Diffstat (limited to 'v')
-rw-r--r-- | v/riscv_test.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/v/riscv_test.h b/v/riscv_test.h index e39123c..f56c022 100644 --- a/v/riscv_test.h +++ b/v/riscv_test.h @@ -59,8 +59,12 @@ userstart: \ // Supervisor mode definitions and macros //----------------------------------------------------------------------- -#define MAX_TEST_PAGES 63 // this must be the period of the LFSR below -#define LFSR_NEXT(x) (((((x)^((x)>>1)) & 1) << 5) | ((x) >> 1)) +#ifndef LFSR_BITS +#define LFSR_BITS 6 +#endif + +#define MAX_TEST_PAGES ((1 << LFSR_BITS)-1) // this must be the period of the LFSR below +#define LFSR_NEXT(x) (((((x)^((x)>>1)) & 1) << (LFSR_BITS-1)) | ((x) >> 1)) #define PGSHIFT 12 #define PGSIZE (1UL << PGSHIFT) |