Advertisement
DevilCarrot

Untitled

Apr 24th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.40 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4. use work.all;
  5.  
  6.  
  7. entity nand_8 is
  8. port (din : in std_logic_vector(7 downto 0);
  9. oddp: out std_logic
  10. );
  11. end;
  12.  
  13.  
  14. architecture struct of nand_8 is
  15. begin
  16.  po: process (din)
  17.  variable odd : std_logic;
  18.  begin
  19.  odd := '0';
  20.  for index in 7 downto 0 loop
  21. odd := odd xor din(index);
  22.  end loop;
  23.  oddp <= odd;
  24.  end process;
  25. end struct;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement