Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data_offload: Second attempt at resolving issues with oversized TX transactions #781

Merged
merged 2 commits into from
Oct 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions library/data_offload/data_offload_fsm.v
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module data_offload_fsm #(
output reg wr_resetn_out,
input wr_valid_in,
output wr_valid_out,
output reg wr_ready,
output wr_ready,
output reg [WR_ADDRESS_WIDTH-1:0] wr_addr,
input wr_last,
input [WR_DATA_WIDTH/8-1:0] wr_tkeep,
Expand Down Expand Up @@ -259,12 +259,13 @@ module data_offload_fsm #(
end

always @(posedge wr_clk) begin
wr_ready_d <= wr_ready;
// flush out the DMA if the transfer is bigger than the storage size
wr_ready <= ((wr_fsm_state == WR_WRITE_TO_MEM) ||
((wr_fsm_state == WR_WAIT_TO_END) && wr_ready_d && !(wr_valid_in && wr_last))) ? 1'b1 : 1'b0;
wr_ready_d <= wr_ready && !(wr_valid_in && wr_last);
end

// flush out the DMA if the transfer is bigger than the storage size
assign wr_ready = ((wr_fsm_state == WR_WRITE_TO_MEM) ||
(TX_OR_RXN_PATH && ((wr_fsm_state == WR_WAIT_TO_END) && wr_ready_d))) ? 1'b1 : 1'b0;

// write control
assign wr_valid_out = (wr_fsm_state == WR_WRITE_TO_MEM) & wr_valid_in;

Expand Down