]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Tue, 21 Aug 2012 22:58:11 +0000 (22:58 +0000)
committerhadeshyp <hadeshyp>
Tue, 21 Aug 2012 22:58:11 +0000 (22:58 +0000)
gbe2_ecp3/trb_net16_gbe_main_control.vhd

index 6fd5f3c0c79a227b7bf96c28831c62d6919d8adb..fb29ce548e7b0c3ffeeddf5004024abf16c908b9 100644 (file)
@@ -182,11 +182,14 @@ signal stat_addr                    : std_logic_vector(7 downto 0);
 
 signal unique_id                    : std_logic_vector(63 downto 0);
 
+
+signal nothing_sent                 : std_logic;
+signal nothing_sent_ctr             : std_logic_vector(31 downto 0);
+
 attribute syn_preserve : boolean;
 attribute syn_keep : boolean;
-attribute syn_keep of unique_id : signal is true;
-attribute syn_preserve of unique_id : signal is true;
-
+attribute syn_keep of unique_id, nothing_sent : signal is true;
+attribute syn_preserve of unique_id, nothing_sent : signal is true;
 
 begin
 
@@ -472,6 +475,27 @@ end process FLOW_MACHINE;
 TC_TRANSMIT_DATA_OUT <= '1' when (flow_current_state = TRANSMIT_DATA) else '0';
 TC_TRANSMIT_CTRL_OUT <= '1' when (flow_current_state = TRANSMIT_CTRL) else '0';
 
+NOTHING_SENT_CTR_PROC : process(CLK)
+begin
+       if rising_edge(CLK) then
+               if (RESET = '1' or TC_TRANSMIT_DONE_IN = '1') then
+                       nothing_sent_ctr <= (others => '0');
+               else
+                       nothing_sent_ctr <= nothing_sent_ctr + x"1";
+               end if;
+       end if;
+end process NOTHING_SENT_CTR_PROC;
+
+NOTHING_SENT_PROC : process(CLK)
+begin
+       if rising_edge(CLK) then
+               if (RESET = '1') then
+                       nothing_sent <= '0';
+               elsif (nothing_sent_ctr = x"ffff_ffff") then
+                       nothing_sent <= '1';
+               end if;
+       end if;
+end process NOTHING_SENT_PROC;
 
 --***********************
 --     LINK STATE CONTROL
@@ -613,7 +637,7 @@ begin
        end if;
 end process LINK_DOWN_CTR_PROC;
 
-MC_LINK_OK_OUT <= link_ok;
+MC_LINK_OK_OUT <= link_ok or nothing_sent;
 
 -- END OF LINK STATE CONTROL
 --*************