Skip to content

Commit

Permalink
axi_test:rand_axi_lite_slave: R response field is now random
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfgang Rönninger authored and bluewww committed Apr 25, 2023
1 parent 67d7db9 commit 41fe87e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Move `mem_to_banks` to `common_cells`.
- Update `common_cells` from version `v1.26.0` to `v1.27.0`.
- `axi_pkg`: Define `localparams` to define AXI type widths.
- `axi_test:axi_rand_lite_slave`: R response field is now random.

### Fixed

Expand Down
12 changes: 7 additions & 5 deletions src/axi_test.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1729,15 +1729,17 @@ package axi_test;

task automatic send_rs();
forever begin
automatic logic rand_success;
automatic addr_t ar_addr;
automatic data_t r_data;
automatic logic rand_success;
automatic addr_t ar_addr;
automatic data_t r_data;
automatic axi_pkg::resp_t r_resp;
wait (ar_queue.size() > 0);
ar_addr = this.ar_queue.pop_front();
rand_success = std::randomize(r_data); assert(rand_success);
rand_success = std::randomize(r_resp); assert(rand_success);
rand_wait(R_MIN_WAIT_CYCLES, R_MAX_WAIT_CYCLES);
$display("%0t %s> Send R with DATA: %h", $time(), this.name, r_data);
this.drv.send_r(r_data, axi_pkg::RESP_OKAY);
$display("%0t %s> Send R with DATA: %h RESP: %h", $time(), this.name, r_data, r_resp);
this.drv.send_r(r_data, r_resp);
end
endtask : send_rs

Expand Down

0 comments on commit 41fe87e

Please sign in to comment.