phy: rx: Introduce simple glitch filter
This commit is contained in:
parent
08bd5f166b
commit
5d6df0219b
@ -39,6 +39,7 @@ begin
|
|||||||
-- Signal conditioning
|
-- Signal conditioning
|
||||||
signal rx : std_logic;
|
signal rx : std_logic;
|
||||||
signal rx_last : std_logic;
|
signal rx_last : std_logic;
|
||||||
|
signal rx_last_static : std_logic;
|
||||||
signal rx_edge : std_logic;
|
signal rx_edge : std_logic;
|
||||||
|
|
||||||
-- Bit recovery
|
-- Bit recovery
|
||||||
@ -61,11 +62,23 @@ begin
|
|||||||
data_out => rx
|
data_out => rx
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Edge detector for RX
|
-- Edge detector for RX (+glitch filter)
|
||||||
rx_last <= '0' when rst
|
edgedet : process(clk, rst) is
|
||||||
else rx when rising_edge(clk)
|
begin
|
||||||
;
|
if rst then
|
||||||
rx_edge <= rx_last xor rx;
|
rx_last <= '0';
|
||||||
|
rx_last_static <= '0';
|
||||||
|
rx_edge <= '0';
|
||||||
|
|
||||||
|
elsif rising_edge(clk) then
|
||||||
|
rx_edge <= '0';
|
||||||
|
if (rx_last = rx) then
|
||||||
|
rx_edge <= rx_last_static xor rx;
|
||||||
|
rx_last_static <= rx;
|
||||||
|
end if;
|
||||||
|
rx_last <= rx;
|
||||||
|
end if;
|
||||||
|
end process edgedet;
|
||||||
|
|
||||||
demanchestizer : block
|
demanchestizer : block
|
||||||
-- Transition detector
|
-- Transition detector
|
||||||
|
Loading…
Reference in New Issue
Block a user