⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cdu60s.vhd

📁 电子钏的硬件描述语言设计
💻 VHD
字号:

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity cdu60s  is
port (  clk1,clr :in std_logic;
      co : out std_logic;
      m :out std_logic_vector (7 downto 0));
end cdu60s ;

architecture aa of cdu60s is
 signal out1,out2 :integer range 0 to 9;
 signal out3,out4 :std_logic_vector (3 downto 0);
 signal clk:std_logic;
begin
process(clk1)
begin
if clr='1' then out1<=0; out2<=0;
elsif clk1'event and clk1='1' then
if (out2=5) and (out1=9) then
out1<=0;
out2<=0;
co<='1';
else
out1<=out1+1;
co<='0';
if out1=9 and out2/=5 then
out1<=0;
out2<=out2+1;
co<='0';

end if;
end if;
end if;

out3<= conv_std_logic_vector(out1,4);
out4<= conv_std_logic_vector(out2,4);

m<=out4 & out3;
end process;
end aa;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -