可逆特殊12进制计数器

2019-03-01 09:51

可逆特殊12进制计数器(20分)。 library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity cnt is Port ( clk : in std_logic; CL : in std_logic; co : out std_logic; output_l: out std_logic_vector(3 downto 0); output_h : out std_logic_vector(3 downto 0); add_dec: in std_logic); end cnt; architecture beh of cnt is signal count : std_logic_vector(7 downto 0); begin process(clk,CL) begin if CL= '1' then count <= \ co<='0'; elsif rising_edge(clk) then if count(3 downto 0)=\ count(3 downto 0)<=\ count(7 downto 4)<=count(7 downto 4) +1; else count(3 downto 0)<=count(3 downto 0)+1; end if; co<='0'; if count=\ co<='1'; elsif count=\ count<=\ co<='0'; else null ; end if; else if count(3 downto 0)=\ count(3 downto 0)<=\ count(7 downto 4)<=count(7 downto 4) -1; else count(3 downto 0)<=count(3 downto 0)-1;

第1页 共4页

end if; co<='0'; if count=\ co<='1'; count<=\ else co<='0'; end if; end if; else null ; end if; end process; output_l <= count(3 downto 0); output_h <= count(7 downto 4); end beh;

第2页 共4页


可逆特殊12进制计数器.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:关于开展安全生产标准化工作讲解宣传稿

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: