tailieunhanh - HandBooks Professional Java-C-Scrip-SQL part 196

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 196', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | hardware engineer about the nature of the problem. However it is visible only if we are running the test program in a debugger or emulator. The best way to proceed is to assume the best download the test program and let it run to completion. Then if and only if the red LED comes on must you use the debugger to step through the program and examine the return codes and contents of the memory to see which test failed and why. include define BASE_ADDRESS volatile datum 0x10000000 define NUM_BYTES 0x10000 Function main Description Test the second 64 KB bank of SRAM. Notes Returns 0 on success. Otherwise -1 indicates failure. main void if memTestDataBus BASE_ADDRESS 0 memTestAddressBus BASE_ADDRESS NUM_BYTES NULL memTestDevice BASE_ADDRESS NUM_BYTES NULL toggleLed LED_RED return -1 else toggleLed LED_GREEN return 0 main Unfortunately it is not always possible to write memory tests in a high-level language. For example C and C both require the use of a stack. But a stack itself requires working memory. This might be reasonable in a system that has more than one memory device. For example you might create a stack in an area of RAM that is already known to be working while testing another memory device. In a common such situation a small SRAM could be tested from assembly and the stack could be created there afterward. Then a larger block of DRAM could be tested using a nicer test algorithm like the one shown earlier. If you cannot assume enough working RAM for the stack and data needs of the test program then you will need to rewrite these memory test routines entirely in assembly language. Another option is to run the memory test program from an emulator. In this case you could choose to place the stack in an area of the emulator s own internal memory. By moving the emulator s internal memory around in the target memory map you could systematically test each memory device on the target. The need for memory testing is perhaps most apparent during product development

TÀI LIỆU LIÊN QUAN
10    158    1
6    184    1
7    162    1
5    157    1
6    160    1
6    152    1
6    150    1
6    206    1
7    154    1