mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
mibuild/sim: avoid updating end at each cycle (simulation speedup)
This commit is contained in:
parent
5ec26a49c3
commit
f4b060f6fe
2 changed files with 2 additions and 2 deletions
|
@ -115,7 +115,6 @@ void sim_tick(struct sim *s)
|
||||||
if (trace)
|
if (trace)
|
||||||
tfp->dump(s->tick);
|
tfp->dump(s->tick);
|
||||||
s->tick++;
|
s->tick++;
|
||||||
s->end = clock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sim_init(struct sim *s)
|
void sim_init(struct sim *s)
|
||||||
|
@ -157,6 +156,7 @@ int main(int argc, char **argv, char **env)
|
||||||
s.run = false;
|
s.run = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
s.end = clock();
|
||||||
|
|
||||||
speed = (s.tick/2)/((s.end-s.start)/CLOCKS_PER_SEC);
|
speed = (s.tick/2)/((s.end-s.start)/CLOCKS_PER_SEC);
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,6 @@ void sim_tick(struct sim *s)
|
||||||
if (trace)
|
if (trace)
|
||||||
tfp->dump(s->tick);
|
tfp->dump(s->tick);
|
||||||
s->tick++;
|
s->tick++;
|
||||||
s->end = clock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sim_init(struct sim *s)
|
void sim_init(struct sim *s)
|
||||||
|
@ -193,6 +192,7 @@ int main(int argc, char **argv, char **env)
|
||||||
s.run = false;
|
s.run = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
s.end = clock();
|
||||||
|
|
||||||
tfp->close();
|
tfp->close();
|
||||||
pthread_cancel(sim_receive_thread);
|
pthread_cancel(sim_receive_thread);
|
||||||
|
|
Loading…
Reference in a new issue