Skip to content

Commit

Permalink
[rtl] relax XBUS read-back gate timing
Browse files Browse the repository at this point in the history
  • Loading branch information
stnolting committed Apr 16, 2024
1 parent bb1acdf commit 57374b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rtl/core/neorv32_xbus.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ architecture neorv32_xbus_rtl of neorv32_xbus is

-- bus arbiter --
signal pending : std_ulogic;
signal bus_rw : std_ulogic;
signal timeout : std_ulogic;
signal timeout_cnt : std_ulogic_vector(index_size_f(TIMEOUT_VAL) downto 0);

Expand Down Expand Up @@ -94,6 +95,7 @@ begin
if (rstn_i = '0') then
pending <= '0';
timeout_cnt <= (others => '0');
bus_rw <= '0';
elsif rising_edge(clk_i) then
if (pending = '0') then -- idle, waiting for request
pending <= bus_req.stb;
Expand All @@ -104,6 +106,7 @@ begin
end if;
timeout_cnt <= std_ulogic_vector(unsigned(timeout_cnt) - 1);
end if;
bus_rw <= bus_req.rw;
end if;
end process arbiter;

Expand All @@ -121,7 +124,7 @@ begin
xbus_cyc_o <= bus_req.stb or pending;

-- response gating --
bus_rsp.data <= xbus_dat_i when (pending = '1') and (bus_req.rw = '0') else (others => '0'); -- no read-back if READ operation
bus_rsp.data <= xbus_dat_i when (pending = '1') and (bus_rw = '0') else (others => '0'); -- no read-back if READ operation
bus_rsp.ack <= xbus_ack_i when (pending = '1') else '0';
bus_rsp.err <= (xbus_err_i or timeout) when (pending = '1') else '0';

Expand Down

0 comments on commit 57374b8

Please sign in to comment.