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

📄 bskz.vhdl

📁 数字钟的实现
💻 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 bskz is
  port(mshi,mge,sshi,sge:in std_logic_vector(3 downto 0);
       clk:in std_logic;
	  cp500: buffer std_logic:='1';
	  cp1000:buffer std_logic:='1'); 
end bskz;

architecture Behavioral of bskz is

begin
   process(clk)
   begin
      if clk'event and clk='1' then
	   if mshi="0101" and mge="1001" and sshi="0101" then
	      if sge="0000" or sge="0010" or sge="0100" or sge="0110" or sge="1000" then
		    cp500<='0';
		 else
		    cp500<='1';
		 end if;
	   end if;
	   if mshi="0000" and mge="0000" and sshi="0000" and sge="0000" then
	         cp1000<='0';
	   else
	         cp1000<='1';
	   end if;
	 end if;
   end process;
end Behavioral;

⌨️ 快捷键说明

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