UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
8,458 Views
Registered: ‎12-09-2013

Running microblaze code directly from SPI Flash

Hi,

 

I'd like to run the Microblaze directly from Flash, unlike the bootloader scenario, (wherein a bootloader running from BRAM fetches the application from Flash and runs it in DDR3). I would like to run an application directly from an SPI Flash. Can you please provide any documents/links for the same? 

 

I have checked the following link:

 

http://china.xilinx.com/support/answers/23748.html

 

The procedure seems to be incomplete, and the given procedure looks like the one for a BPI Flash. Thanks.

 

Regards,

Surya

 

0 Kudos
7 Replies
Scholar sampatd
Scholar
8,451 Views
Registered: ‎09-05-2011

Re: Running microblaze code directly from SPI Flash

0 Kudos
Explorer
Explorer
8,433 Views
Registered: ‎12-09-2013

Re: Running microblaze code directly from SPI Flash

Hi,

 

The link which you have provided discusses more about the method involving the copying of .ELF from Flash to DDR3, and then executing the application from DDR3 memory. It talks less about direct execution of the application from Flash.

 

What I would like to know is if the processor can directly execute the application from Flash, without actually loading it to an external memory like DDR3? Thanks.

 

Regards,

Surya

0 Kudos
Xilinx Employee
Xilinx Employee
8,424 Views
Registered: ‎08-06-2007

Re: Running microblaze code directly from SPI Flash

Hi,

 

I hope you know realize that you will get very very very slow execution.

The number of cycles to fetch each 32-bit instruction word will be how much slower it will be compared to run from BRAM.

 

Göran

0 Kudos
Explorer
Explorer
8,411 Views
Registered: ‎12-09-2013

Re: Running microblaze code directly from SPI Flash

Hi Goran,

 

I understand that time to run the application from Flash will be much slower than when compared to the application running from DDR3 or BRAM. But, I would be glad if you can provide any inputs on doing the same, i.e., running the application directly from Flash. Thanks.

 

Regards,

Surya

0 Kudos
Adventurer
Adventurer
8,344 Views
Registered: ‎10-23-2014

Re: Running microblaze code directly from SPI Flash

 

Hi surya,

 

you can keep the read-only sections in flash and run you system.

Refer to this answer record:AR#46503

 

I have nt tried by keeping all sections in flash. you give a try and let us know. 

(Use linker scripts to organise your elf sections in different memories).

(Use mb-objcopy command to create necessary files).

 

 

0 Kudos
Explorer
Explorer
8,300 Views
Registered: ‎12-09-2013

Re: Running microblaze code directly from SPI Flash

Hi Manoj,

 

I referred your post, and tried out the procedure mentioned in AR46503. However, I'm facing the same error as yours. Program FPGA fails due to errors from elfcheck. I tried increasing the size of BRAM too, but it didn't help. 

 

I shall try by keeping all the sections in Flash, and let you know. 

 

Surya

0 Kudos
Adventurer
Adventurer
8,283 Views
Registered: ‎10-23-2014

Re: Running microblaze code directly from SPI Flash

 

Hi,

 

There is a work around for the elfcheck problem.

 

first program FPGA with system.bit + bootloop. Internally, data2mem is used to intialize the brams with bootloop.

now, program Flash with Flash.bin

Finally if you try to program FPGA with system.bit+volatile.elf, elfcheck fails.

 

Make sure there are sufficient bram available and bypass the elfcheck.

so, by using something like below in commmand prompt you can generate your bit file.

 

cd C:\Xilinx\14.5\ISE_DS\ISE\bin\nt64

 

data2mem -bm yourbmmfilelocation -bt yourbitfilelocation -bd locationofvolatile.elf \

tag microblaze_0(checkthisnameinyourbmmfile) -o b \

destinationofoutputbitfile

 

The generated bitfile can be used to program FPGA using impact.

 

0 Kudos