- 1、本文档共7页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
电子万年历vhdl程序与仿真-read
8.20 电子时钟VHDL程序与仿真
1. 10进制计数器设计与仿真
(1)10进制计数器VHDL程序
--文件名:counter10.vhd。
--功能:10进制计数器,有进位C
--最后修改日期:2004.3.20
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity counter10 is
Port ( clk : in std_logic;
reset : in std_logic;
din : in std_logic_vector(3 downto 0);
dout : out std_logic_vector(3 downto 0);
c:out std_logic);
end counter10;
architecture Behavioral of counter10 is
signal count : std_logic_vector(3 downto 0);
begin
dout = count;
process(clk,reset,din)
begin
if reset=0then
count = din ;
c=0;
elsif rising_edge(clk) then
if count = 1001 then
count = 0000;
c=1;
else
count = count+1;
c=0;
end if;
end if;
end process;
end Behavioral;
10进制计数器仿真
2. 6进制计数器设计与仿真
(1)6进制计数器VHDL程序
--文件名:counter6.vhd。
--功能:6进制计数器,有进位C
--最后修改日期:2004.3.20
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity counter6 is
Port ( clk : in std_logic;
reset : in std_logic;
din : in std_logic_vector(2 downto 0);
dout : out std_logic_vector(2 downto 0);
c:out std_logic);
end counter6;
architecture Behavioral of counter6 is
signal count : std_logic_vector(2 downto 0);
begin
dout = count;
process(clk,reset,din)
begin
if reset= 0 then
count = din;
c=0;
elsif rising_edge(clk) then
if count=101 then
count=000;
c=1;
else
count=count+1;
c=0;
end if;
end if;
end process;
end Behavioral;
(2)6进制计数器仿真
3. 6进制计数器设计与仿真
(1)24进制计数器VHDL程序
--文件名:counter24.vhd。
--功能:24进制计数器。
--最后修改日期:2004.3.20
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity counter24 is
Port ( clk : in std_logic;
reset : in std_logic;
din : in std_logic_vector(5 downto 0);
dout : out std_logic_ve
您可能关注的文档
- 多通道数据采集与处理系统在深水网箱鱼群监测中的应用.pdf
- 多体系统的时域和频域分析-天津大学期刊中心.pdf
- 多糖-th短肽交联疫苗;分子模拟.ppt
- 多台数控机床强度函数浴盆曲线建模技术研究.pdf
- 多相dcc主板电源控制器的设计郭国勇石秉学-journalof.pdf
- 多频率段物理不可克隆函数multiplefrequency-电子与信息学报.pdf
- 多能互补直流微网电压与能量分层协调控制策略-重庆理工大学学报.pdf
- 多目标函数预抗差估计.pdf
- 多美滋婴幼儿食品有限公司企业标准调制乳粉儿童用.pdf
- 多敏感器智能信息融合卫星定姿新方法-哈尔滨工业大学学报.pdf
- 人教版(2019) 必修第三册 Unit 4 Space Exploration Listening and Speaking课件(共15张PPT,内镶嵌音频).pptx
- 人教版(2019) 必修第一册 Unit 3 Sports and Fitness Reading and Thinking课件(共23张).pptx
- 人教版(2019) 必修第三册 Unit 1 Festivals and Celebrations Reading for Writing课件(共21张).pptx
- 人教版(2019) 必修第三册 Unit 5 The Value of Money Reading for Writing课件(共25张PPT).pptx
- 高中政治必修四人教统编版7.1文化的内涵与功能 教学课件(共26张PPT).pptx
- 人教版(2019)必修第三册 Unit 4 Space Exploration Reading and Thinking课件(共26张PPT).pptx
- 人教版(2019)英语必修第三册 Unit 5 The Value Of Money Discovering Useful Structures 课件(共17张).pptx
- 人教版(2019) 必修第二册 Unit 4 History and Traditions Reading for Writing课件(共21张,内嵌音频).pptx
- 人教版(2019)必修第一册Unit 3 Sports and fitness Reading for writing课件(共22张).pptx
- 人教版(2019) 必修第三册 Unit 4 Space Exploration Reading for Writing 课件(共21张,内嵌音频).pptx
文档评论(0)