Skip to content
Snippets Groups Projects
Commit 5ad6566a authored by Tomasz Wlostowski's avatar Tomasz Wlostowski
Browse files

gc_glitch_filt: fix comparisons to make tri-stated I2C bus work on a simulation

parent ae5ff9aa
Branches
Tags
No related merge requests found
...@@ -104,9 +104,9 @@ begin ...@@ -104,9 +104,9 @@ begin
if rising_edge(clk_i) then if rising_edge(clk_i) then
if (rst_n_i = '0') then if (rst_n_i = '0') then
dat_o <= '0'; dat_o <= '0';
elsif (glitch_filt = (glitch_filt'range => '1')) then elsif (unsigned(glitch_filt) = (glitch_filt'range => '1')) then
dat_o <= '1'; dat_o <= '1';
elsif (glitch_filt = (glitch_filt'range => '0')) then elsif (unsigned(glitch_filt) = (glitch_filt'range => '0')) then
dat_o <= '0'; dat_o <= '0';
end if; end if;
end if; end if;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment