4 Star 1 Fork 0

1026508651/shudian_elec-clock

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
fa_count_7.vhd.bak 788 Bytes
一键复制 编辑 原始数据 按行查看 历史
去人 提交于 2022-03-27 10:14 . 24h and musician are completed
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity fa_count_7 is
port(
EN:in std_logic;
CLK:in std_logic;
output:out std_logic
);
end fa_count_7;
architecture main of fa_count_7 is
signal counter: std_logic_vector(2 downto 0);
signal temp1,temp2:std_logic;
begin
process(CLK,EN)
begin
if(EN='0')then
temp1<='0';
elsif(CLK'event and CLK='1')then
if(counter="000")then
counter<="110";
temp1<=not temp1;
else
counter<=counter-1;
end if;
end if;
end process;
process(CLK,EN)
begin
if(EN='0')then
temp2<='1';
elsif(CLK'event and CLK='0')then
if(counter="011")then
temp2<=not temp2;
else
temp2<=temp2;
end if;
end if;
end process;
output<=temp1 xor temp2;
end main;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
VHDL
1
https://gitee.com/huazhong_xuan/shudian_elec-clock.git
git@gitee.com:huazhong_xuan/shudian_elec-clock.git
huazhong_xuan
shudian_elec-clock
shudian_elec-clock
master

搜索帮助