Chinaunix首页 | 论坛 | 博客
  • 博客访问: 404443
  • 博文数量: 105
  • 博客积分: 4100
  • 博客等级: 上校
  • 技术积分: 1040
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-27 19:57
文章存档

2012年(1)

2011年(9)

2010年(4)

2009年(25)

2008年(66)

我的朋友

分类:

2008-07-28 09:56:34

Nios II中Verifying 00000020 ( 0%)类似错误的解决
 
今天用上sdram与falsh做为memory,在NIOSII中则出现了以下的错误,
ownloading 00000020 ( 0%)
Downloaded 21KB in 0.4s (52.5KB/s)
Verifying 00000020 ( 0%)
Verify failed between address 0x20 and 0x5203
Leaving target processor paused
调试时出现的,编译没有问题,关于出现这个问题的原因很多,以下是NIOS II官方论坛的讨论,希望能对大家有些帮助
具体的地址为:
我这次的错误也找到了,总结一下.如果你出现类似的错误,90%是你的sdram通信不正常,关于具体的原因,可以用排除法一步一步去找,(确定是否是这个原因的方法很简单,你可以做一个最小系统,不使用sdram,使用on_chip_memory看系统能否跑起来,这样可排除其它可能性),另外如果是硬件问题,你可以想办法观察sdram的具体时序,看其是否正确?一般比较多的是引脚分配不对,导致无法与sdram进行通讯,我的就是这样.因为大多用的开发系统他们提供给你的中人是一个tcl文件让你来分配引脚,,当你在你自己的系统中写的引脚名称和上面分配的不一样时,就导致了不能与sdram进行通讯.
 
 
2008年5月13号更新,
对这个问题更有一点看法,
 从这句Verifying 00000020 来看,验证地址为0x 00000020 出错,然后你打开你的硬件工程,进入到sopc——builder中,看这个地址对应的那个IP是什么?应该就是nios II与那个组件之间的通讯有问题,我的在这个地址分给了sdram,所以毛病也就是在sdram当中了;而sdram不能通讯问题的可能性也很多,如时序定义不对,引脚分配错误,忘记给sdram的时钟与系统时钟需移相-72度等,这些都是很常见的错误。
 
- - -
Full Version:
lemonoje
ph34r.gif

Well - as with many other people from what I've read - I get the old Verify Failure message when trying to download any project including just a hello_world program:

Downloading 00000020 ( 0%)
Downloading 00010000 (71%)
Downloaded 91KB in 1.1s (82.7KB/s)

Verifying 00000020 ( 0%)
Verify failed between address 0x20 and 0xFFFF
Leaving target processor paused

HOW CAN I GET RID OF THIS ERROR - OR CAN I JUST NEVER RUN PROGRAMS AGAIN?

thanks,
baycool
Hi Lemonoje,

THere are so many reasons for the Verify fail, that is why it is so popular. smile.gif

Here are a few that I have seen

1. Bad memory interface, physical board problem
2. Timing issue with memory
3. Lack of non-volatile memory. This confuses processor.

Hope that helps a little.

-Baycool
dannyjacobs
Hi Lemonojo,

are you sure you downloaded the right NIOS II into your board...

Cheers,

Danny
lemonoje
Well, the memory interface is a straight SDRAM instantiated in SOPC and then all the signals are routed to the chip. The memory in terms of timing works fine because I tested it using LabVIEW making calls to FS2's MDI to perform adderss/data bus tests, etc...

Everything works doing basic R/W peek/pokes from the FS2 CLI. Thanks for the feedback. Any other ideas?


PS - I am also getting Verify Failed from the Nios II flash programmer (from the sdk shell) when trying to load flash. I even tried re-installing Nios II 5.1 - no luck.
atjung
If you have problems with downloading programs from the IDE, I suggest to try reconfigure your FPGA with a "simple" test design that is a sub-set of your design. For example to isolate if your problem is SDRAM or SRAM, try to use/add onchip_memory to run hello world from. If the onchip_memory program runs, but loading the program to SDRAM/sram still fails, I would take a closer look at the memory timing or phase setting.

Once feature I've found useful in sorting out a "verify failure" is to have a System ID peripheral (this is found in the SOPC Builder "other" components group) in my system design. This will sort out if I accidentally loaded the wrong system on my development board or if the board gets reset into a "safe" design on a NIOS II dev board.

When I download a program to a board, if I have the wrong system loaded it will flag a different time stamp.
Another useful part of this is if the system ID tag is something odd like FFFF_FFFF, it shows that I could have a hardware issue like:
1) some setting error in my design that is messed up my system like I forgot to set "unused IOs to tri-state" (by default Quartus II will set all unused IOs to drive ground which may cause issues with other componets on the board that are not expecting the FPGA to pull its pins to ground).
2) line noise and my JTAG port needs a pull-up resistor/cap on a signal to handle line noise or I could have a bad USB-blaster etc....

Good luck in isolating the problem
lemonoje
I also use the system ID feature to make sure I have the correct hardware. That's a great idea to make some internal RAM to try and run out of. The problem with that may be that the Stratix II (2S15) doesn't have much RAM in it at all (even compared to the lowest Stratix I). I know a hello_world project barely fit into my one Stratix I internal RAM design, and like I said it has much more RAM. Nonetheless, I'll try it.

I am also trying to look at the JTAG signals to see if something looks bad there...
lemonoje
Just as an update, I got my programs to download/verify and run again. I originally used the Altera provided calculations to phase shift the SDRAM clock, but I thought I should just try and recalculate everything. When I do this my calculations come out quite different than the Altera example where both of my lead numbers, for example, were negative. So I didn't know if I should take the lesser of the two? Take the absolute value of both and then negate one?

So, what I did was regenerate the system in SOPC, entirely recompile in Quartus, and then recalculate the SDRAM phase shift. I entered this, recompiled in Quartus, and now it seems to be working fine. biggrin.gif
LiangYi
Hi lemonoje,

QUOTE
The memory in terms of timing works fine because I tested it using LabVIEW making calls to FS2's MDI to perform adderss/data bus tests, etc...


But, how do you get the sdram pins work fine? The IDE display download info, then verify failed. Do you know that what will be done in verify process and what is the sdram pins state?

Thank you,
LiangYi
lemonoje
QUOTE(LiangYi @ Jan 19 2006, 02:36 AM)
Hi lemonoje,

QUOTE
The memory in terms of timing works fine because I tested it using LabVIEW making calls to FS2's MDI to perform adderss/data bus tests, etc...


But, how do you get the sdram pins work fine? The IDE display download info, then verify failed. Do you know that what will be done in verify process and what is the sdram pins state?

Thank you,
LiangYi
*



I'm sorry I have no idea what you're asking.
atjung
QUOTE(LiangYi @ Jan 19 2006, 12:36 AM)
Hi lemonoje,

QUOTE
The memory in terms of timing works fine because I tested it using LabVIEW making calls to FS2's MDI to perform adderss/data bus tests, etc...


But, how do you get the sdram pins work fine? The IDE display download info, then verify failed. Do you know that what will be done in verify process and what is the sdram pins state?

Thank you,
LiangYi
*





If I understand what you are asking -- From talking with other users, if you have "boarderline" timing issues with memory doing peeks and pokes to a few memory locations will not always show a problem. Peeks and pokes only help show "major" timming issues or incorrectly connected memories.

If you hit the memory with a large block of data transfers the "boarderline" memory timing issues will start to up. For example
1) A DMA transfer to memory and back shows different results
2) If you load your program into SDRAM memory that has borderline timing issues, the processor is always accessing its next instruction so the memory problems will show up quickly by your program locking up.
3) If you use the IDE download a new program onto your board (writes are ok) and it fails verify (read fails) then one cause could be memory timing or I incorrectly connected the memory.
LiangYi
Hi,

I resolve my problem.

I recheck the hardware connect and jointing. I found there has a data pin jointing to gnd. So, I re-solder this pin, now it works OK.

Thank you,
LiangYi
lemonoje
QUOTE(atjung @ Jan 19 2006, 05:03 PM)
QUOTE(LiangYi @ Jan 19 2006, 12:36 AM)
Hi lemonoje,

QUOTE
The memory in terms of timing works fine because I tested it using LabVIEW making calls to FS2's MDI to perform adderss/data bus tests, etc...


But, how do you get the sdram pins work fine? The IDE display download info, then verify failed. Do you know that what will be done in verify process and what is the sdram pins state?

Thank you,
LiangYi
*





If I understand what you are asking -- From talking with other users, if you have "boarderline" timing issues with memory doing peeks and pokes to a few memory locations will not always show a problem. Peeks and pokes only help show "major" timming issues or incorrectly connected memories.

If you hit the memory with a large block of data transfers the "boarderline" memory timing issues will start to up. For example
1) A DMA transfer to memory and back shows different results
2) If you load your program into SDRAM memory that has borderline timing issues, the processor is always accessing its next instruction so the memory problems will show up quickly by your program locking up.
3) If you use the IDE download a new program onto your board (writes are ok) and it fails verify (read fails) then one cause could be memory timing or I incorrectly connected the memory.
*



This is exactly correct. Peeks and pokes are good for identifying more major issues, although FS2's command line can load programs, etc... which WILL do large blocks of data transfer to test the timing exhaustively. I had been only doing peeks and pokes from the command line and everything seemed fine. Verify was failing, as you put it, becuase of "boarderline" timing.
crisjory
I would like to continue this discussion.
My system works fine, but sometimes I do a little change in the vhdl of a periphal and then the ide begins with Verify failed message...
Almost all changes don't cause problems, but a few changes do that and it seems there is no relationship with change in memory map or behavior.
Someone has a trick for that?
crisjory
I found it!!

I was using a C0 output pll for the sdram_clk, and sometimes it dont achieve the desired phase shift for the sdram. Now I m using a E0 output pll, it is exclusive for external output pll and dont receive influence from internal routing.
I hope this can help another guys....
lemonoje
great - glad you found the problem! That will probably also get rid of the jitter warning error that you get when it has to route internal
Buca
QUOTE(lemonoje @ Feb 3 2006, 03:13 PM)
great - glad you found the problem!  That will probably also get rid of the jitter warning error that you get when it has to route internal
*



Hi lemonoje i'm getting started now with a stratix II (EP2S60F1020C4) and i had the same problem :
Verifying 03000020 ( 0%)
Verify failed
Leaving target processor paused.

I solved it by downloading an the board the standard.qpf file that i found i the directory:
altera\kits\StratixII_DSP_Kit-v1.1.0\Examples\HW\NiosII\example_designs\vhdl\standard

I have downloaded this file without compiling it.
I started Nios II IDE and runned a sample project unchecking Validate Nios II System ID before software downolad.
Everything works fine now.Good Luck and sorry if said uncorrect things but i'm not so expert as you are! tongue.gif
ikuo005
Hi lemonje:
I have a question, what calculation did you do to find out the phase shift needed for SDRAM?? Where can I find out more about the calculation for the phase shift ?

I have been using the ALTERA example design all along throughout my project, and it has been fine until recently .
I just made a really huge JPEG decompresssion custom hardware component, I fitted it into the standard design example from Altera and somehow the verification started failing ... sad.gif

Any idea??
And also i run my jpeg componenet at a different frequency (35Mhz) than my board freq (50Mhz), do you know how can I find out about any clock setup time or hold time I need to configure to read the memmory I built within the jpeg component?

Thanks in advance
Tony
lemonoje
Tony,

Check out the "SDRAM Controller with Avalon Interface" data sheet at :
. At the very bottom you will find calculations for this.

With regards to the new component that runs at a different clock frequency than the CPU - have you hardended the signals across clock domains? If I'm understanding, it sounds like you have a 50MHz clock for CPU and a 35MHz clock for the JPEG logic, which would require special care for the signals to cross each other to avoid instability.

I'm very busy now, so sorry if the response time is a while...
ikuo005
Hi Lemonoje,
Thank you very much for your reply.
Yes, I found the doc from the Altera website, but I have been having difficulty finding the right tso and th from the compilation report. (i found max and min tco)

I was abit confused about the tsu and th becoz the th and tsu i got from the compilation report are quite different to the ones used in the example calculation in the doc.

For example, for th I had -0.963 for th but it's -5.6 ns in the example. Is this what I should be getting??

I tried -3.5ns shift for my sdram clock, and it seems to work fine. but the phase shift I should be using is actually -1.0ns according to my calculation (I haven't really tried this shift)

Yes, I was running my jpeg unit and NIOS II CPU at a different frequencies (35Mhz&50Mhz) but I decided to get the functionalities right first by running them both at 35 Mhz. It's easier to adjust the timing for SDRAM clock with lower frequency but i am not exactly sure how should I adjust it, more negative or more positive?.

I guess we have to do it through trial and error?

(MY SDRAM is the same as the one used in the example).
I compiled the standard Altera example,( I didn't modify it), and the tsu, th, max tco and min tco i found in the compilation report are :
1.405, -0.963, 4.127 and 2.362. ns
from the calculation using the same SDRAM, I got 2.161/2 ~= 1.0805ns. does this sound right?

Oh and also, do you happen to know that is it necessary to adjust the timing setting such as "issue one refresh command every ___ns", duration of refresh command ...etc if we lower the clock to 35 Mhz ?

Thank you very much.

Tony
mgilroy
I tried all the combinations of things to try and fix this problem.

I finally managed to get rid of the verify fail by including the sysid block. Other than that no changes were made. Strange.
bigpunx
I am trying to load the uClinux image for the DE2 board. I've loaded the sof and pof and downloaded using the wiki instructions. I keep getting the following message..

Downloading 630KB in 7.7s
Verfying 00500000 <0%>
Verify failed between address 0x500000 and 0x502A19

Anybody know why I can't get this working? I'm using the DE2_NET project and zimage_de2_net files. It should work but for me it doesn't. Please help me make this DE2 board more than a 500$ paper weight that blinks.
hippo
QUOTE(bigpunx @ Nov 13 2006, 08:20 AM)
I am trying to load the uClinux image for the DE2 board.  I've loaded the sof and pof and downloaded using the wiki instructions.  I keep getting the following message..

Downloading 630KB in 7.7s
Verfying 00500000 <0%>
Verify failed between address 0x500000 and 0x502A19

Anybody know why I can't get this working?  I'm using the DE2_NET project and zimage_de2_net files.  It should work but for me it doesn't.  Please help me make this DE2 board more than a 500$ paper weight that blinks.
*

The sdram address range of de2 is 0-0x00800000.
The zImage will be loaded to 0x00500000.
SO it loaded, but verify failed.

Do you use quartus2 v6.0 sp1, nios2 v6.0 sp1, de2 system disc v1.3 ?

Do you use quaruts2 to config the de2 with DE2_NET.sof before nios2-download?
The config data of fpga will lose when power off.

Have you tried some demo programs from sdram?
kc@xelic.com
QUOTE(crisjory @ Feb 3 2006, 09:57 AM)
I found it!!

  I was using a C0 output pll for the sdram_clk, and sometimes it dont achieve the desired phase shift for the sdram. Now I m using a E0 output pll, it is exclusive for external output pll and dont receive influence from internal routing.
  I hope this can help another guys....
*



Hello, I am getting the old veriy failed error message. However, I am using the cycloneII Device and i don't think cycloneII supports the E0 output pll. I was wondering what device you were using.

Thank you
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please .
Invision Power Board © 2001-2008
阅读(4023) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~