当前位置:首页 > EDA > 电子设计自动化
[导读] 简单改变FPGA计数器规格使作为DAC功能PWM计数器的纹波降低。  当需要一些模拟输出和系统中有FPGA时,很可能选择使用如图1的PWM模块和简单低通滤波器。FPGA的输出是固定频率、计数器和数字比较器使占空比可变的典

 简单改变FPGA计数器规格使作为DAC功能PWM计数器的纹波降低。

  当需要一些模拟输出和系统中有FPGA时,很可能选择使用如图1的PWM模块和简单低通滤波器。FPGA的输出是固定频率、计数器和数字比较器使占空比可变的典型波形(表1)。

 

  假设高信号使能,计数器每个时钟周期进行计数,PWM输出的频率为时钟频率的2次幂分频。通过连接前置比例器,使用使能来降低输出频率。由于输出频率固定,滤波器容易计算。已知占空比50%时,出现最坏的纹波。最大纹波和上升时间的限制结合决定滤波器类型和RC(电阻/电容)值。

  对表1中编码进行非小改动,能够改进PWM电路的性能。但在原先系统中,最大纹波电流发生在50%占空比时,最小纹波电流发生在最小占空比时,改进的版本显示最大纹波等于标准版的最小值。关键是产生最高频率的可能性,还能保持平均的占空比常数。输出脉冲频率越高,滤波器性能越好。

  从左到右交换所有位来修改由重编二进制比较器组成表1。MSB(最高有效位)变成LSB(最低有效位),LSB变成MSB,等等(表2)。只需重编位,而不需额外寄存器或逻辑单元。

  表3显示了4位PWM发出的脉冲序列。表3中,可以看到50%占空比时(第二列,值为8),频率最大,为时钟频率的2分频。在第一个纹波出现点(第二列,值为1),传统PWM系统中有同样的纹波,也就是说,脉冲序列是相同的。

  英文原文:

  Swapping bits improves performance of FPGA-PWM counter

  A simple change to the specification of an FPGA counter lowers the ripple of a PWM counter functioning as a DAC.

  Stefaan Vanheesbeke, Ledegem, Belgium; Edited by Charles H Small and Fran Granville -- EDN, 9/13/2007

  When you need some analog outputs and you have an FPGA in your system, you probably choose to use a PWM module and a simple lowpass filter such as those in Figure 1. The output of the FPGA is typically a waveform with a fixed-frequency, variable-duty cycle, which a counter and a digital comparator generate (Listing 1).

  Suppose that Enable is high, the counter counts up every clock cycle, and the frequency of the PWM output is the clock frequency divided by 2 count bits. You can use Enable to lower the output frequency by connecting it to a prescaler. Because the output frequency is fixed, the filter is easy to calculate, because you know that the worst-case ripple happens at a duty cycle of 50%. The combination of the desired maximum ripple and settling time determines the filter type and RC (resistance/capacitance) values.

  With a small change to the code in Listing 1, you can improve the performance of the PWM circuit. Whereas in the original system, the maximum ripple currents occur at a duty cycle of 50% and the minimum ripple currents occur at the minimum duty cycle, the improved version shows a maximum ripple equal to the minimum of the standard version. The trick is to generate the highest frequency possible but keep the average duty cycle constant. The higher the frequency of the pulses on the output, the better the filter does its job.

  The modification to Listing 1 consists of rewiring the binary comparator with all the bits swapped from left to right. The MSB (most significant bit) becomes the LSB (least significant bit), the LSB becomes the MSB, and so on (Listing 2). You do only a rewiring requiring no extra registers or logic.

  Listing 3 shows the pulse trains that a 4-bit PWM emits. In Listing 3, you see that at 50% duty cycle (Value=8, second column), the frequency is maximum and equal to the clock frequency divided by two. At the first point at which some ripple shows up (Value=1, second column), there is exactly the same ripple as in the conventional PWM system—that is, the pulse train is the same.

本站声明: 本文章由作者或相关机构授权发布,目的在于传递更多信息,并不代表本站赞同其观点,本站亦不保证或承诺内容真实性等。需要转载请联系该专栏作者,如若文章内容侵犯您的权益,请及时联系本站删除。
换一批
延伸阅读

Bluespec支持加速器功能的RISC-V处理器将Achronix的FPGA转化为可编程SoC

关键字: RISC-V处理器 FPGA SoC

为无处不在的端侧设备插上AI的翅膀,AMD发布第二代Versal™ 自适应 SoC

关键字: AMD FPGA 自适应SoC AI 边缘计算

Pmod接口可以说是数字电路板的连接革命。随着科技的飞速发展,数字电路板间的通信与连接技术也在不断创新和进步。Pmod接口,作为一种新兴的数字接口标准,正逐渐成为数字电路板间通信的桥梁,为电子设备的连接和通信带来了革命性...

关键字: pmod接口 FPGA 数字电路板

近日举办的GTC大会把人工智能/机器学习(AI/ML)领域中的算力比拼又带到了一个新的高度,这不只是说明了通用图形处理器(GPGPU)时代的来临,而是包括GPU、FPGA和NPU等一众数据处理加速器时代的来临,就像GPU...

关键字: FPGA AI 图形处理器

开关电源LLC是一种高效的电源转换技术,被广泛应用于各种电子设备中。它结合了谐振电路和PWM(脉宽调制)控制的优点,实现了高效率和低电磁干扰的性能。本文将详细阐述开关电源LLC的原理,包括其工作原理、控制策略以及应用优势...

关键字: 开关电源 LLC PWM

74LS192是一款广泛应用在数字电子系统中的同步十进制可逆计数器集成电路,属于美国德州仪器(TI)早期推出的7400系列TTL逻辑家族的一员。该芯片设计为四位二进制计数器,并因其特殊的十进制计数特性以及双向计数能力而广...

关键字: 74ls192 计数器

当我们提到成本优化型FPGA,往往与简化逻辑资源、有限I/O和较低制造工艺联系在一起。诚然,在成本受限的系统设计中,对于价格、功耗和尺寸的要求更为敏感;但随着一系列创新应用的发展、随着边缘AI的深化,成本优化型FPGA也...

关键字: AMD FPGA Spartan 边缘计算

全球领先的高性能现场可编程门阵列(FPGA)和嵌入式FPGA(eFPGA)半导体知识产权(IP)提供商Achronix Semiconductor公司宣布,该公司参加了由私募股权和风险投资公司Baird Capital举...

关键字: FPGA 智能汽车 eFPGA

全新 FPGA 能为嵌入式视觉、医疗、工业互联、机器人与视频应用提供高数量 I/O、功率效率以及卓越的安全功能

关键字: FPGA 嵌入式视觉 机器人

Altera致力于为客户提供端到端的FPGA、易于使用的AI、软件和弹性供应链。

关键字: FPGA AI
关闭
关闭