diff --git a/modules/wishbone/wb_clock_crossing/xwb_clock_crossing.vhd b/modules/wishbone/wb_clock_crossing/xwb_clock_crossing.vhd index 0c8fcf02362109b4124c5e17a99409640fb17b27..a0591d6ba3e790a64643aa378b11ef3f3489a829 100644 --- a/modules/wishbone/wb_clock_crossing/xwb_clock_crossing.vhd +++ b/modules/wishbone/wb_clock_crossing/xwb_clock_crossing.vhd @@ -19,7 +19,10 @@ entity xwb_clock_crossing is master_clk_i : in std_logic; master_rst_n_i : in std_logic; master_i : in t_wishbone_master_in; - master_o : out t_wishbone_master_out); + master_o : out t_wishbone_master_out; + -- Flow control back-channel for acks + slave_ready_o : out std_logic; + slave_stall_i : in std_logic); end xwb_clock_crossing; architecture rtl of xwb_clock_crossing is @@ -192,7 +195,8 @@ begin ssend.DAT <= master_i.DAT; -- Slave clock domain: sFIFO -> slave - sr_en <= not sr_empty; + slave_ready_o <= not sr_empty; + sr_en <= not sr_empty and not slave_stall_i; slave_o.DAT <= srecv.DAT; slave_o.ACK <= srecv.ACK and slave_o_PUSH; slave_o.RTY <= srecv.RTY and slave_o_PUSH; diff --git a/modules/wishbone/wishbone_pkg.vhd b/modules/wishbone/wishbone_pkg.vhd index 11652f2c2453639b8932334abb7ad8fb41fc4cdb..7a832c3c75e94cf898b55e10b2a44008c7b8d5bc 100644 --- a/modules/wishbone/wishbone_pkg.vhd +++ b/modules/wishbone/wishbone_pkg.vhd @@ -414,7 +414,10 @@ package wishbone_pkg is master_clk_i : in std_logic; master_rst_n_i : in std_logic; master_i : in t_wishbone_master_in; - master_o : out t_wishbone_master_out); + master_o : out t_wishbone_master_out; + -- Flow control back-channel for acks + slave_ready_o : out std_logic; + slave_stall_i : in std_logic := '0'); end component; -- g_size is in words