aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/qtmipsmachine.h
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine/qtmipsmachine.h')
-rw-r--r--qtmips_machine/qtmipsmachine.h35
1 files changed, 29 insertions, 6 deletions
diff --git a/qtmips_machine/qtmipsmachine.h b/qtmips_machine/qtmipsmachine.h
index af981b3..829e571 100644
--- a/qtmips_machine/qtmipsmachine.h
+++ b/qtmips_machine/qtmipsmachine.h
@@ -2,24 +2,47 @@
#define QTMIPSMACHINE_H
#include <QObject>
-
+#include <QTimer>
+#include <cstdint>
#include "qtmipsexception.h"
-#include "programloader.h"
+#include "machineconfig.h"
+#include "registers.h"
+#include "memory.h"
#include "core.h"
-// TODO piplined core
+#include "cache.h"
-class QtMipsMachine : QObject {
+class QtMipsMachine : public QObject {
Q_OBJECT
public:
- QtMipsMachine(char *file);
+ QtMipsMachine(const MachineConfig &cc);
+
+ void set_speed(unsigned);
+ const Registers *registers();
+ const Memory *memory();
+ const Cache *cache();
+ const Core *core();
+
+public slots:
// TODO handle speed
void play();
void pause();
void step();
void restart();
+
+signals:
+ void program_exit();
+
private:
- ProgramLoader *loader;
+ Registers *regs;
+ Memory *mem;
+ Cache *cch;
+ Core *cr;
+
+ unsigned run_speed;
+ QTimer *run_t;
+
+ std::uint32_t program_end;
};
#endif // QTMIPSMACHINE_H