also added tolerance check for patwaittime
Build on RHEL9 docker image / build (push) Failing after 3m34s
Build on RHEL8 docker image / build (push) Failing after 4m49s
Run Simulator Tests on local RHEL9 / build (push) Successful in 17m55s
Run Simulator Tests on local RHEL8 / build (push) Successful in 20m27s

This commit is contained in:
2026-04-24 15:07:49 +02:00
parent 795668be8a
commit bd77ea231b
2 changed files with 31 additions and 3 deletions
@@ -342,7 +342,23 @@ int validate_setPatternWaitClocksAndInterval(char *message, int level,
char mode[128];
memset(mode, 0, sizeof(mode));
sprintf(mode, "set pattern Loop %d wait time", level);
validate64(&ret, message, waittime, retval, mode, DEC);
if (clocks) {
validate64(&ret, message, waittime, retval, mode, DEC);
} else {
#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD)
int runclk = 0;
runclk = clkFrequency[RUN_CLK];
int64_t toleranceNs = 3 * (1000000000 / runclk);
int64_t diff = (int64_t)waittime - (int64_t)retval;
if (diff < -toleranceNs || diff > toleranceNs) {
validate64(&ret, message, waittime, retval, mode, DEC);
}
#else
validate64(&ret, message, waittime, retval, mode, DEC);
#endif
}
return ret;
}
@@ -10902,8 +10902,20 @@ int set_pattern_wait_interval(int file_des) {
uint64_t retval = 0;
ret = validate_getPatternWaitClocksAndInterval(mess, loopLevel,
&retval, 0);
validate64(&ret, mess, (int64_t)timeval, retval,
"set pattern wait interval", DEC);
if (ret == OK) { // is this not already validated ? why do this again here ?
#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD)
int runclk = getFrequency(RUN_CLK);
int64_t toleranceNs = 3 * (1000000000 / runclk);
int64_t diff = (int64_t)timeval - (int64_t)retval;
if (diff < -toleranceNs || diff > toleranceNs) {
validate64(&ret, mess, (int64_t)timeval, retval,
"set pattern wait interval", DEC);
}
#else
validate64(&ret, mess, (int64_t)timeval, retval,
"set pattern wait interval", DEC);
#endif
}
}
}