port (
clk_in : in std_logic; -- clk in synchronous to serdes rx clock
reset_in : in std_logic; -- reset
+ reset_counter : in std_logic; -- reset for comma counter
comma_in : in std_logic; -- comma word detected by serdes
cverr_in : in std_logic; -- serdes data error in
link_sync_out : out std_logic; -- realign to link out pulse low to high to start word alignminment
COUNTWIDTH => 32)
port map (
clk => clk_in,
- reset => reset_in,
+ reset => reset_counter,
inc_en => inc_en_i,
counter => comma_counter_gray);
else
link_sync_i <= '1';
-- look for incoming comma characters
+ if reset_counter = '1' then
+ comma_counter <= 0;
+ end if;
if comma_in = '1' and cverr_in = '0' then
comma_seen <= '1';
comma_counter <= comma_counter + 1;
port(
clk : in std_logic;
reset : in std_logic;
+ reset_counter : in std_logic;
data_in : in std_logic_vector(7 downto 0);
komma : in std_logic;
valid : in std_logic;
port (
clk_in : in std_logic;
reset_in : in std_logic;
+ reset_counter : in std_logic;
comma_in : in std_logic;
cverr_in : in std_logic;
link_sync_out : out std_logic;
sync_output => rx_data_sync((i + 1)*8 - 1 downto i*8));
end generate rx_data_gen;
-
-- synchronize status signals into trb clock domain
sync_los_low : InputSynchronizer
generic map(depth => 2, width => 4)
port map (
clk_in => clkrx(j),
reset_in => rst,
+ reset_counter => reset_counters_i,
comma_in => rx_komma_sync(j),
cverr_in => rx_dataerror_sync(j),
link_sync_out => align_en_i(j),
port map (
clk => clkrx(j),
reset => rst,
+ reset_counter => reset_counters_i,
data_in => rx_data_sync((j + 1)*8 - 1 downto j*8),
komma => rx_komma_sync(j),
valid => unpacker_valid_i(j),
slv_ack_out <= '0';
slv_no_more_data_out <= '0';
slv_unknown_addr_out <= '0';
- reset_counters_i <= '0';
reset_quad_i <= '0';
reset_fifos_i <= '0';
if slv_write_in = '1' then
port(
clk : in std_logic; -- clk input
reset : in std_logic; -- reset input
+ reset_counter : in std_logic; -- reset error counter
data_in : in std_logic_vector(7 downto 0); -- 10b8b decoded data
komma : in std_logic; -- komma word indicator
valid : in std_logic; -- incoming data valid
COUNTWIDTH => 32)
port map (
clk => clk,
- reset => reset,
+ reset => reset_counter,
inc_en => inc_en_i,
counter => errorcounter_gray);
counter_seen <= '0';
data_mode <= '0';
else
+ if reset_counter = '1' then
+ errorcounter_i <= (others => '0');
+ end if;
+
link_flag_reg <= '0';
coarse_reg <= '0';
hit_reg <= '0';