This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我的第一次尝试是将我的大部分 FFT 和其他处理代码放入 RAM (用于表示速度)中、以便查找合适的链接器文件。
第0页:
/* begin 用于"boot to SARAM"引导加载程序模式*/
begin:origin = 0x000000、length = 0x000002
RAMM0:origin = 0x0000F5、length = 0x00030B
RAMLS0:origin = 0x008000,length = 0x000800
RAMLS1:origin = 0x008800、length = 0x000800
RAMLS2:origin = 0x009000,length = 0x000800
RAMLS3:origin = 0x009800、length = 0x000800
RAMLS4:origin = 0x00A000,length = 0x000800
复位:origin = 0x3FFFC0、length = 0x000002
第1页:
BOOT_RSVD:origin = 0x000002、length = 0x0000F3 /* M0的一部分,引导 ROM 将此用于堆栈*/
RAMM1:origin = 0x000400,length = 0x000400 /*片上 RAM 块 M1 */
RAMLS5 : origin = 0x00A800, length = 0x000800
RAMLS6:origin = 0x00B000,length = 0x000800
RAMLS7:origin = 0x00B800,length = 0x000800
RAMGS0:origin = 0x00C000,length = 0x002000
RAMGS1:origin = 0x00E000、length = 0x002000
RAMGS2:origin = 0x010000、length = 0x002000
RAMGS3:origin = 0x012000、length = 0x002000
}
谢谢、Dan
Dan、您好!
此致、
Omer Amir
您好、Omer:
感谢您的回答、也感谢您更正了我有关内存大小的问题。 我认为它计为字节、而不是16位字。
当导入一个新的工程示例时、cmd 链接器文件看起来像你在上面显示的那样、并且在"工程属性(常规)"下、链接器命令文件设置也会指向你显示的那个。 文件
但是,这个链接器文件没有列出所有可用的 RAM 在我的部分.
不过、一旦我从通用器件改为选择合适的器件(C280049C)、链接器文件就会消失。
我假设我应该对我的特定器件使用链接器文件、但随后修改 cmd 文件以进行 FFT 缓冲区对齐。
好的、有几个问题。
1) 1) 使用完整 RAM 空间需要哪些新增语句? 仅选择对齐步骤?
2) 2) FFT 例程表示输入缓冲区必须"对齐"才能正常运行、但例程说明声称它会交换 FFT 不同级的输入/输出缓冲区、因此不应该同时"对齐"输入和输出缓冲区? 由于我将有多个用于输入/输出/中间处理的缓冲器(请见下面的语句)、是否所有缓冲器都必须与 FFT "对齐"或者只是初始输入缓冲器?
3) 3)请更正任何 错误假设。
-输入数据是1024点真实数据,因此计划以下步骤:
-读在1024点的实数数据
-设置 FFT 结构, HND_CFFT 为512-pt
- 512-pt CFFT_f32t (HND_CFFT);
- 512-pt CFFT_F32_UNPACK(HND_CFFT );
-512-pt(或1024-pts) RFFT_F32_MAG_TMU0 ()(仍在尝试找出它需要什么,实数或复杂)
- 512-pt CFFT_F32_PHASE_TMU0 ()
-额外的频率域处理
- CFFT_F32_pack ()(正在准备 ICFFT )
- 512-pt ICFFT (HND_CFFT );
-现在我希望获得1024-pt 实数数据输出(或在一些额外步骤后?)
谢谢、Dan
P.S.如果一个电话是更有效的方式来处理这一点,你可以联系我在+1-719-359-5352或给我发电子邮件联系 dan.staver@tavetech.com
Dan、您好!
为了简化、 当你选择一个新的链接器文件时、它会选择这个新的链接器文件作为设置存储器的文件(因此在项目属性中修改它会使项目忽略之前的.cmd 文件)。 我不确定您为什么不修改现有的链接器文件并为 RAM 的其余部分添加内存配置、我认为这样做应该不会有问题。
解决您的问题:
此致、
Omer Amir
我想我现在已经找出了链接器文件、而没有出现任何问题。
现在、回答我的 FFT 问题。 那么、许多 TI 文档都说以计算优先的方式对2N 点实数数据执行 N 点 FFT 执行以下操作 ,所以不知道为什么你说不要展开? 请参阅示例工程"C2000\C2000Ware_4_03_00_00\libraries\DSP\FPU\c28\examples\FFT\DSP_rfft.c"、其中它们具有256点实数、但调用128点复数 FFT。
(line-63) #define TEST_SIZE (256U)
(line-107) CFFT_f32_setFFTSize(hnd_cfft, (FFT_SIZE >> 1)); // so they're setting up to do 128-point complex FFT
(line-112) CFFT_f32t(hnd_cfft); // do 128-point FFT here
(line-122) CFFT_f32_unpack(hnd_cfft); // now they explicitly call unwrap here so NOT built-in, no????
"cfft_f32t"的文档指出它交换每个阶段的输入和输出缓冲区、以便在后续处理之前检查最终的输出缓冲区。
5.4.2.18 void CFFT_f32t (CFFT_F32_struct_handle ndCFFT_F32)
此例程计算 N-pt (N = 2n;n = 5:10)复数的32位浮点 FFT
输入。 此函数将在继续执行 FFT 之前、以位反转格式对输入进行重新排序。
此例程以乒乓方式使用两个缓冲器、即在每个 FFT 级之后、输出和输入
缓冲器分别成为下一级的输入和输出缓冲器。 CFFT_F32对象
使用两个指针、CurrentInPtr 和 CurrentOutPtr 来跟踪开关。 应用程序
通过查看 CurrentOutPtr 来确定最终输出的地址。
然而、在实际的"FPU_CFFT.h"文件中与此相矛盾:
C:\ti\c2000\C2000Ware_4_03_00_00\libraries\dsp\FPU\c28\include\fpu32\fpu_cfft.h
extern void CFFT_f32t(CFFT_F32_STRUCT_Handle hndCFFT_F32);
//! \brief Complex Fast Fourier Transform (In-Place) using a Pre Generated
//! Twiddle Factor Table
//!
//! This routine computes the 32-bit floating-point FFT for an N-pt
//! (\f$ N = 2^{n}, n = 5 : 10\f$) complex input. The routine performs its
//! computation in-place, i.e. it uses a single buffer as both input and output
// for each FFT stage.
//! \param hndCFFT_F32 Pointer to the CFFT_F32 object
//! \attention
//! -# This function does not reorder the input in bit-reversed format before
//! proceeding with the FFT. It assumes the user has already bit reversed the
//! input by calling CFFT_f32_brev() prior to calling this function
//! -# The routine requires a single buffer of size 2N (32-bit float), for
//! computation; the buffer must be aligned to a memory address of 4N words
//! (16-bit).
哪一项是正确的? 是否有 FFT 专家可以提供帮助?
Daniel、您好!
许多 TI 文档称 对2N 点实数数据执行 N 点 FFT 是计算优先的做法 执行以下操作 ,所以不知道为什么你说不要展开?
我没有说 你不应该使用解包函数、我只是对你为什么要使用它感到困惑。 看起来您只是为了使用 RFFT 幅度函数而使用它、但如果您按照提供的示例进行操作、则没有问题。
然而,在实际的"FPU_CFFT.h"文件中与此矛盾:
我认为您查看的是头文件中 CFFT_f32t 函数描述的错误注释。 我反复选中了、与每个函数相关的注释直接位于函数声明的上方(注释和函数声明之间没有空格)。 以下是 CFFT_f32t 函数的注释:
//! \brief Complex Fast Fourier Transform using a Pre Generated Twiddle //! Factor Table //! //! This routine computes the 32-bit floating-point FFT for an N-pt //! (\f$ N = 2^{n}, n = 5 : 10\f$) complex input. This function will reorder //! the input in bit-reversed format before proceeding with the FFT. The //! routine uses two buffers in ping-pong fashion i.e. after each FFT stage the //! output and input buffers become the input and output buffers respectively //! for the next stage. The CFFT_F32 object uses two pointers, CurrentInPtr //! and CurrentOutPtr to keep track of the switching. The user can determine //! the address of the final output by looking at the CurrentOutPtr. //! \param hndCFFT_F32 Pointer to the CFFT_F32 object //! \attention //! -# The routine requires the use of two buffers, each of size 2N (32-bit //! float), for computation; the input buffer must be aligned to a memory //! address of 4N words (16-bit). Refer to the CFFT linker command file to see //! an example of this. //! -# If alignment is not possible the user can use the alternative, albeit //! slower, function CFFT_f32ut //! \warning This function is not re-entrant as it uses global variables to //! store certain parameters //! //! <table> //! <caption id="multi_row">Performance Data</caption> //! <tr><th> Samples <th> Cycles //! <tr><td> 64 <td> 2334 //! <tr><td> 128 <td> 5032 //! <tr><td> 256 <td> 11026 //! <tr><td> 512 <td> 24250 //! <tr><td> 1024 <td> 53220 //! </table> // extern void CFFT_f32t(CFFT_F32_STRUCT_Handle hndCFFT_F32);
您从 fpu_cfft.h 文件引用的注释似乎是针对 CFFT_f32it 函数的、这就是它们不一致的原因。
此致、
Omer Amir
"你是我的女人,我是你的女人。"
出于某种原因、我确实看到了错误的注释块。
我认为这应该可以解决该问题。 如果出现其他内容、我将打开另一个线程。
感谢您的帮助!