]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
first running version
authorIngo Froehlich <ingo@nomail.fake>
Mon, 16 Jul 2018 12:06:08 +0000 (14:06 +0200)
committerIngo Froehlich <ingo@nomail.fake>
Mon, 16 Jul 2018 12:06:08 +0000 (14:06 +0200)
media_interfaces/sync/rx_control.vhd

index bf94a4818de032d7186791874ac565c8ab54652b..0d2c98cf77e7822c251c786af105fda0ffdcd11e 100644 (file)
@@ -99,7 +99,7 @@ signal good_pos_counter    : std_logic_vector(7 downto 0) := (others => '0');
 signal num_pakets          : unsigned(3 downto 0) := (others => '0');
 
 signal use_crc             : std_logic := '0';
---signal next_use_crc        : std_logic := '0';
+signal last_use_crc        : std_logic := '0';
 signal load_use_crc        : std_logic := '0';
 --signal last_load_use_crc   : std_logic := '0';
 signal disable_crc         : std_logic := '0';
@@ -130,7 +130,7 @@ RX_PACKET_NUMBER_OUT <= rx_packet_num;
 
 last_ct_fifo_read  <= ct_fifo_read  when rising_edge(CLK_100);
 last_ct_fifo_empty <= ct_fifo_empty when rising_edge(CLK_100);
---last_load_use_crc  <= load_use_crc  when rising_edge(CLK_100);
+last_use_crc  <= use_crc  when rising_edge(CLK_100);
 --use_crc  <= next_use_crc when rising_edge(CLK_100);
 
 process begin
@@ -146,15 +146,15 @@ process begin
     end if;    
   end if;
 
-  if use_crc = '0' then  --check disabled, just dummy counter
-    if buf_rx_write_out = '1' then
-      good_pos_counter <= std_logic_vector(unsigned(good_pos_counter)+1);
-    end if;
+  if last_use_crc = '0' and buf_rx_write_out = '1' then
+    good_pos_counter <= std_logic_vector(unsigned(good_pos_counter)+1);
   elsif pulse_good_100 = '1' then
-    got_pulse_good <= '1';
     good_pos_counter <= std_logic_vector(unsigned(good_pos_counter)+5);
   end if;
-  
+    
+  if pulse_good_100 = '1' then
+    got_pulse_good <= '1';
+  end if;
   if pulse_bad_100 = '1' then
     got_pulse_bad  <= '1';
   end if;