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

📄 suocun.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 suocun is
port ( clk2   :in std_logic;                                      
       bcdmin :in std_logic_vector(3 downto 0);
       col    :in std_logic_vector(3 downto 0);
       bcdmo  :out std_logic_vector(3 downto 0));
end suocun;

architecture a of suocun is
    signal d :std_logic_vector(3 downto 0);
begin
   process(clk2)
begin
      if(clk2'event and clk2='1')then
        if(col(0) or col(1) or col(2) or col(3)='1' then
          d<=bcdmin;
        else
          d<=d;
        end if;
      end if;
   bcdmo<=d;
   end process;
end;


⌨️ 快捷键说明

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