Commit f5a7bea2 authored by Matthieu Cattin's avatar Matthieu Cattin

csr wishbone master takes stall into account. Should now be compatible with classic slaves.

parent c90f1f36
......@@ -419,7 +419,9 @@ begin
wishbone_current_state <= WB_WAIT_ACK;
when WB_WAIT_ACK =>
wb_stb_t <= '0';
if wb_stall_t = '0' then
wb_stb_t <= '0';
end if;
if (wb_ack_t = '1') then
-- for read cycles write read data to fifo
if (wb_we_t = '0') then
......
......@@ -528,7 +528,8 @@ begin
dummy_stat_reg_switch_i => dummy_stat_reg_switch
);
wb_stall(2 downto 1) <= "00";
wb_stall(1) <= '0' when wb_cyc(1) = '0' else not(wb_ack(1));
wb_stall(2) <= '0' when wb_cyc(2) = '0' else not(wb_ack(2));
dummy_stat_reg_1 <= X"DEADBABE";
dummy_stat_reg_2 <= X"BEEFFACE";
......
......@@ -148,10 +148,10 @@ begin
end process p_ack_mux;
-- Select stall line of the active peripheral
p_stall_mux : process (wb_stall_i, wb_periph_addr)
p_stall_mux : process (wb_stall_i, s_wb_periph_addr)
begin
if (to_integer(unsigned(wb_periph_addr)) < g_WB_SLAVES_NB) then
wbm_stall_o <= wb_stall_i(to_integer(unsigned(wb_periph_addr)));
if (to_integer(unsigned(s_wb_periph_addr)) < g_WB_SLAVES_NB) then
wbm_stall_o <= wb_stall_i(to_integer(unsigned(s_wb_periph_addr)));
else
wbm_stall_o <= '0';
end if;
......
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