VSPA NCO Formula & Parameter Mapping (LA12xx)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VSPA NCO Formula & Parameter Mapping (LA12xx)

211 Views
Fengsq
Contributor I
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 Kudos
Reply
1 Reply

128 Views
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 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2357118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EVSPA%20NCO%20Formula%20%26amp%3B%20Parameter%20Mapping%20(LA12xx)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2357118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3EI%E2%80%99m%20currently%20working%20with%20the%20VSPA%20processor%20and%20have%20a%20few%20technical%20questions%20about%20the%20NCO%20instruction.%26nbsp%3B%3CSPAN%3EThis%20numerically%20controlled%20oscillator%20instruction%20is%20designed%20for%20complex%20sequence%20generation%2C%20as%20referenced%20in%20Chapter%204.21%20of%20the%20LA12xx%20VSPA3%20ISA%20reference%20manual.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EI%20have%20questions%20about%20the%20mathematical%20formula%20for%20NCO%20output%20described%20in%20the%20official%20document.%26nbsp%3B%3CSPAN%3EIn%20the%20given%20formula%2C%20the%20initial%20phase%20variable%20(nco_phase)%20is%20placed%20within%20parentheses%20and%20multiplied%20by%20the%20frequency%20value%20(nco_freq).%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EFor%20my%20application%2C%20I%20need%20to%20generate%20a%20signal%20following%20this%20standard%20complex%20exponential%20form%3A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E2%CF%80%20%C3%97%20frequency%20%C3%97%20index%20%2B%20initial%20phase.%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EI%20would%20like%20to%20confirm%20the%20precise%20mapping%20between%20this%20standard%20formula%20and%20the%20two%20configuration%20parameters%3A%20nco_phase%20and%20nco_freq.%26nbsp%3B%3CSPAN%3EAdditionally%2C%20I%20need%20to%20know%20if%20a%20scaling%20factor%20is%20required%20to%20convert%20normalized%20floating-point%20values%20into%20valid%2032-bit%20integer%20inputs%20for%20this%20processor.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EThank%20you%20for%20your%20time%20and%20technical%20support.%26nbsp%3B%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%3EIn%20fr1_fr2_test_tool%20there%20is%20the%20feature%20to%20configure%20NCO%20to%20send%20complex%20single%20tone%20at%20DAC%20sample%20rate%20with%20script%20send_single_tone.sh%2C%20for%20example%2C%3CBR%20%2F%3E.%2Fsend_single_tone.sh%200%201000000%2080%20will%20send%20on%20antenna%200%20with%201Mhz%2080%25%20scale%20single%20tone.%22%3CBR%20%2F%3Eabove%20command%20converts%20the%201MHz%20into%20the%20value%20to%20be%20set%20in%20NCO%20register%2C%20you%20can%20also%20see%20below%20description%20in%20in%20DFE_Ref_User_Guide.pdf%2C%3CBR%20%2F%3EFrequency%20factor%20%3D%3CBR%20%2F%3E4294967296*frequency%2Fsampling_rate.%3CBR%20%2F%3EFrequency%20range%20from%201-%20122880000Hz.%20Sampling%20rate%3DDCS%20sampling%20rate.%3CBR%20%2F%3Eexample%3A%20to%20send%201Mhz%20at%20sampling%20491520000%2C%20freq_factor%3D4294967296*1000000%2F491520000%20%3D%3CBR%20%2F%3E0x855555%3C%2FP%3E%0A%3CP%3ERegarding%20phase%2C%20default%20is%20starting%20from%200.%20Each%20NCO%20iteration%20generates%2032%20complex%20samples%20for%20example%2C%20then%20phase%20increase%2032*phase_step%20automatically%3CBR%20%2F%3Ephase_new%20%3D%20phase_old%20%2B%2032*phase_step%3CBR%20%2F%3Ethe%20phase_step%20is%20your%20tone%20freq%20divided%20by%20sample_rate%3C%2FP%3E%3C%2FLINGO-BODY%3E