欢迎来到天天文库
浏览记录
ID:29472379
大小:106.21 KB
页数:36页
时间:2018-12-20
《基于vhdl语言成功数字钟源程序设计说明书》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitycount2isport(clk:instd_logic;output:outstd_logic_vector(2downto0));end;architectureshiofcount2issignalA:std_logic_vector(2downto0);beginprocess(clk)beginifclk'eventandclk='1'thenifA="111"thenA<="000";elseA<=A+1;endif;endif;
2、endprocess;output<=A;end;libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entityfenpingisport(clock:instd_logic;Q:outstd_logic);end;architecturefenpinoffenpingissignalfull:std_logic;beginprocess(clock)variablecount:integerrange0to200;beginifclock'eventandclock='1'thenifcount=20
3、0thencount:=1;full<=notfull;else39count:=count+1;endif;endif;endprocess;Q<=full;end;libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitymaichongisport(clock:instd_logic;Q:outstd_logic);end;architecturefenpinofmaichongissignalfull:std_logic;beginprocess(clock)variablecount:in
4、tegerrange0to500000;beginifclock'eventandclock='1'thenifcount=500000thencount:=1;full<=notfull;elsecount:=count+1;endif;endif;endprocess;Q<=full;end;libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitymiaojishuis39port(clock:instd_logic;Q:outstd_logic);end;architecturefenpin
5、gofmiaojishuissignalfull:std_logic;beginprocess(clock)variablecount:integerrange0to1000000;beginifclock'eventandclock='1'thenifcount=1000000thencount:=1;full<=notfull;elsecount:=count+1;endif;endif;endprocess;Q<=full;end;libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitysa
6、omiaoisport(bcdin1:instd_logic_vector(3downto0);bcdin2:instd_logic_vector(3downto0);bcdin3:instd_logic_vector(3downto0);bcdin4:instd_logic_vector(3downto0);bcdin5:instd_logic_vector(3downto0);bcdin6:instd_logic_vector(3downto0);q:outstd_logic_vector(1downto0);clk:instd_logic;segout:outstd_logic_vec
7、tor(6downto0));end;architectureoneofsaomiaoissignalbcdin:std_logic_vector(3downto0);beginprocess(clk,bcdin1,bcdin2,bcdin3,bcdin4)39beginifbcdin3="1001"andbcdin4="0101"andbcdin2="0101"thencasebcdin1iswhen"00
此文档下载收益归作者所有