*

Ogultekin

  • *
  • 10
  • KTU EEE^4
    • Profili Görüntüle
NEXYS4 DDR Switch ile Led Kontrolü
« : 15 Ekim 2016, 17:38:38 »
Bu uygulamada Nexys4 DDR kartı üzerinde bulunan 16 adet switch ile 16 adet ledin kontrolü yapılmıştır.


Kod: VHDL
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3.  
  4.  
  5. entity SW_16b_LED is
  6.  generic(n: integer :=16);
  7.     Port(
  8.             SW : in std_logic_vector (n-1 downto 0);
  9.             LED: out std_logic_vector (n-1 downto 0)
  10.          );
  11. end SW_16b_LED;
  12.  
  13. architecture Behavioral of SW_16b_LED is
  14.     begin
  15.         LED <= SW;
  16. end Behavioral;

Kod: Verilog
  1. set_property PACKAGE_PIN V11 [get_ports {LED[15]}]
  2. set_property PACKAGE_PIN V12 [get_ports {LED[14]}]
  3. set_property PACKAGE_PIN V14 [get_ports {LED[13]}]
  4. set_property PACKAGE_PIN V15 [get_ports {LED[12]}]
  5. set_property PACKAGE_PIN T16 [get_ports {LED[11]}]
  6. set_property PACKAGE_PIN U14 [get_ports {LED[10]}]
  7. set_property PACKAGE_PIN T15 [get_ports {LED[9]}]
  8. set_property PACKAGE_PIN V16 [get_ports {LED[8]}]
  9. set_property PACKAGE_PIN U16 [get_ports {LED[7]}]
  10. set_property PACKAGE_PIN U17 [get_ports {LED[6]}]
  11. set_property PACKAGE_PIN V17 [get_ports {LED[5]}]
  12. set_property PACKAGE_PIN R18 [get_ports {LED[4]}]
  13. set_property PACKAGE_PIN N14 [get_ports {LED[3]}]
  14. set_property PACKAGE_PIN J13 [get_ports {LED[2]}]
  15. set_property PACKAGE_PIN K15 [get_ports {LED[1]}]
  16. set_property PACKAGE_PIN H17 [get_ports {LED[0]}]
  17. set_property PACKAGE_PIN V10 [get_ports {SW[15]}]
  18. set_property PACKAGE_PIN U11 [get_ports {SW[14]}]
  19. set_property PACKAGE_PIN U12 [get_ports {SW[13]}]
  20. set_property PACKAGE_PIN H6 [get_ports {SW[12]}]
  21. set_property PACKAGE_PIN T13 [get_ports {SW[11]}]
  22. set_property PACKAGE_PIN R16 [get_ports {SW[10]}]
  23. set_property PACKAGE_PIN U8 [get_ports {SW[9]}]
  24. set_property PACKAGE_PIN T8 [get_ports {SW[8]}]
  25. set_property PACKAGE_PIN R13 [get_ports {SW[7]}]
  26. set_property PACKAGE_PIN U18 [get_ports {SW[6]}]
  27. set_property PACKAGE_PIN T18 [get_ports {SW[5]}]
  28. set_property PACKAGE_PIN R17 [get_ports {SW[4]}]
  29. set_property PACKAGE_PIN R15 [get_ports {SW[3]}]
  30. set_property PACKAGE_PIN M13 [get_ports {SW[2]}]
  31. set_property PACKAGE_PIN L16 [get_ports {SW[1]}]
  32. set_property PACKAGE_PIN J15 [get_ports {SW[0]}]
  33. set_property IOSTANDARD LVCMOS33 [get_ports {LED[15]}]
  34. set_property IOSTANDARD LVCMOS33 [get_ports {LED[14]}]
  35. set_property IOSTANDARD LVCMOS33 [get_ports {LED[13]}]
  36. set_property IOSTANDARD LVCMOS33 [get_ports {LED[12]}]
  37. set_property IOSTANDARD LVCMOS33 [get_ports {LED[11]}]
  38. set_property IOSTANDARD LVCMOS33 [get_ports {LED[10]}]
  39. set_property IOSTANDARD LVCMOS33 [get_ports {LED[9]}]
  40. set_property IOSTANDARD LVCMOS33 [get_ports {LED[8]}]
  41. set_property IOSTANDARD LVCMOS33 [get_ports {LED[7]}]
  42. set_property IOSTANDARD LVCMOS33 [get_ports {LED[6]}]
  43. set_property IOSTANDARD LVCMOS33 [get_ports {LED[5]}]
  44. set_property IOSTANDARD LVCMOS33 [get_ports {LED[4]}]
  45. set_property IOSTANDARD LVCMOS33 [get_ports {LED[3]}]
  46. set_property IOSTANDARD LVCMOS33 [get_ports {LED[2]}]
  47. set_property IOSTANDARD LVCMOS33 [get_ports {LED[1]}]
  48. set_property IOSTANDARD LVCMOS33 [get_ports {LED[0]}]
  49. set_property IOSTANDARD LVCMOS33 [get_ports {SW[15]}]
  50. set_property IOSTANDARD LVCMOS33 [get_ports {SW[14]}]
  51. set_property IOSTANDARD LVCMOS33 [get_ports {SW[13]}]
  52. set_property IOSTANDARD LVCMOS33 [get_ports {SW[12]}]
  53. set_property IOSTANDARD LVCMOS33 [get_ports {SW[11]}]
  54. set_property IOSTANDARD LVCMOS33 [get_ports {SW[10]}]
  55. set_property IOSTANDARD LVCMOS33 [get_ports {SW[9]}]
  56. set_property IOSTANDARD LVCMOS33 [get_ports {SW[8]}]
  57. set_property IOSTANDARD LVCMOS33 [get_ports {SW[7]}]
  58. set_property IOSTANDARD LVCMOS33 [get_ports {SW[6]}]
  59. set_property IOSTANDARD LVCMOS33 [get_ports {SW[5]}]
  60. set_property IOSTANDARD LVCMOS33 [get_ports {SW[4]}]
  61. set_property IOSTANDARD LVCMOS33 [get_ports {SW[3]}]
  62. set_property IOSTANDARD LVCMOS33 [get_ports {SW[2]}]
  63. set_property IOSTANDARD LVCMOS33 [get_ports {SW[1]}]
  64. set_property IOSTANDARD LVCMOS33 [get_ports {SW[0]}]
  65. set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]