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

📄 show.vhd

📁 这是一个自动售货机的vhdl源码
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
 entity show is
port(di:in integer range 0 to 9;
     a,b,c,d,e,f,g:out std_logic);
end show;
ARCHITECTURE s of show is
  
 begin
  
  process(di)
   type data_out is array(0 to 6) of std_logic;
   variable output:data_out;
   begin
     case di is
     when 0=>output:="1111110";
     when 1=>output:="0110000";
     when 2=>output:="1101101";
     when 3=>output:="1111001";
     when 4=>output:="0110011";
     when 5=>output:="1011011";
     when 6=>output:="0011111";
     when 7=>output:="1110000";
     when 8=>output:="1111111";
     when 9=>output:="1110011";
     when others =>null;
     end case;
     a<=output(0);
     b<=output(1);
     c<=output(2);
     d<=output(3);
     e<=output(4);
     f<=output(5);
     g<=output(6);
     
  end process;
  end s; 



⌨️ 快捷键说明

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