VSPA NCO Formula & Parameter Mapping (LA12xx)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

VSPA NCO Formula & Parameter Mapping (LA12xx)

跳至解决方案
691 次查看
Fengsq
Contributor II
I’m currently working with the VSPA processor and have a few technical questions about the NCO instruction. This numerically controlled oscillator instruction is designed for complex sequence generation, as referenced in Chapter 4.21 of the LA12xx VSPA3 ISA reference manual.
 
I have questions about the mathematical formula for NCO output described in the official document. In the given formula, the initial phase variable (nco_phase) is placed within parentheses and multiplied by the frequency value (nco_freq).
 
For my application, I need to generate a signal following this standard complex exponential form:
 
2π × frequency × index + initial phase.
 
I would like to confirm the precise mapping between this standard formula and the two configuration parameters: nco_phase and nco_freq. Additionally, I need to know if a scaling factor is required to convert normalized floating-point values into valid 32-bit integer inputs for this processor.
 
Thank you for your time and technical support. 
0 项奖励
回复
1 解答
608 次查看
yipingwang
NXP TechSupport
NXP TechSupport

In fr1_fr2_test_tool there is the feature to configure NCO to send complex single tone at DAC sample rate with script send_single_tone.sh, for example,
./send_single_tone.sh 0 1000000 80 will send on antenna 0 with 1Mhz 80% scale single tone."
above command converts the 1MHz into the value to be set in NCO register, you can also see below description in in DFE_Ref_User_Guide.pdf,
Frequency factor =
4294967296*frequency/sampling_rate.
Frequency range from 1- 122880000Hz. Sampling rate=DCS sampling rate.
example: to send 1Mhz at sampling 491520000, freq_factor=4294967296*1000000/491520000 =
0x855555

Regarding phase, default is starting from 0. Each NCO iteration generates 32 complex samples for example, then phase increase 32*phase_step automatically
phase_new = phase_old + 32*phase_step
the phase_step is your tone freq divided by sample_rate

在原帖中查看解决方案

0 项奖励
回复
1 回复
609 次查看
yipingwang
NXP TechSupport
NXP TechSupport

In fr1_fr2_test_tool there is the feature to configure NCO to send complex single tone at DAC sample rate with script send_single_tone.sh, for example,
./send_single_tone.sh 0 1000000 80 will send on antenna 0 with 1Mhz 80% scale single tone."
above command converts the 1MHz into the value to be set in NCO register, you can also see below description in in DFE_Ref_User_Guide.pdf,
Frequency factor =
4294967296*frequency/sampling_rate.
Frequency range from 1- 122880000Hz. Sampling rate=DCS sampling rate.
example: to send 1Mhz at sampling 491520000, freq_factor=4294967296*1000000/491520000 =
0x855555

Regarding phase, default is starting from 0. Each NCO iteration generates 32 complex samples for example, then phase increase 32*phase_step automatically
phase_new = phase_old + 32*phase_step
the phase_step is your tone freq divided by sample_rate

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2357118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EVSPA%20NCO%20%E5%85%AC%E5%BC%8F%26amp%3B%20%E5%8F%82%E6%95%B0%E6%98%A0%E5%B0%84%EF%BC%88LA12xx%EF%BC%89%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2357118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3E%E6%88%91%E7%9B%AE%E5%89%8D%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%20VSPA%20%E5%A4%84%E7%90%86%E5%99%A8%EF%BC%8C%E6%9C%89%E5%87%A0%E4%B8%AA%E5%85%B3%E4%BA%8E%20NCO%20%E6%8C%87%E4%BB%A4%E7%9A%84%E6%8A%80%E6%9C%AF%E9%97%AE%E9%A2%98%E3%80%82%20%3CSPAN%3E%E5%A6%82%20LA12xx%20VSPA3%20ISA%20%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C%E7%AC%AC%204.21%20%E7%AB%A0%E6%89%80%E8%BF%B0%EF%BC%8C%E8%AF%A5%E6%95%B0%E6%8E%A7%E6%8C%AF%E8%8D%A1%E5%99%A8%E6%8C%87%E4%BB%A4%E4%B8%93%E4%B8%BA%E5%A4%8D%E6%9D%82%E5%BA%8F%E5%88%97%E7%94%9F%E6%88%90%E8%80%8C%E8%AE%BE%E8%AE%A1%E3%80%82%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%E6%88%91%E5%AF%B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%8C%20nco_freq%20%E8%BF%99%E4%B8%A4%E4%B8%AA%E9%85%8D%E7%BD%AE%E5%8F%82%E6%95%B0%E4%B9%8B%E9%97%B4%E7%9A%84%E7%B2%BE%E7%A1%AE%E6%98%A0%E5%B0%84%E5%85%B3%E7%B3%BB%E3%80%82%20%3CSPAN%3E%E6%AD%A4%E5%A4%96%EF%BC%8C%E6%88%91%E9%9C%80%E8%A6%81%E7%9F%A5%E9%81%93%E6%98%AF%E5%90%A6%E9%9C%80%E8%A6%81%E7%BC%A9%E6%94%BE%E5%9B%A0%E5%AD%90%E6%89%8D%E8%83%BD%E5%B0%86%E6%A0%87%E5%87%86%E5%8C%96%E6%B5%AE%E7%82%B9%E5%80%BC%E8%BD%AC%E6%8D%A2%E4%B8%BA%E8%AF%A5%E5%A4%84%E7%90%86%E5%99%A8%E7%9A%84%E6%9C%89%E6%95%8832%E4%BD%8D%E6%95%B4%E6%95%B0%E8%BE%93%E5%85%A5%E3%80%82%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%E6%84%9F%E8%B0%A2%E6%82%A8%E7%9A%84%E6%97%B6%E9%97%B4%E5%92%8C%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81%E3%80%82%20%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2358322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20VSPA%20NCO%20Formula%20%26amp%3B%20Parameter%20Mapping%20(LA12xx)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2358322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%9C%A8%20fr1_fr2_test_tool%20%E4%B8%AD%EF%BC%8C%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%E8%84%9A%E6%9C%AC%20send_single_tone.sh%20%E9%85%8D%E7%BD%AE%20NCO%EF%BC%8C%E4%BB%A5%20DAC%20%E9%87%87%E6%A0%B7%E7%8E%87%E5%8F%91%E9%80%81%E5%A4%8D%E6%9D%82%E7%9A%84%E5%8D%95%E9%9F%B3%E3%80%81%E4%BE%8B%E5%A6%82%EF%BC%8C%3CBR%20%2F%3E.%2Fsend_single_tone.sh%200%201000000%2080%20%E5%B0%86%E5%9C%A8%200%20%E5%8F%B7%E5%A4%A9%E7%BA%BF%E4%B8%8A%E5%8F%91%E9%80%81%201Mhz%2080%25%20%E6%A0%87%E5%BA%A6%E7%9A%84%E5%8D%95%E9%9F%B3%E3%80%82%22%3CBR%20%2F%3E%E4%B8%8A%E8%BF%B0%E5%91%BD%E4%BB%A4%E5%B0%86%201MHz%20%E8%BD%AC%E6%8D%A2%E4%B8%BA%E8%A6%81%E5%9C%A8%20NCO%20%E5%AF%84%E5%AD%98%E5%99%A8%E4%B8%AD%E8%AE%BE%E7%BD%AE%E7%9A%84%E5%80%BC%EF%BC%8C%E6%82%A8%E4%B9%9F%E5%8F%AF%E4%BB%A5%E5%8F%82%E9%98%85%20DFE_Ref_User_Guide.pdf%20%E4%B8%AD%E7%9A%84%E4%BB%A5%E4%B8%8B%E8%AF%B4%E6%98%8E%E3%80%81%3CBR%20%2F%3E%E9%A2%91%E7%8E%87%E7%B3%BB%E6%95%B0%20%3D%3CBR%20%2F%3E4294967296*%E9%A2%91%E7%8E%87%2F%E9%87%87%E6%A0%B7%E7%8E%87%E3%80%82%3CBR%20%2F%3E%E9%A2%91%E7%8E%87%E8%8C%83%E5%9B%B4%E4%B8%BA%201-122880000Hz%E3%80%82%E9%87%87%E6%A0%B7%E7%8E%87%3DDCS%20%E9%87%87%E6%A0%B7%E7%8E%87%E3%80%82%3CBR%20%2F%3E%E4%BE%8B%E5%A6%82%EF%BC%9A%E8%A6%81%E5%9C%A8%E9%87%87%E6%A0%B7%20491520000%20%E6%97%B6%E5%8F%91%E9%80%81%201Mhz%20%E9%A2%91%E7%8E%87%EF%BC%8Cfreq_factor%3D4294967296*1000000%2F491520000%20%3D%3CBR%20%2F%3E0x855555%3C%2FP%3E%0A%3CP%3E%E5%85%B3%E4%BA%8E%E7%9B%B8%E4%BD%8D%EF%BC%8C%E9%BB%98%E8%AE%A4%E5%80%BC%E6%98%AF%E4%BB%8E%200%20%E5%BC%80%E5%A7%8B%E3%80%82%E4%BE%8B%E5%A6%82%EF%BC%8C%E6%AF%8F%E6%AC%A1%20NCO%20%E8%BF%AD%E4%BB%A3%E9%83%BD%E4%BC%9A%E4%BA%A7%E7%94%9F%2032%20%E4%B8%AA%E5%A4%8D%E6%9D%82%E6%A0%B7%E6%9C%AC%EF%BC%8C%E7%84%B6%E5%90%8E%E7%9B%B8%E4%BD%8D%E4%BC%9A%E8%87%AA%E5%8A%A8%E5%A2%9E%E5%8A%A0%2032*phase_step%3CBR%20%2F%3Ephase_new%20%3D%20phase_old%20%2B%2032*phase_step%3CBR%20%2F%3E%E7%9B%B8%E4%BD%8D%E7%9A%84%E6%AD%A5%E9%95%BF%E6%98%AF%E9%9F%B3%E8%B0%83%E9%A2%91%E7%8E%87%E9%99%A4%E4%BB%A5%E9%87%87%E6%A0%B7%E7%8E%87%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E