首页 > 其他 > 详细

用VHDL设计分频器

时间:2019-11-29 17:07:03      阅读:74      评论:0      收藏:0      [点我收藏+]

分频器的实质上就是一个计数器。

带复位功能的计数器:

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity ripple is
port(
clk,rst:in bit;
cnt:out std_logic_vector(1 downto 0)
);
end ripple;
architecture bhv of ripple is
signal cnt0:std_logic_vector(1 downto 0);
begin
process(clk,rst)
begin
if rst=‘1‘ then
cnt0<=(others=>‘0‘);
elsif clk‘event and clk=‘1‘ then
cnt0<=cnt0+1;
end if;
end process;
cnt<=cnt0;
end bhv;

RTL原图:

技术分享图片

 

 仿真图:

技术分享图片

 

 

 

用VHDL设计分频器

原文:https://www.cnblogs.com/lhkhhk/p/11958793.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!