Advertisement
salla

display_dataflow

Jul 29th, 2019
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.78 KB | None | 0 0
  1. library IEEE;
  2. use ieee.std_logic_1164.all;
  3.  
  4. entity display_dataflow is
  5. port (bcd: in std_logic_vector (0 to 3);
  6.         HEX0: out std_logic_vector (0 to 6));
  7. end display_dataflow;
  8.  
  9. architecture dataflow of display_dataflow is
  10. alias A: std_logic is bcd(0);
  11. alias B: std_logic is bcd(1);
  12. alias C: std_logic is bcd(2);
  13. alias D: std_logic is bcd(3);
  14.  
  15. begin
  16. HEX0(0) <= not (A or C or (B xnor D));
  17. HEX0(1) <= not ((not B) or (C xnor D));
  18. HEX0(2) <= not (B or (not C) or D);
  19. HEX0(3) <= not (A or ((not B) and (not D)) or ((not B) and C) or (C and (not D)) or (B and (not C) and D));  
  20. HEX0(4) <= not (((not B) and (not D)) or (C and (not D)));
  21. HEX0(5) <= not (A or ((not C) and (not D)) or (B and (not C)) or (B and (not D)));
  22. HEX0(6) <= not (A or (B xor C) or (C and (not D)));
  23. end dataflow;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement