From 930ec733e988c4996918065b4656f0508c6e2df6 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 28 Apr 2025 18:24:49 -0400 Subject: Fix bug with pipeline blockage, swap DRAM delay to 100 --- gui/gui.cc | 4 ++-- gui/gui.h | 2 +- gui/gui.ui | 2 +- gui/worker.cc | 5 +++-- gui/worker.h | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) (limited to 'gui') diff --git a/gui/gui.cc b/gui/gui.cc index 395c6e6..b86edc1 100644 --- a/gui/gui.cc +++ b/gui/gui.cc @@ -94,7 +94,7 @@ GUI::GUI(QWidget *parent) : QMainWindow(parent), ui(new Ui::GUI) // Update the step button with step amount connect(ui->step_slider, &QSlider::valueChanged, this, [=](int index) { - int value = step_values[index]; + long value = step_values[index]; ui->step_btn->setText(QString("Step %1").arg(value)); }); @@ -268,7 +268,7 @@ void GUI::on_step_btn_clicked() return; this->set_status(get_running, "busy"); - int steps = step_values[ui->step_slider->value()]; + long steps = step_values[ui->step_slider->value()]; emit sendRunSteps(steps); } diff --git a/gui/gui.h b/gui/gui.h index edcde88..6cbdc94 100644 --- a/gui/gui.h +++ b/gui/gui.h @@ -140,7 +140,7 @@ class GUI : public QMainWindow /** * The possible step slider values. */ - QVector step_values = {1, 5, 20, 50, 250, 1000, 10000, 100000, 500000, 100000000}; + QVector step_values = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000}; QThread workerThread; diff --git a/gui/gui.ui b/gui/gui.ui index 5a5a037..52b3505 100644 --- a/gui/gui.ui +++ b/gui/gui.ui @@ -554,7 +554,7 @@ 0 - 9 + 10 1 diff --git a/gui/worker.cc b/gui/worker.cc index a48888c..755c797 100644 --- a/gui/worker.cc +++ b/gui/worker.cc @@ -18,6 +18,7 @@ #include "worker.h" #include "storage.h" #include "util.h" +#include Worker::Worker(QObject *parent) : QObject(parent) {} @@ -49,7 +50,7 @@ void Worker::configure( for (i = ways.size(); i > 0; --i) { s = static_cast(new Cache( s, cache_size_mapper(ways.size() - 1, i - 1), ways.at(i - 1), - CACHE_DELAY + i)); + static_cast(pow(CACHE_DELAY_SCALE, (i - 1))))); this->s.push_front(s); } @@ -68,7 +69,7 @@ void Worker::configure( this->update(); } -void Worker::runSteps(int steps) +void Worker::runSteps(long steps) { this->ct->run_for(steps); this->update(); diff --git a/gui/worker.h b/gui/worker.h index 2a362a4..ad7f162 100644 --- a/gui/worker.h +++ b/gui/worker.h @@ -56,7 +56,7 @@ class Worker : public QObject QMutex &get_ct_mutex() { return ct_mutex; } public slots: - void runSteps(int steps); + void runSteps(long steps); void configure( std::vector ways, std::vector program, -- cgit v1.2.3