blob: 84b2f317cf22d7f6b9de4d959081e7d73f2edd19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef PROGRAMMEMORY_H
#define PROGRAMMEMORY_H
#include <vector>
#include "programloader.h"
#include "memory.h"
#include "instruction.h"
class ProgramMemory {
public:
ProgramMemory(ProgramLoader *loader, MemoryAccess *memory);
Instruction *at(std::uint32_t address); // return instruction isntance for given address
private:
MemoryAccess *memory;
Instruction *decode_r(std::uint32_t dt);
Instruction *decode_j(std::uint32_t dt);
Instruction *decode_i(std::uint32_t dt);
};
#endif // PROGRAMMEMORY_H
|