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

📄 compare2.vhd

📁 VHDL子程序集,包括各种例程资料以及源码.
💻 VHD
字号:
--************************************
--*  Comparator (IF.. THEN .. ELSE)  *
--*        Filename : COMPARE2       *
--************************************

library IEEE;
use IEEE.std_logic_1164.all;

entity COMPARE2 is
    port (
          A:     in STD_LOGIC;
          B:     in STD_LOGIC;
          Large: out STD_LOGIC;
          Small: out STD_LOGIC;
          EQV:   out STD_LOGIC
         );
end COMPARE2;

architecture COMPARE2_arch of COMPARE2 is

begin
process (A,B)

begin
    if A > B then
       Large <= '1';
    else
       Large <= '0';   
    end if;
end process;
    
process (A,B)

begin
    if A < B then
       Small <= '1';
    else
       Small <= '0';   
    end if;    
end process;

process (A,B)

begin
    if A = B then
       EQV <= '1';
    else
       EQV <= '0';   
    end if;    
end process;  
            
end COMPARE2_arch;

⌨️ 快捷键说明

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