diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-04-21 19:59:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-21 19:59:56 -0400 |
commit | 1250359dfcbcad18c0a1078290f95479aa23e26a (patch) | |
tree | c53fa2bfd360a3bdcfbb2a4c6029e454d91456e1 /gui/gui.h | |
parent | 282e2644ef0470133184fdf9900cf2565ec5332b (diff) | |
parent | 98b9786ccab6fdee37a779fdd55b58176abf12d9 (diff) |
Merge pull request #58 from bdunahu/bdunahu
[WIP] Add tab bar, multi-level cache display
Diffstat (limited to 'gui/gui.h')
-rw-r--r-- | gui/gui.h | 45 |
1 files changed, 26 insertions, 19 deletions
@@ -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<std::string()> &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<int> info); - void - onWorkerShowDram(const std::vector<std::array<signed int, LINE_SIZE>> data); - - void onWorkerShowCache( - const std::vector<std::array<signed int, LINE_SIZE>> data); + void onWorkerShowStorage( + const std::vector<std::array<signed int, LINE_SIZE>> data, int i); void onWorkerShowRegisters(const std::array<int, GPR_NUM> &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(); @@ -117,6 +104,11 @@ class GUI : public QMainWindow bool ready; /** + * The list of storage displays. + */ + std::vector<QTextEdit *> tab_text_boxes; + + /** * Whether or not numerical values are currently displaying in hex. */ bool is_hex = true; @@ -132,12 +124,11 @@ class GUI : public QMainWindow QLabel *avatar; /** - * The currently loaded program. + * The next simulation's program. */ std::vector<signed int> 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<std::string()> &func, + const QString &img = "idle.png"); }; #endif // GUI_H |