Motorola DSP Developer's Kit | ![]() ![]() |
Reading from DSP Registers
READ_REG( const char *regname, enum datatype)
ReadFromDspReg( const char *regname, enum datatype )
The valid data types M_INTTYPE
and M_FRACTYPE
, which are defined in motdsp_api.h,
are specified so that the value returned from the register is interpreted correctly.
int* addr = READ_REG( "PC", M_INTTYPE ); double* fracval = READ_REG( "R1", M_FRACTYPE );
Reading from DSP Memory
READ_MEM_SYM( const char *label, int size, enum datatype ) READ_MEM_MAP( enum mem_map, ulong addr, int size, enum datatype) READ_MEM_MAP_INT( enum mem_map, ulong addr, int size ) READ_MEM_MAP_FRAC( enum mem_map, ulong addr, int size )
double *ReadFromDspMem( const char *label, int size, enum datatype ) double *ReadFromDspMem( enum mem_map, ulong addr, int size, enum datatype )
These methods read a contiguous block of memory from the DSP. The start location is specified using a symbolic label from the associated assembly or C-code or by specifying the memory map and address offset. The correct data type is also indicated so that the values can be interpreted correctly, either by calling the correct macro (READ_MEM_MAP_INT or READ_MEM_MAP_FRAC) or by specifying the correct enumerated datatype (M_INTTYPE
or M_FRACTYPE
).
![]() | Importing Data to DSP Simulator | Terminating and Allocated Memory Cleanup | ![]() |