2024-01-23 19:35:57 +00:00
|
|
|
#ifndef SIMDATA_HEADER
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2024-01-22 12:11:07 +00:00
|
|
|
struct simdata_t{
|
|
|
|
long unsigned int current_clock;
|
2024-01-23 19:35:57 +00:00
|
|
|
uint8_t *RAM;
|
2024-01-23 23:56:40 +00:00
|
|
|
uint32_t PC;
|
2024-01-26 16:11:57 +00:00
|
|
|
uint32_t SP;
|
2024-02-03 22:54:20 +00:00
|
|
|
struct fetch_data_t *fetch_data;
|
|
|
|
struct decode_data_t *decode_data;
|
|
|
|
struct exec_data_t *exec_data;
|
2024-01-22 12:11:07 +00:00
|
|
|
};
|
2024-01-23 19:35:57 +00:00
|
|
|
|
2024-01-22 12:11:07 +00:00
|
|
|
struct simdata_t *init_simdata();
|
|
|
|
|
|
|
|
void free_simdata(struct simdata_t *);
|
2024-01-23 17:38:44 +00:00
|
|
|
|
|
|
|
enum CPU_STATE_t{
|
|
|
|
RUNNING,
|
|
|
|
SINGLE_STEPPING,
|
|
|
|
STOPPED
|
|
|
|
};
|
2024-02-03 22:54:20 +00:00
|
|
|
|
2024-01-23 19:35:57 +00:00
|
|
|
#endif
|
|
|
|
#define SIMDATA_HEADER
|