summaryrefslogtreecommitdiff
path: root/gui/worker.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-04-21 18:55:26 -0400
committerbd <bdunahu@operationnull.com>2025-04-21 18:55:26 -0400
commitefc4ce2d15aeb54dccf9493c11de9bb8467033c1 (patch)
tree599082f31a76228cdff6c7180ea1a9082f027a39 /gui/worker.cc
parent812a0036787bea3833bdbf2684a706d4a7165cf1 (diff)
Untested multi-cache-view
Diffstat (limited to 'gui/worker.cc')
-rw-r--r--gui/worker.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/gui/worker.cc b/gui/worker.cc
index ba0723e..2f10c7c 100644
--- a/gui/worker.cc
+++ b/gui/worker.cc
@@ -67,21 +67,25 @@ void Worker::configure(
delete old;
this->ct_mutex.unlock();
- std::cout << this->ct->get_clock_cycle() << ":" << this->ct->get_pc() << std::endl;
emit clock_cycles(this->ct->get_clock_cycle(), this->ct->get_pc());
}
void Worker::runSteps(int steps)
{
+ unsigned long i;
+
this->ct_mutex.lock();
qDebug() << "Running for " << steps << "steps";
this->ct->run_for(steps);
+
// TODO move these to separate functions
- emit dram_storage(this->s.back()->view(0, 255));
- if (this->s.size() > 1) {
- emit cache_storage(this->s.at(0)->view(0, 1 << this->size_inc));
- }
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 clock_cycles(this->ct->get_clock_cycle(), this->ct->get_pc());
emit if_info(this->if_stage->stage_info());
emit id_info(this->id_stage->stage_info());