三分频1:1占空比的VHDL程序(有一个缺点,输入波形必须是1:1的占空比,输出才符
合要求)
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity counter_down is
port(clk : in std_logic;
flag :out std_logic);
end counter_down;
architecture body_cout of counter_down is
signal cou1 ,cou2 : std_logic_vector(1 downto 0 );
signal flag1,flag2 : std_logic;
begin
process(clk)
begin
if(clk = '0' and clk'event) then
if(cou1 = "10") then
cou1 <= "00";
else
cou1 <= cou1 + '1';
end if;
end if;
end process;
process(clk)
begin
if(clk = '1' and clk'event) then
if(cou2 = "10") then
cou2 <= "00";
else
cou2 <= cou2 + '1';
end if;
end if;
end process;
process(cou1)
begin
if(cou1 = "01" ) then
flag1 <= '1';
else
flag1 <= '0';
end if;
end process;
process(cou2)
begin
if(cou2 = "01" ) then
flag2 <= '1';
else
flag2 <= '0';
end if;
end process;
flag <= flag1 or flag2;
end body_cout;
共1条
1/1 1 跳转至页
Re: vhdl怎样写一个占空比1:1的3分频 分频器?

关键词: 怎样 一个 占空 3分频 频器
共1条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【EEPW电子工程师创研计划】技术变现通道已开启~ | |
发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
【EEPW在线】E起听工程师的声音! | |
“我踩过的那些坑”主题活动——第001期 | |
高校联络员开始招募啦!有惊喜!! | |
【工程师专属福利】每天30秒,积分轻松拿!EEPW宠粉打卡计划启动! | |
送您一块开发板,2025年“我要开发板活动”又开始了! | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
多组DCTODC电源方案被打赏50分 | |
【我踩过的那些坑】STM32cubeMX软件的使用过程中的“坑”被打赏50分 | |
新手必看!C语言精华知识:表驱动法被打赏50分 | |
【我踩过的那些坑】杜绑线问题被打赏50分 | |
【我踩过的那些坑】STM32的硬件通讯调试过程的“坑”被打赏50分 | |
【我踩过的那些坑】晶振使用的问题被打赏100分 | |
【我踩过的那些坑】电感选型错误导致的处理器连接不上被打赏50分 | |
【我踩过的那些坑】工作那些年踩过的记忆深刻的坑被打赏10分 | |
【我踩过的那些坑】DRC使用位置错误导致的问题被打赏100分 | |
我踩过的那些坑之混合OTL功放与落地音箱被打赏50分 |