second.vhd

来自「《CPLDFPGA嵌入式应用开发技术白金手册》源代码」· VHDL 代码 · 共 40 行

VHD
40
字号
library ieee;
use ieee.std_logic_1164.all;
entity second is
     port(a,b,c,zin,yin:in std_logic;
          dout,eout,fout,gout:out std_logic);
end second;

architecture rtl of second is
begin
   process(a,zin,yin)
     begin
       if(a='1')then
	    dout<='1';
	    eout<=zin;
       else
	    dout<='0';
        eout<=yin;
       end if;
   end process;
   
   process(a,b)
     begin
       if(b='1')then
	     fout<='1';
       else
	     fout<='0';
       end if;
   end process;
   
   process(c,a,b)
     begin
       if(b='1' and a='1' and c='1')then
	     gout<='1';
       else
	     gout<='0';
       end if;
   end process;
end rtl;

⌨️ 快捷键说明

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