1 /* sim.h: prototype 2 * $Id: sim.h,v 1.4 2004/02/22 06:54:25 varfar Exp $ 3 */ 4 #ifndef SIM_H 5 #define SIM_H 6 7 #include "pspace.h" 8 #include "insn.h" 9 10 insn_t *sim_alloc_bufs( unsigned int nwar, unsigned int coresize, 11 unsigned int processes, unsigned int cycles ); 12 13 insn_t *sim_alloc_bufs2( unsigned int nwar, unsigned int coresize, 14 unsigned int processes, unsigned int cycles, 15 unsigned int pspace ); 16 17 void sim_free_bufs(); 18 19 void sim_clear_core(void); 20 21 22 pspace_t **sim_get_pspaces(void); 23 24 pspace_t *sim_get_pspace(unsigned int war_id); 25 26 void sim_clear_pspaces(void); 27 28 void sim_reset_pspaces(void); 29 30 int sim_load_warrior(unsigned int pos, insn_t const *code, unsigned int len); 31 32 int sim( int nwar_arg, field_t w1_start, field_t w2_start, 33 unsigned int cycles, void **ptr_result ); 34 35 int sim_mw( unsigned int nwar, const field_t *war_pos_tab, 36 unsigned int *death_tab ); 37 38 /* exec_trail support */ 39 typedef void (*step_cb_t)(field_t opcode); 40 void set_step_cb(step_cb_t callback); 41 42 #endif /* SIM_H */ 43