diff options
author | bd <bdunahu@operationnull.com> | 2025-04-19 02:23:03 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-19 02:23:03 -0400 |
commit | da25748edb6997629ffb380683c8c736f24033a8 (patch) | |
tree | c7ffcaccc57afde2235fb53a16679225c06c0ed9 /gui/gui.h | |
parent | f18eac2ac2e5760a4cb81784ad2f23f91b6643d6 (diff) |
Add custom QWidget to keep track of up to 4 user cache ways
Diffstat (limited to 'gui/gui.h')
-rw-r--r-- | gui/gui.h | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -24,10 +24,18 @@ class GUI : public QMainWindow Q_OBJECT public: + /** + * Constructor. + * @return A newly allocated GUI object. + */ GUI(QWidget *parent = nullptr); ~GUI(); - bool is_pipelined = false; - std::vector<int> ways; + + /** + * Uses `func' to set the current status. + * @param a function which returns a string. + */ + void set_status(const std::function<std::string()> &func); signals: void sendRefreshDram(); @@ -82,11 +90,21 @@ class GUI : public QMainWindow */ std::vector<signed int> p; + /** + * The current cache configurations. + */ + std::vector<unsigned int> c; + + /** + * If this stage is pipelined or not. + */ + bool is_pipelined = false; + QThread workerThread; Worker *worker; - QVector<int> step_values = {1, 5, 10, 50, 250, 1000, 10000}; + QVector<int> step_values = {1, 5, 20, 50, 250, 1000, 10000}; const std::map<Mnemonic, QString> mnemonicNameMap = { {Mnemonic::ADD, "ADD"}, {Mnemonic::SUB, "SUB"}, @@ -115,6 +133,5 @@ class GUI : public QMainWindow return (it != mnemonicNameMap.end()) ? it->second : "Unknown"; } - QString make_status(const std::function<std::string()> &func); }; #endif // GUI_H |