blob: 3f64ca40f7c0cca06ff5411117ab736bcb1fa975 (
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
|
#ifndef EMULATOR_H_
#define EMULATOR_H_
#include <vector>
#include "value.h"
class program_loader;
class emulator {
public:
emulator(
program_loader * loader,
int num_temp_regs,
int num_const_regs,
int num_out_regs);
void run();
void set_constants(float value);
value * get_value(register_address addr);
void set_value(
register_address addr,
value * val);
value * get_output_value(int index);
private:
program_loader * m_loader;
std::vector<value *> m_temp_regs;
std::vector<float_value *> m_const_regs;
std::vector<value *> m_out_regs;
std::vector<value *> m_private_regs;
std::vector<float_value*> m_immediate_regs;
};
#endif //EMULATOR_H
|