Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeOpenHWGroup committed Jan 31, 2021
2 parents 27b1a0b + e53b8ac commit e8337f4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cv32/tests/programs/custom/hello-world/hello-world.c
Expand Up @@ -27,6 +27,13 @@
#include <stdio.h>
#include <stdlib.h>

#ifdef NO_PULP
#define EXP_MISA 0x40001104
#else
#define EXP_MISA 0x40801104
#endif


int main(int argc, char *argv[])
{
unsigned int misa_rval, mvendorid_rval, marchid_rval, mimpid_rval, mxl;
Expand All @@ -47,8 +54,8 @@ int main(int argc, char *argv[])
}

/* Check MISA CSR: if its zero, it might not be implemented at all */
if (misa_rval != 0x40001104) {
printf("\tERROR: CSR MISA reads as 0x%x - should be 0x40001104 for this release of CV32E40P!\n\n");
if (misa_rval != EXP_MISA) {
printf("\tERROR: CSR MISA reads as 0x%x - should be 0x%x for this release of CV32E40P!\n\n", misa_rval, EXP_MISA);
return EXIT_FAILURE;
}

Expand Down

0 comments on commit e8337f4

Please sign in to comment.