From 4f77c3161128ff965b26f9575853c5347c0d662d Mon Sep 17 00:00:00 2001 From: bd Date: Sun, 27 Apr 2025 17:34:16 -0400 Subject: Basic register display --- gui/worker.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'gui/worker.h') diff --git a/gui/worker.h b/gui/worker.h index 5ffb6ef..2a362a4 100644 --- a/gui/worker.h +++ b/gui/worker.h @@ -64,9 +64,9 @@ class Worker : public QObject signals: void clock_cycles(int value, int pc); - void - storage(QVector> data, int i); - void register_storage(const std::array data); + void storage(QVector> data, int i); + void register_storage( + QVector gprs, QVector> vrs); void if_info(const InstrDTO *); void id_info(const InstrDTO *); void ex_info(const InstrDTO *); @@ -81,8 +81,21 @@ class Worker : public QObject * @param the original data * @return a less universal version of the same thing */ + template QVector> - data_to_QT(std::vector> data); + data_to_QT(const std::vector> &data) + { + QVector> r; + QVector tmp; + + r.reserve(static_cast(data.size())); + + for (const auto &line : data) { + tmp = QVector(line.begin(), line.end()); + r.append(tmp); + } + return r; + } /** * Sets the GUI signals to update the storage, clock cycle, and stage * displays. -- cgit v1.2.3