summaryrefslogtreecommitdiff
path: root/gui/worker.h
diff options
context:
space:
mode:
authorSiddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com>2025-04-27 09:12:50 -0400
committerGitHub <noreply@github.com>2025-04-27 09:12:50 -0400
commit5653b2a033e7a4173d2f178b5ce52384666d3d7b (patch)
tree5c8fc7282ad1ce0c215786a70b35296645df2a1b /gui/worker.h
parent3d0133c2f793e82d7519d8e2c5023114cd0f0eab (diff)
parenta4dd1f00a5d0108058fb3bfbd5f399a507792859 (diff)
Merge pull request #68 from bdunahu/bdunahu
[WIP] Pipeline cleanup and revisited GUI storage display
Diffstat (limited to 'gui/worker.h')
-rw-r--r--gui/worker.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/gui/worker.h b/gui/worker.h
index 95c81d5..c62f4ed 100644
--- a/gui/worker.h
+++ b/gui/worker.h
@@ -50,11 +50,6 @@ class Worker : public QObject
Controller *ct = nullptr;
QMutex ct_mutex;
- /**
- * The size each progressive cache level increases by.
- */
- unsigned int size_inc;
-
public:
explicit Worker(QObject *parent = nullptr);
~Worker();
@@ -70,14 +65,28 @@ class Worker : public QObject
signals:
void clock_cycles(int value, int pc);
void
- storage(const std::vector<std::array<signed int, LINE_SIZE>> data, int i);
+ storage(QVector<QVector<int>> data, int i);
void register_storage(const std::array<int, GPR_NUM> data);
- void if_info(const std::vector<int> info);
- void id_info(const std::vector<int> info);
- void ex_info(const std::vector<int> info);
- void mm_info(const std::vector<int> info);
- void wb_info(const std::vector<int> info);
+ void if_info(const InstrDTO *);
+ void id_info(const InstrDTO *);
+ void ex_info(const InstrDTO *);
+ void mm_info(const InstrDTO *);
+ void wb_info(const InstrDTO *);
void finished();
+
+ private:
+ /**
+ * Converts a vector of arrays into a QVector of QVectors.
+ * @param the original data
+ * @return a less universal version of the same thing
+ */
+ QVector<QVector<int>>
+ data_to_QT(std::vector<std::array<signed int, LINE_SIZE>> data);
+ /**
+ * Sets the GUI signals to update the storage, clock cycle, and stage
+ * displays.
+ */
+ void update();
};
#endif // WORKER_H