Commit 16de3087 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

fabric: xwb_fabric_(sink/source): WB interface bugfixes

parent 49ebab20
......@@ -6,7 +6,7 @@
-- Author : Tomasz Wlostowski
-- Company : CERN BE-CO-HT
-- Created : 2012-01-16
-- Last update: 2012-01-17
-- Last update: 2012-01-22
-- Platform :
-- Standard : VHDL'93
-------------------------------------------------------------------------------
......@@ -160,7 +160,7 @@ begin -- rtl
post_data <= fout_reg(15 downto 0);
post_addr <= fout_reg(17 downto 16);
post_sof <= fout_reg(21) and rd_d0 and q_valid;
post_sof <= fout_reg(21) and rd_d0; --and q_valid;
post_dvalid <= fout_reg(18);
......
......@@ -42,6 +42,7 @@ architecture rtl of xwb_fabric_source is
signal post_dvalid, post_eof, post_bytesel, post_sof : std_logic;
signal err_status : t_wrf_status_reg;
signal cyc_int : std_logic;
begin -- rtl
......@@ -81,19 +82,20 @@ begin -- rtl
begin
if rising_edge(clk_i) then
if rst_n_i = '0' then
src_o.cyc <= '0';
cyc_int <= '0';
else
if(src_i.stall = '0') then
if(src_i.stall = '0' and q_valid = '1') then
if(post_sof = '1')then
src_o.cyc <= '1';
cyc_int <= '1';
elsif(post_eof = '1') then
src_o.cyc <= '0';
cyc_int <= '0';
end if;
end if;
end if;
end if;
end process;
src_o.cyc <= cyc_int or post_sof;
src_o.we <= '1';
src_o.stb <= post_dvalid and q_valid;
src_o.sel <= '1' & not fout(19);
......@@ -163,7 +165,7 @@ architecture wrapper of wb_fabric_source is
begin -- wrapper
U_Wrapped_Source: xwb_fabric_source
U_Wrapped_Source : xwb_fabric_source
port map (
clk_i => clk_i,
rst_n_i => rst_n_i,
......
Markdown is supported
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