cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Visitor
Visitor
10,757 Views
Registered: ‎05-27-2010

Cannot run dual Microblaze processor simultaneously

Jump to solution

Hi,

 

Can anyone tell me how to run dual microblaze processor simultaneously (EDK 10.1.3)? I opened the XMD shell for both of them. The first one can autoconnect to the board correctly. The second one require manual connection. They connect to different TCP port using the same usb cable. The first one is using RS232 Uart output while the second one is using debug module through mdm to output result.

 

However, when I download the second .elf file after the first file, the XMD displayed "Cable is locked" message. I cant run them at the same time. 

 

Please help!! ( I am using xupv2p board)

0 Kudos
Reply
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
13,322 Views
Registered: ‎08-06-2007

Hi,

 

You don't need two XMD running at the same time.

One XMD can connect to 8 MicroBlazes.

You just have to switch target in XMD when doing XMD commands.

 

Check the XMD documentation on how to do it for our EDK version.

 

Göran

View solution in original post

0 Kudos
Reply
20 Replies
Xilinx Employee
Xilinx Employee
13,323 Views
Registered: ‎08-06-2007

Hi,

 

You don't need two XMD running at the same time.

One XMD can connect to 8 MicroBlazes.

You just have to switch target in XMD when doing XMD commands.

 

Check the XMD documentation on how to do it for our EDK version.

 

Göran

View solution in original post

0 Kudos
Reply
Visitor
Visitor
10,721 Views
Registered: ‎05-27-2010

But in the documentation http://www.xilinx.com/support/documentation/application_notes/xapp996.pdf , it said disable reset on both shells, download them separately and run together. That's where I got my error. Everytime I download the second one, "cable is locked" error will pop out. So, I should only open one XMD shell, and connect to both of the processors? By default, it should be only one target connect, whicg is microblaze<1> i guess. So, i should manually connect to the second processor and mdm uart right?

 

Also, when we start XMD, there is an option to choose which processor we want to access. Doesn't it mean only one processor can be processed in one shell?

 

Anyway, I gonna try out to connect both processors in one shell using " connect mb mdm -cable type ...." command.

0 Kudos
Reply
Visitor
Visitor
10,718 Views
Registered: ‎05-27-2010

Hi,

 

Finally I get it works. I think should share this with others on debugging the same problem.

 

1) The documentation is wrong, there is only one XMD shell required.

2) After opening the XMD shell, use connect mb mdm -debugdevice deviceNr <jtag no.> cpunr <processor number> to connect both of the processors. (each at a time)

3) type -debugconfig -reset_on_run disable to avoid system reset

4) type targets 0, download the first .elf file, and run

5) type targets 1, and download the second .elf file

6) type connect mdm -uart

7) type terminal -jtag_uart_serial to connect to telnet

8) open up hyperterminal to connect to jtag com port (usually is COM1) and localtelnet (port 4321)

9) run for the second target

 

Settled!! :smileyhappy:

0 Kudos
Reply
10,423 Views
Registered: ‎06-14-2010

I also started with XAP 996 for 2 MB system sharing a BRAM

I am also facing the same problem now.

1) How to get the device numbers: JTAG no. for each Micorblaze.

2) I gave jtag no as 3 (as the FPGA number in the table of JTAG chain) and tried running it.

Both .elf files are in separate folders

After starting running the 1st elf file, it enters the first loop and printed the value

When I changed the target to 1 and tried dow the elf file by going into the directory meant for second microblaze it gave following error:

ERROR: Failed to download ELF file

I-side memory access check failed

   section, 0x00000000-0x00000003  Not accessible from processor I-side interface

 I am using virtex-2 pro FPGA and EDK 10.1.3. Any help will be really great!!

 

0 Kudos
Reply
Observer
Observer
9,145 Views
Registered: ‎01-02-2014

i am implementing dual microblaze system for serial comm. using edk13.1 and xc5vlx110t.

 

thanks for the help (to use single XMD console)

 

while launching this, want to clear couple of querries :

1) from where i will know  "jtag no." and "processor no." 

2) while implementing using 2 different xmd console, there was an error of  "unable to open hello_1.elf "

 

also when i provide address / location of elf file, it shows " cannot download this file" 

0 Kudos
Reply
Explorer
Explorer
9,138 Views
Registered: ‎03-31-2011

while launching this, want to clear couple of querries :

1) from where i will know  "jtag no." and "processor no."

 

 

Normally, the jtag chain no. is 3 or 5 and processor no.
is 2.

 

2) while implementing using 2 different xmd console, there was an error of  "unable to open hello_1.elf "

 

also when i provide address / location of elf file, it shows " cannot download this file"

 

If you use 2 different xmd console then this error will come..as XMD is connected to Microblaze 0 by deafult so it can't load hello_1.elf ( I assumed MB0 has hello_0.elf and for MB-1 its hello_1.elf).You have to connect XMD to other processor and one xmd console will debug two MicroBlaze. So, at first use command "targets", This command is to check which devices the XMD is connected to. Make sure you have both microblaze
processors. XAPP-996 may also help in this context.

 

regards

 

 

 

 

 

0 Kudos
Reply
Observer
Observer
9,118 Views
Registered: ‎01-02-2014

thanks for jtag no. and processor no. 

 

i have used one xmd console to debug two MicroBlaze 

after using "targets" , it shows both microblaze are connected to respective targets 

 

but when command ("dow hello_1.elf") is used to download the elf file, it shows an error as "failed to download ELF file" and "Unable to open file" ...

 

i have also used location of file for e.g. "dow  E:\hello_project\SDK\simple hello\hello_01\debug\hello_1.elf" 

still the error occurs...

 

regards......

 

 

0 Kudos
Reply
Explorer
Explorer
9,102 Views
Registered: ‎03-31-2011

Did you ensure that, both MicroBlaze should not have same starting address in their respective linker scripts?

 

regards

0 Kudos
Reply
Observer
Observer
9,095 Views
Registered: ‎01-02-2014

why jtag no. used is 3 or 5 only and why processor no. is 2 only ?...

 

the ELF file is generated int he following address:- 

 

"  E:\mblaze\dual_processor\SDK\simple_hello\hello_world_0\Debug\hello_1"

 

"  E:\mblaze\dual_processor\SDK\simple_hello\hello_world_1\Debug\hello_2"

 

they both are in separate folder as 'hello_world_0' & 'hello_world_1'  it this need to be changed ?

 

where i will get their respective linker scripts

 

 

regards.....

0 Kudos
Reply
Explorer
Explorer
8,196 Views
Registered: ‎03-31-2011

why jtag no. used is 3 or 5 only and why processor no. is 2 only ?...

 


Its not "only"...but usually it appears as 3 or 5...there is obvious reason behind it.

 

Check, Xilinx UG 111 ( XMD Chapter) for detailed explanation of -debugdevice, devicenr & cpunr. also you could look for some XMD reference guide avialable on google.

 

the ELF file is generated int he following address:- 

 

"  E:\mblaze\dual_processor\SDK\simple_hello\hello_world_0\Debug\hello_1"

 

"  E:\mblaze\dual_processor\SDK\simple_hello\hello_world_1\Debug\hello_2"

 

they both are in separate folder as 'hello_world_0' & 'hello_world_1'  it this need to be changed ?

 
Separate folder does not mean that they both have different starting address of their execution in their linker script...

 

where i will get their respective linker scripts

 

 

In the SDK, where you devoloped your software applications

 

thanks

 

0 Kudos
Reply
Observer
Observer
8,183 Views
Registered: ‎01-02-2014
" both MicroBlaze should not have same starting address in their respective linker scripts"

how to get this working.. as there are many files in SDK as SDK_export and others like debug, lib, src etc.
0 Kudos
Reply
Explorer
Explorer
8,179 Views
Registered: ‎03-31-2011

" both MicroBlaze should not have same starting address in their respective linker scripts"

how to get this working.. as there are many files in SDK as SDK_export and others like debug, lib, src etc.

 

 

The linker script is a file which is associated with the every applications written in SDK. In SDK_Export look for "lscript.ld",this file will give the info.

 

Please,look for xilinx tutorial and other linker script related info easily available on web.

 

 

 

 

 

0 Kudos
Reply
Observer
Observer
8,142 Views
Registered: ‎01-02-2014

There is no such file named  "lscript.ld" in SDK.

 

however in sdk when "generate linker script" tab is used from "xilinx tools"  it generates linker file according to programmers 

need like saving the file in any project folder with any name.

 

i have generated two seperate linker files for each of the microblaze and they are generated in seperate folders in SDK folder.

 

  but that do not give any information about the error of XMD console that is "unable to download ELF file"

or "failed to download"

 

please help 

 

 

 

regards....

0 Kudos
Reply
Explorer
Explorer
8,134 Views
Registered: ‎03-31-2011
would you kindly share your linker script files for two MB?
0 Kudos
Reply
Observer
Observer
8,129 Views
Registered: ‎01-02-2014

linker script file has been found in src folder of SDK...

 

they are attached below (lscript.ld)

 

reading those file shows address and  length of ddr_sdram, vectors , stack generation etc.

it does not helped me to understand  why there is problem to download the "elf" file

 

in xmd window when both the hyperterminals are connected and after targets command it shows that both microblaze are targeted, but while downloading elf file....  it shows "processor is already running" and "unable to download elf file..."

0 Kudos
Reply
Explorer
Explorer
8,126 Views
Registered: ‎03-31-2011

Hi,

 

It seems that ur application is residing on DDR_SDRAM, but both have starting address.0xD0000000..so for another MB, u could make it as 0xD1000000. also increase the stack and heap size..it shows, STACK_SIZE : 0x400; make it 0x3000, same for heap.

 

targets 0

then downlaod .elf for MB-0

targets 1

then download for MB-1..same as xapp-996

 

Check, if it gives any luck

 

thanks

0 Kudos
Reply
Observer
Observer
8,120 Views
Registered: ‎01-02-2014

i have changed the starting address of DDR_SDRAM for MB_1, and  stcak and heap size for both, (same as provided by u).....

 

but while using the command " dow hello_0.elf "  the error sustains that " Failed to download ELFfile"...

 

unable to sort out this...

 

 

 

 

 

thanks for ur help...

 

0 Kudos
Reply
Observer
Observer
8,111 Views
Registered: ‎01-02-2014
 
0 Kudos
Reply
Observer
Observer
8,071 Views
Registered: ‎01-02-2014

i have used seperate bsp for each c code....

 

whether it had made the problem....

but separate & even combined bsp dosnt solve the issue...

 

0 Kudos
Reply
Observer
Observer
2,369 Views
Registered: ‎01-02-2014

 

thanx  for help......

 

i have successfully implemented dual microblaze system...

the error "unable to download elf file" was solved

 

soln. seperate bsp for each microblaze and different peripheral access to each of them...

 

so, serial comm. (uart) on one MB and led blinking peripheral on other.

 

 

 

 

regards.............. 

0 Kudos
Reply