Add Parser class to project
MODIFY
RISC-V-sim.pro
RISC-V-sim.pro
@@ -4,8 +4,10 @@ CONFIG -= app_bundle
CONFIG -= qt
SOURCES += src/main.cpp \
- src/parser.cpp
+ src/parser.cpp \
+ src/runner.cpp
HEADERS += \
src/parser.h \
- src/defines.h
+ src/defines.h \
+ src/runner.h

ADD
src/runner.cpp
+#include "runner.h"
+
+Runner::Runner() {}
+
+Runner::~Runner() {}

ADD
src/runner.h
+#ifndef RUNNER_H
+#define RUNNER_H
+
+#include "defines.h"
+
+class Runner {
+public:
+ Runner();
+ ~Runner();
+
+private:
+ int m_pc; // program counter
+ uint32_t m_reg[32]; // Internal registers
+ uint32_t *m_mem; // Data memory
+};
+
+#endif // RUNNER_H

Add Parser class to project