summaryrefslogtreecommitdiff
path: root/gui/worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gui/worker.cc')
-rw-r--r--gui/worker.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/gui/worker.cc b/gui/worker.cc
index 203f907..22f8738 100644
--- a/gui/worker.cc
+++ b/gui/worker.cc
@@ -69,24 +69,28 @@ void Worker::configure(
delete old;
this->ct_mutex.unlock();
- emit clock_cycles(this->ct->get_clock_cycle(), this->ct->get_pc());
+ this->update();
}
void Worker::runSteps(int steps)
{
- unsigned long i;
-
- this->ct_mutex.lock();
qDebug() << "Running for " << steps << "steps";
this->ct->run_for(steps);
+ this->update();
+}
- // TODO move these to separate functions
+void Worker::update()
+{
+ unsigned long i;
+
+ this->ct_mutex.lock();
emit register_storage(this->ct->get_gprs());
emit storage(this->s.at(0)->view(0, 255), 1);
for (i = 1; i < s.size(); ++i)
- emit storage(this->s.at(i - 1)->view(0, 1 << this->size_inc * i), i + 1);
+ emit storage(
+ this->s.at(i - 1)->view(0, 1 << this->size_inc * i), i + 1);
emit clock_cycles(this->ct->get_clock_cycle(), this->ct->get_pc());
emit if_info(this->if_stage->get_instr());