testapp_memory.c
来自「microblaze下ucos移植源码」· C语言 代码 · 共 93 行
C
93 行
/* * * Xilinx, Inc. * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. *//* * Xilinx EDK 10.1.01 EDK_K_SP1.3 * * This file is a sample test application * * This application is intended to test and/or illustrate some * functionality of your system. The contents of this file may * vary depending on the IP in your system and may use existing * IP driver functions. These drivers will be generated in your * XPS project when you run the "Generate Libraries" menu item * in XPS. * * Your XPS project directory is at: * C:\work_dir\xilinx\AN1013-uCOS-II-MicroBlaze\uCOS-II_and_uBlaze_EDK_10_1_01\ */
// Located in: microblaze_0/include/xparameters.h#include "xparameters.h"
#include "stdio.h"
#include "xutil.h"
//====================================================int main (void) {
/* * Enable and initialize cache */
#if XPAR_MICROBLAZE_0_USE_ICACHE microblaze_init_icache_range(0, XPAR_MICROBLAZE_0_CACHE_BYTE_SIZE); microblaze_enable_icache(); #endif
#if XPAR_MICROBLAZE_0_USE_DCACHE microblaze_init_dcache_range(0, XPAR_MICROBLAZE_0_DCACHE_BYTE_SIZE); microblaze_enable_dcache(); #endif
print("-- Entering main() --\r\n");
/* * MemoryTest routine will not be run for the memory at * 0x84100000 (SRAM) * because it is being used to hold a part of this application program */
/* * MemoryTest routine will not be run for the memory at * 0x00000000 (dlmb_cntlr) * because it is being used to hold a part of this application program */
/* * Disable cache and reinitialize it so that other * applications can be run with no problems */
#if XPAR_MICROBLAZE_0_USE_DCACHE microblaze_disable_dcache(); microblaze_init_dcache_range(0, XPAR_MICROBLAZE_0_DCACHE_BYTE_SIZE); #endif
#if XPAR_MICROBLAZE_0_USE_ICACHE microblaze_disable_icache(); microblaze_init_icache_range(0, XPAR_MICROBLAZE_0_CACHE_BYTE_SIZE); #endif
print("-- Exiting main() --\r\n"); return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?