Download Suite56 DSP Simulator User`s Manual
Transcript
Freescale Semiconductor, Inc. Simulator Screen Management Functions enum is memory_map_ concatenated with a valid memory name. As an example, memory_map_pa refers to off chip pa memory on the 96002 device. 13.3.10 dspl_xmwr: Write DSP External Memory Location Freescale Semiconductor, Inc... int dspl_xmwr(device_index,mem_map,address,value,store) int device_index; /* DSP device index to be affected by command */ enum memory_map memory_map; /* memory designator */ unsigned long address; /* DSP memory address to write */ unsigned long value; /* Value to be written to memory location */ int store; /* Flag indicating that a device store is in effect */ This function must store a value to a dsp device’s external memory location. The Simulator calls dspl_xmwr() when a dsp device writes an external memory location, or when the Simulator user interface alters the location. The store parameter will indicate if the reference is from the dsp device (store=1) during simulation of device cycle execution, or some other source (store=0) not related to device cycle execution. For example, the change memory Simulator command will set the parameter store to 0. The store parameter is not used in the dspl_xmwr function provided in the file simvmem.c, but is available to the user if modifications are made to the simvmem.c file for special external memory processing. The memory_map parameter will be a value representing the memory space being accessed. Use the Simulator’s help mem command to obtain a list of the valid memory space prefixes. See Example 13-38. Example 13-38. dspl_xmwr /* Write value of 3 to "xe" memory location 5 of device 2 */ unsigned long address; int devindex; int ok; unsigned long newval; int store; address=5L; devindex=2; newval=3L; store=0; ok= dspl_xmwr(devindex,memory_map_xe,address,newval,store); 13.4 Simulator Screen Management Functions The following sections describe functions which are provided in source code form in the Simulator package in the file scrmgr.c. These functions define all the operations associated with Simulator terminal I/O. The code includes conditionally compiled sections for MSDOS, UNIX, and VMS. The code is provided to allow customization of the Simulator terminal I/O for a particular environment. The user may, for example, wish to 13-26 Suite56 Simulator Reference Manual For More Information On This Product, Go to: www.freescale.com Motorola