#ifndef _PSIM_H_
#define _PSIM_H_
#include "basics.h"
typedef struct _psim_status {
int cpu_nr;
stop_reason reason;
int signal;
unsigned_word program_counter;
} psim_status;
extern device *psim_tree
(void);
extern char **psim_options
(device *root,
char **argv);
extern void psim_command
(device *root,
char **argv);
extern void psim_merge_device_file
(device *root,
const char *file_name);
extern void psim_usage
(int verbose);
extern psim *psim_create
(const char *file_name,
device *root);
extern void psim_init
(psim *system);
extern void psim_stack
(psim *system,
char **argv,
char **envp);
extern void psim_step
(psim *system);
extern void psim_run
(psim *system);
extern void psim_restart
(psim *system,
int cpu_nr);
extern void psim_set_halt_and_restart
(psim *system,
void *halt_jmp_buf,
void *restart_jmp_buf);
extern void psim_clear_halt_and_restart
(psim *system);
extern void psim_stop
(psim *system);
extern void psim_halt
(psim *system,
int cpu_nr,
stop_reason reason,
int signal);
extern int psim_last_cpu
(psim *system);
extern int psim_nr_cpus
(psim *system);
extern psim_status psim_get_status
(psim *system);
extern cpu *psim_cpu
(psim *system,
int cpu_nr);
extern device *psim_device
(psim *system,
const char *path);
extern event_queue *psim_event_queue
(psim *system);
extern void psim_read_register
(psim *system,
int which_cpu,
void *host_ordered_buf,
const char reg[],
transfer_mode mode);
extern void psim_write_register
(psim *system,
int which_cpu,
const void *buf,
const char reg[],
transfer_mode mode);
extern unsigned psim_read_memory
(psim *system,
int which_cpu,
void *buf,
unsigned_word vaddr,
unsigned len);
extern unsigned psim_write_memory
(psim *system,
int which_cpu,
const void *buf,
unsigned_word vaddr,
unsigned len,
int violate_read_only_section);
extern void psim_print_info
(psim *system,
int verbose);
#endif