cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
18,427 Views
Registered: ‎09-26-2007

download problem

When I build a project in EDK 9.1.03i and press download buttons on the menu, it can generate netlists and bitstream. But it can not download the bitstream to the custom board correctly. It said:
 
ERROR:iMPACT:583 - '1': The idcode read from the device does not match the
   idcode in the bsdl File.
INFO:iMPACT:1578 - '1':  Device IDCODE :        00001101101101101101101101101111
INFO:iMPACT:1579 - '1': Expected IDCODE:    00000001001001001010000010010011
Elapsed time =      0 sec.
 
However, when I use the Impact in ISE to download the download.bit. It will be successful and the board works correctly.
 
I'm not sure if the project that I build has any missec parameters. Most of project built by myself has this error problem.
 
Please let me know what's wrong. Thank you!
0 Kudos
13 Replies
Highlighted
Xilinx Employee
Xilinx Employee
18,424 Views
Registered: ‎08-13-2007

Liya,
 
Please check the download.cmd file contents (under XPS's Project tab -> Project files). This file specifies the position of the FPGA in the JTAG chain.
When you create a BSB (Base System Builder) design with a board supported by an xbd file (e.g. Spartan-3E starter kit), this tells EDK/BSB a lot of information about the board including:
-FPGA
-peripherals
-pin-out (used to generate the ucf)
-JTAG position
 
When you create a BSB design for a custom board (as you've done), you have to:
-specify the FPGA (during the BSB wizard)
-use the appropriate peripherals for your board
-edit the ucf with the appropriate pin locations for your board (later)
-possibly edit the download.cmd file to tell iMPACT where the FPGA is in the JTAG chain (later)
 
When you run iMPACT in ISE or stand-alone (GUI mode), you will see a representation of the JTAG chain (e.g. XCF PROM -> FPGA or FPGA -> XCF PROM, FPGA -> FPGA, etc.) It can autoscan the chain illustrating the devices seen via JTAG and then you specify your operations based on your interaction with the GUI.
 
here is a default file, which assumes the FPGA is the 1st device on the chain:
setMode -bscan
setCable -p auto
identify
assignfile -p 1 -file implementation/download.bit
program -p 1
quit
 
EDK uses the download.cmd file to run iMPACT in batch mode. This file has to correctly reflect the position of the FPGA on the JTAG chain. Do you see something like PROM -> FPGA when you run iMPACT under ISE? I think once this file is updated correctly, you will see the correct results in EDK.
 
Cheers,
bt.
Highlighted
Observer
Observer
18,406 Views
Registered: ‎09-26-2007

First, let me thank you for your professional explaination!
 
Then, I opened the download.cmd and found the command in this file was exact the lines that you list in your explaination. However, I don't know how to correct it.
 
I used only one 2vp7 with a Prom XCF08 on my board. Also, as you said, my project is running on stand-alone mode. When I used Impact of ISE, I found the icon represented XCF08 is before the FPGA. Maybe it's the type of Prom ( or flash) -> FPGA.
 
Would you please tell me how to correct the download.cmd file on this condition?
 
Thank you very much!
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
18,403 Views
Registered: ‎08-13-2007

Liya,
 
You're welcome.
 
Try this:
setMode -bscan
setCable -p auto
identify
assignfile -p 2 -file implementation/download.bit
program -p 2
quit
 
 
This should correctly tell iMPACT that the FPGA is the second device in the chain.
 
Please let me know if this works correctly.
 
Best regards,
bt
 
== edit
I should have clarified that these changes:
-associate your bit file with the 2nd device in the chain (not the 1st)
-tell iMPACT to program the 2nd device (not the 1st)


Message Edited by timpe on 09-26-2007 06:49 PM
0 Kudos
Highlighted
Observer
Observer
18,396 Views
Registered: ‎09-26-2007

hi, thank you again! It works! I have tried several projects built in XPS, they can download correctly now! You are great!
 
However,  one of them could not work as I expected.  This maybe not the problem of download, since it can download successfully, and the download led has been lighted.
 
This project is booted by BRAM and the code has been installed in SDRAM, which is welded on my board. ( I set the linkscript as that.) After the bitstream file has been downloaded correctly, the LEDs on the board are controlled and lighted. And it should have sent some information to the hyperterminal to show the status, but nothing happened.
 
Do you think it has some problem in the parameters' setting?
 
Regards,
 
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
18,387 Views
Registered: ‎08-13-2007

I'm glad to hear things are working better.
It sounds like the projects that are working now all use BRAM. Since the BRAMs are internal to the FPGA, the download of the bit file on those projects is sufficient to load the FPGA with the processor subsystem as well as its code.
 
Your other project is set to run from external SDRAM. Typically the bootloop application is used (marked to Initalize BlockRAM) to occupy the processor. You then need some way to get your code into the SDRAM. I would try to launch the XMD shell (e.g. Debug -> Launch XMD...) and then enter "dow executable.elf" into the shell to load the SDRAM with your executable. If you don't do this step, the FPGA will appear to load correctly but the processor is effectively not really doing anything until the real processor instruction code (with UART output) gets into the external memory. The advantage to this approach is that your code size is no longer constrained to the available memory BRAM size of the FPGA. The disadvantage is that you have to use XMD to download the code after power-up. Not a big deal in the lab but likely not suitable for a board in the field.
 
More advanced applications are possible (beyond the scope of this discussion but illustrating possibilities)
-load a Flashwriter application into FPGA
-have Flashwriter copy code into Flash once it has been compiled
-configure FPGA PROM with a bootloader
-power cycle board or initiate reconfiguration
-on power-up, FPGA configures (e.g. from its own flash or other configuration option) and the processor bootloader in BRAM then copies processor code in flash to SDRAM (to speed up execution as SDRAM offers faster accesses)
-bootloader then jumps to SDRAM
 
I hope this helps.
 
 
 
 
0 Kudos
Highlighted
Observer
Observer
18,379 Views
Registered: ‎09-26-2007

hi, your explaination is very clear and I can learn more from that! I'm really honourable to get your help!
 
As you told me, I knew the first two applications, although I have never tried to use it.  For the others, I will search some related information to learn how  to employ them.
 
For this project I'm debugging, after I lanched XMD and dow executable.elf,  part of the program is running, since I have gotten the information from the Hyperterminal, as the following:
 
-- Entering main() --
Running GpioOutputExample() for LEDS...
GpioOutputExample PASSED.
 
 However, it seems to be stopped and I even don't know where it runs.  After waiting for a long long time, the last line (-- Ending main() --) won't appear.
Also, during the period of building all the applications, no error appears. 
 
Would you please tell me what happened?
 
Best Regards,
 
0 Kudos
Highlighted
Observer
Observer
17,976 Views
Registered: ‎01-07-2008

Hi,
 
I am using custom board with Virtex5. I have interfaced with SDRAM to write/read. When i have created Boot loop sequence, modified the tcl script accordingly. The downloading is process is completed. But i am n't getting the expected output.
can anyone help in this regards?
 
 
Regards
JVK Yadav
0 Kudos
Highlighted
Observer
Observer
17,975 Views
Registered: ‎01-07-2008

 
0 Kudos
Highlighted
Observer
Observer
17,966 Views
Registered: ‎09-26-2007

hi,
 
did you try to open the XMD to execute the elf file? I'm not sure if you set the boot0 in the plb_bram or the SDRAM.
 
Open the XMD, and run the following command:
 
dow executable.elf
run
 
then check the result. Hope it can help you.
0 Kudos
Highlighted
Observer
Observer
7,902 Views
Registered: ‎01-07-2008

Hi,
 
Yes i have tried this. i have downloaded using xmd and then typing the "dow ./executable.elf and run". Anything extra settings need to be set?
0 Kudos
Highlighted
Observer
Observer
7,900 Views
Registered: ‎09-26-2007

how about the linker script? Did you set the boot0 in plb_bram_if_ctrl_1?
0 Kudos
Highlighted
Observer
Observer
7,897 Views
Registered: ‎01-07-2008

How to set this?
0 Kudos
Highlighted
Newbie
Newbie
7,664 Views
Registered: ‎04-15-2008

Hi..
I also want to know the answer of above question as I'm also facing the same problem I also tried the software debugger and in that the code always toggle between address 0x00000000 and 0x00000004.
0 Kudos