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

📄 jishu16.vhd

📁 本程序利用VHDL语言实现拔河游戏机的功能
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity jishu16 is
port(clk,clr,input:std_logic;
     qa,qb,qc,qd:out std_logic);
end jishu16;

architecture rtl of jishu16 is
signal temp:std_logic_vector(3 downto 0);
begin 
qa<=temp(0);
qb<=temp(1);
qc<=temp(2);
qd<=temp(3);
  process(clr,clk)
  begin
   if(clr='1')then
    temp<="0000";
   elsif(clk'event and clk='1')then
    if(input='1')then
    temp<=temp+'1';
    elsif(input='0')then
       temp<=temp-'1';
       else 
       temp<=temp;
       end if;
    
   end if;
end process;
end rtl;
    

⌨️ 快捷键说明

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