Advertisement
Device-Cheat

Untitled

May 9th, 2020
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3. use IEEE.STD_LOGIC_ARITH.ALL;
  4. use IEEE.STD_LOGIC_UNSIGNED.ALL;
  5.  
  6. entity adc_dac_interface is port
  7. (
  8. CLK_SAMP : in std_logic;
  9. reset : in std_logic;
  10. enable_in : in std_logic;
  11. Real_in_from_ADC : in std_logic_vector(11 downto 0);--receiver side i/p
  12. imag_in_from_ADC : in std_logic_vector(11 downto 0); --receiver side i/p
  13.  
  14. Real_adc_to_phy : out std_logic_vector(15 downto 0);--receiver side 0/p
  15. imag_adc_to_phy : out std_logic_vector(15 downto 0);--receiver side o/p
  16.  
  17. ADC_CLK1 : out std_logic;
  18. ADC_CLK2 : out std_logic;
  19. enable_out:out std_logic
  20. );
  21. end entity;
  22.  
  23. architecture beh of adc_dac_interface is
  24.  
  25. begin
  26.  
  27. process(CLK_SAMP,reset)
  28. begin
  29. if reset='1' then
  30. enable_out<='0';
  31. real_adc_to_phy<=(others=>'0');
  32. imag_adc_to_phy<=(others=>'0');
  33.  
  34. elsif CLK_SAMP='1' and CLK_SAMP'event then
  35.  
  36. real_adc_to_phy<=Real_in_from_ADC (11)&Real_in_from_ADC (11)&Real_in_from_ADC (11)&Real_in_from_ADC (11)&Real_in_from_ADC ;
  37. imag_adc_to_phy<= imag_in_from_ADC(11)& imag_in_from_ADC(11)& imag_in_from_ADC(11)& imag_in_from_ADC(11)& imag_in_from_ADC;
  38. enable_out<=enable_in;
  39.  
  40. end if;
  41.  
  42. end process;
  43.  
  44. ADC_CLK1<=CLK_SAMP;
  45. ADC_CLK2<=CLK_SAMP;
  46.  
  47. end beh;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement