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