##// END OF EJS Templates
MINI LFR - WFP&MS - 0.1.6...
pellion -
r330:420e00cb22ab (MINI-LFR) WFP_MS-0-1-6 JC
parent child
Show More
@@ -310,11 +310,11 BEGIN -- beh
310 310 pindex => 6,
311 311 paddr => 6,
312 312 pmask => 16#fff#,
313 pirq => 12,
314 nb_wait_pediod => 375) -- (49.152/2) /2^16 = 375
313 FIRST_DIVISION => 374, -- ((49.152/2) /2^16) - 1 = 375 - 1 = 374
314 NB_SECOND_DESYNC => 60) -- 60 secondes of desynchronization before CoarseTime's MSB is Set
315 315 PORT MAP (
316 316 clk25MHz => clk_25,
317 clk49_152MHz => clk_24, -- 49.152MHz/2
317 clk24_576MHz => clk_24, -- 49.152MHz/2
318 318 resetn => reset,
319 319 grspw_tick => swno.tickout,
320 320 apbi => apbi_ext,
@@ -425,7 +425,7 BEGIN -- beh
425 425 pirq_ms => 6,
426 426 pirq_wfp => 14,
427 427 hindex => 2,
428 top_lfr_version => X"000105") -- aa.bb.cc version
428 top_lfr_version => X"000106") -- aa.bb.cc version
429 429 PORT MAP (
430 430 clk => clk_25,
431 431 rstn => reset,
@@ -577,4 +577,4 BEGIN -- beh
577 577 END IF;
578 578 END PROCESS;
579 579
580 END beh;
580 END beh; No newline at end of file
@@ -142,7 +142,7 vcom_lpp:
142 142 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_positive_detection.vhd
143 143 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/SYNC_VALID_BIT.vhd
144 144 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/RR_Arbiter_4.vhd
145 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/counter.vhd
145 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/general_counter.vhd
146 146 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/lpp_lfr_time_management.vhd
147 147 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/apb_lfr_time_management.vhd
148 148 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/lfr_time_management.vhd
@@ -3,7 +3,7 USE IEEE.STD_LOGIC_1164.ALL;
3 3 USE IEEE.std_logic_arith.ALL;
4 4 USE IEEE.std_logic_unsigned.ALL;
5 5
6 ENTITY counter IS
6 ENTITY general_counter IS
7 7
8 8 GENERIC (
9 9 CYCLIC : STD_LOGIC := '1';
@@ -23,9 +23,9 ENTITY counter IS
23 23 counter : OUT STD_LOGIC_VECTOR(NB_BITS_COUNTER-1 DOWNTO 0)
24 24 );
25 25
26 END counter;
26 END general_counter;
27 27
28 ARCHITECTURE beh OF counter IS
28 ARCHITECTURE beh OF general_counter IS
29 29 SIGNAL counter_s : STD_LOGIC_VECTOR(NB_BITS_COUNTER-1 DOWNTO 0);
30 30
31 31 BEGIN -- beh
@@ -33,7 +33,7 USE IEEE.NUMERIC_STD.ALL;
33 33
34 34 PACKAGE general_purpose IS
35 35
36 COMPONENT counter
36 COMPONENT general_counter
37 37 GENERIC (
38 38 CYCLIC : STD_LOGIC;
39 39 NB_BITS_COUNTER : INTEGER);
@@ -22,4 +22,4 lpp_front_detection.vhd
22 22 lpp_front_positive_detection.vhd
23 23 SYNC_VALID_BIT.vhd
24 24 RR_Arbiter_4.vhd
25 counter.vhd
25 general_counter.vhd
@@ -38,7 +38,7 ARCHITECTURE beh OF coarse_time_counter
38 38 --CONSTANT NB_SECOND_DESYNC : INTEGER := 4; -- TODO : 60
39 39 BEGIN -- beh
40 40
41 counter_1 : counter
41 counter_1 : general_counter
42 42 GENERIC MAP (
43 43 CYCLIC => '1',
44 44 NB_BITS_COUNTER => 31)
@@ -55,7 +55,7 BEGIN -- beh
55 55
56 56 add1_bit31 <= '1' WHEN fsm_desync = '1' AND FT_max = '1' ELSE '0';
57 57
58 counter_2 : counter
58 counter_2 : general_counter
59 59 GENERIC MAP (
60 60 CYCLIC => '0',
61 61 NB_BITS_COUNTER => 6)
@@ -40,7 +40,7 BEGIN -- beh
40 40
41 41
42 42
43 counter_1 : counter
43 counter_1 : general_counter
44 44 GENERIC MAP (
45 45 CYCLIC => '1',
46 46 NB_BITS_COUNTER => 9)
@@ -56,7 +56,7 BEGIN -- beh
56 56
57 57 new_ft <= '1' WHEN new_ft_counter = STD_LOGIC_VECTOR(to_unsigned(FIRST_DIVISION, 9)) ELSE '0';
58 58
59 counter_2 : counter
59 counter_2 : general_counter
60 60 GENERIC MAP (
61 61 CYCLIC => '1',
62 62 NB_BITS_COUNTER => 16)
@@ -115,8 +115,7 ARCHITECTURE Behavioral OF lpp_lfr_ms_fs
115 115 WRITE_FINE_TIME,
116 116 TRASH_FIFO,
117 117 SEND_DATA,
118 WAIT_DATA_ACK,
119 CHECK_LENGTH
118 WAIT_DATA_ACK
120 119 );
121 120 SIGNAL state : state_DMAWriteBurst; -- := IDLE;
122 121
@@ -149,6 +148,9 ARCHITECTURE Behavioral OF lpp_lfr_ms_fs
149 148 -----------------------------------------------------------------------------
150 149 SIGNAL debug_reg_s : STD_LOGIC_VECTOR(31 DOWNTO 0);
151 150 SIGNAL fine_time_reg : STD_LOGIC_VECTOR(15 DOWNTO 0);
151
152 -----------------------------------------------------------------------------
153 SIGNAL log_empty_fifo : STD_LOGIC;
152 154
153 155 BEGIN
154 156
@@ -199,6 +201,8 BEGIN
199 201
200 202 debug_reg_s(31 DOWNTO 0) <= (OTHERS => '0');
201 203
204 log_empty_fifo <= '0';
205
202 206 ELSIF HCLK'EVENT AND HCLK = '1' THEN -- rising clock edge
203 207 debug_reg_s(31 DOWNTO 10) <= (OTHERS => '0');
204 208
@@ -227,6 +231,7 BEGIN
227 231 component_type_pre <= component_type;
228 232 state <= CHECK_COMPONENT_TYPE;
229 233 END IF;
234 log_empty_fifo <= '0';
230 235
231 236 WHEN CHECK_COMPONENT_TYPE =>
232 237 debug_reg_s(2 DOWNTO 0) <= "001";
@@ -330,7 +335,7 BEGIN
330 335 header_ack <= '0';
331 336 debug_reg_s(2 DOWNTO 0) <= "101";
332 337
333 IF fifo_empty = '1' THEN
338 IF fifo_empty = '1' OR log_empty_fifo = '1' THEN
334 339 state <= IDLE;
335 340 IF component_type = "1110" THEN --"1110" -- JC
336 341 CASE matrix_type IS
@@ -349,6 +354,8 BEGIN
349 354 END IF;
350 355
351 356 WHEN WAIT_DATA_ACK =>
357 log_empty_fifo <= fifo_empty OR log_empty_fifo;
358
352 359 debug_reg_s(2 DOWNTO 0) <= "110";
353 360
354 361 component_send <= '0';
@@ -357,13 +364,14 BEGIN
357 364 state <= SEND_DATA;
358 365 ELSIF component_send_ko = '1' THEN
359 366 error_anticipating_empty_fifo <= '0';
360 state <= TRASH_FIFO;
367 state <= TRASH_FIFO;
361 368 END IF;
362 369
363 WHEN CHECK_LENGTH =>
364 component_send <= '0';
365 debug_reg_s(2 DOWNTO 0) <= "111";
366 state <= IDLE;
370
371 --WHEN CHECK_LENGTH =>
372 -- component_send <= '0';
373 -- debug_reg_s(2 DOWNTO 0) <= "111";
374 -- state <= IDLE;
367 375
368 376 WHEN OTHERS => NULL;
369 377 END CASE;
General Comments 0
You need to be logged in to leave comments. Login now