00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _VM_H
00013
00014
00015
00016
00017
00018 #define _VM_H
00019
00020 #include <vector>
00021
00022 class Vm {
00023 public:
00024 Vm(const char* path, const int argc, const char** argv, long freq);
00025 ~Vm();
00026 int argc;
00027 const char **argv;
00028
00029
00030 int (*main)(int, const char **);
00031 int (*run)(int instructions, double ipc, uint64_t start_cycle);
00032
00033 uint8_t (*memRead)(uint64_t addr);
00034 void (*memWrite)(uint64_t addr, uint8_t data);
00035 uint64_t (*memSize)(void);
00036
00037 long clock_freq;
00038 double ipc;
00039 uint64_t cycle;
00040
00041 private:
00042 void *handle;
00043 char *target_filename;
00044 };
00045
00046 extern std::vector<Vm*> *vms;
00047
00048 #endif