Projekt z kursu Układy cyfrowe i systemy wbudowane 2 na PWr
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. --------------------------------------------------------------------------------
  2. -- Copyright (c) 1995-2013 Xilinx, Inc. All rights reserved.
  3. --------------------------------------------------------------------------------
  4. -- ____ ____
  5. -- / /\/ /
  6. -- /___/ \ / Vendor: Xilinx
  7. -- \ \ \/ Version : 14.7
  8. -- \ \ Application : sch2hdl
  9. -- / / Filename : MagnetoHMC5883LCtrl.vhf
  10. -- /___/ /\ Timestamp : 05/28/2018 20:43:29
  11. -- \ \ / \
  12. -- \___\/\___\
  13. --
  14. --Command: sch2hdl -intstyle ise -family spartan6 -flat -suppress -vhdl D:/XilinxPrj/ucisw2_magnetometr/MagnetoHMC5883LCtrl.vhf -w D:/XilinxPrj/ucisw2_magnetometr/MagnetoHMC5883LCtrl.sch
  15. --Design Name: MagnetoHMC5883LCtrl
  16. --Device: spartan6
  17. --Purpose:
  18. -- This vhdl netlist is translated from an ECS schematic. It can be
  19. -- synthesized and simulated, but it should not be modified.
  20. --
  21. library ieee;
  22. use ieee.std_logic_1164.ALL;
  23. use ieee.numeric_std.ALL;
  24. library UNISIM;
  25. use UNISIM.Vcomponents.ALL;
  26. entity MagnetoHMC5883LCtrl is
  27. port ( Clk : in std_logic;
  28. DRDY : in std_logic;
  29. OutputRate : in std_logic_vector (2 downto 0);
  30. Reset : in std_logic;
  31. DRX : out std_logic_vector (15 downto 0);
  32. DRY : out std_logic_vector (15 downto 0);
  33. DRZ : out std_logic_vector (15 downto 0);
  34. DR_New : out std_logic;
  35. ID : out std_logic_vector (23 downto 0);
  36. NACK : out std_logic;
  37. SCL : inout std_logic;
  38. SDA : inout std_logic);
  39. end MagnetoHMC5883LCtrl;
  40. architecture BEHAVIORAL of MagnetoHMC5883LCtrl is
  41. signal XLXN_4 : std_logic;
  42. signal XLXN_5 : std_logic;
  43. signal XLXN_6 : std_logic;
  44. signal XLXN_27 : std_logic_vector (7 downto 0);
  45. signal XLXN_28 : std_logic_vector (7 downto 0);
  46. signal XLXN_29 : std_logic_vector (3 downto 0);
  47. signal XLXN_52 : std_logic;
  48. signal XLXN_54 : std_logic;
  49. signal XLXN_55 : std_logic;
  50. signal XLXN_57 : std_logic_vector (7 downto 0);
  51. component I2C_Master
  52. port ( Go : in std_logic;
  53. Address : in std_logic_vector (7 downto 0);
  54. ReadCnt : in std_logic_vector (3 downto 0);
  55. SDA : inout std_logic;
  56. SCL : inout std_logic;
  57. FIFO_Pop : in std_logic;
  58. FIFO_Push : in std_logic;
  59. FIFO_DI : in std_logic_vector (7 downto 0);
  60. FIFO_Empty : out std_logic;
  61. FIFO_Full : out std_logic;
  62. FIFO_DO : out std_logic_vector (7 downto 0);
  63. Reset : in std_logic;
  64. Clk : in std_logic;
  65. Busy : out std_logic;
  66. NACK : out std_logic);
  67. end component;
  68. component Magneto_Drv
  69. port ( I2C_FIFO_Empty : in std_logic;
  70. I2C_FIFO_Full : in std_logic;
  71. I2C_Busy : in std_logic;
  72. DRDY : in std_logic;
  73. Reset : in std_logic;
  74. Clk : in std_logic;
  75. I2C_FIFO_DO : in std_logic_vector (7 downto 0);
  76. OutputRate : in std_logic_vector (2 downto 0);
  77. I2C_Go : out std_logic;
  78. I2C_FIFO_Push : out std_logic;
  79. I2C_FIFO_Pop : out std_logic;
  80. DR_New : out std_logic;
  81. I2C_FIFO_DI : out std_logic_vector (7 downto 0);
  82. I2C_Addr : out std_logic_vector (7 downto 0);
  83. I2C_ReadCnt : out std_logic_vector (3 downto 0);
  84. ID : out std_logic_vector (23 downto 0);
  85. DRX : out std_logic_vector (15 downto 0);
  86. DRY : out std_logic_vector (15 downto 0);
  87. DRZ : out std_logic_vector (15 downto 0));
  88. end component;
  89. begin
  90. I2CCtrl : I2C_Master
  91. port map (Address(7 downto 0)=>XLXN_28(7 downto 0),
  92. Clk=>Clk,
  93. FIFO_DI(7 downto 0)=>XLXN_27(7 downto 0),
  94. FIFO_Pop=>XLXN_6,
  95. FIFO_Push=>XLXN_5,
  96. Go=>XLXN_4,
  97. ReadCnt(3 downto 0)=>XLXN_29(3 downto 0),
  98. Reset=>Reset,
  99. Busy=>XLXN_55,
  100. FIFO_DO(7 downto 0)=>XLXN_57(7 downto 0),
  101. FIFO_Empty=>XLXN_52,
  102. FIFO_Full=>XLXN_54,
  103. NACK=>NACK,
  104. SCL=>SCL,
  105. SDA=>SDA);
  106. MagnetoInterface : Magneto_Drv
  107. port map (Clk=>Clk,
  108. DRDY=>DRDY,
  109. I2C_Busy=>XLXN_55,
  110. I2C_FIFO_DO(7 downto 0)=>XLXN_57(7 downto 0),
  111. I2C_FIFO_Empty=>XLXN_52,
  112. I2C_FIFO_Full=>XLXN_54,
  113. OutputRate(2 downto 0)=>OutputRate(2 downto 0),
  114. Reset=>Reset,
  115. DRX(15 downto 0)=>DRX(15 downto 0),
  116. DRY(15 downto 0)=>DRY(15 downto 0),
  117. DRZ(15 downto 0)=>DRZ(15 downto 0),
  118. DR_New=>DR_New,
  119. ID(23 downto 0)=>ID(23 downto 0),
  120. I2C_Addr(7 downto 0)=>XLXN_28(7 downto 0),
  121. I2C_FIFO_DI(7 downto 0)=>XLXN_27(7 downto 0),
  122. I2C_FIFO_Pop=>XLXN_6,
  123. I2C_FIFO_Push=>XLXN_5,
  124. I2C_Go=>XLXN_4,
  125. I2C_ReadCnt(3 downto 0)=>XLXN_29(3 downto 0));
  126. end BEHAVIORAL;