#241 Fix Murax/Briey TB timeouts

This commit is contained in:
Dolu1990 2022-04-11 11:59:41 +02:00
parent db34033593
commit 3b8270b82b
3 changed files with 6 additions and 7 deletions

View File

@ -466,8 +466,6 @@ int main(int argc, char **argv, char **env) {
uint64_t duration = timer_end(startedAt);
cout << endl << "****************************************************************" << endl;
cout << "Had simulate " << workspaceCycles << " clock cycles in " << duration*1e-9 << " s (" << workspaceCycles / (duration*1e-9) << " Khz)" << endl;
cout << "****************************************************************" << endl << endl;
exit(0);

View File

@ -127,7 +127,6 @@ public:
class success : public std::exception { };
static uint32_t workspaceCycles = 0;
template <class T> class Workspace{
public:
@ -180,7 +179,7 @@ public:
#endif
}
Workspace* run(uint32_t timeout = 5000){
Workspace* run(double timeout = 1e6){
// init trace dump
#ifdef TRACE
@ -205,6 +204,10 @@ public:
if(p->wakeEnable && p->wakeDelay < delay)
delay = p->wakeDelay;
if(time*timeToSec > timeout){
printf("Simulation timeout triggered (%f)\n", time*timeToSec);
fail();
}
if(delay == ~0l){
fail();
}

View File

@ -54,12 +54,10 @@ int main(int argc, char **argv, char **env) {
printf("BOOT\n");
timespec startedAt = timer_start();
MuraxWorkspace().run(100e6);
MuraxWorkspace().run(1e9);
uint64_t duration = timer_end(startedAt);
cout << endl << "****************************************************************" << endl;
cout << "Had simulate " << workspaceCycles << " clock cycles in " << duration*1e-9 << " s (" << workspaceCycles / (duration*1e-9) << " Khz)" << endl;
cout << "****************************************************************" << endl << endl;
exit(0);