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: 
Highlighted
Participant anupkini
Participant
8,621 Views
Registered: ‎05-16-2012

microblaze + virtex7 + DDR3 - unable to execute hello world on DDR3

Hi All,

 

I am trying to run bare-metal hellow world on microblaze, with code, data, heap& stack all placed on DDR3.

Vivado 2014.3, SDK 2014.3

Microblaze - Linux with MMU settings - v9.4

I have a 1GB DDR3 on my board. Since its a custom board, i do not have Flash.

 

I am able to write to DDR3 memory locations and print them back, while running the code from BRAM.

The code works fine with all placed in BRAM.

 

Code:

int main()
{
init_platform();

print("Hello World\n\r");
int* addr = 0x80000000;
int i;

for (i=0; i<10; i++){
print("writting\n");
*addr = 0x01234567;
addr = addr+8;
}

cleanup_platform();
return 0;
}

 

MicroBlaze Pipeline Stalled on a Blocking Instruction or Invalid Bus Access
Stalled PC: 0x80000008
Try Resetting the Processor to Continue..Processor is stalled at address 0x80000004. UNABLE to STOP MicroBlaze

 

DDR3 - base address 0x80000000

 

 

Let me know what i am missing or hoe to proceed.

 

Thanks,

Anup.

Tags (3)
0 Kudos
7 Replies
Scholar stephenm
Scholar
8,604 Views
Registered: ‎05-06-2012

Re: microblaze + virtex7 + DDR3 - unable to execute hello world on DDR3

At what location is the DDR? Where are you placing the ELF in DDR? at the base address?

If this is true, then you are corrupting the ELF with your applciation code by writing to it.

 

Can you try just execute a hello world applciation from the applciation templates in SDK

(file -> New -> Applciation project)

0 Kudos
Participant anupkini
Participant
8,599 Views
Registered: ‎05-16-2012

Re: microblaze + virtex7 + DDR3 - unable to execute hello world on DDR3

Hi Stephen,

 

Thanks for the quick response.

 

Sorry, i was in a hurry and just typed the wrong address here.

DDR3 base address is XPAR_MIG_7SERIES_0_BASEADDR = 0x80000000

 

Where as the address to which i am writting is 0x9000 0000.

I have looked into the elf header and made sure this address is not used in the elf.

 

With a new hello world project also, i am facing the same issue.

If i place code, data, stack n heap in BRAM, it prints fine,

But if i place even one of the above in DDR3, it does not print hello.

 

i did try to manually write to DDR3 using xmd:

mwr 0x9000 0000 0x12345678

and read using 

mrd 0x9000 0000

This works fine.

 

My main goal is to run Linux on microblaze, and hence need to be able to read and execute from DDR3.

 

 

0 Kudos
Scholar stephenm
Scholar
8,577 Views
Registered: ‎05-06-2012

Re: microblaze + virtex7 + DDR3 - unable to execute hello world on DDR3

Sounds like the issue is with your DDR memory. Can you run a memory test on this?

XMD will just do a read/write and will not stress the memory.

 

If you just run the hello world does this work?

 

 

0 Kudos
Participant anupkini
Participant
8,524 Views
Registered: ‎05-16-2012

Re: microblaze + virtex7 + DDR3 - unable to execute hello world on DDR3

I ran mem_Test on DDR3 for BASEADDR and 0x9000 0000, both resulted in success.

status = Xil_TestMem32(0x90000000, 128, 0xAAAA5555, XIL_TESTMEM_INCREMENT);

 

I ran the code from BRAM.

 

Also, the hello world code executes fine from BRAM, but no output from DDR3.

When i run xmd stop , it says the PC is stalling at 0x8000 0004, and everytime this is a new address.

 

Just to make sure, Should i enable any specific flag or setting in Microblaze to enable code execution from external memory ?

 

 

Thanks,

Anup.

0 Kudos
Participant anupkini
Participant
8,520 Views
Registered: ‎05-16-2012

Re: microblaze + virtex7 + DDR3 - unable to execute hello world on DDR3

Some more information about my design.

 

I have the M_AXI_IC & M_AXI_DC ports connected to an AXI_INTERCONNECT with only DDR3 on the other side.

All other devices like timer, uart n interrupt controller are connected through a different AXI_INTERCONNECT along with the M_AXI_DP.

 

The port M_AXI_IP is not visible in my design and i am not sure where it is connected to.

Is this port important and to be connected in my design ??

 

 

Thanks,

Anup.

0 Kudos
Participant anupkini
Participant
8,507 Views
Registered: ‎05-16-2012

Re: microblaze + virtex7 + DDR3 - unable to execute hello world on DDR3

Some more info about the hello.elf and pc stall error msg.

 

JTAG chain configuration
--------------------------------------------------
Device ID Code IR Length Part Name
1 236b3093 24 xc7v2000t

MicroBlaze Processor Configuration :
-------------------------------------
Version............................9.4
Optimization.......................Performance
Interconnect.......................AXI-LE
MMU Type...........................Full_MMU
No of PC Breakpoints...............1
No of Read Addr/Data Watchpoints...0
No of Write Addr/Data Watchpoints..0
Instruction Cache Support..........on
Instruction Cache Base Address.....0x80000000
Instruction Cache High Address.....0x9fffffff
Data Cache Support.................on
Data Cache Base Address............0x80000000
Data Cache High Address............0x9fffffff
Exceptions Support................on
FPU Support.......................off
Hard Divider Support...............on
Hard Multiplier Support............on - (Mul64)
Barrel Shifter Support.............on
MSR clr/set Instruction Support....on
Compare Instruction Support........on
PVR Supported......................on
PVR Configuration Type.............Full
Data Cache Write-back Support......off
Fault Tolerance Support............off
Stack Protection Support...........off

 

 

 

 

Downloading Program -- vivado.sdk/hello/Debug/hello.elf
section, .vectors.reset: 0x00000000-0x00000007
section, .vectors.sw_exception: 0x00000008-0x0000000f
section, .vectors.interrupt: 0x00000010-0x00000017
section, .vectors.hw_exception: 0x00000020-0x00000027
section, .text: 0x80000000-0x8000147b
section, .init: 0x8000147c-0x800014b7
section, .fini: 0x800014b8-0x800014d7
section, .ctors: 0x800014d8-0x800014df
section, .dtors: 0x800014e0-0x800014e7
section, .rodata&colon; 0x800014e8-0x800018e7
section, .data&colon; 0x800018e8-0x80001a5f
section, .bss: 0x80001a60-0x80001a7f
section, .heap: 0x80001a80-0x80003a7f
section, .stack: 0x80003a80-0x80005a7f
Download Progress..10.20.30.40.50.60.70.80.90.Done
Setting PC with Program Start Address 0x00000000

 

 

 

ERROR: Debug Operation Not Supported on the Target, Current Processor State is not "Stopped"
MicroBlaze Pipeline Stalled on a Blocking Instruction or Invalid Bus Access
Stalled PC: 0x80000364
Try Resetting the Processor to Continue..

 

if i try xmd%> rst, then there is nothing displayed on uart console.

If i run the same code from BRAM, it works fine.

 

Kindly let me know how to proceed or debug this issue.

 

 

Thanks,

Anup.

0 Kudos
Participant anupkini
Participant
8,480 Views
Registered: ‎05-16-2012

Re: microblaze + virtex7 + DDR3 - unable to execute hello world on DDR3

Eagerly looking for any suggestions to debug the issue..

 

 

Thanks,

Anup.

0 Kudos