下载此文档

2025年vhdl-BCD码减法计数器.doc


文档分类:IT计算机 | 页数:约2页 举报非法文档有奖
1/2
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/2 下载此文档
文档列表 文档介绍
该【2025年vhdl-BCD码减法计数器 】是由【业精于勤】上传分享,文档一共【2】页,该文档可以免费在线阅读,需要了解更多关于【2025年vhdl-BCD码减法计数器 】的内容,可以使用淘豆网的站内搜索功能,选择自己适合的文档,以下文字是截取该文章内的部分文字,如需要获得完整电子版,请下载此文档到您的设备,方便您编辑和打印。LIBRARY IEEE;
USE ;
USE ;
ENTITY jianfa IS
PORT(clk: IN STD_LOGIC;
q: out std_logic);
END jianfa;
ARCHITECTURE a OF jianfa IS
signal tmph,tmpl:std_logic_vector(3 downto 0);
signal h:std_logic;
begin
process(clk)
begin
if(clk'event and clk='1')then
if(tmpl="0000")then
tmpl<="1001";
tmph<=tmph-'1';
if(tmph="0000")then
tmph<="0011"; --十位
if(tmpl="0000")then
tmpl<="0100"; --个位
q<='1';
h<=not h;
end if;
end if;
elsif(tmpl<"1001"or tmpl="1001")then
tmpl<=tmpl-'1';
end if;
end if;
end process;
process(h)
begin
if(h'event and h='1')then
if(tmpl="0000")then
tmpl<="1001";
tmph<=tmph-'1';
if(tmph="0000")then
tmph<="0000"; --十位
if(tmpl="0000")then
tmpl<="0100"; --个位
q<='1';
h<=not h;
end if;
end if;
elsif(tmpl<"1001"or tmpl="1001")then
tmpl<=tmpl-'1';
end if;
end if;
end process;
end a;

2025年vhdl-BCD码减法计数器 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数2
  • 收藏数0 收藏
  • 顶次数0
  • 上传人业精于勤
  • 文件大小12 KB
  • 时间2025-02-11
最近更新