diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-04-27 09:12:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-27 09:12:50 -0400 |
commit | 5653b2a033e7a4173d2f178b5ce52384666d3d7b (patch) | |
tree | 5c8fc7282ad1ce0c215786a70b35296645df2a1b /gui/gui.h | |
parent | 3d0133c2f793e82d7519d8e2c5023114cd0f0eab (diff) | |
parent | a4dd1f00a5d0108058fb3bfbd5f399a507792859 (diff) |
Merge pull request #68 from bdunahu/bdunahu
[WIP] Pipeline cleanup and revisited GUI storage display
Diffstat (limited to 'gui/gui.h')
-rw-r--r-- | gui/gui.h | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -18,6 +18,7 @@ #ifndef GUI_H #define GUI_H +#include "storageview.h" #include "worker.h" #include <QFile> #include <QFileDialog> @@ -57,23 +58,20 @@ class GUI : public QMainWindow private slots: void on_worker_refresh_gui(int value, int pc); - void onWorkerFetchInfo(const std::vector<int> info); + void onWorkerFetchInfo(const InstrDTO *); - void onWorkerDecodeInfo(const std::vector<int> info); + void onWorkerDecodeInfo(const InstrDTO *); - void onWorkerExecuteInfo(const std::vector<int> info); + void onWorkerExecuteInfo(const InstrDTO *); - void onWorkerMemoryInfo(const std::vector<int> info); + void onWorkerMemoryInfo(const InstrDTO *); - void onWorkerWriteBackInfo(const std::vector<int> info); + void onWorkerWriteBackInfo(const InstrDTO *); - void onWorkerShowStorage( - const std::vector<std::array<signed int, LINE_SIZE>> data, int i); + void onWorkerShowStorage(const QVector<QVector<int>> &data, int i); void onWorkerShowRegisters(const std::array<int, GPR_NUM> &data); - void onWorkerFinished(); - void on_upload_intructions_btn_clicked(); void on_upload_program_state_btn_clicked(); @@ -101,12 +99,17 @@ class GUI : public QMainWindow /** * Indicates if the program has been initialized. */ - bool ready; + bool ready = false; + + /** + * The current number of cache levels. + */ + int curr_cache_levels = 0; /** * The list of storage displays. */ - std::vector<QTextEdit *> tab_text_boxes; + std::vector<StorageView *> tab_boxes; /** * Whether or not numerical values are currently displaying in hex. @@ -135,7 +138,7 @@ class GUI : public QMainWindow /** * The possible step slider values. */ - QVector<int> step_values = {1, 5, 20, 50, 250, 1000, 10000}; + QVector<int> step_values = {1, 5, 20, 50, 250, 1000, 10000, 100000, 500000, 100000000}; QThread workerThread; |