blob: 77a88672c5b205d5c8822ac3fbfd09b50f3b2aed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#ifndef GUI_H
#define GUI_H
#include <QMainWindow>
#include <QThread>
#include <QFileDialog>
#include <QFile>
#include <QTextStream>
#include <QTextEdit>
#include "worker.h"
QT_BEGIN_NAMESPACE
namespace Ui {
class GUI;
}
QT_END_NAMESPACE
class GUI : public QMainWindow
{
Q_OBJECT
public:
GUI(QWidget *parent = nullptr);
~GUI();
signals:
void sendRefreshDram();
void sendRefreshCache();
void sendRefreshRegisters();
void sendRunSteps(int steps);
void sendRunStep();
private slots:
void onWorkerClockCycles(int value, int pc);
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 onWorkerShowRegisters(const std::array<int, GPR_NUM> &data);
void onWorkerFinished();
void on_upload_intructions_btn_clicked();
void on_upload_program_state_btn_clicked();
void on_refresh_dram_btn_clicked();
void on_refresh_cache_btn_clicked();
void on_refresh_registers_btn_clicked();
void on_enable_pipeline_checkbox_checkStateChanged(const Qt::CheckState &arg1);
void on_enabl_cache_checkbox_checkStateChanged(const Qt::CheckState &arg1);
void on_run_steps_btn_clicked();
void on_step_btn_clicked();
void on_save_program_state_btn_clicked();
private:
Ui::GUI *ui;
QThread workerThread;
Worker *worker;
};
#endif // GUI_H
|