欢迎来到天天文库
浏览记录
ID:51058027
大小:31.52 KB
页数:2页
时间:2020-03-08
《同步复位同步置数的六十进制计数器.doc》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、同步复位,同步置数的六十进制计数器libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitycount60yisport(clk,clr,en:instd_logic;carry:outstd_logic;q:outstd_logic_vector(5downto0));endcount60y;architectureartofcount60yissignalcntout:std_logic_vector(5downto0);
2、beginq<=cntout;process(clk)beginifclk'eventandclk='1'thenifclr='1'thencntout<="000000";carry<='0';elsifen='1'thenifcntout="111011"thencntout<="000000";carry<='1';elsecntout<=cntout+'1';carry<='0';endif;endif;endif;endprocess;endart;
此文档下载收益归作者所有