Board logo

标题: [求助]不胜感谢! [打印本页]

作者: pennyllin    时间: 2006-9-13 16:23     标题: [求助]不胜感谢!

请大虾帮忙:我需要向nios 里移植一个FFT算法(用c或c++),需要做那些工作呢?
作者: kzw    时间: 2006-9-13 21:10

如果是fft的算法,你就把算法方面的计算的东西移过去就行了阿。不是用硬件实现的吧。
作者: pennyllin    时间: 2006-9-13 23:08

暂时没有打算用硬件实现,所有的运算都用软件,nios的定制是不是很简单?
初步打算先编一个信号,对之处理,看一下输出,验证一下fft程序的正确性 。
但现在又有问题是:我这个编好的信号怎么存放?



作者: kzw    时间: 2006-9-14 08:23

可以存放在片内ram中,做成rom的形式吧,最好是周期信号啊,非周期不好办。
作者: pennyllin    时间: 2006-9-14 08:58

为什么“最好是周期信号啊,非周期不好办”呢?请版主不吝赐教!
作者: pennyllin    时间: 2006-9-14 11:02

是便于验证吗?
作者: kzw    时间: 2006-9-14 13:20

对啊,这样就是验证一下啊,因为非周期信号不可能模拟保存的下的啊。
非周期信号也只能实时采集信号了。
作者: pennyllin    时间: 2006-9-14 15:17

非常感谢版主赐教!
作者: pennyllin    时间: 2006-9-14 15:54

我把蝶形单元的c程序模块放nios ide 中builder,出现下面的错误,请版主赐教!
**** Incremental build of configuration Debug for project fft_0 ****

make -s all
Linking fft_0.elf...
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: region onchip_memory_0 is full (fft_0.elf section .text). Region needs to be 40596 bytes larger.
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: region onchip_memory_0 is full (fft_0.elf section .bss). Region needs to be 396 bytes larger.
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: address 0x118c of fft_0.elf section .onchip_memory_0 is not within region onchip_memory_0
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: section .rodata [00000020 -> 000004f7] overlaps section .exceptions [00000020 -> 000001c7]
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: section .rwdata [000004f8 -> 00000f77] overlaps section .text [000001c8 -> 0000ae93]
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: section .bss [00000f78 -> 0000118b] overlaps section .text [000001c8 -> 0000ae93]
collect2: ld returned 1 exit status
make: *** [fft_0.elf] Error 1
Build completed

作者: pennyllin    时间: 2006-9-14 15:59

我把我编的整个程序加进去builde时,又出现一下错误:
**** Incremental build of configuration Debug for project fft_0 ****

make -s all
Linking fft_0.elf...
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: region onchip_memory_0 is full (fft_0.elf section .text). Region needs to be 40596 bytes larger.
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: region onchip_memory_0 is full (fft_0.elf section .bss). Region needs to be 396 bytes larger.
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: address 0x118c of fft_0.elf section .onchip_memory_0 is not within region onchip_memory_0
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: section .rodata [00000020 -> 000004f7] overlaps section .exceptions [00000020 -> 000001c7]
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: section .rwdata [000004f8 -> 00000f77] overlaps section .text [000001c8 -> 0000ae93]
/cygdrive/d/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: section .bss [00000f78 -> 0000118b] overlaps section .text [000001c8 -> 0000ae93]
collect2: ld returned 1 exit status
make: *** [fft_0.elf] Error 1
Build completed

作者: oceanx    时间: 2006-9-14 16:14

onchip_memory_0 is full
FPGA片上RAM不够。。。移到外面的空间去
作者: pennyllin    时间: 2006-9-14 16:25

请版主别生气,我还要请教一个极菜问题:
在nios定制时,我是否只要添加CPU、ON-CHIP MEMORY 、UART可以了??

作者: pennyllin    时间: 2006-9-14 16:38

是移到SDRAM或flash中吗?是不是nios 定制时把on chip memory 改成SDRAM或flash就可以了?

[此贴子已经被作者于2006-9-14 16:38:14编辑过]


作者: kzw    时间: 2006-9-14 18:41

不是这个意思,使把你的代码空间放到片外的ram中,我只是说把你的fft的数据存放到片内ram中。
作者: pennyllin    时间: 2006-9-14 20:23

知道了,谢谢版主!
作者: oceanx    时间: 2006-9-15 13:58

可以把.text段定义到片外的flash和ram中,
其他的.stack.rwdata可以定义到内部ram中,速度要快很多的
fft数据如果256个点,float型就要1kbyte哦,好好计算下空间,实在不行也只有放到外部的ram中。。。
作者: rouder21control    时间: 2006-9-15 14:34

on-chip ram不够,这么大的程序建议使用外部扩展ram
作者: pennyllin    时间: 2006-9-15 21:03

谢谢高手的答复,不过您们所说的操作我具体还不会,我会试着去做的。谢谢!




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0