| |||||
Technical Support Support Resources
Product Information | MON51: TESTING VON NEUMANN MEMORY AREASInformation in this article applies to:
QUESTIONI'm trying to configure the monitor for my target hardware. How can I verify that my memory is von Neumann mapped? ANSWERChecking for von Neumann memory is fairly easy. One method is to create a stand-alone program that uses the XBYTE and CBYTE absolute access macros to write to XDATA and read from CODE memory. For example:
unsigned long addr;
for (addr = 0x8000; addr < 0x10000; addr++)
{
XBYTE [addr] = (unsigned char) ('A' + addr);
if (CBYTE[addr] != (unsigned char) ('A' + addr))
printf ("Error at address %4.4X\n", (unsigned) addr);
}
This example code writes values into XDATA from 0x8000 to 0xFFFF and outputs an error message if the values do not match. You could create a simple program to scan the von Neumann areas of memory and report on whether or not they "pass". Another method is to use the Keil µVision Debugger to fill XDATA memory with a value and to then check it by reading CODE memory. To start the debugger and connect to your target hardware, you must...
To test the von Neumann Memory Areas...The monitor must have 2 von Neumann memory areas. One is for your target program. When the debugger downloads the program to the monitor, the monitor actually writes the code into the XDATA space. The code it writes must appear in CODE space to be executed. Therefore, this memory area must be von Neumann. The other von Neumann memory area is reserved for the monitor. This 256-byte area is the monitor's data area. It, too, must be von Neumann mapped because the monitor generates code on-the-fly that it writes into this area. To test the Target Program Memory...
To test the Monitor Data Memory...
To Summarize...Most of the monitor problems we see are related to monitor configuration or to memory configuration. The above steps should help you resolve the von Neumann aspects of your memory map. SEE ALSO
FORUM THREADSThe following Discussion Forum threads may provide information related to this topic. Last Reviewed: Friday, June 02, 2006 | ||||
| |||||