Put simif_t declaration in its own file. (#209)
[riscv-isa-sim.git] / riscv / simif.h
1 // See LICENSE for license details.
2
3 #ifndef _RISCV_SIMIF_H
4 #define _RISCV_SIMIF_H
5
6 #include "decode.h"
7
8 // this is the interface to the simulator used by the processors and memory
9 class simif_t
10 {
11 public:
12 // should return NULL for MMIO addresses
13 virtual char* addr_to_mem(reg_t addr) = 0;
14 // used for MMIO addresses
15 virtual bool mmio_load(reg_t addr, size_t len, uint8_t* bytes) = 0;
16 virtual bool mmio_store(reg_t addr, size_t len, const uint8_t* bytes) = 0;
17 // Callback for processors to let the simulation know they were reset.
18 virtual void proc_reset(unsigned id) = 0;
19 };
20
21 #endif