Skip to content

Commit

Permalink
axi_sim_mem: Keep R response stable while not accepted
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelRiedel authored and andreaskurth committed Mar 9, 2022
1 parent e8a48f6 commit be922cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed

### Fixed
- `axi_sim_mem`: Keep R response stable while not accepted.


## 0.34.0 - 2022-03-09
Expand Down
16 changes: 9 additions & 7 deletions src/axi_sim_mem.sv
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@ module axi_sim_mem #(
axi_rsp_o.r = r_beat;
axi_rsp_o.r_valid = 1'b1;
#(AcqDelay - ApplDelay);
if (axi_req_i.r_ready) begin
if (r_beat.last) begin
r_cnt = 0;
void'(ar_queue.pop_front());
end else begin
r_cnt++;
end
while (!axi_req_i.r_ready) begin
@(posedge clk_i);
#(AcqDelay);
end
if (r_beat.last) begin
r_cnt = 0;
void'(ar_queue.pop_front());
end else begin
r_cnt++;
end
end
end
Expand Down

0 comments on commit be922cc

Please sign in to comment.