usb-avr-cpld experiment board with FTDI FT232RL, ATMEGA88 & XC9572XL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
895 B

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4. entity CpldTestE is
  5. port (
  6. -- globals
  7. XcClk_i : in std_logic;
  8. -- avr
  9. AvrData_io : inout std_logic_vector(14 downto 0);
  10. AvrSck_i : in std_logic;
  11. AvrMosi_i : in std_logic;
  12. AvrMiso_o : out std_logic;
  13. -- spi flash
  14. SpfRst_n_o : out std_logic;
  15. SpfCs_n_o : out std_logic;
  16. SpfSck_o : out std_logic;
  17. SpfMosi_o : out std_logic;
  18. SpfMiso_i : in std_logic;
  19. -- gpio
  20. Gpio_io : inout std_logic_vector(4 downto 0)
  21. );
  22. end entity CpldTestE;
  23. architecture rtl of CpldTestE is
  24. begin
  25. -- test gpio pins
  26. process (XcClk_i) is
  27. begin
  28. if(rising_edge(XcClk_i)) then
  29. if(AvrData_io(0) = '0') then
  30. Gpio_io <= "00000";
  31. else
  32. Gpio_io <= "10101";
  33. end if;
  34. end if;
  35. end process;
  36. end architecture rtl;