转载:http://blog.sina.com.cn/s/blog_612514b00100ftk9.html
QUARTUS II版本:9.0
FPGA型号:EP2C8Q208
配置芯片:EPCS4
SDRAM型号: HY57V28820HCT-H
FLASH型号 :TE28F320J3
前面的一些问题是入门时遇到的,能记得的都列出来了。后面的再遇到什么问题会不断更新……
一.SDRAM设置http://blog.sina.com.cn/spflying
在Nios II IDE 中下载时出现
Using
Pausing
Reading
Initializing
OK
Downloading
Downloaded
Verifying
Verify
Leaving
找不到SDRAM、地址不存在的错误。
原因是搞错了SDRAM的型号并查错了PDF,导致SDRAM控制IO错乱。错误的设置是
我的SDRAM型号是HY57V28820HCT-H:128Mbit
二.CPU复位电路错误http://blog.sina.com.cn/spflying
Nios II IDE 下载时出现如下错误提示:
Using cable "USB-Blaster [USB-0]", device 1, instance 0x00
Pausing target processor: not responding.
Resetting and trying again: FAILED
Leaving target processor paused
在网上找了很多资料,出现这种通信错误的情况基本上是由于PIN定义错误或者是复位错误。仔细检查后发现PIN定义没有问题,在检查delay_reset_block后发现一个连线没有连接上,导致不能正常复位。基本上属于上述情况。以后要注意细心了!
三.FLASH下载内容为空http://blog.sina.com.cn/spflying
在有SDRAM和FLASH的SOPC中,如果最后要下载程序到FLASH中,在NIOS II 中用FLASH PROGRAMER下载时有
# Programming flash with the project
"$SOPC_KIT_NIOS2/bin/nios2-flash-programmer" --base=0x03000000 --cable='ByteBlas
terII [LPT1]' --sidp=0x04001038 --id=417604522 --timestamp=1257256685
h.flash"
Empty flash content cannot be programmed or verified
的错误。提示说要给flash编程的数据是空的。
原因是RESET VECTOR指向了SDRAM,应该指向FLASH。因为这里要下载的是一个工程,下载的是工程内容,reset vector指向了SDRAM与flash就没有关系了,也就不会下载到flash中。
四.LED基础实验PIO基地址错误http://blog.sina.com.cn/spflying
**** Build of configuration Debug for project hello_led_0 ****
make -s all includes
Compiling hello_led.c...
../hello_led.c: In function `alt_main':
../hello_led.c:141: error: `LED_BASE' undeclared (first use in this function)
../hello_led.c:141: error: (Each undeclared identifier is reported only once
../hello_led.c:141: error: for each function it appears in.)
../hello_led.c:190:80: warning: no newline at end of file
make: *** [obj/hello_led.o] Error 1
Build completed in 3.625 seconds
原因是在定制SOPC系统时PIO的定义与这里程序的名称不相同。有两种方法,一种是在这里直接改成SOPC里面PIO的名称,第二种方法是改SOPC里面的PIO名称。clean project后重新build就可以了~
五.NIOS II
一个论坛上看到的。问题现象:
在ep2c下试验过没有任何问题的NIOS II在ep3c中无法自举(启动),但是看上去附加的verilog IP core在工作,只是nios2的C主程序无法运行。nios2eds也没有什么明显的报错。
原因:
NIOS2_EDS_9.0 的Flash Programmer有bug!
解决方法是把/opt/altera8.1/nios2eds/bin/sof2flash.jar 复制到9.0的相应目录里。(需要此文件可以发邮件到spfei@Hotmail.com索取)
NIOS2_EDS_9_SP2应该没有这个问题。
QUARTUS II版本:9.0
FPGA型号:EP2C8Q208
配置芯片:EPCS4
SDRAM型号: HY57V28820HCT-H
FLASH型号 :TE28F320J3
之前已经接触QUARTUS II比较长的时间了,也遇到过不少问题,有些比较简单解决后就忘了,现在把能记得起来列在前面几个。后面的是自己后续遇到的问题的集锦...
1.多模块或多进程驱动同一信号http://blog.sina.com.cn/spflying
Error (10028): Can't resolve multiple constant drivers for net "FLASH_A[7]" at led.v(32)
2.多功能管脚的设置http://blog.sina.com.cn/spflying
Error: Can't place multiple pins assigned to pin location Pin_108 (IOC_X34_Y2_N0)
Info: Fitter preparation operations ending: elapsed time is 00:00:00
Error: Can't fit design in device
Error: Quartus II Fitter was unsuccessful. 2 errors, 0 warnings
Error: Quartus II Full Compilation was unsuccessful. 4 errors, 56 warnings
3.CLK 连接http://blog.sina.com.cn/spflying
4.负载电容(load capacitance)警告http://blog.sina.com.cn/spflying
Warning: Found 8 output pins without output pin load capacitance assignment
消除此警告要在assignment>assignment editor>下指定负载电容。如下图所示:
Specifies the capacitive load, in picofarads (pF), on output pins for each I/O standard.
5.行波时钟警告http://blog.sina.com.cn/spflying
Warning: Found 2 node(s) in clock paths which may be acting as ripple and/or gated clocks -- node(s) analyzed as buffer(s) resulting in clock skew.
关于全局时钟,再多说几句。23,24,27,28是EP2C8Q208的四个全局时钟管脚。他们比一般的IO管脚驱动能力更强,通常建议将时钟信号绑定在这些管脚上,以保证时钟信号的驱动质量.4个管脚是等效的,可以用不同时钟同时驱动他们,这样FPGA内部可以工作在多个时钟域下,不同电路由不同时钟来驱动.
6.仿真时存储器初始化http://blog.sina.com.cn/spflying
在Quartus II环境下,打开mif文件,点Save As,选择Hexadecimal(Intel-Format) File(*.hex),或者点击Export,用Save as type选择RAM Initialization File (*.rif),也可能在命令行下输入:
mif2rif <mif_file> <rif_file>
打开ram模块文件,找到lpm_file或init_file,指向刚刚生成的hex文件或rif文件。
lpm_ram_dp_component.lpm_file = "path"
使用hex文件时,不需要compiler directives,使用rif文件时,需要加入USE_RIF,如下
vlog -work alter_mf altera_mf.v +define+USE_RIF=1
这样就完成了数据导入。