Main Page | Modules | File List | Globals | Examples

bfemu.h File Reference

Header file of exported Blackfin emulation functions. More...


Defines

#define EMUDAT_SIZE_32   0
 EMUDAT register size = 32.
#define EMUDAT_SIZE_40   (1 << 7)
 EMUDAT register size = 40.
#define EMUDAT_SIZE_48   (2 << 7)
 EMUDAT register size = 48.
#define EMUIR_SIZE_64   0
 EMUIR register size = 64.
#define EMUIR_SIZE_48   (1 << 4)
 EMUIR register size = 48.
#define EMUIR_SIZE_32   (2 << 4)
 EMUIR register size = 32.
#define LDST_32   0
 Word size 32 bits.
#define LDST_16   1
 Word size 16 bits.
#define LDST_8   2
 Word size 8 bits.

Enumerations

enum  CpuState { CPUSTATE_NORMAL, CPUSTATE_EMULATION, CPUSTATE_STEP }
 CPU state. More...
enum  {
  JTAG_CLKSPEED, EMUIR_SIZE = 32, EMUDAT_SIZE, EMULOOP_SIZE,
  EMU_STEP
}
 Tokens for Emulation Control ( emulation_config() ). More...
enum  { WP_DISABLE, WP_READ, WP_WRITE, WP_ALL }
 See wpu_set_watch(). More...
enum  {
  ERR_GENERAL = -1024, ERR_MALLOC, ERR_OPEN, ERR_WRITE,
  ERR_READ, ERR_TIMEOUT, ERR_NOTREADY = -512, ERR_DMA,
  ERR_CORE, ERR_STATE = - 127, ERR_UNSUPPORTED, ERR_ACCESS_SIZE,
  ERR_OVERFLOW
}
 Error codes. More...

Functions

int jtag_init (char *const *argv, CPU *cpu)
 Initialize JTAG part.
void jtag_exit (CPU cpu)
 Free all resources used by the CPU handle 'cpu'.
int emulation_init (CPU cpu)
 Initialize emulation.
int emulation_exit (CPU cpu)
 Exit emulation and turn off emulator unit (save power).
int emulation_enter (CPU cpu)
 Enter emulation state.
int emulation_leave (CPU cpu)
 Exit emulation state; 'go'.
int emulation_enter_singlestep (CPU cpu)
 Enter single stepping mode.
int emulation_go (CPU cpu)
 Return from emulation (go).
int emulation_leave_singlestep (CPU cpu)
 Leave single step mode.
int emulation_flush (CPU cpu)
 Flush memory changes.
int emulation_config (CPU cpu, int mode, int value)
 Configure emulation.
CpuState emulation_state (CPU cpu)
 Return emulation state for state debugging.
int wpu_init (CPU cpu, int enable)
 Initialize CPUs watchpoint unit.
int wpu_set_hbreak (CPU cpu, int n, ADDR addr, int enable)
 Set hardware breakpoint on CPU.
int wpu_cause (CPU cpu)
 Returns an 8 bit vector reflecting the source of the watchpoint.
char * detect_device (CPU cpu, unsigned int *rev)
 Return identification string and revision from CPU id.
int get_memory (CPU cpu, ADDR addr, unsigned long count, unsigned char *buf)
 Read from CPU side memory.
int set_memory (CPU cpu, ADDR addr, unsigned long count, const unsigned char *buf)
 Write to CPU side memory.
int get_memory_word (CPU cpu, ADDR addr, unsigned long *word, int sizecode)
 Read MMR registers.
int set_memory_word (CPU cpu, ADDR addr, unsigned long word, int sizecode)
 Write to MMR registers.
BFIN_REGISTER get_cpuregister (CPU cpu, int regno)
 Get CPU register value.
int set_cpuregister (CPU cpu, int regno, BFIN_REGISTER value)
 Set CPU core register value.
int save_registers (CPU cpu, BFIN_REGISTER *buf, int *regs)
 Save CPU registers to buffer.
int restore_registers (CPU cpu, BFIN_REGISTER *buf, int *regs)
 Restore CPU registers from buffer.
int save_dagregisters (CPU cpu, BFIN_REGISTER *buf)
 Save DAG registers.
int save_aluregisters (CPU cpu, BFIN_REGISTER *buf)
 Save ALU registers.
int get_idcode (CPU cpu, unsigned long *code)
 Get value of IDCODE register.
BFIN_REGISTER get_dbgstat (CPU cpu)
 Get value of DBGSTAT register.
int cpu_reset (CPU cpu, int mode)
 Reset CPU This function resets the CPU according to the mode value:.


Detailed Description

(c) 11/2004 Martin Strubel <hackfin@section5.ch>

Id
bfemu.h,v 1.16 2005/08/30 16:05:33 strubi Exp

Generated on Thu Sep 1 15:02:53 2005 for bfemu - Blackfin emulation library by  doxygen 1.4.3-20050530