CN107977044B - DDS signal generator and linear interpolation method thereof - Google Patents

DDS signal generator and linear interpolation method thereof Download PDF

Info

Publication number
CN107977044B
CN107977044B CN201810042354.0A CN201810042354A CN107977044B CN 107977044 B CN107977044 B CN 107977044B CN 201810042354 A CN201810042354 A CN 201810042354A CN 107977044 B CN107977044 B CN 107977044B
Authority
CN
China
Prior art keywords
value
waveform data
phase
read
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810042354.0A
Other languages
Chinese (zh)
Other versions
CN107977044A (en
Inventor
孙乔
洪少林
吴忠良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Uni Trend Technology China Co Ltd
Original Assignee
Uni Trend Technology China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Uni Trend Technology China Co Ltd filed Critical Uni Trend Technology China Co Ltd
Priority to CN201810042354.0A priority Critical patent/CN107977044B/en
Publication of CN107977044A publication Critical patent/CN107977044A/en
Application granted granted Critical
Publication of CN107977044B publication Critical patent/CN107977044B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/02Digital function generators
    • G06F1/022Waveform generators, i.e. devices for generating periodical functions of time, e.g. direct digital synthesizers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Complex Calculations (AREA)

Abstract

The application relates to a DDS signal generator, comprising: the phase accumulator sends the accumulated frequency control word to the phase register, the phase register searches the first waveform data and the second waveform data in the first read-only memory and the second read-only memory according to the output phase value, the subtracter calculates the difference value between the second waveform data and the first waveform data and sends the difference value to the multiplier, the multiplier multiplies the difference value with the phase value in the phase register and shifts the result to the right to obtain a decimal value, and the adder adds the decimal value with the first waveform data to obtain waveform output data. The signal generator of the application effectively ensures the quality of the waveform under the condition of not increasing the cost and reducing the design difficulty of peripheral hardware, and ensures that the data output by waveform data in each clock cycle is changed.

Description

DDS signal generator and linear interpolation method thereof
Technical Field
The application belongs to the field of signal generators, and particularly relates to a DDS signal generator and a linear interpolation method thereof.
Background
At present, the DDS signal generator is generated by adopting a most basic DDS mode, as shown in fig. 1, wherein a frequency control word freq_word is calculated by a peripheral processor according to the frequency required by a user, a phase accumulator 1 is used for accumulating the frequency control word freq_word, a phase register 2 is used for caching accumulated phase values, and a read-only memory (ROM) 3 stores waveform data which are digitized by the needed waveform data, generally periodic waveform data and waveform data of one period. The inquiry address of the read only memory 3 is the phase value of the high-cut bit of the phase register 2.
The data from the phase register 2 to the read only memory 3 is typically 10 to 16 bits due to resource limitations within the FPGA. If 14 bits of data are used, namely, if the depth of the ROM is 16K, if the required frequency is lower than Fsample/16384, the waveform data in the ROM can have a condition that one point is continuously read for a plurality of times; and under the condition of low demand frequency, the requirement on peripheral filtering is high, otherwise, the waveform can form stepped waveform output, so that the waveform can not meet the index demand. However, if the filter is used in the FPGA, a large amount of internal resources of the FPGA are occupied, and there is a certain requirement on the cost of the FPGA.
Disclosure of Invention
In view of the above problems, the present application is to provide a DDS signal generator and a linear interpolation method thereof, so as to solve the problem that in the prior art, when the required frequency is low, the waveform data can be continuously read for a plurality of times.
In order to achieve the above purpose, the present application adopts the following technical scheme:
the DDS signal generator of the present application includes: the phase accumulator sends the accumulated frequency control word to the phase register, the phase register searches the first waveform data and the second waveform data in the first read-only memory and the second read-only memory respectively according to the output phase value, the subtracter calculates the difference value between the second waveform data and the first waveform data and sends the difference value to the multiplier, the multiplier multiplies the difference value with the phase value in the phase register and shifts the result to the right to obtain a decimal value, and the adder adds the decimal value with the first waveform data to obtain waveform output data.
The DDS signal generator described above, preferably, further includes: the waveform output data is output after passing through the digital-to-analog converter and the filter.
In the DDS signal generator, preferably, the first rom and the second rom adopt dual-port rom of a hardware memory.
Preferably, the DDS signal generator includes a second rom having an address value greater than the first rom.
In the DDS signal generator, preferably, the address values of the first rom and the second rom are higher than the phase value.
The application relates to a linear interpolation method of a DDS signal generator, which comprises the following steps:
the phase accumulator sends the accumulated frequency control word to the phase register;
the phase register searches the first waveform data and the second waveform data in the first read-only memory and the second read-only memory respectively according to the output phase value;
calculating the difference value between the second waveform data and the first waveform data by a subtracter and sending the difference value to a multiplier;
multiplying the difference value by a phase value in the phase register by the multiplier and right-shifting the result to obtain a decimal value;
the decimal value is added to the first waveform data by an adder to obtain waveform output data.
The linear interpolation method of the DDS signal generator, preferably, the method further includes: intercepting high bits of the phase value to search first waveform data and second waveform data in the first read-only memory and the second read-only memory respectively; the high order of the phase value is the address value of the first read-only memory and the second read-only memory.
In the linear interpolation method of the DDS signal generator, preferably, the second rom is one greater than the first rom.
In the above DDS signal generator linear interpolation method, preferably, the multiplying the difference value by the phase value in the phase register by the multiplier further includes: the multiplier multiplies the difference value by a fractional portion of the phase value in the phase register.
In the linear interpolation method of the DDS signal generator, preferably, the difference between the second waveform data and the first waveform data is a signed difference.
The DDS signal generator and the linear interpolation method thereof mainly solve the problem that the waveform is discontinuous and trapezoidal output exists when the required frequency is low under the condition of saving resources, thereby reducing the design difficulty of a peripheral filter and improving the waveform quality.
Drawings
Fig. 1 is a schematic diagram of a prior art DDS signal generator;
fig. 2 is a schematic diagram of a DDS signal generator according to an embodiment of the present application;
fig. 3 is a flowchart of a linear interpolation method of a DDS signal generator according to an embodiment of the present application.
Detailed Description
The present application will be described in detail with reference to the accompanying drawings and examples.
An embodiment of the present application provides a DDS signal generator, as shown in fig. 2, including: the frequency control word accumulated by the phase accumulator 4 is sent to the phase register 5, the phase register 5 searches the first waveform data and the second waveform data in the first read-only memory 7 and the second read-only memory 8 according to the output phase value, the subtracter 9 calculates the difference value between the second waveform data and the first waveform data and sends the difference value to the multiplier 10, the multiplier 10 multiplies the difference value by the phase value in the phase register 5 and shifts the result to the right to obtain a decimal value, and the adder 11 adds the decimal value and the first waveform data to obtain waveform output data. Preferably, the DDS signal generator in the embodiment of the present application is implemented by an FPGA. In a specific embodiment, the phase value output by the phase register 5 takes 48 bits as an example, wherein the upper 14 bits of the phase value are address values of the first rom and the second rom, and are integer parts, so as to find the first waveform data and the second waveform data in the first rom 7 and the second rom 8 respectively; the lower 34 bits of the phase value are the phase data, in fractional parts. Wherein the values stored in the first read only memory 7 and the second read only memory 8 are the same value, and the storage depth is 16384 data. The first waveform data and the second waveform data are two adjacent waveform data values. The second waveform data in the second read only memory 8 is subtracted from the first waveform data in the first read only memory 7 by the subtractor 9 to obtain a difference value, and the difference value is signed data. The multiplier 10 receives the difference between the second waveform data and the first waveform data, multiplies the difference by the lower 34 bits of the phase value in the phase register 5, and right shifts the result to obtain a decimal value, which is the difference between the waveform values of the decimal part during phase accumulation. Specifically, in the present embodiment, the result of the multiplication is shifted to the right by 34 bits, i.e., divided by 34 to the power of 2. Preferably, the result of the multiplication is signed data. Finally, the adder 11 adds the fractional value to the first waveform data in the first read only memory 7 to obtain final waveform output data, which is also preferably signed.
The DDS signal generator provided by the embodiment of the application effectively ensures the quality of waveforms under the conditions of not increasing the cost and reducing the design difficulty of peripheral hardware of the FPGA, so that the data output by waveform data in each clock cycle are changed.
The DDS signal generator according to the embodiment of the present application preferably further includes: the waveform output data is output after passing through the digital-to-analog converter and the filter. The waveform is continuous and the harmonic component is less by the peripheral filter.
In the DDS signal generator according to the embodiment of the present application, preferably, the first rom and the second rom adopt dual-port rom of a hardware memory. Specifically, because the first read-only memory and the second read-only memory are realized by the FPGA, the first read-only memory and the second read-only memory can be simultaneously realized by generating a dual-port ROM through a hardware memory (BRAM) in the FPGA, so that BRAM resources in the FPGA can be saved.
In the DDS signal generator according to the embodiment of the present application, preferably, the second rom is one greater than the first rom. Specifically, the values stored in the first rom 7 and the second rom 8 are the same value, and the storage depths are 16384 pieces of data. Therefore, when the second read-only memory is larger than the first read-only memory address value, the first waveform data and the second waveform data are two adjacent waveform data.
In the DDS signal generator according to the embodiment of the present application, preferably, the address values of the first rom and the second rom are high bits of the phase value. Specifically, the upper bits of the phase value are used to store the address values of the read-only memory, so in the embodiment of the application, the addresses of the first read-only memory and the second read-only memory are searched by the upper 14 bits of the 48-bit phase value output by the phase register 5.
The application adopts the hardware memory (BRAM) to generate the ROM with double ports and the corresponding algorithm, thereby not increasing the peripheral cost and effectively solving the problem that the waveform has trapezium at low frequency.
The embodiment of the application also provides a linear interpolation method of the DDS signal generator, as shown in fig. 3, comprising the following steps:
step 301, the phase accumulator sends the accumulated frequency control word to the phase register;
step 302, searching the first waveform data and the second waveform data in the first read-only memory and the second read-only memory respectively according to the output phase value by the phase register;
step 303, calculating the difference between the second waveform data and the first waveform data by the subtracter and sending the difference to the multiplier;
step 304, multiplying the difference value by the phase value in the phase register by the multiplier and right-shifting the result to obtain a decimal value;
step 305, adding the decimal value and the first waveform data by an adder to obtain waveform output data.
Specifically, the phase value output by the phase register 5 takes 48 bits as an example, wherein the upper 14 bits of the phase value are address values of the first read-only memory and the second read-only memory, and are integer parts, so as to find the first waveform data and the second waveform data in the first read-only memory and the second read-only memory respectively; the lower 34 bits of the phase value are the phase data, in fractional parts. The first read-only memory and the second read-only memory store the same value, and the storage depth is 16384 data. The first waveform data and the second waveform data are two adjacent waveform data values. The second waveform data in the second read-only memory is subtracted from the first waveform data in the first read-only memory by a subtractor to obtain a difference value, and the difference value is signed data. The multiplier receives the difference value between the second waveform data and the first waveform data, multiplies the difference value by the lower 34 bits of the phase value in the phase register, and right shifts the result to obtain a decimal value, wherein the obtained decimal value is the difference value of the waveform value of the decimal part when the decimal part is accumulated in the phase. Specifically, in the present embodiment, the result of the multiplication is shifted to the right by 34 bits, i.e., divided by 34 to the power of 2. Preferably, the result of the multiplication is signed data. Finally, the adder adds the decimal value to the first waveform data in the first read-only memory to obtain final waveform output data, which is also preferably signed.
In the linear interpolation method of the DDS signal generator according to the embodiment of the present application, preferably, the difference between the second waveform data and the first waveform data is a signed difference.
In the linear interpolation method of the DDS signal generator according to the embodiment of the present application, preferably, the second rom is one larger than the first rom in address value. Therefore, when the second read-only memory is larger than the first read-only memory address value, the first waveform data and the second waveform data are two adjacent waveform data values.
In the linear interpolation method of the DDS signal generator according to the embodiment of the present application, preferably, the multiplying the difference value by the phase value in the phase register by the multiplier further includes: the multiplier multiplies the difference by the fractional part of the phase value in the phase register, i.e. the multiplier multiplies the signed difference of the second waveform data and the first waveform data, which is desired to be subtracted, by the low order bits in the phase register, which in the embodiment of the application is 34 bits.
In summary, the linear interpolation method and the signal generator according to the embodiments of the present application effectively ensure the quality of waveforms under the condition of reducing the design difficulty of peripheral hardware without increasing the cost, so that the data output by each clock cycle of waveform data is changed, and the advantages of continuous waveforms and few harmonic components are achieved through the peripheral filter.
The present application is not limited to the above-mentioned preferred embodiments, and any person who can obtain other various products under the teaching of the present application can make any changes in shape or structure, and all the technical solutions that are the same or similar to the present application fall within the scope of the present application.

Claims (8)

1. A DDS signal generator comprising: the phase accumulator sends the accumulated frequency control word to the phase register, the phase register searches first waveform data and second waveform data in the first read-only memory and the second read-only memory according to the output phase value, the subtracter calculates and obtains the difference value between the second waveform data and the first waveform data and sends the difference value to the multiplier, the multiplier multiplies the difference value with the phase value in the phase register and shifts the result to the right to obtain a decimal value, and the adder adds the decimal value with the first waveform data to obtain waveform output data;
the signal generator further comprises: the waveform output data is output after passing through the digital-to-analog converter and the filter;
the first read-only memory and the second read-only memory adopt dual-port read-only memories of a hardware memory.
2. The DDS signal generator of claim 1, wherein the second read-only memory is one greater than the first read-only memory address value.
3. A DDS signal generator according to claim 1 or 2, wherein the address values of the first and second read-only memories are high order bits of the phase value.
4. A method of linear interpolation of a DDS signal generator, the method comprising: the phase accumulator sends the accumulated frequency control word to the phase register;
the phase register searches the first waveform data and the second waveform data in the first read-only memory and the second read-only memory respectively according to the output phase value;
calculating the difference value between the second waveform data and the first waveform data by a subtracter and sending the difference value to a multiplier; multiplying the difference value by a phase value in the phase register by the multiplier and right-shifting the result to obtain a decimal value;
the decimal value is added to the first waveform data by an adder to obtain waveform output data.
5. The method of linear interpolation of a DDS signal generator of claim 4, further comprising: intercepting high bits of the phase value to search first waveform data and second waveform data in the first read-only memory and the second read-only memory respectively; the high order of the phase value is the address value of the first read-only memory and the second read-only memory.
6. The linear interpolation method of DDS signal generator of claim 5, wherein the second rom is one greater than the first rom address value.
7. The method of linear interpolation of a DDS signal generator of claim 4 wherein said multiplier multiplying said difference with a phase value in said phase register further comprises: the multiplier multiplies the difference value by a fractional portion of the phase value in the phase register.
8. The linear interpolation method of DDS signal generator of claim 4, wherein the difference between the second waveform data and the first waveform data is a signed difference.
CN201810042354.0A 2018-01-17 2018-01-17 DDS signal generator and linear interpolation method thereof Active CN107977044B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810042354.0A CN107977044B (en) 2018-01-17 2018-01-17 DDS signal generator and linear interpolation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810042354.0A CN107977044B (en) 2018-01-17 2018-01-17 DDS signal generator and linear interpolation method thereof

Publications (2)

Publication Number Publication Date
CN107977044A CN107977044A (en) 2018-05-01
CN107977044B true CN107977044B (en) 2023-09-01

Family

ID=62006042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810042354.0A Active CN107977044B (en) 2018-01-17 2018-01-17 DDS signal generator and linear interpolation method thereof

Country Status (1)

Country Link
CN (1) CN107977044B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857188B (en) * 2019-01-08 2020-06-23 优利德科技(中国)股份有限公司 Pulse wave generation method, device and system based on DDS
CN109714048A (en) * 2019-01-08 2019-05-03 优利德科技(中国)股份有限公司 A kind of output method for the DDS circuit and phase that phase mode is variable
CN113281595A (en) * 2021-05-19 2021-08-20 中航机载系统共性技术有限公司 Airborne equipment testing device
CN114138051A (en) * 2021-11-08 2022-03-04 西安电子科技大学 Waveform generation method for electrochemical workstation

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE2216633A1 (en) * 1972-04-07 1973-10-18 Nsm Apparatebau Gmbh Kg CIRCUIT FOR GENERATING PSEUDO ACCIDENT NUMBERS
CN1395438A (en) * 1995-08-18 2003-02-05 富士通株式会社 Amplifier with distortion compensator and radio communication base station
CN1518813A (en) * 2001-01-09 2004-08-04 �����ɷ� Efficient multicarrer filter
CN1774689A (en) * 2003-04-16 2006-05-17 索尼爱立信移动通讯股份有限公司 Direct digital frequency synthesizer for cellular wireless communication systems based on fast frequency-hopped spread spectrum technology
CN101807089A (en) * 2010-04-02 2010-08-18 广西大学 Waveform signal generator with optionally adjustable output signal offset
CN103873160A (en) * 2012-12-12 2014-06-18 北京普源精电科技有限公司 Method and device for changing phase jump of phase shift keying (PSK)
CN104067195A (en) * 2012-01-18 2014-09-24 高通股份有限公司 High accuracy sin-cos wave and frequency generators, and related systems and methods
CN104660218A (en) * 2013-11-18 2015-05-27 田荣侠 Arbitrary waveform synthesizer
RU2577488C1 (en) * 2015-02-17 2016-03-20 Федеральное государственное бюджетное образовательное учреждение высшего образования "Вятский государственный университет" Digital recursive chirp signal count generator
CN207867387U (en) * 2018-01-17 2018-09-14 优利德科技(中国)股份有限公司 A kind of DDS signal generator

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6807554B2 (en) * 2001-08-10 2004-10-19 Hughes Electronics Corporation Method, system and computer program product for digitally generating a function

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE2216633A1 (en) * 1972-04-07 1973-10-18 Nsm Apparatebau Gmbh Kg CIRCUIT FOR GENERATING PSEUDO ACCIDENT NUMBERS
CN1395438A (en) * 1995-08-18 2003-02-05 富士通株式会社 Amplifier with distortion compensator and radio communication base station
CN1518813A (en) * 2001-01-09 2004-08-04 �����ɷ� Efficient multicarrer filter
CN1774689A (en) * 2003-04-16 2006-05-17 索尼爱立信移动通讯股份有限公司 Direct digital frequency synthesizer for cellular wireless communication systems based on fast frequency-hopped spread spectrum technology
CN101807089A (en) * 2010-04-02 2010-08-18 广西大学 Waveform signal generator with optionally adjustable output signal offset
CN104067195A (en) * 2012-01-18 2014-09-24 高通股份有限公司 High accuracy sin-cos wave and frequency generators, and related systems and methods
CN103873160A (en) * 2012-12-12 2014-06-18 北京普源精电科技有限公司 Method and device for changing phase jump of phase shift keying (PSK)
CN104660218A (en) * 2013-11-18 2015-05-27 田荣侠 Arbitrary waveform synthesizer
RU2577488C1 (en) * 2015-02-17 2016-03-20 Федеральное государственное бюджетное образовательное учреждение высшего образования "Вятский государственный университет" Digital recursive chirp signal count generator
CN207867387U (en) * 2018-01-17 2018-09-14 优利德科技(中国)股份有限公司 A kind of DDS signal generator

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
付扬."基于FPGA直接数字频率合成两种控制电路设计".《PLC 技术应用200 例》.2007,第221-223页. *

Also Published As

Publication number Publication date
CN107977044A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
CN107977044B (en) DDS signal generator and linear interpolation method thereof
CN108139981B (en) Access method for page table cache TLB table entry and processing chip
WO2006005077B1 (en) Hierarchical optimization method and system for pattern recognition and edge detection
CN101335509B (en) Method and digital control oscillator for sinusoidal and cosine signal generation
KR970007613A (en) SRT hardware and square root units that generate multiple share digits per clock cycle
TWI523431B (en) Phase conversion method and device in DDS
CN110597935A (en) Space analysis method and device
CN104102586A (en) Address mapping processing method and address mapping processing device
CN102521312A (en) Storage method of file index, and file system
CN207867387U (en) A kind of DDS signal generator
CN107436619B (en) High-precision low-cost digital sine wave generating device
CN107943204B (en) Digital frequency synthesis method and device
CN112803896A (en) Sinusoidal signal generation method, device, equipment and medium
CN106681691A (en) Data processing method and modular multiplication operation method and apparatus based on Montgomery modular-multiplication
Curticapean et al. Low-power direct digital frequency synthesizer
CN1166226C (en) Digital method for generating local oscillation signal and numeral controlled oscillator
Han et al. FIR filter synthesis considering multiple adder graphs for a coefficient
CN104753530B (en) Phase only pupil filter and non-homogeneous phase width conversion method and device in DDS
CN113630123B (en) Data compression system and method
CN112910496B (en) Chirp signal generation method, device, terminal and medium
EP3082255B1 (en) Device and method for generating sine wave
CN112688671A (en) Linear frequency modulation pulse generating device
CN217981808U (en) Time domain Frank code signal generating device
Paliouras et al. Signal activity and power consumption reduction using the logarithmic number system
CN112104356B (en) Direct digital frequency synthesis method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523808 No. 6 industrial North Road, Songshan Lake high tech Industrial Development Zone, Dongguan, Guangdong

Applicant after: UNI-TREND TECHNOLOGY (CHINA) Co.,Ltd.

Address before: 523808 No. 6 industrial North Road, Songshan Lake high tech Industrial Development Zone, Dongguan, Guangdong

Applicant before: UNI-TREND TECHNOLOGY (CHINA) Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant