Ignore:
Timestamp:
07/27/11 11:55:25 (13 years ago)
Author:
vogler
Message:
clock cond interface, new settings loaded only when changed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • firmware/FTM/Clock_cond_interface/Clock_cond_interface.vhd

    r10740 r11648  
    2121--                 March    23  2011 by Patrick Vogler
    2222--                 May      03  2011 by Patrick Vogler and Quirin Weitzel
     23--                 July     19  2011 by Patrick Vogler
    2324----------------------------------------------------------------------------------
    2425
     
    7677    -- FPGA intern control signals
    7778    -------------------------------------------------------------------------------
    78     start_config : in STD_LOGIC;       -- load new configuration into the clock
     79    start_config     : in STD_LOGIC;   -- load new configuration into the clock
    7980                                       -- conditioner
    8081   
    81     config_started : out STD_LOGIC;    -- indicates that the new configuration
     82    config_started   : out STD_LOGIC;  -- indicates that the new configuration
    8283                                       -- is currently loaded into the clock conditioner
    8384
    84     config_done : out STD_LOGIC;       -- indicates that the configuration has
    85                                        -- been loaded and the clock conditioners
    86                                        -- PLL is locked
    87 
     85    config_done      : out STD_LOGIC;  -- indicates that the configuration has
     86                                       -- been loaded
     87
     88 -- locked           : out STD_LOGIC;  -- PLL in the Clock Conditioner locked
     89   
    8890    timemarker_select: in STD_LOGIC    -- selects time marker source
    8991                                       --
     
    9698  );
    9799end Clock_cond_interface;
     100
    98101
    99102
     
    118121  signal config_ready_sig : STD_LOGIC;
    119122  signal config_started_sig : STD_LOGIC;
    120  
    121   signal clk_cond_array_sig : clk_cond_array_type; 
    122 
    123   signal cc_R0_sig             : std_logic_vector (31 downto 0);
    124   signal cc_R1_sig             : std_logic_vector (31 downto 0);
    125 
    126   signal cc_R2_sig             : std_logic_vector (31 downto 0);       
    127   signal cc_R3_sig             : std_logic_vector (31 downto 0);
    128   signal cc_R4_sig             : std_logic_vector (31 downto 0);
    129   signal cc_R5_sig             : std_logic_vector (31 downto 0);
    130   signal cc_R6_sig             : std_logic_vector (31 downto 0);
    131   signal cc_R7_sig             : std_logic_vector (31 downto 0);
    132 
    133   signal cc_R8_sig             : std_logic_vector (31 downto 0);
    134   signal cc_R9_sig             : std_logic_vector (31 downto 0);
    135   signal cc_R11_sig            : std_logic_vector (31 downto 0);
    136   signal cc_R13_sig            : std_logic_vector (31 downto 0);
    137   signal cc_R14_sig            : std_logic_vector (31 downto 0);
    138   signal cc_R15_sig            : std_logic_vector (31 downto 0);
    139 
     123
     124
     125  signal clk_cond_array_sig    : clk_cond_array_type;
     126
     127
     128--  signal cc_R0_sig             : std_logic_vector (31 downto 0);
     129--  signal cc_R1_sig             : std_logic_vector (31 downto 0);
     130
     131--  signal cc_R2_sig             : std_logic_vector (31 downto 0);       
     132--  signal cc_R3_sig             : std_logic_vector (31 downto 0);
     133--  signal cc_R4_sig             : std_logic_vector (31 downto 0);
     134--  signal cc_R5_sig             : std_logic_vector (31 downto 0);
     135--  signal cc_R6_sig             : std_logic_vector (31 downto 0);
     136--  signal cc_R7_sig             : std_logic_vector (31 downto 0);
     137
     138--  signal cc_R8_sig             : std_logic_vector (31 downto 0);
     139--  signal cc_R9_sig             : std_logic_vector (31 downto 0);
     140--  signal cc_R11_sig            : std_logic_vector (31 downto 0);
     141--  signal cc_R13_sig            : std_logic_vector (31 downto 0);
     142--  signal cc_R14_sig            : std_logic_vector (31 downto 0);
     143--  signal cc_R15_sig            : std_logic_vector (31 downto 0);
     144
     145
     146
     147 
    140148  signal timemarker_select_sig : std_logic := '0';
    141149
     
    166174  end process sync_ld_proc;
    167175 
    168   --config_done <= config_ready_sig;  -- indicates that the configuration
    169                                     -- has been loaded
    170 
    171   --config_done <= (config_ready_sig AND LD_Clk_Cond);  -- indicates that the configuration
    172                                                       -- has been loaded and
    173                                                       -- the PLL has locked
    174  
    175   config_done <= config_ready_sig and (load_detect_sr(1) and load_detect_sr(0));
     176 -- config_done <= config_ready_sig;  -- indicates that the configuration
     177                                      -- has been loaded
     178
     179 -- config_done <= (config_ready_sig AND LD_Clk_Cond);  -- indicates that the configuration
     180                                                        -- has been loaded and
     181                                                        -- the PLL has locked
     182 
     183 config_done <= config_ready_sig and (load_detect_sr(1) and load_detect_sr(0));
     184
     185--  config_done <= config_ready_sig;
     186--  locked      <= load_detect_sr(1) and load_detect_sr(0);
     187 
     188 
     189 
    176190 
    177191  TIM_Sel <= timemarker_select_sig;
     
    201215  config_started <= config_started_sig;
    202216
    203   cc_R0_sig  <= cc_R0;             
    204   cc_R1_sig  <= cc_R1;
    205   cc_R2_sig  <= cc_R2_const;                 
    206   cc_R3_sig  <= cc_R3_const;   
    207   cc_R4_sig  <= cc_R4_const;           
    208   cc_R5_sig  <= cc_R5_const;   
    209   cc_R6_sig  <= cc_R6_const;       
    210   cc_R7_sig  <= cc_R7_const;     
    211   cc_R8_sig  <= cc_R8;
    212   cc_R9_sig  <= cc_R9;     
    213   cc_R11_sig <= cc_R11;       
    214   cc_R13_sig <= cc_R13;         
    215   cc_R14_sig <= cc_R14;           
    216   cc_R15_sig <= cc_R15;
    217 
     217
     218--  -----------------------------------------------------------------------------
     219   
     220--  cc_R0_sig  <= cc_R0;             
     221--  cc_R1_sig  <= cc_R1;
     222 
     223--  cc_R2_sig  <= cc_R2_const;                 
     224--  cc_R3_sig  <= cc_R3_const;   
     225--  cc_R4_sig  <= cc_R4_const;           
     226--  cc_R5_sig  <= cc_R5_const;   
     227--  cc_R6_sig  <= cc_R6_const;       
     228--  cc_R7_sig  <= cc_R7_const;
     229 
     230--  cc_R8_sig  <= cc_R8;
     231--  cc_R9_sig  <= cc_R9;     
     232--  cc_R11_sig <= cc_R11;       
     233--  cc_R13_sig <= cc_R13;         
     234--  cc_R14_sig <= cc_R14;           
     235--  cc_R15_sig <= cc_R15;
     236
     237
     238
     239
     240
     241
     242 
     243--  clk_cond_array_sig(0) <= LMK03000_Reset;      -- reset LKM03000 by setting
     244--                                                -- bit 31 of register 0
     245--  clk_cond_array_sig(1) <= cc_R0_sig;
     246--  clk_cond_array_sig(2) <= cc_R1_sig;
     247 
     248--  clk_cond_array_sig(3) <= cc_R2_sig; -- unused channels
     249--  clk_cond_array_sig(4) <= cc_R3_sig;
     250--  clk_cond_array_sig(5) <= cc_R4_sig;
     251--  clk_cond_array_sig(6) <= cc_R5_sig;
     252--  clk_cond_array_sig(7) <= cc_R6_sig;
     253--  clk_cond_array_sig(8) <= cc_R7_sig; -- unused channels
     254 
     255--  clk_cond_array_sig(9)  <= cc_R8_sig;
     256--  clk_cond_array_sig(10) <= cc_R9_sig;
     257--  clk_cond_array_sig(11) <= cc_R11_sig;
     258--  clk_cond_array_sig(12) <= cc_R13_sig;
     259--  clk_cond_array_sig(13) <= cc_R14_sig;
     260--  clk_cond_array_sig(14) <= cc_R15_sig;
     261
     262-- -----------------------------------------------------------------------------
     263 
     264 
    218265  clk_cond_array_sig(0) <= LMK03000_Reset;      -- reset LKM03000 by setting
    219266                                                -- bit 31 of register 0
    220   clk_cond_array_sig(1) <= cc_R0_sig;
    221   clk_cond_array_sig(2) <= cc_R1_sig;
    222  
    223   clk_cond_array_sig(3) <= cc_R2_sig; -- unused channels
    224   clk_cond_array_sig(4) <= cc_R3_sig;
    225   clk_cond_array_sig(5) <= cc_R4_sig;
    226   clk_cond_array_sig(6) <= cc_R5_sig;
    227   clk_cond_array_sig(7) <= cc_R6_sig;
    228   clk_cond_array_sig(8) <= cc_R7_sig;
    229  
    230   clk_cond_array_sig(9)  <= cc_R8_sig;
    231   clk_cond_array_sig(10) <= cc_R9_sig;
    232   clk_cond_array_sig(11) <= cc_R11_sig;
    233   clk_cond_array_sig(12) <= cc_R13_sig;
    234   clk_cond_array_sig(13) <= cc_R14_sig;
    235   clk_cond_array_sig(14) <= cc_R15_sig;
     267  clk_cond_array_sig(1) <= cc_R0;
     268  clk_cond_array_sig(2) <= cc_R1;
     269 
     270  clk_cond_array_sig(3) <= cc_R2_const; -- unused channels
     271  clk_cond_array_sig(4) <= cc_R3_const;
     272  clk_cond_array_sig(5) <= cc_R4_const;
     273  clk_cond_array_sig(6) <= cc_R5_const;
     274  clk_cond_array_sig(7) <= cc_R6_const;
     275  clk_cond_array_sig(8) <= cc_R7_const; -- unused channels
     276 
     277  clk_cond_array_sig(9)  <= cc_R8;
     278  clk_cond_array_sig(10) <= cc_R9;
     279  clk_cond_array_sig(11) <= cc_R11;
     280  clk_cond_array_sig(12) <= cc_R13;
     281  clk_cond_array_sig(13) <= cc_R14;
     282  clk_cond_array_sig(14) <= cc_R15;
     283
    236284
    237285end Behavioral;
Note: See TracChangeset for help on using the changeset viewer.