##// END OF EJS Templates
Remove arbitration in front of FFT based on Pong Status...
pellion -
r384:328a814d7018 (MINI-LFR) WFP_MS-0-1-20 JC
parent child
Show More
@@ -428,7 +428,7 BEGIN -- beh
428 428 pirq_ms => 6,
429 429 pirq_wfp => 14,
430 430 hindex => 2,
431 top_lfr_version => X"000112") -- aa.bb.cc version
431 top_lfr_version => X"000114") -- aa.bb.cc version
432 432 PORT MAP (
433 433 clk => clk_25,
434 434 rstn => reset,
@@ -234,8 +234,13 ARCHITECTURE Behavioral OF lpp_lfr_ms IS
234 234 SIGNAL status_component_fifo_0_end : STD_LOGIC;
235 235 SIGNAL status_component_fifo_1_end : STD_LOGIC;
236 236 -----------------------------------------------------------------------------
237 SIGNAL ping_npong : STD_LOGIC;
238 SIGNAL sample_load_reg : STD_LOGIC;
237 SIGNAL fft_ongoing_counter : STD_LOGIC_VECTOR(1 DOWNTO 0);
238
239 SIGNAL fft_ready_reg : STD_LOGIC;
240 SIGNAL fft_ready_rising_down : STD_LOGIC;
241
242 SIGNAL sample_load_reg : STD_LOGIC;
243 SIGNAL sample_load_rising_down : STD_LOGIC;
239 244
240 245 BEGIN
241 246
@@ -476,7 +481,8 BEGIN
476 481 -- FSM LOAD FFT
477 482 -----------------------------------------------------------------------------
478 483
479 sample_ren <= sample_ren_s WHEN ping_npong = fft_pong AND sample_load = '1' ELSE
484 sample_ren <= (OTHERS => '1') WHEN fft_ongoing_counter = "10" ELSE
485 sample_ren_s WHEN sample_load = '1' ELSE
480 486 (OTHERS => '1');
481 487
482 488 PROCESS (clk, rstn)
@@ -551,8 +557,7 BEGIN
551 557 END IF;
552 558 END PROCESS;
553 559
554 -- sample_valid <= sample_valid_r AND sample_load;
555 sample_valid <= sample_valid_r AND sample_load WHEN ping_npong = fft_pong ELSE '0';
560 sample_valid <= '0' WHEN fft_ongoing_counter = "10" ELSE sample_valid_r AND sample_load;
556 561
557 562 sample_data <= sample_rdata(16*1-1 DOWNTO 16*0) WHEN next_state_fsm_load_FFT = FIFO_1 ELSE
558 563 sample_rdata(16*2-1 DOWNTO 16*1) WHEN next_state_fsm_load_FFT = FIFO_2 ELSE
@@ -577,27 +582,46 BEGIN
577 582 fft_data_valid => fft_data_valid,
578 583 fft_ready => fft_ready);
579 584
580 observation_vector_0(11 DOWNTO 0) <= "0000" & --11 10 9 8
581 sample_load_reg & --7
582 ping_npong & --6
583 fft_ready & --5
584 fft_data_valid & --4
585 fft_pong & --3
586 sample_load & --2
587 fft_read & --1
588 sample_valid; --0
585 observation_vector_0(11 DOWNTO 0) <= "00" & --11 10
586 fft_ongoing_counter & --9 8
587 sample_load_rising_down & --7
588 fft_ready_rising_down & --6
589 fft_ready & --5
590 fft_data_valid & --4
591 fft_pong & --3
592 sample_load & --2
593 fft_read & --1
594 sample_valid; --0
589 595
590 596 -----------------------------------------------------------------------------
597 fft_ready_rising_down <= fft_ready_reg AND NOT fft_ready;
598 sample_load_rising_down <= sample_load_reg AND NOT sample_load;
599
591 600 PROCESS (clk, rstn)
592 601 BEGIN
593 602 IF rstn = '0' THEN
594 ping_npong <= '0';
603 fft_ready_reg <= '0';
595 604 sample_load_reg <= '0';
605
606 fft_ongoing_counter <= "00";
596 607 ELSIF clk'event AND clk = '1' THEN
597 sample_load_reg <= sample_load;
598 IF sample_load_reg = '1' AND sample_load = '0' THEN
599 ping_npong <= NOT ping_npong;
608 fft_ready_reg <= fft_ready;
609 sample_load_reg <= sample_load;
610
611 IF fft_ready_rising_down = '1' AND sample_load_rising_down = '0' THEN
612 CASE fft_ongoing_counter IS
613 WHEN "01" => fft_ongoing_counter <= "00";
614 WHEN "10" => fft_ongoing_counter <= "01";
615 WHEN OTHERS => NULL;
616 END CASE;
617 ELSIF fft_ready_rising_down = '0' AND sample_load_rising_down = '1' THEN
618 CASE fft_ongoing_counter IS
619 WHEN "00" => fft_ongoing_counter <= "01";
620 WHEN "01" => fft_ongoing_counter <= "10";
621 WHEN OTHERS => NULL;
622 END CASE;
600 623 END IF;
624
601 625 END IF;
602 626 END PROCESS;
603 627
@@ -969,4 +993,4 BEGIN
969 993
970 994 -----------------------------------------------------------------------------
971 995
972 END Behavioral; No newline at end of file
996 END Behavioral;
General Comments 0
You need to be logged in to leave comments. Login now