]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Wed, 29 Sep 2010 14:44:59 +0000 (14:44 +0000)
committerhadeshyp <hadeshyp>
Wed, 29 Sep 2010 14:44:59 +0000 (14:44 +0000)
special/handler_lvl1.vhd

index 12ac6102580bdbc12c2c96abc73bff5fe0875394..e4ed5ce3645509dd01664eb20740792ec754fe2d 100644 (file)
@@ -150,12 +150,15 @@ THE_SYNC_PROC: process( CLOCK )
 begin
        if( rising_edge(CLOCK) ) then
                -- timeout_found <= next_timeout_found;  -- gk 28.09.10
-               trg_num_match <= next_trg_num_match;
+               if (trg_rel = '1') then
+                       trg_num_match <= next_trg_num_match;
+               end if;
+
                error_pattern <= next_error_pattern;
        end if;
 end process THE_SYNC_PROC;
 
----------------------------------------------------------------------------
+--------------------------------------------------------------------------
 -- fake timing trigger has only 10ns length!
 ---------------------------------------------------------------------------
 THE_PULSE_STRETCH: pulse_stretch
@@ -545,23 +548,25 @@ end process THE_MEASURED_DELAY_PROC;
 STAT_PROC : process(CLOCK)
 begin
        if rising_edge(CLOCK) then
+               STATUS_OUT(63 downto 48)  <= std_logic_vector(trigger_length);
+               STATUS_OUT(47 downto 32)  <= std_logic_vector(trigger_edge_count);
+               STATUS_OUT(31 downto 16)  <= lvl1_delay;
+               STATUS_OUT(15)            <= timing_trg_found;
+               STATUS_OUT(14)            <= data_valid;
+               STATUS_OUT(12)            <= not trg_num_match;
+               STATUS_OUT(11)            <= timeout_found;
+               STATUS_OUT(10 downto 8)   <= (others => '0');
+               STATUS_OUT(3 downto 0)    <= bsm_x;
+               
                if (RESET = '1') or (RESET_STATS_IN = '1') then
-                       STATUS_OUT <= (others => '0');
+                       STATUS_OUT(7 downto 4) <= (others => '0');
+                       STATUS_OUT(13) <= '0';
                elsif (val_trg = '1') or (invalid_trg = '1') then
-                       STATUS_OUT(63 downto 48)  <= std_logic_vector(trigger_length);
-                       STATUS_OUT(47 downto 32)  <= std_logic_vector(trigger_edge_count);
-                       STATUS_OUT(31 downto 16)  <= lvl1_delay;
-                       STATUS_OUT(15)            <= timing_trg_found;
-                       STATUS_OUT(14)            <= data_valid;
                        STATUS_OUT(13)            <= mult_trg_found;
-                       STATUS_OUT(12)            <= trg_num_match;
-                       STATUS_OUT(11)            <= timeout_found;
-                       STATUS_OUT(10 downto 8)   <= (others => '0');
                        STATUS_OUT(7)             <= wrong_polarity;
                        STATUS_OUT(6)             <= spurious_trg;
                        STATUS_OUT(5)             <= missing_tmg;
                        STATUS_OUT(4)             <= short_tmg_trg;
-                       STATUS_OUT(3 downto 0)    <= bsm_x;
                end if;
        end if;
 end process STAT_PROC;