Advertisement
Oleguer

comp

Dec 7th, 2021
1,282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.44 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4.  
  5. entity comp is
  6.     port (
  7.         A: in std_logic_vector (3 downto 0);
  8.       B: in std_logic_vector (3 downto 0);
  9.         AHB, AEB, ALB: out std_logic
  10.    );
  11. end comp;
  12.  
  13. architecture dataflow of comp is
  14.  
  15. begin
  16.  
  17.     AHB <= '1' when A > B else '0';
  18.              
  19.     AEB <= '1' when A = B else '0';
  20.              
  21.     ALB <= '1' when A < B else '0';
  22.              
  23. end dataflow;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement