Not Scott's fault, I mean
{
}
-void htif_isasim_t::tick()
+bool htif_isasim_t::tick()
{
+ if (done())
+ return false;
+
do tick_once(); while (reset);
+
+ return true;
}
void htif_isasim_t::tick_once()
{
public:
htif_isasim_t(sim_t* _sim, const std::vector<std::string>& args);
- void tick();
- bool done();
+ bool tick();
private:
sim_t* sim;
uint8_t seqno;
void tick_once();
+ bool done();
};
#endif
void sim_t::run()
{
- while (!htif->done())
+ while (htif->tick())
{
- htif->tick();
if (debug || ctrlc_pressed)
interactive();
else
void sim_t::stop()
{
procs[0]->state.tohost = 1;
- while (!htif->done())
- htif->tick();
+ while (htif->tick())
+ ;
}