Advertisement
Guest User

top_module

a guest
Sep 4th, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 3.46 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4.  
  5. library machXO3;
  6. use machXO3.all;
  7.    
  8. entity top_module is
  9.     port (
  10.         GSRN                :   in std_logic;
  11.        
  12.         rx_serial               :   in std_logic;
  13.         trigger_from_awg        :   in std_logic;
  14.         trigger_from_apd        :   in  std_logic;
  15.        
  16.         flag_start_experiment   :   out std_logic;
  17.         flag_hard_limit         :   out std_logic;
  18.         flag_nv_minus           :   out std_logic;
  19.        
  20.         trigger_to_awg          :   out std_logic;
  21.        
  22.         pulse_laser_1           :   out std_logic;
  23.         pulse_laser_2           :   out std_logic;
  24.         pulse_laser_3           :   out std_logic;
  25.         pulse_laser_4           :   out std_logic;
  26.        
  27.         pulse_htm_dac_1         :   out std_logic;
  28.         pulse_htm_dac_2         :   out std_logic;
  29.        
  30.         pulse_ni_gate           :   out std_logic
  31.     );
  32. end top_module;
  33.  
  34. architecture behaviour of top_module is
  35.  
  36.     component GSR
  37.         port (  GSR : in std_logic);
  38.     end component;
  39.    
  40.     COMPONENT OSCH
  41.         GENERIC (NOM_FREQ: string := "53.2");
  42.         PORT (  STDBY:IN std_logic;
  43.                 OSC:OUT std_logic;
  44.                 SEDSTDBY:OUT std_logic);
  45.     END COMPONENT;
  46.    
  47.     attribute NOM_FREQ : string;
  48.     attribute NOM_FREQ of OSCinst0 : label is "53.2";
  49.    
  50.     signal clk : std_logic;
  51.    
  52.     component tiptop_module
  53.         generic (
  54.             g_CLKS_PER_BIT : integer;
  55.             max_experiment_repetition_counter_value     :   integer;
  56.             max_step_counter_value                      :   integer;
  57.             max_initialization_repetition_counter_value :   integer;
  58.             max_photon_counter_value                    :   integer;
  59.            
  60.             max_photon_counter_window_pulse_value       :   integer
  61.         );
  62.         port (
  63.             rst                     :   in std_logic;
  64.             clk                     :   in std_logic;
  65.             rx_serial               :   in std_logic;
  66.             trigger_from_awg        :   in std_logic;
  67.             trigger_from_apd        :   in  std_logic;
  68.            
  69.             flag_start_experiment   :   out std_logic;
  70.             flag_hard_limit         :   out std_logic;
  71.             flag_nv_minus           :   out std_logic;
  72.            
  73.             trigger_to_awg          :   out std_logic;
  74.            
  75.             pulse_laser_1           :   out std_logic;
  76.             pulse_laser_2           :   out std_logic;
  77.             pulse_laser_3           :   out std_logic;
  78.             pulse_laser_4           :   out std_logic;
  79.            
  80.             pulse_htm_dac_1         :   out std_logic;
  81.             pulse_htm_dac_2         :   out std_logic;
  82.            
  83.             pulse_ni_gate           :   out std_logic
  84.         );
  85.     end component;
  86.    
  87.    
  88. begin
  89.    
  90.    
  91.  
  92.     inst_gsr : GSR
  93.         port map(       GSR => GSRN);
  94.  
  95.     OSCinst0 : OSCH
  96.         port map(       STDBY => '0',
  97.                         OSC => clk,
  98.                         SEDSTDBY => open);
  99.                      
  100.     inst_tiptop_module : tiptop_module
  101.                                         generic map(
  102.                                                     g_CLKS_PER_BIT => 461,
  103.                                                     max_experiment_repetition_counter_value => 100001,
  104.                                                     max_step_counter_value => 133001,
  105.                                                     max_initialization_repetition_counter_value => 257,
  106.                                                     max_photon_counter_value => 513,
  107.                                                     max_photon_counter_window_pulse_value => 133001
  108.                                                     )
  109.                                         port map (
  110.                                                     rst => GSRN,
  111.                                                     clk => clk,
  112.                                                    
  113.                                                     rx_serial => rx_serial,
  114.                                                     trigger_from_awg => trigger_from_awg,
  115.                                                     trigger_from_apd => trigger_from_apd,
  116.  
  117.                                                     flag_start_experiment => flag_start_experiment,
  118.                                                     flag_hard_limit => flag_hard_limit,
  119.                                                     flag_nv_minus => flag_nv_minus,
  120.                                                    
  121.                                                     trigger_to_awg => trigger_to_awg,
  122.                                                    
  123.                                                     pulse_laser_1 => pulse_laser_1,
  124.                                                     pulse_laser_2 => pulse_laser_2,
  125.                                                     pulse_laser_3 => pulse_laser_3,
  126.                                                     pulse_laser_4 => pulse_laser_4,
  127.                                                     pulse_htm_dac_1 => pulse_htm_dac_1,
  128.                                                     pulse_htm_dac_2 => pulse_htm_dac_2,
  129.                                                    
  130.                                                     pulse_ni_gate => pulse_ni_gate
  131.                                                     );
  132.                                        
  133.      
  134. end behaviour;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement