最近做了个系统,已经将mcs文件写到prom中,elf文件写入到flash中。 我想将程序放在fpga中直接运行,在工程添加了两个bram,一个SLMB接口,一个SOPB接口。 在生成linker script时,bootloader_0工程(已选择Mark to initialize brams)选择的是SLMB接口的bram存储器, main工程选择的是SOPB接口的bram存储器。 调试都没有问题,但是断电重起后程序没有运行,下面是我的mhs和mss文件,请高人指点,不胜感激!!! .mhs文件  ARAMETER VERSION = 2.1.0  ORT db_12864 = db_12864, DIR = O, VEC = [0:7]  ORT rw_12864 = rw_12864, DIR = O  ORT di_12864 = di_12864, DIR = O  ORT cs1_n_12864 = cs1_n_12864, DIR = O  ORT cs2_n_12864 = cs2_n_12864, DIR = O  ORT e_12864 = e_12864, DIR = O  ORT rst_n_12864 = rst_n_12864, DIR = O  ORT led = led, DIR = O  ORT sys_clk_pin = dcm_clk_s, DIR = I, SIGIS = DCMCLK PORT sys_rst_pin = sys_rst_s, DIR = I # #flash PORT flash_addr = flash_sram_Mem_A, DIR = O, VEC = [0:31] PORT flash_data = flash_sram_Mem_DQ, DIR = IO, VEC = [0:15] PORT flash_cen = flash_sram_Mem_CEN, DIR = O PORT flash_oen = flash_sram_Mem_OEN, DIR = O PORT flash_wen = flash_sram_Mem_WEN, DIR = O PORT flash_rst = NET_VCC, DIR = O PORT flash_byte = NET_VCC, DIR = O
# #PORT flash_ryby = NET_VCC,DIR=O BEGIN microblaze PARAMETER INSTANCE = microblaze_0 PARAMETER HW_VER = 4.00.a PARAMETER C_USE_FPU = 0 PARAMETER C_DEBUG_ENABLED = 1 PARAMETER C_NUMBER_OF_PC_BRK = 2 BUS_INTERFACE DLMB = dlmb BUS_INTERFACE ILMB = ilmb BUS_INTERFACE DOPB = mb_opb BUS_INTERFACE IOPB = mb_opb PORT CLK = sys_clk_s PORT DBG_CAPTURE = DBG_CAPTURE_s PORT DBG_CLK = DBG_CLK_s PORT DBG_REG_EN = DBG_REG_EN_s PORT DBG_TDI = DBG_TDI_s PORT DBG_TDO = DBG_TDO_s PORT DBG_UPDATE = DBG_UPDATE_s END
BEGIN opb_v20 PARAMETER INSTANCE = mb_opb PARAMETER HW_VER = 1.10.c PARAMETER C_EXT_RESET_HIGH = 1 PORT SYS_Rst = sys_rst_s PORT OPB_Clk = sys_clk_s END BEGIN bram_block PARAMETER INSTANCE = lmb_bram PARAMETER HW_VER = 1.00.a BUS_INTERFACE PORTB = dlmb_port BUS_INTERFACE PORTA = ilmb_port END BEGIN lmb_bram_if_cntlr PARAMETER INSTANCE = ilmb_cntlr PARAMETER HW_VER = 1.00.b PARAMETER C_BASEADDR = 0x00000000 PARAMETER C_HIGHADDR = 0x00003fff BUS_INTERFACE SLMB = ilmb BUS_INTERFACE BRAM_PORT = ilmb_port END BEGIN lmb_v10 PARAMETER INSTANCE = ilmb PARAMETER HW_VER = 1.00.a PARAMETER C_EXT_RESET_HIGH = 1 PORT SYS_Rst = sys_rst_s PORT LMB_Clk = sys_clk_s END BEGIN opb_emc PARAMETER INSTANCE = flash_sram PARAMETER HW_VER = 2.00.a PARAMETER C_NUM_BANKS_MEM = 1 PARAMETER C_MAX_MEM_WIDTH = 16 PARAMETER C_MEM0_WIDTH = 16 PARAMETER C_SYNCH_MEM_0 = 0 PARAMETER C_OPB_CLK_PERIOD_PS = 15151 PARAMETER C_INCLUDE_DATAWIDTH_MATCHING_0 = 1 # #tce PARAMETER C_TCEDV_PS_MEM_0 = 120000 # #tacc PARAMETER C_TAVDV_PS_MEM_0 = 120000 # #tdf PARAMETER C_THZCE_PS_MEM_0 = 30000 # #tdf PARAMETER C_THZOE_PS_MEM_0 = 30000 # #twc PARAMETER C_TWC_PS_MEM_0 = 120000 # twp PARAMETER C_TWP_PS_MEM_0 = 50000 # #toeh PARAMETER C_TLZWE_PS_MEM_0 = 10000 PARAMETER C_MEM0_BASEADDR = 0x20100000 PARAMETER C_MEM0_HIGHADDR = 0x201fffff BUS_INTERFACE SOPB = mb_opb PORT Mem_A = flash_sram_Mem_A PORT Mem_DQ = flash_sram_Mem_DQ PORT Mem_CEN = flash_sram_Mem_CEN PORT Mem_OEN = flash_sram_Mem_OEN PORT Mem_WEN = flash_sram_Mem_WEN END BEGIN lmb_bram_if_cntlr PARAMETER INSTANCE = dlmb_cntlr PARAMETER HW_VER = 1.00.b PARAMETER C_BASEADDR = 0x00000000 PARAMETER C_HIGHADDR = 0x00003fff BUS_INTERFACE SLMB = dlmb BUS_INTERFACE BRAM_PORT = dlmb_port END BEGIN lmb_v10 PARAMETER INSTANCE = dlmb PARAMETER HW_VER = 1.00.a PARAMETER C_EXT_RESET_HIGH = 1 PORT SYS_Rst = sys_rst_s PORT LMB_Clk = sys_clk_s END BEGIN opb_mdm PARAMETER INSTANCE = debug_module PARAMETER HW_VER = 2.00.a PARAMETER C_MB_DBG_PORTS = 1 PARAMETER C_USE_UART = 1 PARAMETER C_UART_WIDTH = 8 PARAMETER C_BASEADDR = 0x41400000 PARAMETER C_HIGHADDR = 0x4140ffff BUS_INTERFACE SOPB = mb_opb PORT OPB_Clk = sys_clk_s PORT DBG_CAPTURE_0 = DBG_CAPTURE_s PORT DBG_CLK_0 = DBG_CLK_s PORT DBG_REG_EN_0 = DBG_REG_EN_s PORT DBG_TDI_0 = DBG_TDI_s PORT DBG_TDO_0 = DBG_TDO_s PORT DBG_UPDATE_0 = DBG_UPDATE_s END BEGIN dcm_module PARAMETER INSTANCE = dcm_0 PARAMETER HW_VER = 1.00.a PARAMETER C_CLK0_BUF = TRUE PARAMETER C_CLKIN_PERIOD = 20.000000 PARAMETER C_CLK_FEEDBACK = 1X PARAMETER C_DLL_FREQUENCY_MODE = LOW PARAMETER C_EXT_RESET_HIGH = 1 PORT CLKIN = dcm_clk_s PORT CLK0 = sys_clk_s PORT CLKFB = sys_clk_s PORT RST = net_gnd PORT LOCKED = dcm_0_lock END BEGIN led_zdq PARAMETER INSTANCE = led_zdq_0 PARAMETER HW_VER = 1.00.a PARAMETER C_BASEADDR = 0x7b400000 PARAMETER C_HIGHADDR = 0x7b40ffff BUS_INTERFACE SOPB = mb_opb PORT OPB_CLK = sys_clk_s PORT OPB_RST = net_gnd PORT led = led END BEGIN lcd_zdq PARAMETER INSTANCE = lcd_zdq_0 PARAMETER HW_VER = 1.00.a PARAMETER C_BASEADDR = 0x7b420000 PARAMETER C_HIGHADDR = 0x7b42ffff BUS_INTERFACE SOPB = mb_opb PORT OPB_CLK = sys_clk_s PORT OPB_RST = net_gnd PORT db_12864 = db_12864 PORT di_12864 = di_12864 PORT rw_12864 = rw_12864 PORT e_12864 = e_12864 PORT cs1_n_12864 = cs1_n_12864 PORT cs2_n_12864 = cs2_n_12864 PORT rst_n_12864 = rst_n_12864 END BEGIN opb_bram_if_cntlr PARAMETER INSTANCE = opb_bram_if_cntlr_0 PARAMETER HW_VER = 1.00.a PARAMETER c_baseaddr = 0x20080000 PARAMETER c_highaddr = 0x20081fff BUS_INTERFACE SOPB = mb_opb BUS_INTERFACE PORTA = opb_bram_if_cntlr_0_PORTA END BEGIN bram_block PARAMETER INSTANCE = bram_block_0 PARAMETER HW_VER = 1.00.a BUS_INTERFACE PORTA = opb_bram_if_cntlr_0_PORTA END .mss文件 PARAMETER VERSION = 2.2.0
BEGIN OS PARAMETER OS_NAME = standalone PARAMETER OS_VER = 1.00.a PARAMETER PROC_INSTANCE = microblaze_0 PARAMETER STDIN = debug_module PARAMETER STDOUT = debug_module END
BEGIN PROCESSOR PARAMETER DRIVER_NAME = cpu PARAMETER DRIVER_VER = 1.00.a PARAMETER HW_INSTANCE = microblaze_0 PARAMETER COMPILER = mb-gcc PARAMETER ARCHIVER = mb-ar PARAMETER XMDSTUB_PERIPHERAL = debug_module END
BEGIN DRIVER PARAMETER DRIVER_NAME = opbarb PARAMETER DRIVER_VER = 1.02.a PARAMETER HW_INSTANCE = mb_opb END
BEGIN DRIVER PARAMETER DRIVER_NAME = uartlite PARAMETER DRIVER_VER = 1.00.b PARAMETER HW_INSTANCE = debug_module END BEGIN DRIVER PARAMETER DRIVER_NAME = bram PARAMETER DRIVER_VER = 1.00.a PARAMETER HW_INSTANCE = dlmb_cntlr END BEGIN DRIVER PARAMETER DRIVER_NAME = bram PARAMETER DRIVER_VER = 1.00.a PARAMETER HW_INSTANCE = ilmb_cntlr END BEGIN DRIVER PARAMETER DRIVER_NAME = emc PARAMETER DRIVER_VER = 2.00.a PARAMETER HW_INSTANCE = flash_sram END BEGIN DRIVER PARAMETER DRIVER_NAME = led_zdq PARAMETER DRIVER_VER = 1.00.a PARAMETER HW_INSTANCE = led_zdq_0 END BEGIN DRIVER PARAMETER DRIVER_NAME = lcd_zdq PARAMETER DRIVER_VER = 1.00.a PARAMETER HW_INSTANCE = lcd_zdq_0 END BEGIN DRIVER PARAMETER DRIVER_NAME = bram PARAMETER DRIVER_VER = 1.00.a PARAMETER HW_INSTANCE = opb_bram_if_cntlr_0 END |