Skip to content
Snippets Groups Projects
Commit abcd6a7c authored by BRONES Romain's avatar BRONES Romain
Browse files

fix: Add rising edge filter on PPS

* Sometimes 0 were read on the AXI interface. Hopefully this fixes this.
parent 868e8f6b
No related branches found
No related tags found
No related merge requests found
...@@ -84,6 +84,8 @@ architecture rtl of combpm_protocol_electron is ...@@ -84,6 +84,8 @@ architecture rtl of combpm_protocol_electron is
signal packet : t_bpmpacket; signal packet : t_bpmpacket;
signal m_axi_tvalid : std_logic; signal m_axi_tvalid : std_logic;
signal pps_r : std_logic;
begin begin
...@@ -287,8 +289,12 @@ begin ...@@ -287,8 +289,12 @@ begin
last_cnt_seq_r <= (others => '0'); last_cnt_seq_r <= (others => '0');
seq_discontinuity <= '0'; seq_discontinuity <= '0';
cnt_seq_mismatch <= '0'; cnt_seq_mismatch <= '0';
pps_r <= '0';
elsif rising_edge(clk) then elsif rising_edge(clk) then
-- Register for rising edge filter
pps_r <= pps;
if soft_reset = '1' then if soft_reset = '1' then
cnt_frame_seq_r <= (others => '0'); cnt_frame_seq_r <= (others => '0');
cnt_valid_r <= (others => '0'); cnt_valid_r <= (others => '0');
...@@ -313,7 +319,7 @@ begin ...@@ -313,7 +319,7 @@ begin
end if; end if;
-- Rate counter -- Rate counter
if pps = '1' then if pps = '1' and pps_r = '0' then
frame_valid_rate <= std_logic_vector(rate_valid_r); frame_valid_rate <= std_logic_vector(rate_valid_r);
frame_invalid_rate <= std_logic_vector(rate_invalid_r); frame_invalid_rate <= std_logic_vector(rate_invalid_r);
rate_valid_r <= (others => '0'); rate_valid_r <= (others => '0');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment