From 4972a27ae92cb24256a324ca66f07bc5b90079f1 Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Wed, 22 Mar 2023 11:06:23 +0100 Subject: [PATCH] More verbose main.cpp on failure, fix C.ADDSP regfile initialisation --- src/test/cpp/regression/main.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/test/cpp/regression/main.cpp b/src/test/cpp/regression/main.cpp index c482adc..35e9cc3 100644 --- a/src/test/cpp/regression/main.cpp +++ b/src/test/cpp/regression/main.cpp @@ -735,8 +735,10 @@ public: masked &= MIP_SSIP; else if (masked & MIP_STIP) masked &= MIP_STIP; - else - fail(); + else { + cout << "CPU model doesn't has pending interrupt" << endl; + fail(); + } } return masked; @@ -1963,6 +1965,7 @@ public: if(*data == 0) pass(); else + cout << "0xF00FFF20 test asked for failure " << *data << endl; fail(); break; case 0xF00FFF24u: @@ -3331,6 +3334,9 @@ public: loadHex(string(REGRESSION_PATH) + "../../resources/hex/" + name + ".elf.hex"); out32.open (name + ".out32"); this->name = name; + if(name == "C.ADDI16SP" || name == "C.ADDI4SPN"){ + top->VexRiscv->RegFilePlugin_regFile[2] = 0; + } } @@ -3370,9 +3376,10 @@ public: fread(log, 1, logSize, logFile); fclose(logFile); - if(refSize > logSize || memcmp(log,ref,refSize)) + if(refSize > logSize || memcmp(log,ref,refSize)){ + cout << "Bad compliance check" << endl; fail(); - else + } else Workspace::pass(); } };