summaryrefslogtreecommitdiff
path: root/gui/worker.cc
diff options
context:
space:
mode:
authorSiddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com>2025-04-21 19:59:56 -0400
committerGitHub <noreply@github.com>2025-04-21 19:59:56 -0400
commit1250359dfcbcad18c0a1078290f95479aa23e26a (patch)
treec53fa2bfd360a3bdcfbb2a4c6029e454d91456e1 /gui/worker.cc
parent282e2644ef0470133184fdf9900cf2565ec5332b (diff)
parent98b9786ccab6fdee37a779fdd55b58176abf12d9 (diff)
Merge pull request #58 from bdunahu/bdunahu
[WIP] Add tab bar, multi-level cache display
Diffstat (limited to 'gui/worker.cc')
-rw-r--r--gui/worker.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/gui/worker.cc b/gui/worker.cc
index ba0723e..2652fce 100644
--- a/gui/worker.cc
+++ b/gui/worker.cc
@@ -38,6 +38,8 @@ void Worker::configure(
Stage *old;
int i;
+ this->s.clear();
+
this->ct_mutex.lock();
if (ways.size() != 0) {
// TODO optimal proper sizes
@@ -67,21 +69,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());