From efc4ce2d15aeb54dccf9493c11de9bb8467033c1 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 21 Apr 2025 18:55:26 -0400 Subject: Untested multi-cache-view --- gui/gui.h | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) (limited to 'gui/gui.h') diff --git a/gui/gui.h b/gui/gui.h index 0b10145..cf31142 100644 --- a/gui/gui.h +++ b/gui/gui.h @@ -48,15 +48,6 @@ class GUI : public QMainWindow GUI(QWidget *parent = nullptr); ~GUI(); - /** - * Uses `func' to set the current status. - * @param a function which returns a string. - * @param a path to the desired avatar - */ - void set_status( - const std::function &func, - const QString &img = "idle.png"); - signals: void hex_toggled(bool is_hex); void sendRunSteps(int steps); @@ -76,11 +67,8 @@ class GUI : public QMainWindow void onWorkerWriteBackInfo(const std::vector info); - void - onWorkerShowDram(const std::vector> data); - - void onWorkerShowCache( - const std::vector> data); + void onWorkerShowStorage( + const std::vector> data, int i); void onWorkerShowRegisters(const std::array &data); @@ -93,8 +81,7 @@ class GUI : public QMainWindow void on_enable_pipeline_checkbox_checkStateChanged(const Qt::CheckState &arg1); - void - on_base_toggle_checkbox_checkStateChanged(const Qt::CheckState &state); + void on_base_toggle_checkbox_checkStateChanged(const Qt::CheckState &state); void on_step_btn_clicked(); @@ -116,6 +103,11 @@ class GUI : public QMainWindow */ bool ready; + /** + * The list of storage displays. + */ + std::vector tab_text_boxes; + /** * Whether or not numerical values are currently displaying in hex. */ @@ -132,12 +124,11 @@ class GUI : public QMainWindow QLabel *avatar; /** - * The currently loaded program. + * The next simulation's program. */ std::vector p; - /** - * If this stage is pipelined or not. + * If the next initialized simulation is pipelined or not. */ bool is_pipelined = true; @@ -176,5 +167,21 @@ class GUI : public QMainWindow auto it = mnemonicNameMap.find(mnemonic); return (it != mnemonicNameMap.end()) ? it->second : "Unknown"; } + + /** + * Helper for 'on_config_clicked'. + * Initialized the tab component with enough views for the simulation's + * storage devices. + * @param the number of tabs required to show registers, DRAM, and cache. + */ + void make_tabs(int num); + /** + * Uses `func' to set the current status. + * @param a function which returns a string. + * @param a path to the desired avatar + */ + void set_status( + const std::function &func, + const QString &img = "idle.png"); }; #endif // GUI_H -- cgit v1.2.3