xuanze.vhd

来自「VHDL的数字电子钟程序」· VHDL 代码 · 共 26 行

VHD
26 行
字号
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith;
entity xuanze is
port(xinhao1: in std_logic;
     xinhao2: in std_logic;
     kongzhi: in std_logic;
       input: in std_logic;     
     xinhao:  out std_logic;
     output:  out std_logic);
end xuanze;
architecture a of xuanze is
begin
process(kongzhi,input)
begin 
  if(input='1') then xinhao<='0';
  elsif(kongzhi='1') then xinhao<=xinhao2;
                     output<='1'; 
  else xinhao<=xinhao1; 
       output<='0';
  end if;
end process;
end a;  

⌨️ 快捷键说明

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