error exit

Trigger err_exit module to stop the SystemC simualtion if the data check
fails
This commit is contained in:
Stanislaw Kaushanski 2020-12-30 11:37:06 +01:00
parent 4dbbb73f01
commit 62cdc0c7b9
2 changed files with 3 additions and 0 deletions

Binary file not shown.

View File

@ -42,9 +42,12 @@ bool check_results(int addr, int k) {
bool result = 0;
int step = 500;
double *res_base = (double*) (addr);
int * error_exit = (int *)0xF0000000;
for (int i = 0; i < step; i++) {
if (!double_equals(res_base[i] * ln2, ref_data.at(k + i))) {
printf("XSPN ref %d comparison FAILED\n", k + i);
*error_exit = 0x1;
result = 1;
}
}