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

📄 display.vhdl

📁 利用fpga实现秒表。秒表有开始停止
💻 VHDL
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

--  Uncomment the following lines to use the declarations that are
--  provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;

entity display is
port(datain: in std_logic_vector(3 downto 0);
    dataout: out std_logic_vector(6 downto 0));
end display;

architecture Behavioral of display is
begin
process(datain)
  begin
      case datain is 
    when "0000"=>  dataout<="0000001";
    when "0001"=>  dataout<="1001111";           
    when "0010"=>  dataout<="0010010";
    when "0011"=>  dataout<="0000110";
    when "0100"=>  dataout<="1001100";
    when "0101"=>  dataout<="0100100";
    when "0110"=>  dataout<="0100000";
    when "0111"=>  dataout<="0001111";
    when "1000"=>  dataout<="0000000";
    when "1001"=>  dataout<="0000100";
    when others => dataout<="0000001";
	end case;
end process;
end Behavioral;

⌨️ 快捷键说明

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