@@ -12,8 +12,8 | |||||
12 | # |
|
12 | # | |
13 |
|
13 | |||
14 |
|
14 | |||
15 |
define_clock |
|
15 | define_clock -name {clk_50} -freq 100 -clockgroup default_clkgroup_50 -route 5 | |
16 |
define_clock |
|
16 | define_clock -name {clk_49} -freq 49.152 -clockgroup default_clkgroup_49 -route 5 | |
17 |
|
17 | |||
18 | # |
|
18 | # | |
19 | # Clock to Clock |
|
19 | # Clock to Clock | |
@@ -22,8 +22,6 define_clock {clk_49} -name {clk_49} - | |||||
22 | # |
|
22 | # | |
23 | # Inputs/Outputs |
|
23 | # Inputs/Outputs | |
24 | # |
|
24 | # | |
25 | define_output_delay -disable -default 5.00 -improve 0.00 -route 0.00 -ref {clk:r} |
|
|||
26 | define_input_delay -disable -default 5.00 -improve 0.00 -route 0.00 -ref {clk:r} |
|
|||
27 |
|
25 | |||
28 |
|
26 | |||
29 | # |
|
27 | # | |
@@ -37,6 +35,7 define_input_delay -disable -defaul | |||||
37 | # |
|
35 | # | |
38 | # False Path |
|
36 | # False Path | |
39 | # |
|
37 | # | |
|
38 | set_false_path -from reset | |||
40 |
|
39 | |||
41 | # |
|
40 | # | |
42 | # Path Delay |
|
41 | # Path Delay | |
@@ -47,7 +46,6 define_input_delay -disable -defaul | |||||
47 | # |
|
46 | # | |
48 | define_global_attribute syn_useioff {1} |
|
47 | define_global_attribute syn_useioff {1} | |
49 | define_global_attribute -disable syn_netlist_hierarchy {0} |
|
48 | define_global_attribute -disable syn_netlist_hierarchy {0} | |
50 | define_attribute {etx_clk} syn_noclockbuf {1} |
|
|||
51 |
|
49 | |||
52 | # |
|
50 | # | |
53 | # I/O standards |
|
51 | # I/O standards |
@@ -185,6 +185,11 ARCHITECTURE beh OF MINI_LFR_top IS | |||||
185 | SIGNAL rstn_25_d2 : STD_LOGIC; |
|
185 | SIGNAL rstn_25_d2 : STD_LOGIC; | |
186 | SIGNAL rstn_25_d3 : STD_LOGIC; |
|
186 | SIGNAL rstn_25_d3 : STD_LOGIC; | |
187 |
|
187 | |||
|
188 | SIGNAL rstn_24 : STD_LOGIC; | |||
|
189 | SIGNAL rstn_24_d1 : STD_LOGIC; | |||
|
190 | SIGNAL rstn_24_d2 : STD_LOGIC; | |||
|
191 | SIGNAL rstn_24_d3 : STD_LOGIC; | |||
|
192 | ||||
188 | SIGNAL rstn_50 : STD_LOGIC; |
|
193 | SIGNAL rstn_50 : STD_LOGIC; | |
189 | SIGNAL rstn_50_d1 : STD_LOGIC; |
|
194 | SIGNAL rstn_50_d1 : STD_LOGIC; | |
190 | SIGNAL rstn_50_d2 : STD_LOGIC; |
|
195 | SIGNAL rstn_50_d2 : STD_LOGIC; | |
@@ -273,8 +278,16 BEGIN -- beh | |||||
273 | BEGIN -- PROCESS |
|
278 | BEGIN -- PROCESS | |
274 | IF reset = '0' THEN -- asynchronous reset (active low) |
|
279 | IF reset = '0' THEN -- asynchronous reset (active low) | |
275 | clk_24 <= '0'; |
|
280 | clk_24 <= '0'; | |
|
281 | rstn_24_d1 <= '0'; | |||
|
282 | rstn_24_d2 <= '0'; | |||
|
283 | rstn_24_d3 <= '0'; | |||
|
284 | rstn_24 <= '0'; | |||
276 | ELSIF clk_49'EVENT AND clk_49 = '1' THEN -- rising clock edge |
|
285 | ELSIF clk_49'EVENT AND clk_49 = '1' THEN -- rising clock edge | |
277 | clk_24 <= NOT clk_24; |
|
286 | clk_24 <= NOT clk_24; | |
|
287 | rstn_24_d1 <= '1'; | |||
|
288 | rstn_24_d2 <= rstn_24_d1; | |||
|
289 | rstn_24_d3 <= rstn_24_d2; | |||
|
290 | rstn_24 <= rstn_24_d3; | |||
278 | END IF; |
|
291 | END IF; | |
279 | END PROCESS; |
|
292 | END PROCESS; | |
280 |
|
293 | |||
@@ -315,9 +328,9 BEGIN -- beh | |||||
315 | END IF; |
|
328 | END IF; | |
316 | END PROCESS; |
|
329 | END PROCESS; | |
317 |
|
330 | |||
318 |
PROCESS (clk_24, rstn_2 |
|
331 | PROCESS (clk_24, rstn_24) | |
319 | BEGIN -- PROCESS |
|
332 | BEGIN -- PROCESS | |
320 |
IF rstn_2 |
|
333 | IF rstn_24 = '0' THEN -- asynchronous reset (active low) | |
321 | I00_s <= '0'; |
|
334 | I00_s <= '0'; | |
322 | ELSIF clk_24'EVENT AND clk_24 = '1' THEN -- rising clock edge |
|
335 | ELSIF clk_24'EVENT AND clk_24 = '1' THEN -- rising clock edge | |
323 | I00_s <= NOT I00_s; |
|
336 | I00_s <= NOT I00_s; | |
@@ -396,8 +409,9 BEGIN -- beh | |||||
396 | NB_SECOND_DESYNC => 60) -- 60 secondes of desynchronization before CoarseTime's MSB is Set |
|
409 | NB_SECOND_DESYNC => 60) -- 60 secondes of desynchronization before CoarseTime's MSB is Set | |
397 | PORT MAP ( |
|
410 | PORT MAP ( | |
398 | clk25MHz => clk_25, |
|
411 | clk25MHz => clk_25, | |
|
412 | resetn_25MHz => rstn_25, -- TODO | |||
399 |
clk24_576MHz => clk_24, |
|
413 | clk24_576MHz => clk_24, -- 49.152MHz/2 | |
400 | resetn => rstn_25, |
|
414 | resetn_24_576MHz => rstn_24, -- TODO | |
401 | grspw_tick => swno.tickout, |
|
415 | grspw_tick => swno.tickout, | |
402 | apbi => apbi_ext, |
|
416 | apbi => apbi_ext, | |
403 | apbo => apbo_ext(6), |
|
417 | apbo => apbo_ext(6), | |
@@ -522,7 +536,7 BEGIN -- beh | |||||
522 | pirq_ms => 6, |
|
536 | pirq_ms => 6, | |
523 | pirq_wfp => 14, |
|
537 | pirq_wfp => 14, | |
524 | hindex => 2, |
|
538 | hindex => 2, | |
525 |
top_lfr_version => X"00014 |
|
539 | top_lfr_version => X"000144") -- aa.bb.cc version | |
526 | PORT MAP ( |
|
540 | PORT MAP ( | |
527 | clk => clk_25, |
|
541 | clk => clk_25, | |
528 | rstn => LFR_rstn, |
|
542 | rstn => LFR_rstn, | |
@@ -566,7 +580,7 BEGIN -- beh | |||||
566 | PORT MAP ( |
|
580 | PORT MAP ( | |
567 | -- CONV |
|
581 | -- CONV | |
568 | cnv_clk => clk_24, |
|
582 | cnv_clk => clk_24, | |
569 |
cnv_rstn => rstn_2 |
|
583 | cnv_rstn => rstn_24, | |
570 | cnv => ADC_nCS_sig, |
|
584 | cnv => ADC_nCS_sig, | |
571 | -- DATA |
|
585 | -- DATA | |
572 | clk => clk_25, |
|
586 | clk => clk_25, |
@@ -15,7 +15,7 VHDLSIMFILES= testbench.vhd | |||||
15 | SIMTOP=testbench |
|
15 | SIMTOP=testbench | |
16 | PDC=$(VHDLIB)/boards/$(BOARD)/default.pdc |
|
16 | PDC=$(VHDLIB)/boards/$(BOARD)/default.pdc | |
17 | ##SDC=$(VHDLIB)/boards/$(BOARD)/default.sdc |
|
17 | ##SDC=$(VHDLIB)/boards/$(BOARD)/default.sdc | |
18 |
|
|
18 | SDCFILE=$(VHDLIB)/boards/$(BOARD)/MINI_LFR_synthesis.sdc | |
19 |
|
|
19 | SDC=$(VHDLIB)/boards/$(BOARD)/MINI_LFR_place_and_route.sdc | |
20 | BITGEN=$(VHDLIB)/boards/$(BOARD)/default.ut |
|
20 | BITGEN=$(VHDLIB)/boards/$(BOARD)/default.ut | |
21 | CLEAN=soft-clean |
|
21 | CLEAN=soft-clean |
@@ -89,14 +89,10 ARCHITECTURE beh OF cic_lfr_r2 IS | |||||
89 | SIGNAL addr_gen: STD_LOGIC_VECTOR(8 DOWNTO 0); |
|
89 | SIGNAL addr_gen: STD_LOGIC_VECTOR(8 DOWNTO 0); | |
90 | SIGNAL addr_read: STD_LOGIC_VECTOR(8 DOWNTO 0); |
|
90 | SIGNAL addr_read: STD_LOGIC_VECTOR(8 DOWNTO 0); | |
91 | SIGNAL addr_write: STD_LOGIC_VECTOR(8 DOWNTO 0); |
|
91 | SIGNAL addr_write: STD_LOGIC_VECTOR(8 DOWNTO 0); | |
92 | SIGNAL addr_write_mux: STD_LOGIC_VECTOR(8 DOWNTO 0); |
|
|||
93 | SIGNAL addr_write_s: STD_LOGIC_VECTOR(8 DOWNTO 0); |
|
92 | SIGNAL addr_write_s: STD_LOGIC_VECTOR(8 DOWNTO 0); | |
94 | SIGNAL data_we: STD_LOGIC; |
|
93 | SIGNAL data_we: STD_LOGIC; | |
95 | SIGNAL data_we_s: STD_LOGIC; |
|
94 | SIGNAL data_we_s: STD_LOGIC; | |
96 | SIGNAL data_wen : STD_LOGIC; |
|
95 | SIGNAL data_wen : STD_LOGIC; | |
97 | -- SIGNAL data_write : STD_LOGIC_VECTOR(15 DOWNTO 0); |
|
|||
98 | -- SIGNAL data_read : STD_LOGIC_VECTOR(15 DOWNTO 0); |
|
|||
99 | -- SIGNAL data_read_pre : STD_LOGIC_VECTOR(15 DOWNTO 0); |
|
|||
100 | ----------------------------------------------------------------------------- |
|
96 | ----------------------------------------------------------------------------- | |
101 | SIGNAL sample_out_reg16 : sample_vector(8*2-1 DOWNTO 0, 15 DOWNTO 0); |
|
97 | SIGNAL sample_out_reg16 : sample_vector(8*2-1 DOWNTO 0, 15 DOWNTO 0); | |
102 | SIGNAL sample_out_reg256 : sample_vector(6*3-1 DOWNTO 0, 15 DOWNTO 0); |
|
98 | SIGNAL sample_out_reg256 : sample_vector(6*3-1 DOWNTO 0, 15 DOWNTO 0); | |
@@ -394,4 +390,4 BEGIN | |||||
394 | END GENERATE all_bits; |
|
390 | END GENERATE all_bits; | |
395 | END GENERATE all_channel_out_v; |
|
391 | END GENERATE all_channel_out_v; | |
396 |
|
392 | |||
397 |
END beh; |
|
393 | END beh; No newline at end of file |
@@ -181,7 +181,7 ARCHITECTURE ar_IIR_CEL_CTRLR_v3 OF IIR_ | |||||
181 | TYPE FSM_CHANNEL_SELECTION IS (IDLE, ONGOING_1, ONGOING_2, WAIT_STATE); |
|
181 | TYPE FSM_CHANNEL_SELECTION IS (IDLE, ONGOING_1, ONGOING_2, WAIT_STATE); | |
182 | SIGNAL state_channel_selection : FSM_CHANNEL_SELECTION; |
|
182 | SIGNAL state_channel_selection : FSM_CHANNEL_SELECTION; | |
183 |
|
183 | |||
184 | SIGNAL sample_out_zero : samplT(ChanelsCount-1 DOWNTO 0, Sample_SZ-1 DOWNTO 0); |
|
184 | --SIGNAL sample_out_zero : samplT(ChanelsCount-1 DOWNTO 0, Sample_SZ-1 DOWNTO 0); | |
185 |
|
185 | |||
186 | BEGIN |
|
186 | BEGIN | |
187 |
|
187 | |||
@@ -193,7 +193,7 BEGIN | |||||
193 | BEGIN -- PROCESS |
|
193 | BEGIN -- PROCESS | |
194 | IF rstn = '0' THEN -- asynchronous reset (active low) |
|
194 | IF rstn = '0' THEN -- asynchronous reset (active low) | |
195 | channel_ready(I) <= '0'; |
|
195 | channel_ready(I) <= '0'; | |
196 |
ELSIF clk' |
|
196 | ELSIF clk'EVENT AND clk = '1' THEN -- rising clock edge | |
197 | IF channel_val(I) = '1' THEN |
|
197 | IF channel_val(I) = '1' THEN | |
198 | channel_ready(I) <= '1'; |
|
198 | channel_ready(I) <= '1'; | |
199 | ELSIF channel_done(I) = '1' THEN |
|
199 | ELSIF channel_done(I) = '1' THEN | |
@@ -203,11 +203,7 BEGIN | |||||
203 |
END PROCESS; |
|
203 | END PROCESS; | |
204 | END GENERATE all_channel_input_valid; |
|
204 | END GENERATE all_channel_input_valid; | |
205 | ----------------------------------------------------------------------------- |
|
205 | ----------------------------------------------------------------------------- | |
206 | all_channel_sample_out: FOR I IN ChanelsCount-1 DOWNTO 0 GENERATE |
|
206 | ||
207 | all_bit: FOR J IN Sample_SZ-1 DOWNTO 0 GENERATE |
|
|||
208 | sample_out_zero(I,J) <= '0'; |
|
|||
209 | END GENERATE all_bit; |
|
|||
210 | END GENERATE all_channel_sample_out; |
|
|||
211 |
|
207 | |||
212 | PROCESS (clk, rstn) |
|
208 | PROCESS (clk, rstn) | |
213 | BEGIN -- PROCESS |
|
209 | BEGIN -- PROCESS | |
@@ -217,11 +213,15 BEGIN | |||||
217 | sample_in_val <= '0'; |
|
213 | sample_in_val <= '0'; | |
218 | sample_out1_val <= '0'; |
|
214 | sample_out1_val <= '0'; | |
219 | sample_out2_val <= '0'; |
|
215 | sample_out2_val <= '0'; | |
220 | sample_out1 <= sample_out_zero; |
|
216 | all_channel_sample_out : FOR I IN ChanelsCount-1 DOWNTO 0 LOOP | |
221 | sample_out2 <= sample_out_zero; |
|
217 | all_bit : FOR J IN Sample_SZ-1 DOWNTO 0 LOOP | |
|
218 | sample_out1(I, J) <= '0'; | |||
|
219 | sample_out2(I, J) <= '0'; | |||
|
220 | END LOOP all_bit; | |||
|
221 | END LOOP all_channel_sample_out; | |||
222 | channel_done <= "00"; |
|
222 | channel_done <= "00"; | |
223 |
|
223 | |||
224 |
ELSIF clk' |
|
224 | ELSIF clk'EVENT AND clk = '1' THEN -- rising clock edge | |
225 | CASE state_channel_selection IS |
|
225 | CASE state_channel_selection IS | |
226 | WHEN IDLE => |
|
226 | WHEN IDLE => | |
227 |
CHANNEL_SEL |
|
227 | CHANNEL_SEL <= '0'; |
@@ -31,8 +31,9 ENTITY SYNC_VALID_BIT IS | |||||
31 | NB_FF_OF_SYNC : INTEGER := 2); |
|
31 | NB_FF_OF_SYNC : INTEGER := 2); | |
32 | PORT ( |
|
32 | PORT ( | |
33 | clk_in : IN STD_LOGIC; |
|
33 | clk_in : IN STD_LOGIC; | |
|
34 | rstn_in : IN STD_LOGIC; | |||
34 | clk_out : IN STD_LOGIC; |
|
35 | clk_out : IN STD_LOGIC; | |
35 |
rstn |
|
36 | rstn_out : IN STD_LOGIC; | |
36 | sin : IN STD_LOGIC; |
|
37 | sin : IN STD_LOGIC; | |
37 | sout : OUT STD_LOGIC); |
|
38 | sout : OUT STD_LOGIC); | |
38 | END SYNC_VALID_BIT; |
|
39 | END SYNC_VALID_BIT; | |
@@ -45,7 +46,7 BEGIN -- beh | |||||
45 | lpp_front_to_level_1: lpp_front_to_level |
|
46 | lpp_front_to_level_1: lpp_front_to_level | |
46 | PORT MAP ( |
|
47 | PORT MAP ( | |
47 | clk => clk_in, |
|
48 | clk => clk_in, | |
48 | rstn => rstn, |
|
49 | rstn => rstn_in, | |
49 | sin => sin, |
|
50 | sin => sin, | |
50 | sout => s_1); |
|
51 | sout => s_1); | |
51 |
|
52 | |||
@@ -54,14 +55,14 BEGIN -- beh | |||||
54 | NB_FF_OF_SYNC => NB_FF_OF_SYNC) |
|
55 | NB_FF_OF_SYNC => NB_FF_OF_SYNC) | |
55 | PORT MAP ( |
|
56 | PORT MAP ( | |
56 | clk => clk_out, |
|
57 | clk => clk_out, | |
57 | rstn => rstn, |
|
58 | rstn => rstn_out, | |
58 | A => s_1, |
|
59 | A => s_1, | |
59 | A_sync => s_2); |
|
60 | A_sync => s_2); | |
60 |
|
61 | |||
61 | lpp_front_detection_1: lpp_front_detection |
|
62 | lpp_front_detection_1: lpp_front_detection | |
62 | PORT MAP ( |
|
63 | PORT MAP ( | |
63 | clk => clk_out, |
|
64 | clk => clk_out, | |
64 | rstn => rstn, |
|
65 | rstn => rstn_out, | |
65 | sin => s_2, |
|
66 | sin => s_2, | |
66 | sout => sout); |
|
67 | sout => sout); | |
67 |
|
68 |
@@ -366,13 +366,25 Constant CLR_MAC_V0 : std_logic_vector(3 | |||||
366 | sout : OUT STD_LOGIC); |
|
366 | sout : OUT STD_LOGIC); | |
367 | END COMPONENT; |
|
367 | END COMPONENT; | |
368 |
|
368 | |||
|
369 | --COMPONENT SYNC_VALID_BIT | |||
|
370 | -- GENERIC ( | |||
|
371 | -- NB_FF_OF_SYNC : INTEGER); | |||
|
372 | -- PORT ( | |||
|
373 | -- clk_in : IN STD_LOGIC; | |||
|
374 | -- clk_out : IN STD_LOGIC; | |||
|
375 | -- rstn : IN STD_LOGIC; | |||
|
376 | -- sin : IN STD_LOGIC; | |||
|
377 | -- sout : OUT STD_LOGIC); | |||
|
378 | --END COMPONENT; | |||
|
379 | ||||
369 | COMPONENT SYNC_VALID_BIT |
|
380 | COMPONENT SYNC_VALID_BIT | |
370 | GENERIC ( |
|
381 | GENERIC ( | |
371 | NB_FF_OF_SYNC : INTEGER); |
|
382 | NB_FF_OF_SYNC : INTEGER); | |
372 | PORT ( |
|
383 | PORT ( | |
373 | clk_in : IN STD_LOGIC; |
|
384 | clk_in : IN STD_LOGIC; | |
|
385 | rstn_in : IN STD_LOGIC; | |||
374 | clk_out : IN STD_LOGIC; |
|
386 | clk_out : IN STD_LOGIC; | |
375 | rstn : IN STD_LOGIC; |
|
387 | rstn_out : IN STD_LOGIC; | |
376 | sin : IN STD_LOGIC; |
|
388 | sin : IN STD_LOGIC; | |
377 | sout : OUT STD_LOGIC); |
|
389 | sout : OUT STD_LOGIC); | |
378 | END COMPONENT; |
|
390 | END COMPONENT; |
@@ -47,8 +47,9 ENTITY apb_lfr_management IS | |||||
47 |
|
47 | |||
48 | PORT ( |
|
48 | PORT ( | |
49 |
clk25MHz : IN STD_LOGIC; |
|
49 | clk25MHz : IN STD_LOGIC; --! Clock | |
|
50 | resetn_25MHz : IN STD_LOGIC; --! Reset | |||
50 |
clk24_576MHz : IN STD_LOGIC; |
|
51 | clk24_576MHz : IN STD_LOGIC; --! secondary clock | |
51 |
resetn |
|
52 | resetn_24_576MHz : IN STD_LOGIC; --! Reset | |
52 |
|
53 | |||
53 | grspw_tick : IN STD_LOGIC; --! grspw signal asserted when a valid time-code is received |
|
54 | grspw_tick : IN STD_LOGIC; --! grspw signal asserted when a valid time-code is received | |
54 |
|
55 | |||
@@ -155,11 +156,11 BEGIN | |||||
155 |
|
156 | |||
156 | LFR_soft_rstn <= NOT r.LFR_soft_reset; |
|
157 | LFR_soft_rstn <= NOT r.LFR_soft_reset; | |
157 |
|
158 | |||
158 | PROCESS(resetn, clk25MHz) |
|
159 | PROCESS(resetn_25MHz, clk25MHz) | |
159 | VARIABLE paddr : STD_LOGIC_VECTOR(7 DOWNTO 2); |
|
160 | VARIABLE paddr : STD_LOGIC_VECTOR(7 DOWNTO 2); | |
160 | BEGIN |
|
161 | BEGIN | |
161 |
|
162 | |||
162 | IF resetn = '0' THEN |
|
163 | IF resetn_25MHz = '0' THEN | |
163 | Rdata <= (OTHERS => '0'); |
|
164 | Rdata <= (OTHERS => '0'); | |
164 | r.coarse_time_load <= (OTHERS => '0'); |
|
165 | r.coarse_time_load <= (OTHERS => '0'); | |
165 | r.soft_reset <= '0'; |
|
166 | r.soft_reset <= '0'; | |
@@ -324,8 +325,9 BEGIN | |||||
324 | NB_FF_OF_SYNC => 2) |
|
325 | NB_FF_OF_SYNC => 2) | |
325 | PORT MAP ( |
|
326 | PORT MAP ( | |
326 | clk_in => clk25MHz, |
|
327 | clk_in => clk25MHz, | |
|
328 | rstn_in => resetn_25MHz, | |||
327 | clk_out => clk24_576MHz, |
|
329 | clk_out => clk24_576MHz, | |
328 |
rstn |
|
330 | rstn_out => resetn_24_576MHz, | |
329 | sin => tick, |
|
331 | sin => tick, | |
330 | sout => new_timecode); |
|
332 | sout => new_timecode); | |
331 |
|
333 | |||
@@ -334,8 +336,9 BEGIN | |||||
334 | NB_FF_OF_SYNC => 2) |
|
336 | NB_FF_OF_SYNC => 2) | |
335 | PORT MAP ( |
|
337 | PORT MAP ( | |
336 | clk_in => clk25MHz, |
|
338 | clk_in => clk25MHz, | |
|
339 | rstn_in => resetn_25MHz, | |||
337 | clk_out => clk24_576MHz, |
|
340 | clk_out => clk24_576MHz, | |
338 |
rstn |
|
341 | rstn_out => resetn_24_576MHz, | |
339 | sin => coarsetime_reg_updated, |
|
342 | sin => coarsetime_reg_updated, | |
340 | sout => new_coarsetime); |
|
343 | sout => new_coarsetime); | |
341 |
|
344 | |||
@@ -344,8 +347,9 BEGIN | |||||
344 | NB_FF_OF_SYNC => 2) |
|
347 | NB_FF_OF_SYNC => 2) | |
345 | PORT MAP ( |
|
348 | PORT MAP ( | |
346 | clk_in => clk25MHz, |
|
349 | clk_in => clk25MHz, | |
|
350 | rstn_in => resetn_25MHz, | |||
347 | clk_out => clk24_576MHz, |
|
351 | clk_out => clk24_576MHz, | |
348 |
rstn |
|
352 | rstn_out => resetn_24_576MHz, | |
349 | sin => soft_reset, |
|
353 | sin => soft_reset, | |
350 | sout => soft_reset_sync); |
|
354 | sout => soft_reset_sync); | |
351 |
|
355 | |||
@@ -383,16 +387,17 BEGIN | |||||
383 | NB_FF_OF_SYNC => 2) |
|
387 | NB_FF_OF_SYNC => 2) | |
384 | PORT MAP ( |
|
388 | PORT MAP ( | |
385 | clk_in => clk24_576MHz, |
|
389 | clk_in => clk24_576MHz, | |
|
390 | rstn_in => resetn_24_576MHz, | |||
386 | clk_out => clk25MHz, |
|
391 | clk_out => clk25MHz, | |
387 |
rstn |
|
392 | rstn_out => resetn_25MHz, | |
388 | sin => time_new_49, |
|
393 | sin => time_new_49, | |
389 | sout => time_new); |
|
394 | sout => time_new); | |
390 |
|
395 | |||
391 |
|
396 | |||
392 |
|
397 | |||
393 | PROCESS (clk25MHz, resetn) |
|
398 | PROCESS (clk25MHz, resetn_25MHz) | |
394 | BEGIN -- PROCESS |
|
399 | BEGIN -- PROCESS | |
395 | IF resetn = '0' THEN -- asynchronous reset (active low) |
|
400 | IF resetn_25MHz = '0' THEN -- asynchronous reset (active low) | |
396 | fine_time_s <= (OTHERS => '0'); |
|
401 | fine_time_s <= (OTHERS => '0'); | |
397 | coarse_time_s <= (OTHERS => '0'); |
|
402 | coarse_time_s <= (OTHERS => '0'); | |
398 | ELSIF clk25MHz'EVENT AND clk25MHz = '1' THEN -- rising clock edge |
|
403 | ELSIF clk25MHz'EVENT AND clk25MHz = '1' THEN -- rising clock edge | |
@@ -404,7 +409,7 BEGIN | |||||
404 | END PROCESS; |
|
409 | END PROCESS; | |
405 |
|
410 | |||
406 |
|
411 | |||
407 | rstn_LFR_TM <= '0' WHEN resetn = '0' ELSE |
|
412 | rstn_LFR_TM <= '0' WHEN resetn_24_576MHz = '0' ELSE | |
408 | '0' WHEN soft_reset_sync = '1' ELSE |
|
413 | '0' WHEN soft_reset_sync = '1' ELSE | |
409 | '1'; |
|
414 | '1'; | |
410 |
|
415 | |||
@@ -433,7 +438,7 BEGIN | |||||
433 | -- HK |
|
438 | -- HK | |
434 | ----------------------------------------------------------------------------- |
|
439 | ----------------------------------------------------------------------------- | |
435 |
|
440 | |||
436 | PROCESS (clk25MHz, resetn) |
|
441 | PROCESS (clk25MHz, resetn_25MHz) | |
437 | CONSTANT BIT_FREQUENCY_UPDATE : INTEGER := 14; -- freq = 2^(16-BIT) |
|
442 | CONSTANT BIT_FREQUENCY_UPDATE : INTEGER := 14; -- freq = 2^(16-BIT) | |
438 |
|
|
443 | -- for each HK, the update frequency is freq/3 | |
439 |
|
|
444 | -- | |
@@ -441,7 +446,7 BEGIN | |||||
441 |
|
|
446 | -- 4Hz and update for each | |
442 |
|
|
447 | -- HK is 1.33Hz | |
443 | BEGIN -- PROCESS |
|
448 | BEGIN -- PROCESS | |
444 | IF resetn = '0' THEN -- asynchronous reset (active low) |
|
449 | IF resetn_25MHz = '0' THEN -- asynchronous reset (active low) | |
445 |
|
450 | |||
446 | r.HK_temp_0 <= (OTHERS => '0'); |
|
451 | r.HK_temp_0 <= (OTHERS => '0'); | |
447 | r.HK_temp_1 <= (OTHERS => '0'); |
|
452 | r.HK_temp_1 <= (OTHERS => '0'); | |
@@ -489,7 +494,7 BEGIN | |||||
489 | ) |
|
494 | ) | |
490 | PORT MAP( |
|
495 | PORT MAP( | |
491 | clk => clk25MHz, |
|
496 | clk => clk25MHz, | |
492 | rstn => resetn, |
|
497 | rstn => resetn_25MHz, | |
493 |
|
498 | |||
494 | pre => pre, |
|
499 | pre => pre, | |
495 | N => N, |
|
500 | N => N, | |
@@ -509,4 +514,4 BEGIN | |||||
509 | ); |
|
514 | ); | |
510 |
|
515 | |||
511 | DAC_CAL_EN <= DAC_CAL_EN_s; |
|
516 | DAC_CAL_EN <= DAC_CAL_EN_s; | |
512 |
END Behavioral; |
|
517 | END Behavioral; No newline at end of file |
@@ -39,8 +39,9 PACKAGE lpp_lfr_management IS | |||||
39 | NB_SECOND_DESYNC : INTEGER); |
|
39 | NB_SECOND_DESYNC : INTEGER); | |
40 | PORT ( |
|
40 | PORT ( | |
41 | clk25MHz : IN STD_LOGIC; |
|
41 | clk25MHz : IN STD_LOGIC; | |
|
42 | resetn_25MHz : IN STD_LOGIC; | |||
42 | clk24_576MHz : IN STD_LOGIC; |
|
43 | clk24_576MHz : IN STD_LOGIC; | |
43 |
resetn |
|
44 | resetn_24_576MHz : IN STD_LOGIC; | |
44 | grspw_tick : IN STD_LOGIC; |
|
45 | grspw_tick : IN STD_LOGIC; | |
45 | apbi : IN apb_slv_in_type; |
|
46 | apbi : IN apb_slv_in_type; | |
46 | apbo : OUT apb_slv_out_type; |
|
47 | apbo : OUT apb_slv_out_type; |
General Comments 0
You need to be logged in to leave comments.
Login now