使用 VHDL 代码生成纯正弦波作为 FPGA 的输出
我们知道 FPGA 的输出是数字的,但我们可以使用 vhdl 代码生成纯模拟正弦波吗?我还可以指定正弦波的频率。
We know that the output of an FPGA is digital but can we genrate a pure analog sine wave using a vhdl code. also can I specify the frequency of the sine wav.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
定义“纯粹”——您可以接受多少“位”量化……以及什么频率?
对于低位的低频率,您可以在 FPGA 中构建一个简单的 PWM 或 delta-sigma DAC,并在“外部”放置一个低通滤波器(抱歉,这必须是真正的模拟硬件:)。 此示例可能提供信息
如果没有一些外部资源,就无法实现这一 目标虽然是组件。
Define "pure" - how many "bits" of quantisation can you live with... and what frequency?
For lowish frequencies at lowish bits you could build a simple PWM or delta-sigma DAC in the FPGA and put a low-pass filter on the "outside" (sorry, that'll have to be real analogue hardware :) . This example may be informative
Not going to get there without some external componentry though.
您可以查看直接数字合成。它基本上使用 ROM 来存储正弦样本,并使用相位累加器索引到 ROM 以生成具有所需频率的输出信号。分辨率和最大频率受 fpga 时钟和 ROM 大小的限制。
不过,您仍然需要一个模拟重建滤波器。
You can look into Direct Digital Synthesis. It basically uses a ROM to store the sine samples and uses a phase accumulator to index into the ROM to generate the output signal with the desired frequency. Resolution and maximum frequency is bound by the fpga clock and the ROM size.
You still need an anlog reconstruction filter, though.
从存储器中先前存储的样本生成纯正弦波的方法以不同的速率/存储位置读取存储器以改变正弦波的频率和/或频谱纯度称为直接数字合成。
这使您能够生成具有所需频谱纯度的各种正弦频率。适用于手机和平板电脑软件定义无线电的&任何其他类似的应用程序。 DDS ASIC 也可用,但通常价格昂贵。
FPGA 是更便宜的替代方案。 FPGA只能产生所需的数字输出,但如果没有滤波器或DAC和DAC,就无法产生模拟信号。一些基本的过滤。
大多数 FPGA 供应商都在其 IDE(集成开发环境)中提供免费的 DDS IP 核。查看 Actel/Xilinx/Altera IP。他们是免费的。如果你无法获得IP,你可以在Matlab和DDS中拉一个DDS功能块。利用第 3 方工具(上述所有三个供应商均提供)通过 Matlab 接口合成 DDS。 DDS 有时也称为 DDFS:直接数字频率合成。
The Method of generating Pure Sine waves from a previously stored samples in memory & reading the memory at varying rate / memory locations to change the frequency and or the spectral purity of the sine wave is called Direct Digital Synthesis.
This allows you to generate wide range of sine freq's with the required spectral purity. Useful in Mobiles & Software Defined Radio's & any other similar application. DDS ASIC's are also available but are usually expensive.
FPGA's are cheaper alternative. FPGA can only generate the required Digital output , but the analog singal cant be generated without a filter or a DAC & some basic filtering.
Most FPGA vendors have a free DDS IP Core with their IDE (Integrated Dev Environment). Checkout Actel/ Xilinx / Altera IP's. They're free. If you cannot manage to get an IP, you can pull a DDS function block in Matlab & utilize a 3rd party tool .. (available with all three above vendors) to synthesize a DDS via Matlab Interface . DDS is sometimes also known as DDFS : Direct Digital Frequency Synthesis.
除了极少数混合信号模型(例如一些 Actel 产品)外,FPGA 不具备所需模拟重构滤波器的组件。它们必须添加到外部。
Except for a very few mixed-signal models (e.g. some Actel products), FPGAs do not have the components for the required analog reconstruction filter. They would have to be added on the outside.
解决这个实现
它显示的误差大于表达式 1.000 预期的常数值
Solve this implementation
It shows error than constant value expected for expression 1.000