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

📄 fenpin.vhd

📁 (1)、自动售货机可以出售4种货物
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity fenpin is
port ( clk      :in std_logic;                                      
       clk1     :out std_logic;
       clk2,clk3:out std_logic);
end;
architecture a of fenpin is
     signal count:std_logic_vector(12 downto 0);
     signal a,c  :std_logic;
begin
p1:
   process(clk)
   begin
       if(clk'event and clk='1')then 
       if(count="1001110001000")then
           count<="0000000000000"; a<=not a;
       else count<=count+1;
       end if;
      end if;
clk2<=a;
clk3<=a;
end process p1;
p2:
    process(a)
    begin
        if(a'event and a='1')then 
            c<=not c;
        end if;
    clk1<=c;
    end process;
end;



⌨️ 快捷键说明

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